Files
everything-claude-code/skills/skill-comply/prompts/spec_generator.md
Shimo a2e465c74d feat(skills): add skill-comply — automated behavioral compliance measurement (#724)
* feat(skills): add skill-comply — automated behavioral compliance measurement

Automated compliance measurement for skills, rules, and agent definitions.
Generates behavioral specs, runs scenarios at 3 strictness levels,
classifies tool calls via LLM, and produces self-contained reports.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(skill-comply): address bot review feedback

- AGENTS.md: fix stale skill count (115 → 117) in project structure
- run.py: replace remaining print() with logger, add zero-division guard,
  create parent dirs for --output path
- runner.py: add returncode check for claude subprocess, clarify
  relative_to path traversal validation
- parser.py: use is_file() instead of exists(), catch KeyError for
  missing trace fields, add file check in parse_spec
- classifier.py: log warnings on malformed classification output,
  guard against non-dict JSON responses
- grader.py: filter negative indices from LLM classification

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 21:51:49 -07:00

1.6 KiB

You are analyzing a skill/rule file for a coding agent (Claude Code). Your task: extract the observable behavioral sequence that an agent should follow when this skill is active.

Each step should be described in natural language. Do NOT use regex patterns.

Output ONLY valid YAML in this exact format (no markdown fences, no commentary):

id: name: source_rule: version: "1.0"

steps:

  • id: <snake_case> description: required: true|false detector: description: after_step: <step_id this must come after, optional — omit if not needed> before_step: <step_id this must come before, optional — omit if not needed>

scoring: threshold_promote_to_hook: 0.6

Rules:

  • detector.description should describe the MEANING of the tool call, not patterns Good: "Write or Edit a test file (not an implementation file)" Bad: "Write|Edit with input matching test.*\.py"
  • Use before_step/after_step for skills where ORDER matters (e.g. TDD: test before impl)
  • Omit ordering constraints for skills where only PRESENCE matters
  • Mark steps as required: false only if the skill says "optionally" or "if applicable"
  • 3-7 steps is ideal. Don't over-decompose
  • IMPORTANT: Quote all YAML string values containing colons with double quotes Good: description: "Use conventional commit format (type: description)" Bad: description: Use conventional commit format (type: description)

Skill file to analyze:


{skill_content}