session-insights
Analyze past Claude Code sessions to extract patterns, metrics, and recommendations.
npx skills add majiayu000/claude-skill-registry --skill session-insights --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Session Insights Analyze the current project's Claude Code usage patterns and generate actionable recommendations. ## Step 1: Gather session data Collect data from available sources in the current project: 1. **Session metrics** — `~/.claude/metrics/{project-slug}/*.json` (structured JSON from session-report hook) 2. **CLAUDE_ERRORS.md** — error frequency by Area and Type 3. **Git log** — files most frequently modified in commits mentioning "fix", "bug", "error" 4. **.claude/agent-memory/** — learnings accumulated by agents 5. **Registry history** — audit score trend from `$DOTFORGE_DIR/registry/projects.yml` If a source doesn't exist, skip it and note as "unavailable". ### Retroactive Analysis (no session metrics yet) When `~/.claude/metrics/{project-slug}/` is empty or doesn't exist, reconstruct a pseudo-historical picture: 1. **CLAUDE_ERRORS.md** → parse dates and group errors by week/month to show trends 2. **Git log** → `git log --name-only --since="60 days ago"` to identify: - Hot files (most frequently changed) - Fix frequency (`git log --grep="fix" --oneline | wc -l`) - Commit cadence by week 3. **Registry history** → score progression over time 4. **Rule glob coverage**
- Step 1: Gather session data
- Retroactive Analysis (no session metrics yet)
- Step 2: Compute metrics
- Session Metrics (from ~/.claude/metrics/)
- Error Patterns
- File Activity
- Agent Usage (from agent-memory/)
- Score Trend (from registry)
- Step 3: Generate recommendations
- Step 4: Feed practices pipeline
- Step 5: Generate report
What does the session-insights skill do?
Analyze past Claude Code sessions to extract patterns, metrics, and recommendations.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill session-insights --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
