A Kiro Power that preserves session context across chat windows. Never lose your decisions, progress, or reasoning when switching sessions.
- Auto-capture: Structured session summaries saved automatically when sessions end
- Auto-restore: Prior context loaded automatically when new sessions start
- Branch-aware: Summaries tagged with git branch — restores prefer same-branch context
- Project memory: Persistent file accumulates long-term project knowledge across all sessions
- Manual snapshots: Save context on demand at any point during a session
- Compression: Consolidate older summaries to keep the store lean
- Zero dependencies: Pure hooks + steering files, no MCP server needed
- Open Kiro IDE
- Go to the Powers panel
- Click "Add power from GitHub"
- Paste
https://github.com/logesh4v/context-keeper - Click Install
That's it. The power starts working immediately — no configuration needed.
When you close a chat session or it ends, Context Keeper automatically:
- Detects your current git branch
- Generates a structured summary (decisions, files modified, patterns, preferences, questions, next steps)
- Saves it to
.kiro/context-keeper/sessions/ - Updates the project memory with new learnings
- Cleans up old files (keeps max 20)
When you start a new chat session, Context Keeper automatically:
- Finds the most recent summary for your current branch (falls back to any branch)
- Loads the project memory file
- Loads any compressed historical context
- Presents everything in labeled sections
Trigger the "Snapshot Context" hook anytime to save a point-in-time snapshot. Useful before switching tasks or branches.
Trigger the "Compress Context" hook to consolidate older summaries. It:
- Keeps the 3 most recent summaries untouched
- Merges older ones into a single compressed file
- Deduplicates decisions, patterns, and preferences
- Discards session-specific metadata and resolved questions
- Requires at least 4 session files to run
.kiro/context-keeper/
├── project-memory.md # Persistent project knowledge
└── sessions/
├── 2025-01-15T14-30-00-feature-auth.md # Auto-captured
├── 2025-01-15T16-00-00-main.md # Auto-captured
├── 2025-01-15T17-45-00-feature-auth-manual.md # Manual snapshot
└── compressed-2025-01-16T10-00-00.md # Compressed history
Context Keeper uses 4 hooks and 5 steering files — no MCP server, no external dependencies:
| Hook | Event | What it does |
|---|---|---|
| Capture Context | agentStop |
Saves session summary + updates project memory |
| Restore Context | promptSubmit |
Loads prior context into new session |
| Snapshot Context | userTriggered |
Manual point-in-time save |
| Compress Context | userTriggered |
Consolidates older summaries |
Contributions welcome! This is an open-source Kiro Power.
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-improvement) - Make your changes
- Run tests:
npm test - Submit a pull request
git clone https://github.com/logesh4v/context-keeper.git
cd context-keeper
npm install
npm testMIT