Compact the conversation context by summarizing what was accomplished and updating CLAUDE.md with any learnings. Use when context is getting long or when transitioning between work sessions.
This skill performs context compaction - summarizing the current session and persisting valuable learnings to CLAUDE.md.
Purpose: Reduce context length while preserving important information for future sessions.
Use this skill when:
Review the current conversation and identify:
Work Completed
Decisions Made
Problems Encountered
User Preferences Revealed
Learnings About the Codebase
Rule files in .claude/rules/ are domain-specific and have a lower threshold than CLAUDE.md. They should capture patterns, gotchas, and decisions for specific domains.
Rule File Locations:
rules/frontend/ - auth, styling, api, routing, state, onboarding, errorsrules/backend/ - auth, data, api, validation, services, calculations, llm, errors, middleware, utils, seedrules/components/ - components, styling, charts, forms, storybook, errorsrules/e2e/ - testing, authThreshold for Rules: Add if it meets TWO criteria:
Examples that SHOULD go in rule files:
rules/components/charts.mdrules/backend/validation.mdrules/components/components.mdrules/backend/auth.mdrules/frontend/styling.mdExamples that should NOT go in rule files:
Rule File Sections: Each rule file follows this structure:
Add learnings to the appropriate section. If a section doesn't exist, create it.
CLAUDE.md has a higher threshold - only global, project-wide learnings.
Threshold: Only add if it meets ALL THREE criteria:
Examples that PASS the threshold:
Examples that FAIL (should go in rules instead):
When in doubt, put it in a rule file. CLAUDE.md is for global conventions only.
Step 1: Update Rule Files
For each domain-specific learning:
Step 2: Update CLAUDE.md (if warranted)
For global learnings that pass the higher threshold:
CLAUDE.md Placement Guidelines:
| Learning Type | Where to Add | |---------------|--------------| | New tech/dependency | Tech Stack section | | New pattern/convention | Coding Standards section | | New page or feature | Pages section | | New API endpoint | API Design section | | Security concern | Security section | | User preference | NOTES FROM THE USER section | | Development tip | Development Setup section |
Produce a compact summary with this structure:
## Session Summary
### Completed
- [Bullet list of work done]
### Files Changed
- [List of significant files modified]
### Decisions
- [Key decisions made during session]
### Open Items
- [Anything left incomplete or for next session]
### Rule Updates
- [Rule file → what was added]
### CLAUDE.md Updates
- [What was added, if anything, or "None"]
The skill produces:
The summary becomes the new context for continuing work, replacing the long conversation history.
## Session Summary
### Completed
- Fixed TypeScript strict mode errors in backend/
- Implemented rate limiting middleware
- Added Norwegian number formatting utility
- Created user profile API endpoint
### Files Changed
- backend/src/middleware/rateLimiter.ts (new)
- backend/src/controllers/userController.ts (modified)
- frontend/src/shared/utils/numberFormat.ts (new)
- backend/tsconfig.json (modified - enabled strict)
### Decisions
- Rate limit: 100 req/min general, 10 req/min calculators
- Number format: numeral.js with custom nb locale
- Profile updates require email verification
### Open Items
- E2E test for rate limiting
### Rule Updates
- rules/backend/middleware.md → Added rate limiter configuration pattern
- rules/backend/validation.md → Added profile update validation schema
- rules/frontend/styling.md → Added numeral.js locale setup
### CLAUDE.md Updates
- None (domain-specific learnings went to rule files)
The user can invoke with:
npx skills add andersnygaard/summarize-session下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer