From claude-powerpack
Capture session learnings and update project docs. Use when ending a session, after completing a feature, or when asked to "debrief", "capture learnings", "update project knowledge", or "what did we learn".
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-powerpack:debriefThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Capture learnings from the current session and persist them into project documentation. The goal is continuous improvement: never repeat the same mistakes, always build on what we learn.
Capture learnings from the current session and persist them into project documentation. The goal is continuous improvement: never repeat the same mistakes, always build on what we learn.
Scan the conversation history for learnings. Look for these signals:
| Signal | What to capture |
|---|---|
| Corrections ("no, use X instead") | The right approach and why the wrong one fails |
| Debugging breakthroughs | Root cause and fix, not just the symptom |
| Repeated mistakes | Pattern that keeps tripping us up |
| Architectural decisions | What was chosen and the reasoning |
| Surprising behavior | Gotchas, edge cases, unintuitive APIs |
| Process friction | Steps that were slow, confusing, or error-prone |
| Discovered conventions | Patterns in the codebase that weren't documented |
Categorize each learning:
| Category | Typical destination |
|---|---|
| Mistake/Correction | CLAUDE.md (universal) or .claude/rules/ (domain-specific) |
| Architectural Decision | CLAUDE.md or project docs (ARCHITECTURE.md, ADRs) |
| Gotcha/Pitfall | .claude/rules/ with path-scoping |
| Pattern/Convention | .claude/rules/ with path-scoping |
| Process Improvement | CLAUDE.md or CONTRIBUTING.md |
| Debugging Insight | .claude/rules/ topic file |
If the session had no meaningful learnings (simple task, everything went smoothly), say so and stop. Don't force learnings that aren't there.
Before proposing changes, read CLAUDE.md, scan .claude/rules/ for existing rule files, and check for project docs (ARCHITECTURE.md, CONTRIBUTING.md, docs/). Follow any @ imports and path references in CLAUDE.md to discover documentation locations.
For each learning, check:
Estimate CLAUDE.md line count and track against the 300-line budget.
Activates when BOTH conditions are true:
Scan CLAUDE.md for entries that no longer earn their place:
| Category | How to verify |
|---|---|
| Duplicated by docs | Entry restates guidance in a docs/*.md file that CLAUDE.md already references |
| Enforced by toolchain | Linter, ast-grep, CI, or pre-commit hook already catches this (check config files) |
| Outdated | Convention no longer matches codebase (verify with grep/glob) |
| Session debris | Ephemeral context from a past session that was never cleaned up |
Rules:
Present ALL proposed changes to the user in a single summary before writing anything.
## Session Debrief: Proposed Updates
### 1. CLAUDE.md (289 → 285 lines, net -4)
**Removals (pruned):**
- **Remove line 142**: "Use X pattern" — now documented in docs/SERVICES.md (referenced on line 12)
- **Remove line 87**: "Run prettier before committing" — enforced by pre-commit hook in .husky/pre-commit
**Additions:**
- **Add**: "IExceptionHandler gotcha: need both AddExceptionHandler() and UseExceptionHandler() (see src/Program.cs:42)"
- **Update**: Change "Use npm" → "Use pnpm (npm causes lockfile conflicts)"
### 2. .claude/rules/api-conventions.md (new file)
- **Add**: Path-scoped rule for `src/api/**/*.ts`
- Content: "All API handlers must validate input with zod schemas before processing"
### 3. Skipped
- [Session-specific detail] — not generalizable
- [Already documented in .claude/rules/testing.md]
These rules are non-negotiable when proposing CLAUDE.md changes:
see src/config.ts:15-20)@docs/api-patterns.md not inline explanationsapi-conventions.md, testing.md, debugging.mdWhen updating CONTRIBUTING.md, ARCHITECTURE.md, docs/*.md:
@ references to find authoritative locationsUse AskUserQuestion to get approval:
{
"questions": [{
"question": "Here are the proposed documentation updates from this session. Which should I apply?",
"header": "Updates",
"multiSelect": false,
"options": [
{ "label": "Apply all", "description": "Apply all proposed changes listed above" },
{ "label": "CLAUDE.md only", "description": "Only update CLAUDE.md, skip other files" },
{ "label": "Rules only", "description": "Only update .claude/rules/ files" },
{ "label": "Let me pick", "description": "Show each change individually for approval" }
]
}]
}
After applying, show a summary table of what was updated with file, change description, and line delta. Report final CLAUDE.md line count and remaining budget.
~/.claude/CLAUDE.md or CLAUDE.local.md instead$ARGUMENTS
npx claudepluginhub propstreet/claude-powerpack --plugin claude-powerpackExtracts learnings from the current conversation and appends them to the project's CLAUDE.md as generalized rules. Captures non-obvious solutions and workarounds.
Extracts reusable rules from developer corrections during a coding session and persists them to CLAUDE.md or memory for future sessions.
Analyzes Claude Code sessions to improve CLAUDE.md instructions and capture learnings. Quick mode suggests CLAUDE.md tweaks; deep mode reviews problems, patterns, preferences, and gaps.