ワンクリックで
token-audit
Audit a repository for token waste — find redundant context files, measure baseline, recommend optimizations
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Audit a repository for token waste — find redundant context files, measure baseline, recommend optimizations
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Tool-agnostic search — query construction, tool selection, source trust hierarchy.
Auto-continue through todos with idle detection and safety gates. Use for multi-step orchestration.
Level 2 — Pantheon-native context compression with priority scoring, semantic summarization, downstream-aware compression, budget allocation, and cross-references
Automated visual review pipeline — Playwright screenshots, self-analysis, fix loop, escalation. Used by Aphrodite for UI verification.
Multi-agent orchestration with model routing, category delegation, and sprint management. Use for coordinating Pantheon agents.
MCP security hardening — credential leakage prevention, input sanitization, and tool access control. Use for reviewing agent MCP configurations.
| name | token-audit |
| description | Audit a repository for token waste — find redundant context files, measure baseline, recommend optimizations |
When Pantheon is installed in a new repository, run this skill to audit and optimize all AI context files for token efficiency.
Scan the repository for ALL files that contribute to AI context:
# Auto-loaded files (every invocation)
AGENTS.md
CLAUDE.md
.gemini/AGENTS.md
.github/copilot-instructions.md
.github/instructions/*.md
.claude/CLAUDE.md
.cursor/rules/*.mdc
.windsurfrules
.kilocode/rules/*.md
.clinerules
.opencode/agents/*.agent.md
# Memory bank
docs/memory-bank/*.md
docs/adr/*.md
# Skills (lazy-load)
.github/skills/*/SKILL.md
.claude/skills/*/SKILL.md
.opencode/skills/*/SKILL.md
Read all discovered files and map what information appears where:
| Information | Found in files | Lines duplicated |
|---|---|---|
| Tech stack | AGENTS.md, 00-overview.md, copilot-instructions.md | ~15 |
| Run commands | AGENTS.md, 03-tech-context.md, commands.md | ~10 |
| Agent roles | AGENTS.md, copilot-instructions.md, zeus.agent.md | ~20 |
| CI/CD rules | AGENTS.md, copilot-instructions.md, .github/workflows | ~12 |
| Coding standards | copilot-instructions.md, instructions/*.md | ~25 |
Count lines and estimate tokens:
# Auto-loaded context (every invocation)
wc -l AGENTS.md .github/copilot-instructions.md /memories/repo/*.md 2>/dev/null
# On-demand context (read by agents)
wc -l docs/memory-bank/*.md 2>/dev/null
# Skills (lazy-load)
find .github/skills .claude/skills .opencode/skills -name "SKILL.md" 2>/dev/null | xargs wc -l 2>/dev/null
# Agent definitions
wc -l .github/agents/*.agent.md .opencode/agents/*.agent.md .claude/agents/*.agent.md 2>/dev/null
Estimate: 1 line ≈ 4 tokens (markdown average)
Check for content that should NOT be auto-loaded. Use specific patterns, not generic keywords:
Wave 1:, Wave 2:, ## Wave, wave-by-wave (NOT "DAG Waves" pattern)delivered:, what was delivered, delivery history, delivery log[0-9]+% complete, commit count, commits: [0-9] (NOT in progress-log.md)**Last Updated**:, <!-- last.updated: (git has this)deleted X lines of dead code, legacy cleanup, cleaned up XSkip files where the keyword is expected:
progress-log.md → skip "progress" checksactive-context.md → skip "wave" checks (may reference wave patterns legitimately)Generate a structured report:
If user approves, execute:
## Token Audit Report
### Baseline
- Auto-loaded: X lines (~Y tokens)
- On-demand: X lines (~Y tokens)
- Skills: N files, X lines total
- Agents: N files, X lines total
- **Total baseline: ~Y tokens per invocation**
### Redundancy
- X instances of duplicated content found
- Estimated waste: ~Y tokens per invocation
### Red Flags
- X files with historical content
- X files with derivable content (exists in code)
- X files exceeding line limits
### Recommended Actions
1. [action] — saves ~Y tokens
2. [action] — saves ~Y tokens
...
### Projected After Optimization
- Auto-loaded: X lines (~Y tokens) — **Z% reduction**