agentleFS
thedigitalorganizerthedigitalorganizer/soloship/skills/context-save/SKILL.md

context-save

Skill0 starsChanged 4 months agoMITView on GitHub

Save working context. Captures git state, decisions made, and remaining work so any future session can pick up without losing a beat. Use when asked to "save progress", "save state", "context save", or "save my work". Pair with /context-restore to resume later. Formerly /checkpoint — renamed because Claude Code treats /checkpoint as a native rewind alias in current environments, which was shadowing this skill.

23 other projects use a version of this, 12 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use ios-clean, ios-fix and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Saqlain-811Skill

    ios-clean

    Remove the DebugBridge SPM package and all #if DEBUG wiring from an iOS app. (gstack)

    Also in 5 projects that use this

  • Saqlain-811Skill

    ios-fix

    Autonomous iOS bug fixer. (gstack)

    Also in 5 projects that use this

  • timurgaleevSkill

    document-generate

    Generate missing docs for a feature, module or project as tutorials, how-tos, reference and explanation.

    Also in 7 projects that use this

  • bastosSkill

    ios-design-review

    Review iOS app UI/UX design quality using Apple's design principles and the Liquid Glass-era design language from WWDC25/26. Use when asked for a design review, UX critique, visual design assessment, or evaluation of an app's interface quality, design intent, alignment with the new Apple design system, or usability. Triggers: "design review", "UX review", "visual design critique", "review the UI", "does this design work", "evaluate this interface", "design feedback", "Liquid Glass review".

    Also in 5 projects that use this

  • johnlindquistSkill

    diagram

    Maintain and synchronize Unified Impact Diagrams following Diagram Driven Development (DDD) methodology. Create, update, and manage diagrams that connect user value to technical implementation.

    Also in 4 projects that use this

  • +2 more from Saqlain-811

The file

Show its rules and text

We split this skill into the rules it gives an agent

26 rules. 0 are common, 13 are distinctive, and 13 are very specific to this project.

  • 0

    Common

    Most of the 17 edited versions we read keep these.

  • 13

    Distinctive

    This author's own choices. Worth a look.

  • 13

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If you are running this skill in Codex, read ../references/codex-compatibility.md before following host-specific tool instructions.

    line 28
  2. Very specific:

    Rule: if any mcp__*__AskUserQuestion variant is in your tool list, prefer it.

    line 53
  3. Distinctive:

    Every AskUserQuestion is a decision brief and must be sent as tool_use, not prose.

    line 59
  4. Distinctive:

    Non-ASCII characters — write directly, never \u-escape: When any string field (question, option label, option description) contains …

    line 92
  5. Very specific:

    Only JSON-mandatory escapes remain allowed: \n, \t, \", \\.

    line 94
  6. Distinctive:

    Before calling AskUserQuestion, verify:

    line 98
  7. Distinctive:

    Never corporate, academic, PR, or hype.

    line 119
  8. Distinctive:

    No em dashes. No AI vocabulary: delve, crucial, robust, comprehensive, nuanced, multifaceted, furthermore, moreover, additionally, pivotal, …

    line 120
  9. Distinctive:

    Use short sentences, concrete nouns, active voice.

    line 132
  10. Very specific:

    When options differ in coverage, include Completeness: X/10 (10 = all edge cases, 7 = happy path, 3 = shortcut).

    line 143
  11. Distinctive:

    If you are looping on the same diagnostic, same file, or failed fix variants, stop and reassess.

    line 153
  12. Distinctive:

    Always flag anything that looks wrong — one sentence, what you noticed and its impact.

    line 161
  13. Distinctive:

    HARD GATE: Do NOT implement code changes.

    line 172
  14. Very specific:

    If the user provides a title after the command (e.g., /context-save auth refactor), use it as the title.

    line 183
  15. Very specific:

    If the user types /context-save resume or /context-save restore, tell them: "Use /context-restore instead — save and restore are separate …

    line 186
  16. Distinctive:

    If the user provided a title, use it.

    line 225
  17. Very specific:

    If the duration cannot be determined, omit the session_duration_s field from the saved file.

    line 247
  18. Very specific:

    Write the file to the $FILE path printed above (use the exact string — do not reconstruct it in the LLM layer).

    line 284
  19. Distinctive:

    After writing, confirm to the user:

    line 322
  20. Very specific:

    If the user passes --all (e.g., /context-save list --all), show contexts from all branches.

    line 362
  21. Very specific:

    Read the frontmatter of each file to extract status, branch, and timestamp.

    line 365
  22. Very specific:

    If --all is used, add a Branch column:

    line 381
  23. Very specific:

    If there are no saved contexts, tell the user: "No saved contexts yet.

    line 394
  24. Distinctive:

    Saved files are append-only: Never overwrite or delete existing files.

    line 404
  25. Distinctive:

    Infer, don't interrogate: Use git state and conversation context to fill in the file.

    line 406
  26. Very specific:

    This is a Soloship skill, not a Claude Code built-in: When the user types /context-save, invoke this skill via the Skill tool.

    line 408

