跳到正文
Skillpedia
智能体280k · #408

skill-comply

它能做什么

这个工具用来检查 AI 智能体是否遵守了你给它的指令。即使指令没有写得很明确,它也会创建测试,看看智能体的行为是否符合预期。

适用场景

  • ✓当你想确认 AI 智能体是否在遵守规则时。
  • ✓在你为智能体创建新规则或新指令之后。
  • ✓想要验证 AI 智能体运行是否正常时。

技能链接

https://github.com/affaan-m/ECC/blob/main/skills/skill-comply/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/affaan-m/ECC/blob/main/skills/skill-comply/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“检查这个 AI 智能体是否遵守了安全规则。”

每周 5 个新技能,1 分钟读完。

工作原理

这个工具会先创建示例,说明智能体应该如何表现,然后测试它是否真的这样做。它会衡量智能体遵守指令的程度。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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.

常见问题

什么是“提示严格度递减的场景”?

这是工具创建的测试。它们一开始使用非常明确的指令,然后逐步变得模糊,用来检验智能体是否仍然能理解并遵守预期的要求。

什么是“提示独立性”(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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能