session-insights
Skill8 starsChanged 7 months agoMITView on GitHub
Per-project insights from dotforge data — CLAUDE_ERRORS.md, session-report metrics, agent memory, registry score trend — fed into the practices pipeline. General friction analysis across transcripts is native (/insights).
2 other projects use a version of this.
Adopted by
Most recently taken up by
- IlyaGorsky/memory-toolkittheir own version, first seen Nov 1, 2026
- yasunori0418/skillstheir own version, first seen Oct 13, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- IlyaGorsky/memory-toolkit★ 13same name
- yasunori0418/skills★ 9same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- .claude/rules/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- audit-projectSkill
- bootstrap-projectSkill
- capture-practiceSkill
- diff-projectSkill
- domain-extractSkill
- export-configSkill
- forge-behaviorSkill
- init-projectSkill
- learn-projectSkill
- mcp-addSkill
- plugin-generatorSkill
- reset-projectSkill
- rule-effectivenessSkill
- scout-reposSkill
- sync-all-reposSkill
- sync-templateSkill
- update-practicesSkill
- watch-upstreamSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
If a source doesn't exist, skip it and note as "unavailable".
- Very specific: line 26
When ~/.claude/metrics/{project-slug}/ is empty or doesn't exist, reconstruct a pseudo-historical picture:
- Distinctive: line 32
Commit cadence by week
- Distinctive: line 47
When JSON metrics files exist, aggregate across the last N sessions (default 20):
- Distinctive: line 72
Projected: if declining, estimate when score drops below 7.0
- Very specific: line 87
Check if a practice already exists in $DOTFORGE_DIR/practices/inbox/ or active/
- Very specific: line 88
If not, create a practice in practices/inbox/:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Session Insights
Analyze the current project's Claude Code usage patterns and generate actionable recommendations.
Scope (native-first boundary, v4.7.0): Claude Code's /insights already analyzes up to 200 recent sessions across every project on the machine from transcripts (misunderstood requests, buggy code, auto-mode recommendation) → ~/.claude/usage-data/report.html. This skill does NOT read transcripts and does not duplicate that. It covers only what native has no access to: CLAUDE_ERRORS.md by Area/Type, session-report.sh hook metrics, .claude/agent-memory/, the registry score trend, and the automatic feed into practices/inbox/. Start by pointing the user to /insights for the cross-project friction picture.
Step 1: Gather session data
Collect data from available sources in the current project:
- Session metrics —
~/.claude/metrics/{project-slug}/*.json(structured JSON from session-report hook) - CLAUDE_ERRORS.md — error frequency by Area and Type
- Git log — files most frequently modified in commits mentioning "fix", "bug", "error"
- .claude/agent-memory/ — learnings accumulated by agents
- Registry history — audit score trend from
$DOTFORGE_DIR/registry/projects.local.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:
- CLAUDE_ERRORS.md → parse dates and group errors by week/month to show trends
- 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
- Registry history → score progression over time
- Rule glob coverage → delegate to
/forge rule-check(therule-effectivenessskill) instead of recomputing it here; cite its ACTIVE/INERT summary
Mark all retroactive data clearly as:
⚠ Inferred from git history — no session metrics available yet.
Session metrics will accumulate automatically after /forge sync.Step 2: Compute metrics
From available data, calculate:
Session Metrics (from ~/.claude/metrics/)
When JSON metrics files exist, aggregate across the last N sessions (default 20):
- Total sessions: count of metric files
- Avg files touched: mean files_touched per session
- Avg hook blocks: mean hook_blocks + lint_blocks (lower is better — team is learning)
- Rule coverage trend: plot rule_coverage over time (improving / stable / declining)
- Error rate: errors_added / sessions (target: < 0.5)
Error Patterns
- Top error areas: group CLAUDE_ERRORS.md entries by Area, rank by count
- Error types distribution: count by Type (syntax, logic, integration, config, security)
- Repeat offenders: areas with 3+ errors (candidates for rule creation)
File Activity
- Hot files: top 10 most-edited files (from git log)
- Churn rate: files edited > 5 times in last 30 days (may need refactoring)
- Untested hot files: hot files without corresponding test files
Agent Usage (from agent-memory/)
- Active agents: which agents have accumulated learnings
- Top learnings: most recent entries per agent
- Gaps: agents with memory enabled but no learnings (underused)
Score Trend (from registry)
- Current score: latest audit score
- Trend: improving, stable, or declining (compare last 3 audits)
- Projected: if declining, estimate when score drops below 7.0
Step 3: Generate recommendations
Based on metrics, produce actionable recommendations:
- Repeat errors → suggest creating a rule in
.claude/rules/targeting that area - Hot untested files → suggest test creation
- Score declining → suggest
/forge syncto update configuration - Underused agents → suggest delegation patterns for common tasks
- High churn files → suggest refactoring or better abstractions
Step 4: Feed practices pipeline
For the top 3 most impactful recommendations:
- Check if a practice already exists in
$DOTFORGE_DIR/practices/inbox/oractive/ - If not, create a practice in
practices/inbox/:source_type: session-insightstags: [insights, <area>]
- Report which practices were created
Step 5: Generate report
Output format:
═══ SESSION INSIGHTS: {{project}} ═══
Fecha: {{YYYY-MM-DD}}
Data sources: {{list of available sources}}
── SESSION METRICS ──
Sessions tracked: {{N}} (since {{first date}})
Avg files/session: {{N}} | Avg commits/session: {{N}}
Hook blocks: {{N}} destructive, {{N}} lint (total across sessions)
Rule coverage: {{trend}} ({{current}}% — last 5: {{values}})
Error rate: {{N}} errors/session
{{if retroactive: "⚠ Inferred from git history"}}
── ERROR PATTERNS ──
Top areas: {{area}} ({{count}} errors), ...
Type distribution: logic {{N}}, config {{N}}, ...
Repeat offenders: {{areas with 3+ errors}}
── FILE ACTIVITY ──
Hot files (last 30 days):
1. {{file}} — {{N}} edits
2. ...
Untested hot files: {{list or "none"}}
High churn (>5 edits): {{list or "none"}}
── AGENT USAGE ──
Active: {{agents with learnings}}
Underused: {{agents with empty memory}}
── SCORE TREND ──
Current: {{score}}/10
Trend: {{improving|stable|declining}} ({{last 3 scores}})
── RECOMMENDATIONS ──
1. {{recommendation}} — impact: {{high|medium|low}}
2. ...
── PRACTICES CREATED ──
{{list of new practices or "none"}}Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

