---
id: daily-skill-comply
name: "skill-comply"
url: https://skills.yangsir.net/skill/daily-skill-comply
author: affaan-m
domain: ai-code-generation-quality
tags: ["ai-agents", "test-automation", "prompt-engineering", "quality-assurance", "llm-orchestration"]
install_count: 4900
rating: 4.40 (20 reviews)
github: https://github.com/affaan-m/everything-claude-code
---

# skill-comply

> 自动生成AI代理行为规范测试场景，验证代码代理是否严格遵循技能定义和规则要求

**Stats**: 4,900 installs · 4.4/5 (20 reviews)

## Before / After 对比

### 合规性验证

**Before**:

人工编写测试用例验证AI代理行为，手动检查每个输出是否符合规范，一个代理需要多天时间，覆盖面有限且容易遗漏边界情况

**After**:

自动从规范文档生成完整测试套件，包含多种严格度级别的测试场景，自动执行并生成合规性报告，2小时完成全面验证

| Metric | Before | After | Change |
|---|---|---|---|
| 测试时间 | 72小时 | 2小时 | -97% |
| 覆盖率 | 60% | 95% | +58% |

## Readme

# skill-comply

# 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 -p` and 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.
Weekly Installs325Repository[affaan-m/everyt…ude-code](https://github.com/affaan-m/everything-claude-code)GitHub Stars114.8KFirst Seen6 days agoSecurity Audits[Gen Agent Trust HubFail](/affaan-m/everything-claude-code/skill-comply/security/agent-trust-hub)[SocketWarn](/affaan-m/everything-claude-code/skill-comply/security/socket)[SnykFail](/affaan-m/everything-claude-code/skill-comply/security/snyk)Installed oncodex314cursor281gemini-cli280github-copilot280cline280opencode280

---
*Source: https://skills.yangsir.net/skill/daily-skill-comply*
*Markdown mirror: https://skills.yangsir.net/api/skill/daily-skill-comply/markdown*