skills/prompt-analytics/SKILL.md
Analyze how prompts and skill routing behave across coding-agent sessions and produce calibrated recommendations — prompt-pattern analysis, routing accuracy, and knowledge gaps. Use when the user says "analyze my prompts", "prompt patterns", "is routing working", "which skill should have fired", "knowledge gaps", "what do I keep asking", or invokes /prompt-analytics. Do NOT use for auditing a single skill/agent definition (that is /skill-improver), tool/MCP efficiency (that is /tool-efficiency), or one-off interactive log queries (that is /session-analytics).
npx skillsauth add paulnsorensen/dotfiles prompt-analyticsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyze prompt and routing behavior across sessions, then produce calibrated recommendations. Judgment skill — scores findings with the shared confidence × severity model.
A target framing for the analysis: a skill/router name for routing accuracy, a
keyword/topic for knowledge gaps, or all for a broad prompt-pattern sweep. If
unclear, ask. Optional harness filter (all default).
Three analytics packs under references/:
| Domain | Pack | What it surfaces |
|--------|------|------------------|
| prompt-analysis | prompt-analysis.md | Recurring user-prompt shapes, repeated asks, session openers |
| routing-accuracy | routing-accuracy.md | Did the right skill fire? (correlational — no ground truth) |
| knowledge-gaps | knowledge-gaps.md | Topics that recur without a resolving skill/tool (medium signal) |
Ingest — python3 ~/Dev/dotfiles/skills/session-analytics/scripts/ingest.py
(1-hour TTL). Best-effort.
Fan out — spawn one parallel duckdb-expert per relevant domain
(one-domain-per-spawn):
spawn duckdb-expert "Run analytics pack prompt-analytics/references/<domain>.md for target {TARGET}. harness={HARNESS}"
Collect the digests.
Calibrate with ../session-analytics/references/calibration.md. Two of
these domains are explicitly weaker signal — honor that: routing-accuracy
has no intent ground-truth (correlational at best) and knowledge-gaps is
medium-signal. Findings from them lean <speculative>; demote to
<don't know> when the data is thin.
Report (below).
## Prompt & Routing Report: {TARGET}
### Summary
- Target: <skill/topic/all> · Harness: <filter>
- Domains run: <list>
- Findings: N surfaced, N below the bar
### Recommendations (surfaced)
| # | Severity | Confidence | Domain | Issue | Recommendation |
|---|----------|------------|--------|-------|----------------|
### Detail
For each surfaced finding: What / Why (with the metric) / How.
### Below the Bar
N findings were `<don't know>` or insufficient-signal (not shown).
duckdb-expert spawn.routing-accuracy infers intent from what fired next; it cannot prove the
right skill fired. Always tag its findings <speculative> at most.knowledge-gaps is medium-signal — a recurring topic isn't proof of a missing
skill. Degrade to "insufficient signal" rather than over-claim.tools
Reconstruct what a past coding-agent session was doing so you can resume it — goal, files touched, last verified state, and the next step — by querying the session logs. Use when the user says "what was I working on", "recover that session", "reconstruct where I left off", "resume my last session", "what did that session change", "rebuild context from logs", or invokes /work-recovery. Report-only — it never scores or judges. Do NOT use for usage scoring (that is /skill-improver, /tool-efficiency, /prompt-analytics) or one-off interactive log queries (that is /session-analytics).
development
Curate this repo's hallouminate wiki (.hallouminate/wiki/, the repo:dotfiles:wiki corpus) — add or update architecture pages, per-harness docs, and gotchas. Use when the user says "update the wiki", "document this in the wiki", "refresh the harness docs", "add a wiki page", "curate the wiki", "the wiki is stale", or invokes /wiki-curator. Also use at session end to write back a non-obvious decision or gotcha worth preserving. Grounds the existing wiki first, follows one-topic-per-file conventions, verifies every external doc URL before writing, and reindexes. Do NOT use for general code search (that is cheez-search) or for editing AGENTS.md command reference.
tools
Audit how a tool, command, or MCP server is actually used across coding-agent sessions and produce calibrated recommendations — tool-vs-task fit, error forensics, fix recommendations, permission friction, MCP health, and token economics. Use when the user says "tool efficiency", "am I using X efficiently", "audit tool usage", "why does X keep failing", "how do I fix this error", "what should I change", "permission friction", "is this MCP worth it", "tool error rate", "fix recommendations", or invokes /tool-efficiency. Do NOT use for auditing a skill or agent definition (that is /skill-improver) or for one-off interactive log queries (that is /session-analytics).
development
Diagnose and self-heal harness-config drift between what's live on this machine (~/.claude, ~/.codex, ~/.config/opencode, ~/.cursor, ~/.copilot) and what `ap` renders from the registries — the post-migration target state. Use when the user says "harness doctor", "check my harness config", "is my settings drifted", "audit the dotfiles config", "why is this hook firing twice", "diagnose my agent config", or invokes /harness-doctor; also after an `ap`/registry change to verify the live config converged. Grounds the wiki + git history for intended state, diffs live vs `ap` render, classifies each drift (stale remnant / dotfiles bug / expected local), self-heals safe remnants via ap's renderers (ClaudeRenderer._clean_legacy_settings_hooks / CodexRenderer._clean_legacy_config_toml_hooks) during ap install / dots sync, opens deduped gh issues for confirmed dotfiles bugs, and writes new drift patterns back to the wiki. Do NOT use for general code review (/age), single-file permission cleanup (/settings-clean), or app-level debugging.