skill-comply
它能做什么
这个工具用来检查 AI 智能体是否遵守了你给它的指令。即使指令没有写得很明确,它也会创建测试,看看智能体的行为是否符合预期。
适用场景
- ✓当你想确认 AI 智能体是否在遵守规则时。
- ✓在你为智能体创建新规则或新指令之后。
- ✓想要验证 AI 智能体运行是否正常时。
技能链接
https://github.com/affaan-m/ECC/blob/main/skills/skill-comply/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“检查这个 AI 智能体是否遵守了安全规则。”
每周 5 个新技能,1 分钟读完。
工作原理
这个工具会先创建示例,说明智能体应该如何表现,然后测试它是否真的这样做。它会衡量智能体遵守指令的程度。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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.
常见问题
什么是“提示严格度递减的场景”?
这是工具创建的测试。它们一开始使用非常明确的指令,然后逐步变得模糊,用来检验智能体是否仍然能理解并遵守预期的要求。
什么是“提示独立性”(Prompt Independence)?
指测试智能体在提示词中没有直接提到某条规则的情况下,是否仍然会遵守这条规则。
最终报告会显示什么?
报告会显示预期结果、执行过的测试、测试结果(智能体是否遵守),以及智能体操作的时间线。
详情
作者的原始描述
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.
repo: affaan-m/ECC
热度
- GitHub 星标
- 280k
- 排名
- #408
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
accessibility
280k帮你的智能体创建人人都能使用的界面。确保网站和应用对残障人士友好,比如失明或行动不便的用户也能顺畅使用。
agent-architecture-audit
280k让你的智能体检查一切是否正常运行。它能找出并修复 AI 系统中的问题,确保系统按预期工作。
agent-eval
280k帮你的智能体比较不同的 AI 编程工具。它能衡量哪个工具在特定任务上更快、更便宜、更可靠。
agent-harness-construction
280k让你的智能体更好地理解如何完成任务。它会优化智能体使用的工具和指令,提高成功的几率。