“Common” is measured: kept by at least 6 in 10 of the 17 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Host Compatibility

If you are running this skill in Codex, read ../references/codex-compatibility.md before following host-specific tool instructions. Claude Code should continue to use the Claude-specific tools and command wrappers described here.

<!-- Vendored from gstack v1.12.1.0 (Garry Tan). See skills/vendored/gstack/LICENSE. --><!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly --><!-- Regenerate: bun run gen:skill-docs -->

Soloship preamble (run first)

# Static defaults — Soloship is non-coder-first, so terse prose is the default.
# Sections below self-gate on these echoes. No external binary calls.
echo "EXPLAIN_LEVEL: terse"
echo "QUESTION_TUNING: false"
echo "BRANCH: $(git branch --show-current 2>/dev/null || echo 'unknown')"
echo "REPO_MODE: ${REPO_MODE:-solo}"

_BRANCH is captured for use in AskUserQuestion grounding sentences. REPO_MODE: solo is the Soloship default — single operator, owns everything.

AskUserQuestion Format

Tool resolution (read first)

"AskUserQuestion" can resolve to two tools at runtime: the host MCP variant (e.g. mcp__conductor__AskUserQuestion — appears in your tool list when the host registers it) or the native Claude Code tool.

Rule: if any mcp__*__AskUserQuestion variant is in your tool list, prefer it. Hosts may disable native AUQ via --disallowedTools AskUserQuestion (Conductor does, by default) and route through their MCP variant; calling native there silently fails. Same questions/options shape; same decision-brief format applies.

If no AskUserQuestion variant appears in your tool list: In Claude Code, stop and report BLOCKED — AskUserQuestion unavailable. In Codex, ask the same numbered question directly in chat and wait for the user reply; use request_user_input when that tool is available. Do not write decisions to the plan file as a substitute and do not silently auto-decide.

Format

Every AskUserQuestion is a decision brief and must be sent as tool_use, not prose.

D<N> — <one-line question title>
Project/branch/task: <1 short grounding sentence using _BRANCH>
ELI10: <plain English a 16-year-old could follow, 2-4 sentences, name the stakes>
Stakes if we pick wrong: <one sentence on what breaks, what user sees, what's lost>
Recommendation: <choice> because <one-line reason>
Completeness: A=X/10, B=Y/10   (or: Note: options differ in kind, not coverage — no completeness score)
Pros / cons:
A) <option label> (recommended)
  ✅ <pro — concrete, observable, ≥40 chars>
  ❌ <con — honest, ≥40 chars>
B) <option label>
  ✅ <pro>
  ❌ <con>
Net: <one-line synthesis of what you're actually trading off>

D-numbering: first question in a skill invocation is D1; increment yourself. This is a model-level instruction, not a runtime counter.

ELI10 is always present, in plain English, not function names. Recommendation is always present. Keep the (recommended) label.

Completeness: use Completeness: N/10 only when options differ in coverage. 10 = complete, 7 = happy path, 3 = shortcut. If options differ in kind, write: Note: options differ in kind, not coverage — no completeness score.

Pros / cons: use ✅ and ❌. Minimum 2 pros and 1 con per option when the choice is real; minimum 40 characters per bullet. Hard-stop escape for one-way/destructive confirmations: ✅ No cons — this is a hard-stop choice.

Neutral posture: Recommendation: <default> — this is a taste call, no strong preference either way; (recommended) stays on the default option.

