Facets Modules Validate

Validate changed Facets modules: lint against all rules defined in rules.md AND run raptor dry-run. Auto-detects changed modules from git diff.

16 stars

Best use case

Facets Modules Validate is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Validate changed Facets modules: lint against all rules defined in rules.md AND run raptor dry-run. Auto-detects changed modules from git diff.

Teams using Facets Modules Validate should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/facets-modules-validate/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/facets-modules-validate/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/facets-modules-validate/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Facets Modules Validate Compares

Feature / AgentFacets Modules ValidateStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Validate changed Facets modules: lint against all rules defined in rules.md AND run raptor dry-run. Auto-detects changed modules from git diff.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Facets Modules Validation

**IMPORTANT:** This skill does TWO things: (1) validates modules against all rules in `rules.md` by reading and analyzing the module files directly, and (2) runs `raptor create iac-module --dry-run` for each module. Both checks must pass.

Validate changed Facets modules against the project's `rules.md` validation ruleset.

---

## Step 1: Determine which modules to validate

Identify the set of modules to validate, in priority order:

1. **If the user passed a module path as argument** → use that path directly
2. **If on a PR branch** (not `main`) → run `git diff origin/main --name-only` to get all changed files vs main, then extract unique module directories
3. **Otherwise** → run `git diff --name-only` (unstaged) and `git diff --cached --name-only` (staged) to get locally changed files, then extract unique module directories

**Extracting module paths:** A module directory is any directory that contains a `facets.yaml` file. For each changed file, walk up its path to find the nearest `facets.yaml`. The module path is that directory (e.g., `modules/datastore/postgres/aws-rds/1.0/`).

Deduplicate the list. If no modules are found, inform the user and stop.

Print the list of modules that will be validated before proceeding.

---

## Step 2: Read rules.md and module files

1. **Read `rules.md`** from the repo root — this contains all validation rules
2. **For each module**, read:
   - `facets.yaml`
   - All `.tf` files in that module directory (`variables.tf`, `main.tf`, `outputs.tf`, `locals.tf`, `versions.tf`, etc.)
   - The relevant **output type schemas** from `outputs/` based on the output types declared in `facets.yaml` outputs section (e.g., if output type is `@facets/eks`, check `outputs/eks/outputs.yaml`; if `@outputs/postgres`, check `outputs/postgres/outputs.yaml`)

---

## Step 3: Validate each module against applicable rules

For each module, check **every rule** from `rules.md` (RULE-001 through the last defined rule). Use the rule's category and description to determine if it applies to the module being validated:

- **Skip** rules whose category doesn't apply (e.g., skip "output schema" rules if the module has no output type schemas in `outputs/`)
- **Check** all applicable rules and record PASS/FAIL/SKIP with a brief finding

The rules in `rules.md` contain all the detail needed — category, description, and good/bad examples. Do NOT hardcode rule numbers or descriptions here; always read `rules.md` at validation time to pick up any newly added rules.

---

## Step 4: Run raptor dry-run validation

For each detected module, run:

```bash
export FACETS_PROFILE=1155708878 && raptor create iac-module -f <module-path> --dry-run
```

- If the raptor dry-run **fails due to security scan**, retry with `--skip-security-scan` but report the security findings to the user in a table
- If the raptor dry-run fails for other reasons (provider issues, schema errors, etc.), report the error
- Record each module's raptor result (PASS / FAIL + error details) for the final report

---

## Step 5: Report results

### Per-module report

For each validated module, output a report in this format:

```
## modules/datastore/postgres/aws-rds/1.0

| Rule | Status | Finding |
|------|--------|---------|
| RULE-001 | PASS | — |
| RULE-002 | PASS | — |
| RULE-003 | SKIP | No sample values to check |
| RULE-004 | FAIL | var.inputs uses `type = any` instead of explicit object type |
| RULE-005 | PASS | — |
| ... | ... | ... |
| RULE-024 | SKIP | No cloud resources with names |
| Raptor dry-run | PASS/FAIL | Result or error details |

X passed, Y failed, Z skipped.
```

