From skill-analyzer
SKILL.md / CLAUDE.md / instructions 静的解析 (token 量 + n-gram 重複検出 = 統合候補)。Triggers: プロンプト冗長検出, 重複検出, token 多いファイル, prompt redundancy, detect duplicate prompts, high-token files, merge candidate prompts
How this skill is triggered — by the user, by Claude, or both
Slash command
/skill-analyzer:prompt-redundancy-checkThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
`skill-analyzer` plugin の静的解析 skill。指定パス配下の SKILL.md / CLAUDE.md / instructions/*.md を走査し、各ファイルの metrics と ファイル間の n-gram 重複を検出する。
skill-analyzer plugin の静的解析 skill。指定パス配下の SKILL.md / CLAUDE.md / instructions/*.md を走査し、各ファイルの metrics と ファイル間の n-gram 重複を検出する。
per-file metrics: chars / lines / estimated_tokens / language (ja / en / mixed)
n-gram 重複: 連続 N 単語 (default 10) の重複 hash を全 file 横断で集計、 重複 span 合計が --min-bytes (default 100 bytes) 超える file ペアを抽出
解析対象決定:
--target <path> → 指定 path 配下走査node_modules, .git, .venv, dist, .worktrees解析実行:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/prompt-stats.sh" \
--target /path/to/project \
--ngram 10 --min-bytes 100
出力 JSON を整形:
共有用エクスポート:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/prompt-stats.sh" --target ... \
| bash "${CLAUDE_PLUGIN_ROOT}/scripts/lib/sanitize.sh" \
> redundancy-report.json
| env | default | 効果 |
|---|---|---|
REDUNDANCY_NGRAM | 10 | 小さく → 短い句も検出 (false positive 増)、大きく → 長い段落のみ |
REDUNDANCY_MIN_BYTES | 100 | span 閾値、英語なら ~20 単語、日本語なら ~50 文字相当 |
TOKEN_CHARS_PER_TOK | 言語別自動 | 全 file 一律で override したい時に明示 |
ANALYZE_TARGET | $(pwd) | デフォルト解析 root |
## Prompt redundancy check (target: /path/to/project)
### High-token files (top 10)
| file | tokens | language |
|---|---:|---|
| .claude/instructions/core/completion-checklist.md | 2,152 | ja |
| .claude/instructions/core/default-review-layer.md | 1,719 | mixed |
| ...
### Consolidation candidates (n-gram overlap)
| file A | file B | overlap (bytes) |
|---|---|---:|
| .claude/skills/commit/SKILL.md | plugins/dev-workflow/skills/commit/SKILL.md | 2,836 |
| ...
improvement-proposal: 本 skill 結果を含む統合提案cost-monitor plugin の cost-status: 実コスト集計と組み合わせて token 単価ベースの判断npx claudepluginhub arkatom/claude-plugins --plugin skill-analyzerCreates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.