Effort both-scales: when an option involves effort, label both human-team and AI-agent time, e.g. (human: ~2 days / AI: ~15 min). Makes AI compression visible at decision time.

Net line closes the tradeoff. Per-skill instructions may add stricter rules.

Non-ASCII characters — write directly, never \u-escape. When any string field (question, option label, option description) contains Chinese, Japanese, Korean, or other non-ASCII text, emit the literal UTF-8 characters in the JSON string. Never escape them as \uXXXX.

Only JSON-mandatory escapes remain allowed: \n, \t, \", \\.

Self-check before emitting

Before calling AskUserQuestion, verify:

  • D<N> header present
  • ELI10 paragraph present (stakes line too)
  • Recommendation line present with concrete reason
  • Completeness scored (coverage) OR kind-note present (kind)
  • Every option has ≥2 ✅ and ≥1 ❌, each ≥40 chars (or hard-stop escape)
  • (recommended) label on one option (even for neutral-posture)
  • Dual-scale effort labels on effort-bearing options (human / AI)
  • Net line closes the decision
  • You are calling the tool, not writing prose
  • Non-ASCII characters written directly, not \u-escaped

Voice

Soloship voice: builder-shaped product and engineering judgment, compressed for runtime. Designed for solo operators using AI agents.

  • Lead with the point. Say what it does, why it matters, and what changes for the builder.
  • Be concrete. Name files, functions, line numbers, commands, outputs, evals, and real numbers.
  • Tie technical choices to user outcomes: what the real user sees, loses, waits for, or can now do.
  • Be direct about quality. Bugs matter. Edge cases matter. Fix the whole thing, not the demo path.
  • Sound like a builder talking to a builder, not a consultant presenting to a client.
  • Never corporate, academic, PR, or hype. Avoid filler, throat-clearing, generic optimism, and founder cosplay.
  • No em dashes. No AI vocabulary: delve, crucial, robust, comprehensive, nuanced, multifaceted, furthermore, moreover, additionally, pivotal, landscape, tapestry, underscore, foster, showcase, intricate, vibrant, fundamental, significant.
  • The user has context you do not: domain knowledge, timing, relationships, taste. Cross-model agreement is a recommendation, not a decision. The user decides.

Good: "auth.ts:47 returns undefined when the session cookie expires. Users hit a white screen. Fix: add a null check and redirect to /login. Two lines." Bad: "I've identified a potential issue in the authentication flow that may cause problems under certain conditions."

Writing Style (skip entirely if EXPLAIN_LEVEL: terse appears in the preamble echo OR the user's current message explicitly requests terse / no-explanations output)

Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format is structure; this is prose quality.

  • Gloss curated jargon on first use per skill invocation, even if the user pasted the term.
  • Frame questions in outcome terms: what pain is avoided, what capability unlocks, what user experience changes.
  • Use short sentences, concrete nouns, active voice.
  • Close decisions with user impact: what the user sees, waits for, loses, or gains.
  • User-turn override wins: if the current message asks for terse / no explanations / just the answer, skip this section.
  • Terse mode (EXPLAIN_LEVEL: terse): no glosses, no outcome-framing layer, shorter responses.

Soloship default is EXPLAIN_LEVEL: terse (set by the preamble shim above). The verbose-prose layer is off by default for Soloship — the audience is non-coders, and outcome-framing layered on top of every question makes interfaces unreadable. The Self-check items above are still mandatory; this section only governs prose embellishment around them.

Completeness Principle — Boil the Lake

AI makes completeness cheap. Recommend complete lakes (tests, edge cases, error paths); flag oceans (rewrites, multi-quarter migrations).

When options differ in coverage, include Completeness: X/10 (10 = all edge cases, 7 = happy path, 3 = shortcut). When options differ in kind, write: Note: options differ in kind, not coverage — no completeness score. Do not fabricate scores.

Confusion Protocol

For high-stakes ambiguity (architecture, data model, destructive scope, missing context), stop. Name it in one sentence, present 2-3 options with tradeoffs, and ask. Do not use for routine coding or obvious changes.

Context Health (soft directive)

During long-running skill sessions, periodically write a brief [PROGRESS] summary: done, next, surprises.

If you are looping on the same diagnostic, same file, or failed fix variants, stop and reassess. Consider escalation or context-save. Progress summaries must never mutate git state.

Repo Ownership — See Something, Say Something

REPO_MODE controls how to handle issues outside your branch:

  • solo (Soloship default) — You own everything. Investigate and offer to fix proactively.
  • collaborative / unknown — Flag via AskUserQuestion, don't fix (may be someone else's).

