skill-comply
affaan-m/everything-claude-code
Measure whether coding agents actually follow skills, rules, and agent definitions across varying prompt conditions.
What is skill-comply?
skill-comply auto-generates behavioral specs from markdown files, creates test scenarios at three prompt strictness levels, runs agents while capturing tool traces, and reports compliance rates with full timelines. Use it to verify that skills and rules are genuinely followed regardless of prompt framing.
- Auto-generates expected behavioral sequences from .md files (skills, rules, agent definitions)
- Creates three scenario variants with decreasing prompt support (supportive → neutral → competing)
- Captures and classifies tool call traces using LLM-based matching against spec steps
- Reports compliance scores per scenario with deterministic temporal ordering checks
- Generates self-contained reports including specs, prompts, compliance scores, and tool call timelines
- Supports dry-run mode for spec and scenario generation without execution cost
How to install skill-comply
npx skills add https://github.com/affaan-m/everything-claude-code --skill skill-comply- Python environment with uv
- Claude CLI installed and configured
- Target markdown file (.md) containing skill, rule, or agent definition
How to use skill-comply
- 1.Run `/skill-comply <path>` or ask the agent 'is this rule actually being followed?'
- 2.For a full compliance run: `uv run python -m scripts.run ~/.claude/rules/common/testing.md`
- 3.For a dry run (spec and scenarios only, no cost): `uv run python -m scripts.run --dry-run <path>`
- 4.Optionally specify models: `uv run python -m scripts.run --gen-model haiku --model sonnet <path>`
- 5.Review the generated report for compliance scores, tool call timelines, and any hook promotion recommendations
Use cases
- Verify a new rule (e.g., testing.md, security.md) is followed even when prompts don't explicitly mention it
- Check whether a workflow skill (e.g., search-first) is consistently applied across different user requests
- Validate agent definitions trigger correctly in expected contexts
- Audit compliance of existing skills and rules as part of quality maintenance
- Test prompt independence—ensure agent behavior doesn't collapse when prompt framing changes
- AI agent developers and maintainers
- Teams managing coding agent rule sets and skill libraries
- QA engineers verifying agent behavior consistency
- Developers building custom agent workflows
skill-comply FAQ
It measures whether an agent follows a skill or rule even when the prompt doesn't explicitly support or mention it. The three strictness levels test this: supportive prompts make compliance easy, while competing prompts actively discourage the behavior.
Skills (skills/*/SKILL.md), rules (rules/common/*.md), and agent definitions (agents/*.md). It verifies whether agents follow these when invoked.
Yes. Use `--dry-run` flag to generate expected behavioral sequences and test scenarios without executing agents or incurring API costs.
It uses LLM-based classification rather than regex, then checks temporal ordering deterministically to ensure steps occur in the expected sequence.
Reports include the auto-generated spec, scenario prompts at each strictness level, compliance scores per scenario, tool call timelines with LLM classification labels, and optional hook promotion recommendations.
Full instructions (SKILL.md)
Source of truth, from affaan-m/everything-claude-code.
name: skill-comply description: Visualize whether skills, rules, and agent definitions are actually followed — auto-generates scenarios at 3 prompt strictness levels, runs agents, classifies behavioral sequences, and reports compliance rates with full tool call timelines metadata: origin: ECC tools: Read, Bash
skill-comply: Automated Compliance Measurement
Measures whether coding agents actually follow skills, rules, or agent definitions by:
- Auto-generating expected behavioral sequences (specs) from any .md file
- Auto-generating scenarios with decreasing prompt strictness (supportive → neutral → competing)
- Running
claude -pand capturing tool call traces via stream-json - Classifying tool calls against spec steps using LLM (not regex)
- Checking temporal ordering deterministically
- Generating self-contained reports with spec, prompts, and timelines
Supported Targets
- Skills (
skills/*/SKILL.md): Workflow skills like search-first, TDD guides - Rules (
rules/common/*.md): Mandatory rules like testing.md, security.md, git-workflow.md - Agent definitions (
agents/*.md): Whether an agent gets invoked when expected (internal workflow verification not yet supported)
When to Activate
- User runs
/skill-comply <path> - User asks "is this rule actually being followed?"
- After adding new rules/skills, to verify agent compliance
- Periodically as part of quality maintenance
Usage
# Full run
uv run python -m scripts.run ~/.claude/rules/common/testing.md
# Dry run (no cost, spec + scenarios only)
uv run python -m scripts.run --dry-run ~/.claude/skills/search-first/SKILL.md
# Custom models
uv run python -m scripts.run --gen-model haiku --model sonnet <path>
Key Concept: Prompt Independence
Measures whether a skill/rule is followed even when the prompt doesn't explicitly support it.
Report Contents
Reports are self-contained and include:
- Expected behavioral sequence (auto-generated spec)
- Scenario prompts (what was asked at each strictness level)
- Compliance scores per scenario
- Tool call timelines with LLM classification labels
Advanced (optional)
For users familiar with hooks, reports also include hook promotion recommendations for steps with low compliance. This is informational — the main value is the compliance visibility itself.
Related skills
More from affaan-m/everything-claude-code and the wider catalog.
security-review
Security checklist and patterns for authentication, input validation, secrets, and sensitive features.
golang-patterns
Idiomatic Go patterns, best practices, and conventions for building robust, efficient, and maintainable applications.
coding-standards
Baseline coding conventions for naming, readability, immutability, and quality across projects.
frontend-patterns
React and Next.js patterns for components, state management, performance, and modern frontend practices.
backend-patterns
REST/GraphQL API design, database optimization, and server-side patterns for Node.js, Express, and Next.js.
golang-testing
Go testing patterns: table-driven tests, subtests, benchmarks, fuzzing, and TDD methodology.