regression-io/claude-config-plugins/flush

Claude Code and agent skill by regression-io/claude-config-plugins

Trust tier 3
  • community
Source check pending

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/flush

SKILL.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)
  1. Run git rev-parse --show-toplevel from the cwd. If it succeeds, use <repo-root>/.claude/.
  2. If cwd is not in a git repo, use <cwd>/.claude/ (the "working directly in ~" case → ~/.claude).
  3. 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:

SectionContent
Task SummaryWhat the user asked for
Current Statecompleted / in-progress / blocked
Key DecisionsImportant choices and rationale
Files ModifiedWhat was created/changed
Pending WorkWhat still needs to be done
Important ContextCritical 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):

bash
find "<chosen-dir>/.claude" -maxdepth 1 -name 'session-context.*.md' -type f -mtime +14 -delete

Output Format

markdown
# Session Context - YYYY-MM-DD
## Task Summary
[What the user wanted to accomplish]
## Current State
**[status]**
[Brief description]
## Key Decisions
-**[Decision]**: [Rationale]
## Files Modified
-`path/to/file` - [what changed]
## Pending Work
-[ ] Task 1
-[ ] Task 2
## Important Context
[Critical information for continuation]

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/regression-io/claude-config-plugins/flush/badge)](https://verified-skill.com/skills/regression-io/claude-config-plugins/flush)

Something wrong with this skill or its page? Tell us.