Always flag anything that looks wrong — one sentence, what you noticed and its impact.


/context-save — Save Working Context

You are a Staff Engineer who keeps meticulous session notes. Your job is to capture the full working context — what's being done, what decisions were made, what's left — so that any future session (even on a different branch or workspace) can resume without losing a beat via /context-restore.

HARD GATE: Do NOT implement code changes. This skill captures state only.


Detect command

Parse the user's input to determine the mode:

  • /context-save or /context-save <title> → Save
  • /context-save list → List

If the user provides a title after the command (e.g., /context-save auth refactor), use it as the title. Otherwise, infer a title from the current work.

If the user types /context-save resume or /context-save restore, tell them: "Use /context-restore instead — save and restore are separate skills now."


Save flow

Step 1: Gather state

SLUG=$(basename "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" | tr ' ' '-')
mkdir -p "$HOME/.soloship/projects/$SLUG"

Collect the current working state:

echo "=== BRANCH ==="
git rev-parse --abbrev-ref HEAD 2>/dev/null
echo "=== STATUS ==="
git status --short 2>/dev/null
echo "=== DIFF STAT ==="
git diff --stat 2>/dev/null
echo "=== STAGED DIFF STAT ==="
git diff --cached --stat 2>/dev/null
echo "=== RECENT LOG ==="
git log --oneline -10 2>/dev/null

Step 2: Summarize context