**Status values:**
- **PASS** — Rule checked and satisfied
- **FAIL** — Rule checked and violation found (include specific finding)
- **SKIP** — Rule not applicable to this module (include brief reason)

### Summary (if multiple modules)

After all per-module reports, output a summary:

```
## Summary

| Module | Passed | Failed | Skipped |
|--------|--------|--------|---------|
| modules/datastore/postgres/aws-rds/1.0 | 18 | 2 | 4 |
| modules/service/aws/1.0 | 20 | 0 | 4 |
| **Total** | **38** | **2** | **8** |
```

If all modules pass, add a confirmation message. If any fail, list the critical failures that should be fixed before commit.

---

## Step 6: Recommend new rules (if applicable)

During validation, if you encounter any of the following that are NOT covered by existing rules in `rules.md`:
- A new anti-pattern seen across multiple modules
- A validation gap (something raptor catches but rules.md doesn't cover)
- A convention that modules follow inconsistently

Propose a new rule to the user in the standard format:
- Rule number: next available (RULE-025, RULE-026, etc.)
- Category, description, bad example, good example
- Do NOT modify rules.md automatically — present the proposal and wait for approval

Related Skills

firebase-development-validate

16
from diegosouzapw/awesome-omni-skill

This skill should be used when reviewing Firebase code against security model and best practices. Triggers on "review firebase", "check firebase", "validate", "audit firebase", "security review", "look at firebase code". Validates configuration, rules, architecture, and security.

dataverse-python-modules

16
from diegosouzapw/awesome-omni-skill

dataverse-python-modules guidelines Triggers on: **

aposd-designing-deep-modules

16
from diegosouzapw/awesome-omni-skill

Enforce Design-It-Twice workflow: generate 2-3 radically different approaches, compare them, then implement. Use when designing modules, APIs, or classes before implementation. Triggers on: design, create class, add module, implement feature, new service, API design, before implementing. Produces structured design document with approaches, comparison table, choice rationale, and depth check.

61-validate-lint-150

16
from diegosouzapw/awesome-omni-skill

[61] VALIDATE. Comprehensive code quality check combining ESLint, TypeScript compilation, and unused code detection. Runs full lint suite with detailed error reporting and fix suggestions. Use before commits, after major changes, or when ensuring code quality standards.

1k-patching-native-modules

16
from diegosouzapw/awesome-omni-skill

Patches native modules (expo-image, react-native, etc.) to fix native crashes or bugs.

validate-historical

16
from diegosouzapw/awesome-omni-skill

Validate historical data completeness and quality over date ranges

Validate with Database

16
from diegosouzapw/awesome-omni-skill

Connect to live PostgreSQL database to validate schema assumptions, compare pg_dump vs pgschema output, and query system catalogs interactively

lint-and-validate

16
from diegosouzapw/awesome-omni-skill

Automatic quality control, linting, and static analysis procedures. Use after every code modification to ensure syntax correctness and project standards. Triggers onKeywords: lint, format, check, validate, types, static analysis.

api-validate

16
from diegosouzapw/awesome-omni-skill

API contract validation and breaking change detection

validate-agent-files

16
from diegosouzapw/awesome-omni-skill

Validates AI coding assistant customization files (agents, skills, prompts, instructions) for correct format and structure. Works with GitHub Copilot, Claude Code, Codex, OpenCode, and other providers. Use when checking if agent files are properly configured, troubleshooting agent issues, or before committing new customization files.

chatgpt-app:validate

16
from diegosouzapw/awesome-omni-skill

Run validation suite on your ChatGPT App to check schemas, annotations, widgets, and UX compliance.

agent-validate-config

16
from diegosouzapw/awesome-omni-skill

Validate agent YAML frontmatter and configuration. Use before committing agent changes or in CI.