/pedantic-coder:guidelines-compliancefrom pedantic-coder
Enforces project-specific CLAUDE.md rules across all files using directory-scoped inheritance. Useful for auditing compliance with project conventions.
Ships in pedantic-coder. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Pedantic principles are universal. But every project also has its own rules — captured in CLAUDE.md files scattered across the repository. These files form an inheritance hierarchy, and every line of code must comply with every applicable guideline in its ancestor chain.
A pristine codebase follows both universal principles AND its own documented rules. This skill teaches you how to find, parse, and enforce project-specific guidelines.
CLAUDE.md files follow a directory-scoped inheritance model:
CLAUDE.md applies to every file in the repositoryCLAUDE.md (e.g., src/CLAUDE.md) adds rules on top of its parent — it does NOT replace themsrc/features/auth/CLAUDE.md) adds more rules on top of both ancestorsRules are additive. A file at src/features/auth/LoginForm.tsx must follow:
CLAUDE.md (project-wide conventions)src/CLAUDE.md (source code conventions, if it exists)src/features/auth/CLAUDE.md (auth-specific conventions, if it exists)There is no override mechanism. If the root says "use snake_case" and a nested file says "use PascalCase for components," both rules apply in their respective contexts. If they genuinely conflict, that is a bug in the CLAUDE.md hierarchy — flag it.
To find all applicable CLAUDE.md files for a given source file:
CLAUDE.md exists in that directoryCLAUDE.md if it existsFor a file at src/features/auth/components/LoginForm.tsx, the walk produces:
CLAUDE.md ← root (project-wide)
src/CLAUDE.md ← source conventions (if exists)
src/features/CLAUDE.md ← feature conventions (if exists)
src/features/auth/CLAUDE.md ← auth conventions (if exists)
src/features/auth/components/CLAUDE.md ← component conventions (if exists)
Most repositories will have 1-3 CLAUDE.md files. Some well-structured monorepos may have more.
When auditing a repository, find all CLAUDE.md files first:
# Find all CLAUDE.md files in the repo
Glob pattern: **/CLAUDE.md
Map the hierarchy. Common patterns:
| Location | Typical Content |
|---|---|
CLAUDE.md (root) | Build commands, test commands, project structure, global conventions, architecture overview |
src/CLAUDE.md | Source code conventions, import rules, naming patterns, component patterns |
src/features/*/CLAUDE.md | Feature-specific patterns, data models, API contracts |
tests/CLAUDE.md | Test conventions, mocking patterns, fixture rules |
scripts/CLAUDE.md | Script conventions, deployment rules |
docs/CLAUDE.md | Documentation conventions, formatting rules |
Not everything in a CLAUDE.md is an enforceable rule. Distinguish:
Enforceable guidelines — statements that prescribe HOW code should be written:
any in TypeScript"Informational content — context that helps you understand the project but doesn't prescribe behavior:
When in doubt, treat it as a guideline. Better to flag a potential violation than to miss one.
**/CLAUDE.md)### Guidelines Compliance Report
**CLAUDE.md files found**: [list with paths]
#### [CLAUDE.md path] — [X violations, Y files checked]
**Guideline**: "[quoted rule from CLAUDE.md]"
**Status**: Violated in N files / Followed in M files
**Examples**:
- `path/to/file.py:42` — [specific violation]
- `path/to/other.py:17` — [specific violation]
**Fix**: [what to change]
#### Guideline Conflicts
- [Root CLAUDE.md says X, src/CLAUDE.md says Y — which applies?]
#### Stale Guidelines
- [CLAUDE.md references pattern/directory/command that no longer exists]
#### Summary
- Total guidelines checked: N
- Fully compliant: X
- Partially compliant: Y (followed in some files, violated in others)
- Widely violated: Z
- Stale/outdated: W
Bad — vague and unjustified:
The code doesn't follow project conventions in some places.
Consider reviewing the CLAUDE.md for guidance.
Good — specific, traced to source:
CLAUDE.md (root) states: "All Python files use Google-style docstrings."
Violated in 4 of 12 sampled files:
- src/services/auth.py:23 — missing docstring on public function `verify_token`
- src/services/auth.py:45 — NumPy-style docstring instead of Google-style
- src/models/user.py:12 — missing Args section in `create_user` docstring
- src/utils/crypto.py:8 — no docstring on module-level function `hash_password`
Working examples in examples/:
examples/claude-md-inheritance.md — Multi-level CLAUDE.md hierarchy showing how rules accumulate and how to check files at different depthsWhen checking guidelines compliance:
**/CLAUDE.md glob)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub oborchers/fractional-cto --plugin pedantic-coder16 skills in this plugin
/abbreviation-policyThis skill should be used when the user is abbreviating identifiers, using acronyms, or when a codebase has inconsistent short forms like btn/button, msg/message, req/request. Covers the abbreviation decision framework, approved short forms, and the rule that consistency beats brevity./boolean-namingThis skill should be used when the user is naming boolean variables, writing predicate functions, using flags or toggles, or when code contains ambiguous boolean names like flag, status, check, active without proper prefixes. Covers is/has/can/should prefixes, positive naming, and the rule that a boolean's name must read as a true/false question./casing-lawThis skill should be used when the user is writing code with mixed casing conventions, choosing casing for identifiers, enforcing casing consistency across a codebase, or when camelCase and snake_case appear in the same file. Covers per-context casing rules, acronym handling, and the absolute prohibition of mixed conventions./dead-code-intoleranceThis skill should be used when the user's code contains commented-out code blocks, unused imports, unreachable branches, TODO/FIXME comments that have been sitting for more than a day, or comments referencing removed functionality. Covers the elimination of dead code and the rule that version control remembers so you don't have to./declaration-orderThis skill should be used when the user is organizing code within a file, ordering class members, structuring module exports, or when a file has constants mixed with functions mixed with classes in no predictable order. Covers file-level ordering, class member ordering, and the rule that every file should have the same shape./go-pedantryThis skill should be used when the user is writing Go code and needs guidance on Go-specific pedantry: error wrapping with fmt.Errorf and %w, interface design (accept interfaces return structs), package naming conventions, struct field ordering, receiver naming, golangci-lint configuration, and Go-specific patterns that go beyond universal principles.Other plugins' skills for the same job