garrytan/gstack/context-save

Claude Code and agent skill by garrytan/gstack

Trust tier 2
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Save working context. Use for: save progress, save state, save my work, context save. (gstack)

Install

npx vskill@latest install garrytan/gstack/context-save

SKILL.md

The same SKILL.md was published earlier as garrytan/gstack/context-save.

/context-save — Save Working Context

Capture a lean ~20–30 line checkpoint (active decisions, reversals, open promises, minimal workspace state) in one fast pass so /context-restore resumes with zero stale decisions.

HARD GATE: Do NOT implement code changes. Capture state only.

Detect command

  • /context-save or /context-save <title> → Save (infer a 3–6 word title if omitted)
  • /context-save list or /context-save list --all → List
  • /context-save resume or /context-save restore → reply: "Use /context-restore to resume — restoring is a separate skill."

Save flow

Write in one fast pass from session context — skip git diff --stat, git log, and directory dumps (run git status -sb only if branch or key modified files are not already in context).

Step 1: Draft the lean checkpoint (~20–30 lines)
markdown
## Working on: {3-6 word title}
### Active Decisions
-{Current binding decision, 1 line. On any change or reversal, REPLACE the old entry — never keep superseded choices here.}
### Reversals / Do-Not-Repeat
-~~{Superseded approach or dropped choice}~~ -> {Current choice} ({short reason dropped})
### Open Promises / Next Step
1.Open. {Exact next step: concrete file, symbol, command, or pending deliverable} {(provenance marker)}
### Workspace
-Branch: `{branch}`
-Key files: `path/a`, `path/b`
  • Reversal hygiene: Replace changed entries in Active Decisions and log

each dropped approach + reason in Reversals / Do-Not-Repeat so a returning session never regresses (- None. only if none).

  • Decisions & file claims: Back any claim about a concrete file's contents

with a read/grep/wc in this turn, or mark it (path assumed) under Open Promises for restore to verify first.

  • Remaining Work provenance: Every item starts with Open. (never

[done] or [executed]) and ends with the first applicable English literal marker (Markers stay English literals — never translate; fix missing or invalid markers before saving):

  1. Writing step (migration, sync, insert, import, mutating dialog): (target state checked) | (code read) | (path assumed)
  2. Concrete path (command, flag, config key/value, file/dir): (path run) + outcome | (path read) | (path assumed)
  3. Otherwise: none (Open. alone).
Step 2: Save and stamp in one call

Write the lean checkpoint markdown from Step 1 to a private temp file using the Write tool (so untrusted body text never enters a shell command), then pass that path to save --body-file. The helper derives the filename slug safely from ## Working on: in the body (never interpolate titles into the shell command), adds YAML frontmatter (status, branch, timestamp, session_duration_s, files_modified), stamps remote:, project_root:, worktree:, and head: (do not write remote:, project_root:, worktree: or head: yourself), carries forward open Active Decisions, Reversals / Do-Not-Repeat, and Open Promises / Next Step from the prior same-branch checkpoint on stub or non-code saves (pass --replace or --clear when prior items are resolved), publishes atomically without overwriting, and records a nested-repo pointer when CLAUDE_PROJECT_DIR differs:

bash
# Bash-side title sanitize. Pass the raw title via TITLE_RAW when running this block.
~/.claude/skills/gstack/bin/gstack-context-checkpoint save --body-file "<the FILE path printed above>"

Confirm in one line: Saved: {title} ({BRANCH}, {MODIFIED} modified) -> {FILE}. Restore with /context-restore.


List flow

Run one command (add --all when passed):

bash
~/.claude/skills/gstack/bin/gstack-context-checkpoint list
  • NO_CHECKPOINTS → "No saved contexts yet. Run /context-save to save your current working state."
  • NO_CHECKPOINTS_ON_BRANCH → say none on this branch and suggest /context-save list --all.
  • NO_VERIFIED_CHECKPOINTS / IDENTITY_CHECK_FAILED → report unverified (relay HIDDEN:).
  • Otherwise print a table (#, Date, Title, Status; Branch for --all) + any HIDDEN:/TRUNCATED:.

Important Rules

  • Never modify code. Append-only in checkpoints/ (helper guarantees collision-safe filenames).
  • Lean (~20–30 lines). Decisions, reversals, next steps, key files only — no narrative recaps or git log dumps.
  • Infer, don't interrogate. Only ask via AskUserQuestion if the title cannot be inferred.
  • Invoke via Skill tool — /context-save is a gstack skill, not a built-in.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
129,555
Repository forks
19,504
Repository npm downloads, 7 days
209
7-day trend score
73

Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 24 Jul 2026, 4 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Grok Build (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/garrytan/gstack/context-save/badge)](https://verified-skill.com/skills/garrytan/gstack/context-save)

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