regression-io/claude-config-plugins/flush
Claude Code and agent skill by regression-io/claude-config-plugins
- community
Checking that the SKILL.md file is still in the repository.
Save current session context to a resumable document. Use when ending a session, switching tasks, or wanting to preserve context for later continuation.
Install
npx vskill@latest install regression-io/claude-config-plugins/flushSKILL.md
Flush Context to Resumable Doc
Save all current session context to a per-session file .claude/session-context.<session-id>.md for seamless continuation. Per-session naming means parallel sessions never overwrite each other's flush.
When to Use
- Ending a work session
- Switching to a different task
- Before a long break
- When context is getting complex and you want a checkpoint
- User says "save context", "flush", "checkpoint", or similar
Process
Step 1: Pick the .claude Directory (anchor to the project root)
- Run
git rev-parse --show-toplevelfrom the cwd. If it succeeds, use<repo-root>/.claude/. - If cwd is not in a git repo, use
<cwd>/.claude/(the "working directly in~" case →~/.claude). - Create the dir if it doesn't exist — no prompt, the location is deterministic. Do not offer
/init. Print the resolved absolute path so the location is never a surprise.
Do not walk up the tree looking for an ancestor .claude/: that made flush drift into the nearest ancestor (including the global ~/.claude config dir) instead of the project you're working in.
Step 2: Create Session Summary
Summarize the session:
| Section | Content | |
|---|---|---|
| Task Summary | What the user asked for | |
| Current State | completed / in-progress / blocked | |
| Key Decisions | Important choices and rationale | |
| Files Modified | What was created/changed | |
| Pending Work | What still needs to be done | |
| Important Context | Critical info for continuation |
Step 3: Write to File
Resolve the session id (printenv CLAUDE_CODE_SESSION_ID) and write to .claude/session-context.<session-id>.md in the chosen directory. If the env var is empty, fall back to the legacy global name .claude/session-context.md.
Then reap stale resume prompts (per-session files older than 14 days; the glob skips the legacy global file and won't touch the one just written):
Output Format
Notes
- Resume a saved context with
/unflush, which finds the right per-session file (preferring the current session id, else the most recent) and acts on it - Keep summaries concise but complete enough to resume without re-reading code
- Focus on the "why" not just the "what"
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/coder-config/skills/flush/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/regression-io/claude-config-plugins/flush)