agentleFS
maee-comaee-co/cc-autoship/skills/checkpoint/SKILL.md

checkpoint

Skill0 starsChanged 5 months agoMITArchived repositoryView on GitHub

Checkpoint your work: pause to save progress as an Issue comment, and resume it from another session. Issues can be given by GitHub number or Linear ID.

  • Reads credentials

99 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use aside, open-gstack-browser and 10 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.
  • TheKREATORSSkill

    aside

    Answer a quick side question without interrupting or losing context from the current task. Resume work automatically after answering.

    Also in 3 projects that use this

  • seek888Skill

    open-gstack-browser

    Launch GStack Browser — AI-controlled Chromium with the sidebar extension baked in. Opens a visible browser window where you can watch every action in real time. The sidebar shows a live activity feed and chat. Anti-bot stealth built in. Use when asked to "open gstack browser", "launch browser", "connect chrome", "open chrome", "real browser", "launch chrome", "side panel", or "control my browser". Voice triggers (speech-to-text aliases): "show me the browser".

    Also in 6 projects that use this

  • TheKREATORSSkill

    instinct-export

    Export instincts from project/global scope to a file

    Also in 3 projects that use this

  • AhmedMerzaSkill

    spinoff

    After a branch is finished, harvest the work it made CHEAP — the helper you wrote that four other sites now hand-roll, the plumbing that turned a deferred feature small, the pattern that just split the codebase in two. Produces a follow-up backlog (0–3 candidates, feeding /issue), NEVER commits on the current branch. Invoke with /spinoff at the tail of the chain — after /fix-review has settled the review findings, before the MR merges — or when the user asks \"what else should we do while we're here / what did this unlock / anything to follow up on\". This is ship-check's optional twin — that finds what's MISSING and blocks the merge; this finds what's now CHEAP and blocks nothing. Restraint-gated: \"nothing spun off\" is the common and correct answer, and a finding that would have been equally valid before this branch is not a finding.

    Also in 3 projects that use this

  • seek888Skill

    design-html

    Design finalization: generates production-quality Pretext-native HTML/CSS. Works with approved mockups from /design-shotgun, CEO plans from /plan-ceo-review, design review context from /plan-design-review, or from scratch with a user description. Text actually reflows, heights are computed, layouts are dynamic. 30KB overhead, zero deps. Smart API routing: picks the right Pretext patterns for each design type. Use when: "finalize this design", "turn this into HTML", "build me a page", "implement this design", or after any planning skill. Proactively suggest when user has approved a design or has a plan ready. (gstack) Voice triggers (speech-to-text aliases): "build the design", "code the mockup", "make it real".

    Also in 6 projects that use this

  • CodeWithBehnamSkill

    gstack-upgrade

    Upgrade gstack to the latest version. Detects global vs vendored install, runs the upgrade, and shows what's new.

    Also in 5 projects that use this

  • +2 more from TheKREATORS
  • +2 more from seek888

The file

Show its rules and text

We split this skill into the rules it gives an agent

