From plugin-introspector
Reusable analysis patterns and heuristics for plugin execution data. Provides standardized methods for pattern detection, anomaly scoring, and improvement signal extraction.
How this skill is triggered — by the user, by Claude, or both
Slash command
/plugin-introspector:analysis-patternsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> Standardized analysis methods used by multiple agents.
Standardized analysis methods used by multiple agents.
| Pattern | Description | Expected Token Cost |
|---|---|---|
Read→Edit→Bash(pass) | Read file, edit, verify | ~1500 tokens |
Glob→Read→Edit | Find file, read, edit | ~1800 tokens |
Read→Task(sub)→Edit | Read, delegate, apply | ~2500 tokens |
| Pattern | Description | Token Waste |
|---|---|---|
Read→Read→Read(same) | Repeated reads of same file | ~1000 tokens/repeat |
Bash(fail)→Bash(fail)→Edit | Build-before-edit | ~800 tokens wasted |
Edit→Bash(fail)→Edit→Bash(fail) | Edit-test loop without reading error | ~1500 tokens/cycle |
z = (x - μ) / σ
Threshold: |z| > 2.0 → anomaly
Minimum data points: 5 (for reliable σ)
MA(n) = sum(last_n_values) / n
Window: 5 sessions (default)
Alert if: current > MA × 1.5
efficiency = productive_calls / total_calls
productive_call = call that contributed to final output (no retry, no revert)
Target: ≥ 0.85
Expected token usage per tool (for waste detection):
| Tool | Expected Range | Flag If |
|---|---|---|
| Read | 200-1500 | >2000 (large file, use offset) |
| Edit | 100-500 | >800 (complex edit, consider split) |
| Write | 200-2000 | >3000 (generated file too large) |
| Bash | 50-500 | >1000 (verbose output, use --quiet) |
| Glob | 50-200 | >500 (too many matches) |
| Grep | 50-300 | >800 (broad search pattern) |
| Task | 500-5000 | >8000 (sub-agent context explosion) |
Phase detection and per-plugin baselines are loaded dynamically from plugin profiles:
~/.claude/plugin-introspector/plugin-profiles/{plugin}/profile.json
When baselines unavailable (< 5 sessions), use universal defaults:
Phase-Generic Anti-Patterns (PG-001~PG-007) are defined in improvement-pipeline.md Layer 2.
Field names match quality-evaluator.md improvement_signals[] output:
IF dimension.score ≤ 3:
signal = {
dimension: dimension.name,
score: dimension.score,
score_gap: 5 - dimension.score,
what: "description of the issue",
root_cause: "underlying cause",
quantified_impact: {tokens, cost_usd, percentage_of_session},
trace_evidence: ["trace_id: description", ...],
suggested_change: {target_file, change_type, description},
priority: score_gap × dimension.weight
}
IF waste_source.tokens_wasted > total_tokens × 0.05:
signal = {
type: waste_source.type,
impact: waste_source.tokens_wasted,
priority: impact / total_tokens
}
IF alert.severity == "HIGH":
signal = {
type: alert.type,
recurrence: count(similar_alerts_in_history),
priority: recurrence > 2 ? "CRITICAL" : "HIGH"
}
npx claudepluginhub hungrytech/hungrytech-claude-skills --plugin plugin-introspectorGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.