coding-guidelines-verify
Verify changes follow nearest-scoped AGENTS.md rules: group changed files by nested scope, auto-fix formatting, run lint/tests, and report violations. Use when the user wants scoped compliance checks for changed files.
When & Why to Use This Skill
The Coding Guidelines Verifier is a powerful Claude skill designed to automate the enforcement of project-specific standards and best practices. It intelligently identifies changed files and validates them against the nearest 'AGENTS.md' rules, making it an essential tool for maintaining code quality in complex codebases and monorepos. By automating formatting, linting, and testing based on localized scopes, it ensures that every contribution adheres to the specific requirements of its module, significantly reducing manual review effort and preventing technical debt.
Use Cases
- Monorepo Governance: Automatically apply and verify different coding standards across multiple modules by respecting nested AGENTS.md configurations.
- Pre-submission Validation: Use as a quality gate to catch formatting errors, linting violations, and test failures in staged or unstaged changes before they are committed.
- Automated Compliance Reporting: Generate detailed compliance reports that highlight specific rule violations and suggest fixes, streamlining the feedback loop for developers.
- Standardizing Team Workflows: Ensure all team members follow the same project-specific 'forbid' rules and architectural constraints defined in the local scope.
| name | coding-guidelines-verify |
|---|---|
| description | "Verify changes follow nearest-scoped AGENTS.md rules: group changed files by nested scope, auto-fix formatting, run lint/tests, and report violations. Use when the user wants scoped compliance checks for changed files." |
Coding guidelines verifier
Goal
Validate that changes follow the nearest nested AGENTS.md:
- default: changed files only
- default: auto-fix formatting before lint/tests
- monorepo-aware: each module’s
AGENTS.mdis the source of truth for that scope
Workflow (checklist)
- Collect changed files (staged + unstaged + untracked).
- For each changed file, find the nearest parent
AGENTS.md.- If a file has no scoped
AGENTS.md, report it (suggest runningcoding-guidelines-gen).
- If a file has no scoped
- Parse the
codex-guidelinesblock (schema:references/verifiable-block.md). - Run, per scope:
- format (auto-fix) -> lint -> tests
- apply simple forbid rules (globs/regex) from the block
- Produce a short compliance report (template:
references/report-template.md).
Automation
Use scripts/verify_guidelines.py to group scopes, run commands, and report results.
- If
pythonis not available or the script fails, tell the user and ask whether to install Python or proceed with a manual per-scope verification.
Deliverable
Provide:
- The per-scope compliance report (use
references/report-template.md). - Any auto-fix formatting changes applied.
- Lint/test commands run and their results, plus any violations.