22 rules. 0 are common, 12 are distinctive, and 10 are very specific to this project.

  • 0

    Common

    Most of the 91 edited versions we read keep these.

  • 12

    Distinctive

    This author's own choices. Worth a look.

  • 10

    Very specific

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

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

    If --issue and --create are both given → error: --issue and --create cannot be given together

    line 58
  2. Distinctive:

    If unauthenticated → tell the user it will fall back to markdown output at the end, and continue

    line 65
  3. Very specific:

    If the value above is empty, or is still an unexpanded ${...} placeholder (a Claude Code version without the substitution) → write …

    line 71
  4. Distinctive:

    Run these in parallel:

    line 76
  5. Distinctive:

    Run the reference you obtained through the "Resolving an issue reference (shared by pause and resume)" section to convert it into a GitHub …

    line 103
  6. Very specific:

    If it does not exist → error: Issue #{N} not found.

    line 107
  7. Distinctive:

    Write the title in the language of the session too.

    line 141
  8. Very specific:

    When there is no worktree, use <!-- checkpoint:worktree none --> or omit the marker entirely

    line 156
  9. Very specific:

    Read the pause note recorded by pause from the GitHub issue, restore the context, and continue the work.

    line 199
  10. Very specific:

    No argument → infer from the branch name (the lib function.

    line 215
  11. Distinctive:

    Run the reference you obtained through the "Resolving an issue reference (shared by pause and resume)" section to convert it into a GitHub …

    line 224
  12. Very specific:

    Check gh auth — error if unauthenticated

    line 226
  13. Distinctive:

    Search the comments in reverse (newest first) and take the first match

    line 241
  14. Distinctive:

    If no comment matches, check the issue body

    line 242
  15. Very specific:

    Only session, branch, and worktree are extracted mechanically

    line 251
  16. Distinctive:

    If no pause note is found → read the situation from the issue body and resume from there

    line 256
  17. Distinctive:

    Check whether the branch and worktree exist

    line 260
  18. Distinctive:

    If the issue is already closed → warn and continue (do not re-open it)

    line 269
  19. Very specific:

    Run the Linear MCP get_issue("ENG-123", includeRelations: true), look through attachments and links for a URL of the form …

    line 328
  20. Very specific:

    If there is still none → error: No GitHub issue corresponds to ENG-123

    line 330
  21. Distinctive:

    Use only git diff --stat (never dump the full code diff)

    line 362
  22. Distinctive:

    Never re-open a closed issue (that is the maintainer's call)

    line 366

“Common” is measured: kept by at least 6 in 10 of the 91 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

/checkpoint

An issue-based checkpoint for pausing and resuming work. Everything is recorded on GitHub issues, and an issue may be given either as a GitHub number (81) or as a Linear ID (ENG-123).

Output language: write the body of the pause note in the language of the session (the templates in this file are the sample and are not strings to copy verbatim). docs/rules/output-language.md is the SSoT for the fixed label translations.

The <!-- checkpoint:* --> markers, however, must always be emitted exactly as shown, regardless of language — resume reads the branch, worktree, and session ID out of those markers. Translating or omitting them means resume cannot find the pause note and, without raising an error, quietly degrades to the "no note" fallback (guessing the resume point from the issue body).

Usage

/checkpoint pause                  # infer the issue, comment the progress on it
/checkpoint pause --issue 81       # give the GitHub issue number explicitly
/checkpoint pause --issue ENG-123  # give a Linear ID (records on the corresponding GitHub issue)
/checkpoint pause --create         # create a new issue and record there
/checkpoint resume 81              # restore context from the pause note on issue #N
/checkpoint resume ENG-123         # restore from a Linear ID (via the corresponding GitHub issue)

pause — record a work interruption

Collect the session information, git state, and progress at the moment work stops, and record them as a comment on a GitHub issue.

Arguments

ArgumentDescriptionDefault
--issue <ref>The issue to record on. A GitHub number (81) or a Linear ID (ENG-123)Inferred from the branch name
--createCreate a new issue and record therefalse

Giving --issue and --create together is an error.

Procedure (6 steps, run immediately without asking the user)

Step 1: Parse arguments and check auth

  1. Parse the arguments:
    • --issue <ref>: the issue to record on. A GitHub number (81) or a Linear ID (ENG-123). Keep it as a raw string; resolving it to a GitHub issue number happens in "Resolving an issue reference" during step 4
    • --create: flag to create a new issue
    • If --issue and --create are both given → error: --issue and --create cannot be given together
    • Remaining text: used as an additional note
  2. Check gh auth:
    gh auth status 2>&1
    If unauthenticated → tell the user it will fall back to markdown output at the end, and continue

Step 2: Collect session information

  1. The session ID of this session is: ${CLAUDE_SESSION_ID}
    • Claude Code substitutes it into this skill's text when the skill is loaded, so no command is needed to look it up
    • If the value above is empty, or is still an unexpanded ${...} placeholder (a Claude Code version without the substitution) → write "unavailable" in the session info section and continue
  2. Build the resume command: claude --resume {sessionId}

Step 3: Collect git state (run in parallel)

Run these in parallel:

git branch --show-current
git status --short
git log --oneline -5
git diff --stat
git worktree list

Step 4: Resolve the issue reference and confirm it exists

Determine the issue reference in this order of priority:

  1. --create given → create a new issue in step 6 (skip resolution)
  2. --issue <ref> given → use that reference
  3. Neither → infer from the branch name (use the helper function; the old grep -oE '^(feat|fix)/([0-9]+)' had a bug where it did not match feat/ENG-123-..., so this is unified into the lib function):
    CCAS_ROOT="${CLAUDE_PLUGIN_ROOT}"; [ -n "$CCAS_ROOT" ] || CCAS_ROOT=.claude
    source "$CCAS_ROOT/skills/checkpoint/lib/resolve-issue-ref.sh"
    extract_issue_ref_from_branch "$(git branch --show-current)"
    # -> "ENG-123" (Linear) / "120" (GitHub) / non-zero (could not extract)
  4. Cannot infer → create a new issue in step 6

A Linear-shaped reference inferred from a branch name is only a guess: feat/oauth-2-login looks like OAUTH-2. If it cannot be resolved in the section below (no such Linear issue, no linked GitHub issue, or the Linear MCP is not connected), treat it as "cannot infer" instead of stopping with an error.

Run the reference you obtained through the "Resolving an issue reference (shared by pause and resume)" section to convert it into a GitHub issue number. Confirm the resolved number exists:

gh issue view {N} --json number,title,state -q '.number' 2>&1

If it does not exist → error: Issue #{N} not found. Check the number, or use --create to open a new one

Step 5: Summarize the context (LLM)

From the conversation context and the git state, produce:

  • Done: the completed work as a [x] checklist
  • Remaining: the unfinished work as a [ ] checklist
  • Decision notes: things to hand to the maintainer, records of decisions
  • API key patterns (sk-..., Bearer ...) → mask as ***
  • Values from .env → mask as ***
  • Passwords and secrets → mask as ***
  • Absolute paths (/Users/...) → convert to repository-relative paths

Step 6: Record on the issue

  1. Write the body to a temp file (use mktemp for a unique path):
    TMPFILE=$(mktemp /tmp/pause-memo-XXXXXX)
    cat <<'PAUSE_BODY_EOF' > "$TMPFILE"
    {contents of the output template}
    PAUSE_BODY_EOF
  2. Comment on an existing issue (when there is an issue number):
    gh issue comment {N} --body-file "$TMPFILE"
  3. Create a new issue (with --create, or when the issue could not be inferred):
    gh issue create --title "[{scope}] Work pause note: {summary}" --body-file "$TMPFILE"
    Write the title in the language of the session too. Resume finds the note by the markers in the body, not by the title, so translating the title does not affect detection.
  4. Fallback (when gh is unauthenticated):
    • Print the contents of the output template as markdown
    • Tell the user to copy it into a GitHub issue by hand
  5. Delete the temp file: rm -f "$TMPFILE"
  6. Report: the issue URL, the session ID, and the resume command

Output template

Write the headings and labels in the language of the session (the sample below is English). The four <!-- checkpoint:* --> marker lines, by contrast, are emitted in exactly this form regardless of language — resume's machine extraction looks only at the markers (see "Language-invariant tokens" in docs/rules/output-language.md).

  • The value runs to the --> at the end of the line, so a path containing spaces needs no quoting
  • When there is no worktree, use <!-- checkpoint:worktree none --> or omit the marker entirely
## Work pause note
<!-- checkpoint:pause v1 -->
<!-- checkpoint:session {sessionId} -->
<!-- checkpoint:branch {branch} -->
<!-- checkpoint:worktree {worktree path or "none"} -->

### Session info
- **Session ID**: `{sessionId}`
- **Resume command**: `claude --resume {sessionId}`
- **Branch**: `{branch}`
- **worktree**: `{worktree info or "none"}`

### Done
- [x] {completed work 1}
- [x] {completed work 2}

### Remaining
- [ ] {remaining work 1}
- [ ] {remaining work 2}

### Decision notes
{decisions and things to hand to the maintainer}

### Current state

    {output of git status --short}

### Change summary

    {output of git diff --stat}

### Recent commits

    {output of git log --oneline -5}

resume — restore context and continue

Read the pause note recorded by pause from the GitHub issue, restore the context, and continue the work.

Arguments

ArgumentDescriptionDefault
(positional)The issue to resume. A GitHub number (81) or a Linear ID (ENG-123)Inferred from the branch name
--issue <ref>The same, in explicit form—

Procedure (4 steps)

Step 1: Parse arguments and check auth

  1. Get the issue reference:

    • A number or ENG-123 → use it as the reference
    • --issue <ref> → use that reference
    • No argument → infer from the branch name (the lib function; the old grep version did not handle feat/ENG-123):
      CCAS_ROOT="${CLAUDE_PLUGIN_ROOT}"; [ -n "$CCAS_ROOT" ] || CCAS_ROOT=.claude
      source "$CCAS_ROOT/skills/checkpoint/lib/resolve-issue-ref.sh"
      extract_issue_ref_from_branch "$(git branch --show-current)"
      # -> "ENG-123" / "120" / non-zero (could not extract)
    • Cannot infer, or a Linear-shaped reference inferred from the branch name cannot be resolved → error: Specify an issue (e.g. /checkpoint resume 81 or ENG-123)

    Run the reference you obtained through the "Resolving an issue reference (shared by pause and resume)" section to convert it into a GitHub issue number before going to step 2.

  2. Check gh auth — error if unauthenticated

Step 2: Read the pause note from the issue

  1. Fetch the issue data:
    gh issue view {N} --json body,comments,title,state
  2. Find the most recent pause note (a language-independent check — use ckp_has_pause_memo):
    CCAS_ROOT="${CLAUDE_PLUGIN_ROOT}"; [ -n "$CCAS_ROOT" ] || CCAS_ROOT=.claude
    source "$CCAS_ROOT/skills/checkpoint/lib/parse-pause-memo.sh"
    ckp_has_pause_memo "$COMMENT_BODY"   # 0 = pause note / 1 = anything else
    • Search the comments in reverse (newest first) and take the first match
    • If no comment matches, check the issue body
    • The check prefers the <!-- checkpoint:pause --> marker, falling back to the legacy Japanese heading ## 作業中断メモ for backward compatibility
  3. Extract the machine-readable fields from the pause note (ckp_memo_field from the same lib, which does not depend on any Japanese literal):
    BRANCH=$(ckp_memo_field branch   "$MEMO") || BRANCH=""
    WORKTREE=$(ckp_memo_field worktree "$MEMO") || WORKTREE=""   # rc 1 = no worktree
    SESSION=$(ckp_memo_field session "$MEMO") || SESSION=""
    • Only session, branch, and worktree are extracted mechanically
    • For older notes without markers, the lib falls back to the legacy Japanese form automatically (existing issues remain resumable)
    • Done and Remaining are picked up from the Markdown checkboxes - [x] / - [ ] (syntax elements, hence language-invariant)
    • Prose such as the decision notes is not extracted with a regex — read the section's content and take it into context as it is (headings can be translated, so do not depend on a literal match)
  4. If no pause note is found → read the situation from the issue body and resume from there

Step 3: Restore the environment

  1. Check whether the branch and worktree exist
  2. Respond according to the situation:
SituationResponse
Branch and worktree both existPoint at the worktree path
Only the branch existsOffer to create the worktree
Neither existsOffer to create the branch and the worktree
  1. If the issue is already closed → warn and continue (do not re-open it)

Step 4: Present the context and resume

## Resuming from issue #{N}

### Previous session
- **Session ID**: `{sessionId}`
- **Resume in the same session**: `claude --resume {sessionId}`

### Previous branch
- **Branch**: `{branch}`
- **worktree**: `{path or "none"}`

### Work completed previously
- [x] {completed work 1}

### Remaining (from the previous pause note)
- [ ] {remaining work 1}

### Decision notes
{the previous decision notes}

---
Resuming work with the context above.

Then start from the first item of the remaining work.


Resolving an issue reference (shared by pause and resume)

The shared procedure for resolving a reference — from --issue <ref>, a positional argument, or branch inference — into a GitHub issue number.

1. Classify the reference

CCAS_ROOT="${CLAUDE_PLUGIN_ROOT}"; [ -n "$CCAS_ROOT" ] || CCAS_ROOT=.claude
source "$CCAS_ROOT/skills/checkpoint/lib/resolve-issue-ref.sh"
classify_issue_ref "$REF"   # -> "github:81" / "linear:ENG-123" / non-zero (invalid)
  • github:<N> → use <N> directly as the GitHub issue number
  • linear:<KEY>-<N> → convert to a GitHub number in step 2 below (<KEY> is the Linear team key: a letter followed by letters or digits, normalized to upper case)
  • Non-zero (invalid) → error: Invalid issue reference (e.g. 81 or ENG-123)

Branch-name inference uses the same lib function:

extract_issue_ref_from_branch "$(git branch --show-current)"
# -> "ENG-123" / "120" / non-zero (could not extract). Pass the value to classify_issue_ref

2. Resolving a Linear ID to a GitHub issue number

A Linear ID does not appear in the GitHub issue title and cannot be located with gh search (fuzzy hits produce wrong matches). Resolve it through the Linear MCP (read it yourself, directly — this resolves a single item, and delegating a few tool calls to a subagent costs more in round trips than it saves):

  1. Run the Linear MCP get_issue("ENG-123", includeRelations: true), look through attachments and links for a URL of the form github.com/<owner>/<repo>/issues/<N>, and take the GitHub issue number <N> from there (never extrapolate the number from a sequence — always take it from attachments)
  2. Fallback if none is found: look for a GitHub issue link in the body or description of the Linear issue
  3. If there is still none → error: No GitHub issue corresponds to ENG-123

Verified against the real API (2026-06-24): attachments[].url of the get_issue(..., includeRelations=true) response carried the GitHub issue URL, and the issue number could be extracted from it with a regular expression (attachments[].url is the primary path).

Notes are always recorded on GitHub issues (settled maintainer policy). A Linear number is accepted as an input key, and the note itself is commented on the resolved GitHub issue. From Linear, it is reachable through the GitHub↔Linear sync link.

Edge cases

CaseResponse
--issue and --create given togetherPrint an error and exit
An invalid reference in --issue (abc, #1, and the like)classify_issue_ref returns non-zero → error: Invalid issue reference (e.g. 81 or ENG-123)
The GitHub issue for --issue ENG-123 cannot be resolvedError: No GitHub issue corresponds to ENG-123
Linear MCP not connected, or get_issue fails (when a Linear ID was given)Print the error and suggest re-running with a GitHub number
A branch name such as feat/oauth-2-login looks like a Linear ID but does not resolveTreat it as not inferred: pause creates a new issue, resume asks for an issue
The issue does not existPrint an error and exit
Session ID unavailableWrite "unavailable" and continue
gh unauthenticated (pause)Fall back to markdown output
gh unauthenticated (resume)Print an error and exit
--issue omitted while on the main branchCannot infer the issue → create a new one
Run outside a worktreeRecord the worktree info as "none"
No git changesWrite "no changes" and continue
The branch was deleted (resume)Offer to recreate the worktree
The issue is already closed (resume)Warn and continue
Several pause notes existUse the one in the newest comment
Resuming an old note without markersckp_memo_field falls back to the legacy Japanese form automatically
Resuming a note written in another languageThe <!-- checkpoint:* --> markers are language-invariant, so extraction works as is

Safety rules

  • Level 1 (API keys, passwords, personally identifying information): never put these in an issue body
  • Mask values from .env files and any credentials with ***
  • Use only git diff --stat (never dump the full code diff)
  • Convert absolute paths (/Users/...) to repository-relative paths
  • Generate temp files with mktemp for a unique path, and always delete them afterwards
  • Watch the gh command's rate limits and keep API calls to the minimum
  • Never re-open a closed issue (that is the maintainer's call)

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.