Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Agent Trace仕様に基づくAI生成コードの帰属追跡・統計・管理スキル。編集履歴の確認、AI/人間の貢献率分析、コンプライアンス対応レポート生成。
.claude/skills/majiayu000-agent-trace/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | -10% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 16% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -15% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 9% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 80% | 0% |
Agent Trace仕様(v0.1.0)に基づくAI生成コードの帰属追跡・管理スキル。 自動記録されたトレースの確認、統計分析、レポート生成を支援。
以下のキーワードで発動:
/agent-trace┌─────────────────────────────────────────────────────────────┐
│ Agent Trace Management │
├─────────────────────────────────────────────────────────────┤
│ 📊 統計表示 - AI/人間の貢献率、モデル別統計 │
│ 📋 一覧表示 - 最近のトレース一覧 │
│ 🔍 検索 - ファイル別、日付別のトレース検索 │
│ 📄 レポート生成 - コンプライアンス用レポート │
│ 🗄️ アーカイブ - 古いトレースの整理 │
└─────────────────────────────────────────────────────────────┘bash# プロジェクトの統計を表示 node -e " const { TraceStore } = require('./.claude/lib/trace-store.ts'); const store = new TraceStore(process.cwd()); const stats = store.getStatistics(); console.log(JSON.stringify(stats, null, 2)); "
bash# 最新10件のトレースを表示 node -e " const { TraceStore } = require('./.claude/lib/trace-store.ts'); const store = new TraceStore(process.cwd()); const traces = store.list(10); traces.forEach(t => { console.log(\`[\${t.timestamp}] \${t.files.map(f => f.path).join(', ')}\`); }); "
bash# src/api/auth.ts のトレース履歴を表示 node -e " const { TraceStore } = require('./.claude/lib/trace-store.ts'); const store = new TraceStore(process.cwd()); const traces = store.findByFile('src/api/auth.ts'); console.log(JSON.stringify(traces, null, 2)); "
┌─────────────────────────────────────────────────────────────┐
│ 自動トレース記録フロー │
├─────────────────────────────────────────────────────────────┤
│ │
│ Claude Code (Edit/Write) │
│ │ │
│ ▼ │
│ PostToolUse Hook │
│ (.claude/hooks/agent-trace-capture.js) │
│ │ │
│ ▼ │
│ Trace Record 生成 │
│ - ファイルパス │
│ - 貢献者タイプ(ai) │
│ - モデル情報 │
│ - タイムスタンプ │
│ - Git commit/branch │
│ │ │
│ ▼ │
│ .agent-trace/traces/*.json に保存 │
│ │
└─────────────────────────────────────────────────────────────┘json{ "version": "0.1.0", "id": "550e8400-e29b-41d4-a716-446655440000", "timestamp": "2026-02-04T12:00:00Z", "files": [ { "path": "src/utils/helper.ts", "conversations": [ { "contributor_type": "ai", "model": "anthropic/claude-opus-4-5-20251101", "ranges": [{ "start_line": 1, "end_line": -1 }], "description": "Edit: text replacement" } ] } ], "vcs": { "type": "git", "commit": "abc123...", "branch": "main" }, "tool": { "name": "taisun-agent", "version": "2.10.1" }, "metadata": { "dev.taisun": { "hook": "agent-trace-capture", "tool_used": "Edit" } } }
| タイプ | コード | 説明 | |--------|--------|------| | 人間 | human | 人間が直接記述したコード | | AI | ai | AIが生成したコード | | 混合 | mixed | 人間が編集したAIコード | | 不明 | unknown | 起源が不明なコード |
以下のファイルはトレース対象外(機密保護):
node_modules/.git/.agent-trace/.env*secrets/, credentials/*.pem, *.keyプロジェクト全体の統計を表示
最近のトレースを一覧表示(デフォルト: 10件)
特定ファイルのトレース履歴を検索
コンプライアンス用のレポートを生成
指定日数より古いトレースをアーカイブ(デフォルト: 30日)
.agent-trace/
├── traces/ # アクティブなトレースファイル
│ ├── 2026-02-04_abc123.json
│ ├── 2026-02-04_def456.json
│ └── ...
└── archive/ # アーカイブ済みトレース
└── 2026-01-*.json.claude/lib/trace-store.ts.claude/hooks/agent-trace-capture.js.agent-trace/)Other measured skills in the registry, with their headline benchmark lift.