skill-comply
affaan-m/ECC
複数のプロンプト厳格度レベルでシナリオを生成し、エージェントを実行し、ツール呼び出しを分類し、完全なタイムライン付きでコンプライアンス率を報告することで、コーディングエージェントがスキル、ルール、またはエージェント定義に従っているかどうかを自動的に測定します。
...すべて拡張しますskill-comply: コンプライアンスの自動測定
コーディング担当者がスキル、ルール、またはエージェント定義を実際に遵守しているかどうかを、以下の方法で測定します:
- 任意の.mdファイルから、期待される動作シーケンス(仕様)を自動生成する
- プロンプトの厳格さを段階的に緩和したシナリオを自動生成(支援的 → 中立 → 競合)
- `
claude -p` を実行し、stream-json を通じてツール呼び出しのトレースをキャプチャする - LLM(正規表現ではなく)を使用して、ツール呼び出しを仕様のステップに対して分類する
- 時間的な順序を決定論的に検証する
- 仕様、プロンプト、タイムラインを含む独立したレポートを生成する
サポート対象
- スキル(
skills/*/SKILL.md): search-first や TDD ガイドなどのワークフロースキル - ルール(
rules/common/*.md): testing.md、security.md、git-workflow.md などの必須ルール - エージェント定義(
agents/*.md):エージェントが予定通りに呼び出されるかどうか(内部ワークフローの検証はまだサポートされていません)
有効化のタイミング
- ユーザーが
/skill-complyを実行したとき - ユーザーが「このルールは実際に守られているのか?」と問い合わせた場合
- 新しいルールやスキルを追加した後、エージェントのコンプライアンスを確認するため
- 品質維持の一環として定期的に
使用方法
# 完全実行
uv run python -m scripts.run ~/.claude/rules/common/testing.md
# ドライラン(コストなし、仕様とシナリオのみ)
uv run python -m scripts.run --dry-run ~/.claude/skills/search-first/SKILL.md
# カスタムモデル
uv run python -m scripts.run --gen-model haiku --model sonnet
重要な概念:プロンプトの独立性
プロンプトが明示的にサポートしていない場合でも、スキルやルールが遵守されているかどうかを測定します。
レポートの内容
レポートは独立した内容となっており、以下が含まれます:
- 期待される動作シーケンス(自動生成された仕様書)
- シナリオのプロンプト(各厳格度レベルで何が求められたか)
- シナリオごとの準拠スコア
- LLMの分類ラベル付きツール呼び出しのタイムライン
高度な機能(オプション)
フックに精通しているユーザー向けに、レポートにはコンプライアンス率が低いステップに対するフックの推奨事項も含まれています。これは参考情報であり、主な価値はコンプライアンス状況の可視化そのものにあります。
---
name: skill-comply
description: Automatically measures whether coding agents follow skills, rules, or agent definitions by generating scenarios at multiple prompt strictness levels, running agents, classifying tool calls, and reporting compliance rates with full timelines.
---
# 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
```bash
# 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.
すべてのファイル
21件のファイルskill-complyをインストール
スキルファイルをダウンロードし、.claude/skills/ ディレクトリに解凍してください。
ZIPをダウンロードリポジトリをクローンし、スキルファイルをプロジェクトにコピーしてください。
git clone https://github.com/affaan-m/ECC/tree/main/skills/skill-comply # Copy SKILL.md to your .claude/skills/ directory
コピー





家
