Catalog
affaan-m/skill-comply

affaan-m

skill-comply

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. Use when checking whether agents actually follow the skills, rules, and definitions they were given, rather than assuming they do.

NewUpdated Oct 12, 2026

skill-comply: Automated Compliance Measurement

Measures whether coding agents actually follow skills, rules, or agent definitions by:

  1. Auto-generating expected behavioral sequences (specs) from any .md file
  2. Auto-generating scenarios with decreasing prompt strictness (supportive → neutral → competing)
  3. Running claude -p and capturing tool call traces via stream-json
  4. Classifying tool calls against spec steps using LLM (not regex)
  5. Checking temporal ordering deterministically
  6. 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:

  1. Expected behavioral sequence (auto-generated spec)
  2. Scenario prompts (what was asked at each strictness level)
  3. Compliance scores per scenario
  4. 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.

Files22
22 files · 92.3 KB

Select a file to preview

Overall Score

82/100

Grade

B

Good

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

80

Quality

87

Clarity

82

Completeness

78

Summary

skill-comply is a sophisticated compliance measurement tool that auto-generates test scenarios for coding agent skills at three prompt strictness levels, executes agents via claude -p, classifies tool call traces using LLM, and generates detailed compliance reports with behavioral timelines. The skill measures whether agents actually follow rules and skill definitions even when not explicitly prompted to do so.

Static Analysis Findings

1 finding

Patterns detected by deterministic static analysis before AI scoring. Hover over any finding code for detailed information and remediation guidance.

Credential Exposure
SEC-020Direct .env File Access2x in 1 file

Direct .env file access

tests/test_runner.py.env2x

Detected Capabilities

file readsubprocess execution (claude -p CLI)LLM inference (classify_events)yaml parsingjson parsingstream-json parsingBash subprocess with sandbox isolationtemporary directory managementhome path redaction for privacyreport generation (markdown)

Trigger Keywords

Phrases that agents use to match this skill to user intent.

check agent compliancemeasure skill adherenceverify rule followingagent behavior auditcompliance report

Risk Signals

WARNING

SEC-020: Direct .env file access in tests/test_runner.py

tests/test_runner.py

Use Cases

  • Verify agents follow skills when prompts don't explicitly mention them
  • Measure compliance rates of mandatory development rules (testing, git workflow, security)
  • Detect prompt injection resistance and competing instructions compliance
  • Generate compliance reports with tool call timelines for quality auditing
  • Identify which steps in a workflow have low compliance and need hook promotion

Quality Notes

  • Excellent separation of concerns: spec generation, scenario generation, execution, grading, and reporting are all modular and independently testable
  • Comprehensive test coverage including edge cases, temporal ordering constraints, forward references, and prerequisite demotion logic
  • Strong privacy safeguard: home directory paths are automatically redacted from observations before they enter reports or persist to disk
  • Well-designed sandboxing with security boundaries: path traversal protection, symlink validation, reparse point detection, whitelisted setup executables
  • Clear error handling: distinguishes graceful termination (max_turns) from actual failures; propagates subprocess errors with context
  • LLM classification parsed defensively: validation for non-dict JSON, non-list values, numeric overflow
  • Temporal ordering logic is sophisticated and well-tested: handles forward references, prerequisite failures, and demotion propagation
  • Documentation is comprehensive with examples (YAML specs, prompts, fixture traces)
  • Advanced feature: Hook promotion recommendations identify steps with low compliance that should become hooks
  • Stream-json parsing correctly handles fragmented tool use/result pairs and incomplete runs
Model: claude-haiku-4-5-20251001Analyzed: Oct 12, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Version History

  1. v2.2

    Content updated

    ✦ AIAdds new classifier test file and expands runner test coverage; updates classifier and runner scripts.

    2026-10-12

    LATEST
  2. v2.1

    Content updated

    ✦ AIExpands scripts/grader.py by 3.3 KB with additional logic and enlarges test coverage.

    2026-09-21

    View This Version
  3. v2.0

    Contract changed: description

    ✦ AIAdds direct .env file access in test runner and expands guidance on skill compliance verification scenarios.

    triggering2026-09-09

    View This Version
  4. v1.2

    Content updated

    ✦ AIAdds test suite (tests/test_runner.py) and expands scripts/runner.py executable with new logic.

    2026-07-14

    View This Version
  5. v1.1

    Content updated

    ✦ AIAdds executable Python scripts for compliance classification, grading, and reporting; includes test fixtures, prompts, and configuration.

    new script2026-04-20

    View This Version
  6. v1.0

    2026-04-12

    View This VersionInitial version

Use affaan-m/skill-comply in your dev environment

Command Palette

Search for a command to run...