From cape
Check code changes against documented conventions in CLAUDE.md and rules files. Use whenever the user asks to check convention adherence — "check my code against rules", "does this conform", "lint conventions", "check rules", "/cape:conform", or any request to verify code follows documented standards. Covers project and global CLAUDE.md rules plus per-language rule files in ~/.claude/rules/. Do NOT use for bug-finding or code quality review (use cape:review), running external linters (use cape check), or investigating bugs (use cape:debug-issue).
npx claudepluginhub sqve/cape --plugin capeThis skill uses the workspace's default tool permissions.
<skill_overview> Check whether changed code conforms to the user's documented conventions — the
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
<skill_overview> Check whether changed code conforms to the user's documented conventions — the
rules in CLAUDE.md files and ~/.claude/rules/*.md files. Produces a binary report: each rule is
either followed or violated.
Unlike review (which checks correctness, security, and design using structural analysis), conform is mechanical and rule-driven. It checks what the user has explicitly documented, not what a reviewer would infer. No blast radius, no severity levels, no code-review-graph. </skill_overview>
<rigidity_level> MEDIUM FREEDOM — The process order (scope → gather → match → check → report) is fixed. The report format (result first, violations grouped by file) is non-negotiable. Checking granularity adapts to scope size. </rigidity_level>
<when_to_use>
Don't use for:
cape check)</when_to_use>
<critical_rules>
cape conform [scope] to discover rules and changed files. Do not
manually read CLAUDE.md or rule files.</critical_rules>
<the_process>
Parse the argument to determine what to check:
| Argument | Scope |
|---|---|
| (none) | branch (branch changes) |
unstaged | unstaged (uncommitted changes) |
staged | staged (staged changes) |
| file path or glob | Specific files |
Run the CLI command to discover rules and changed files:
cape conform [scope]
This outputs JSON:
{
"rules": [
{ "source": "~/.claude/rules/typescript.md", "globs": ["**/*.ts"], "content": "..." },
{ "source": "~/.claude/CLAUDE.md", "globs": [], "content": "..." }
],
"changedFiles": [{ "path": "src/index.ts", "content": "..." }],
"scope": "branch"
}
If no changed files: "No changes found for scope: {scope}." Stop.
If no rules discovered: "No convention rules found. Expected CLAUDE.md or ~/.claude/rules/*.md files." Stop.
For each rule entry, determine which changed files it applies to:
Filter out rule entries with no matching changed files — there is nothing to check.
If no rules match any changed files: "No applicable rules for the changed files." Stop.
Report: "Checking N files against M rule sets..."
For each applicable rule entry, check all matching changed files for violations.
Small scope (<10 changed files, <5 applicable rule entries):
Check directly. For each rule entry:
Large scope (10+ files or 5+ rule entries):
Dispatch one subagent per rule entry, in parallel. Each agent receives:
Checking guidelines:
any instead of unknown"Structure the report. Lead with the result.
When violations are found:
## Conform: {scope_description}
**Result:** Violations found
**Scope:** {N} files checked against {M} rule sets
### Violations
#### {file_path}
- **L{line}:** {violation description} — *{rule_source_basename}*
#### {next_file_path}
...
### Summary
{violation_count} violations across {file_count} files
When no violations are found:
## Conform: {scope_description}
**Result:** Conforms
**Scope:** {N} files checked against {M} rule sets
No violations found.
Use the rule file basename (e.g., typescript.md, CLAUDE.md) for attribution, not the full path.
</the_process>
TypeScript changes checked against rulesUser: "conform"
cape conform branch — returns 3 changed .ts files, 4 rule entries (CLAUDE.md, project
CLAUDE.md, typescript.md, testing-typescript.md)## Conform: branch diff
**Result:** Violations found
**Scope:** 3 files checked against 4 rule sets
### Violations
#### src/services/auth.ts
- **L12:** Uses `any` type — should be `unknown` — *typescript.md*
- **L28:** Missing braces on single-line if statement — *typescript.md*
#### src/services/auth.test.ts
- **L5:** Test description doesn't start with "should" or verb phrase — *testing-typescript.md*
### Summary
3 violations across 2 files
No violations found
User: "conform unstaged"
cape conform unstaged — returns 1 changed file, 2 applicable rule entries## Conform: unstaged changes
**Result:** Conforms
**Scope:** 1 file checked against 2 rule sets
No violations found.
No matching rules for file type
User: "conform" — only changed a Dockerfile and a Makefile
cape conform branch — returns 2 changed files, rules have globs for .ts, .go, .lua, etc.<key_principles>
</key_principles>