Initialize the file-based memory system for the current project. Creates the directory structure and starter files. Use when starting organized work on a new project.
How this skill is triggered — by the user, by Claude, or both
Slash command
/swannysec-context-keeper:memory-initThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
1. Confirm working directory is a project root (has package.json, Cargo.toml, pyproject.toml, go.mod, or similar)
.claude/memory/ already exists
mkdir -p .claude/memory/decisions
mkdir -p .claude/memory/sessions
Ask user (or infer from codebase):
product-context.md - Populate with gathered info:
# Product Context
## Project Overview
<!-- What is this project? What problem does it solve? -->
## Architecture
<!-- High-level architecture description -->
## Key Stakeholders
<!-- Who uses this? Who maintains it? -->
## Constraints
<!-- Technical, business, or regulatory constraints -->
## Non-Goals
<!-- What this project explicitly doesn't do -->
---
*Last updated: [date] by Claude*
active-context.md - Set current focus:
# Active Context
## Current Focus
<!-- What are we working on right now? -->
## Recent Decisions
<!-- Decisions made in recent sessions that affect current work -->
## Open Questions
<!-- Unresolved questions that need answers -->
## Blockers
<!-- What's preventing progress? -->
---
*Session: [date]*
progress.md - Empty or with known tasks:
# Progress Tracker
## In Progress
- [ ] [Initial task if known]
## Completed (Recent)
<!-- Recently completed items -->
## Backlog
<!-- Future tasks -->
---
*Last updated: [date]*
patterns.md - Any detected patterns:
# Project Patterns
## Code Conventions
<!-- Coding standards and conventions -->
## Architecture Patterns
<!-- Recurring architectural patterns -->
## Testing Patterns
<!-- Testing conventions -->
---
*Last updated: [date]*
glossary.md - Any project-specific terms:
# Project Glossary
## Terms
<!-- Project-specific terminology -->
## Abbreviations
<!-- Common abbreviations used -->
---
*Last updated: [date]*
friction.md - Friction patterns (initially empty):
# Friction Patterns
<!-- Generated by /memory-insights. Edit freely. -->
<!-- Loaded at session start to help agents avoid known pitfalls. -->
<!-- Max ~15-20 entries to stay within token budget. -->
## Conventions
<!-- Add friction-reducing conventions here -->
## Project-Specific
<!-- Friction patterns specific to this project -->
---
*Last updated: [date]*
Ask user:
What token budget preset would you like?
- Economy (~2000 tokens): Minimal context, fast loading
- Light (~3000 tokens): Smaller projects, lighter footprint
- Standard (~4000 tokens): Balanced for most projects (default)
- Detailed (~6000 tokens): Comprehensive context, rich handoffs
Create .claude/memory/.memory-config.md with their choice:
---
token_budget: standard
---
If user accepts default (Standard), this file can be omitted.
Ask user:
Enable cross-project memory search? This allows searching memory across other projects on your machine. [y/n]
If yes:
Enter parent directories to search (comma-separated). Example: ~/zed, ~/work Write to
.claude/memory/.memory-config.md(append to existing frontmatter):
project_search_paths: ["~/zed", "~/work"]
If no:
Disable this prompt permanently? [y/n]
project_search_paths: disabled in configAsk user:
Should
.claude/memory/be tracked in git?
- Yes: Memory persists with repo (recommended for solo projects)
- No: Add to .gitignore (recommended for shared repos)
If no, add to .gitignore (idempotent - won't duplicate if already present):
grep -qxF '.claude/memory/' .gitignore 2>/dev/null || echo '.claude/memory/' >> .gitignore
Output summary:
Memory initialized for [project-name]
- Product context: [summary]
- Current focus: [focus]
- Token budget: [economy/light/standard/detailed]
- Git tracking: [yes/no]
Use
/memory-syncto update memory as you work. Use/memory-configto adjust settings later.
If any memory files already contain entries (e.g., reset scenario or migration from a previous setup), offer to tag them:
Tag existing memory entries with categories? [y/n]
If yes: Read each memory file and classify each entry or section heading using these keyword matching rules:
decisionpatternbugfixconventionlearningPlace each tag on its own line immediately after the entry it categorizes. Show the proposed tags to the user before applying, then apply on confirmation.
If no: Skip — no tags added. Files continue to work normally without tags.
This step is opt-in only. Never auto-tag without asking.
npx claudepluginhub joshuarweaver/cascade-ai-ml-agents-misc-1 --plugin swannysec-context-keeperGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Resolves in-progress git merge or rebase conflicts by analyzing history, understanding intent, and preserving both changes where possible. Runs automated checks after resolution.