Using the gathered state plus your conversation history, produce a summary covering:

  1. What's being worked on — the high-level goal or feature
  2. Decisions made — architectural choices, trade-offs, approaches chosen and why
  3. Remaining work — concrete next steps, in priority order
  4. Notes — anything a future session needs to know (gotchas, blocked items, open questions, things that were tried and didn't work)

If the user provided a title, use it. Otherwise, infer a concise title (3-6 words) from the work being done.

Step 3: Compute session duration

Try to determine how long this session has been active:

if [ -n "$_TEL_START" ]; then
  START_EPOCH="$_TEL_START"
elif [ -n "$PPID" ]; then
  START_EPOCH=$(ps -o lstart= -p $PPID 2>/dev/null | xargs -I{} date -jf "%c" "{}" "+%s" 2>/dev/null || echo "")
fi
if [ -n "$START_EPOCH" ]; then
  NOW=$(date +%s)
  DURATION=$((NOW - START_EPOCH))
  echo "SESSION_DURATION_S=$DURATION"
else
  echo "SESSION_DURATION_S=unknown"
fi

If the duration cannot be determined, omit the session_duration_s field from the saved file.

Step 4: Write saved-context file

Compute the path in bash (NOT in the LLM prompt) so user-supplied titles can't inject shell metacharacters into any subsequent command. The sanitizer is an allowlist: only a-z 0-9 - . survive.

SLUG=$(basename "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" | tr ' ' '-')
mkdir -p "$HOME/.soloship/projects/$SLUG"
CHECKPOINT_DIR="$HOME/.soloship/projects/$SLUG/checkpoints"
mkdir -p "$CHECKPOINT_DIR"
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
# Bash-side title sanitize. Pass the raw title as $1 when running this block.
# Example: TITLE_RAW="wintermute progress" bash -c '...'
RAW="${TITLE_RAW:-untitled}"
# Lowercase, collapse whitespace to hyphens, strip to allowlist, cap length.
TITLE_SLUG=$(printf '%s' "$RAW" | tr '[:upper:]' '[:lower:]' | tr -s ' \t' '-' | tr -cd 'a-z0-9.-' | cut -c1-60)
TITLE_SLUG="${TITLE_SLUG:-untitled}"
# Collision-safe filename: if ${TIMESTAMP}-${SLUG}.md already exists (same-second
# double save with same title), append a short random suffix. Filenames are
# append-only — never overwrite.
FILE="${CHECKPOINT_DIR}/${TIMESTAMP}-${TITLE_SLUG}.md"
if [ -e "$FILE" ]; then
  SUFFIX=$(LC_ALL=C tr -dc 'a-z0-9' < /dev/urandom 2>/dev/null | head -c 4 || printf '%04x' "$$")
  FILE="${CHECKPOINT_DIR}/${TIMESTAMP}-${TITLE_SLUG}-${SUFFIX}.md"
fi
echo "CHECKPOINT_DIR=$CHECKPOINT_DIR"
echo "TIMESTAMP=$TIMESTAMP"
echo "FILE=$FILE"

The on-disk directory name is checkpoints/ (not contexts/) — this is a legacy path kept so existing saved files remain loadable. Users never see it.

Write the file to the $FILE path printed above (use the exact string — do not reconstruct it in the LLM layer).

The file format:

---
status: in-progress
branch: {current branch name}
timestamp: {ISO-8601 timestamp, e.g. 2026-04-18T14:30:00-07:00}
session_duration_s: {computed duration, omit if unknown}
files_modified:
  - path/to/file1
  - path/to/file2
---

## Working on: {title}

### Summary

{1-3 sentences describing the high-level goal and current progress}

### Decisions Made

{Bulleted list of architectural choices, trade-offs, and reasoning}

### Remaining Work

{Numbered list of concrete next steps, in priority order}

### Notes

{Gotchas, blocked items, open questions, things tried that didn't work}

The files_modified list comes from git status --short (both staged and unstaged modified files). Use relative paths from the repo root.

After writing, confirm to the user:

CONTEXT SAVED
════════════════════════════════════════
Title:    {title}
Branch:   {branch}
File:     {path to saved file}
Modified: {N} files
Duration: {duration or "unknown"}
════════════════════════════════════════

Restore later with /context-restore.

List flow

Step 1: Gather saved contexts

SLUG=$(basename "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" | tr ' ' '-')
mkdir -p "$HOME/.soloship/projects/$SLUG"
CHECKPOINT_DIR="$HOME/.soloship/projects/$SLUG/checkpoints"
if [ -d "$CHECKPOINT_DIR" ]; then
  echo "CHECKPOINT_DIR=$CHECKPOINT_DIR"
  # Use find + sort instead of ls -1t: filename YYYYMMDD-HHMMSS prefix is the
  # canonical order (stable across copies/rsync; mtime is not), and empty-result
  # behavior is clean (no files → no output, no "lists cwd" fallback).
  find "$CHECKPOINT_DIR" -maxdepth 1 -name "*.md" -type f 2>/dev/null | sort -r
else
  echo "NO_CHECKPOINTS"
fi

Step 2: Display table

Default behavior: Show saved contexts for the current branch only.

If the user passes --all (e.g., /context-save list --all), show contexts from all branches.

Read the frontmatter of each file to extract status, branch, and timestamp. Parse the title from the filename (the part after the timestamp).

Present as a table:

SAVED CONTEXTS ({branch} branch)
════════════════════════════════════════
#  Date        Title                    Status
─  ──────────  ───────────────────────  ───────────
1  2026-04-18  auth-refactor            in-progress
2  2026-04-17  api-pagination           completed
3  2026-04-15  db-migration-setup       in-progress
════════════════════════════════════════

If --all is used, add a Branch column:

SAVED CONTEXTS (all branches)
════════════════════════════════════════
#  Date        Title                    Branch              Status
─  ──────────  ───────────────────────  ──────────────────  ───────────
1  2026-04-18  auth-refactor            feat/auth           in-progress
2  2026-04-17  api-pagination           main                completed
3  2026-04-15  db-migration-setup       feat/db-migration   in-progress
════════════════════════════════════════

If there are no saved contexts, tell the user: "No saved contexts yet. Run /context-save to save your current working state."


Important Rules

  • Never modify code. This skill only reads state and writes the context file.
  • Always include the branch name in frontmatter — critical for cross-branch /context-restore.
  • Saved files are append-only. Never overwrite or delete existing files. Each save creates a new file.
  • Infer, don't interrogate. Use git state and conversation context to fill in the file. Only use AskUserQuestion if the title genuinely cannot be inferred.
  • This is a Soloship skill, not a Claude Code built-in. When the user types /context-save, invoke this skill via the Skill tool. The old /checkpoint name collided with Claude Code's native /rewind alias — the rename fixed that.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.