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

checkpoint

Skill0 starsChanged 5 months agoMITView 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

57 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use open-gstack-browser, instinct-export 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.
  • 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 4 projects that use this

  • TheKREATORSSkill

    instinct-export

    Export instincts from project/global scope to a file

    Also in 3 projects that use this

  • TheKREATORSSkill

    instinct-import

    Import instincts from file or URL into project/global scope

    Also in 3 projects that use this

  • diego-tobalinaSkill

    build-fix

    Fix build and compilation errors systematically. Run when build fails.

    Also in 5 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 4 projects that use this

  • ayudaySkill

    cso

    Chief Security Officer mode. Performs OWASP Top 10 audit, STRIDE threat modeling, attack surface analysis, auth flow verification, secret detection, dependency CVE scanning, supply chain risk assessment, and data classification review. Use when: "security audit", "threat model", "pentest review", "OWASP", "CSO review".

    Also in 4 projects that use this

  • +1 more from seek888
  • +1 more from TheKREATORS

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 53 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 60
  2. Distinctive:

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

    line 67
  3. Very specific:

    If the session ID is NONE → write "unavailable" in the session info section and continue

    line 97
  4. Distinctive:

    Run these in parallel:

    line 102
  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 127
  6. Very specific:

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

    line 131
  7. Distinctive:

    Write the title in the language of the session too.

    line 165
  8. Very specific:

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

    line 180
  9. Very specific:

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

    line 223
  10. Very specific:

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

    line 239
  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 248
  12. Very specific:

    Check gh auth — error if unauthenticated

    line 250
  13. Distinctive:

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

    line 265
  14. Distinctive:

    If no comment matches, check the issue body

    line 266
  15. Very specific:

    Only session, branch, and worktree are extracted mechanically

    line 275
  16. Distinctive:

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

    line 280
  17. Distinctive:

    Check whether the branch and worktree exist

    line 284
  18. Distinctive:

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

    line 293
  19. Very specific:

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

    line 352
  20. Very specific:

    If there is still none → error: No GitHub issue corresponds to {ISSUE-ID}

    line 354
  21. Distinctive:

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

    line 385
  22. Distinctive:

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

    line 389

“Common” is measured: kept by at least 6 in 10 of the 53 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 ({ISSUE-ID}).

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 {ISSUE-ID}  # 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 {ISSUE-ID}         # 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 ({ISSUE-ID})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 ({ISSUE-ID}). 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. Generate the project key:
    pwd | sed 's|/|-|g'
  2. Get the session ID:
    PROJECT_KEY=$(pwd | sed 's|/|-|g')
    SESSION_FILE="$HOME/.claude/projects/${PROJECT_KEY}/sessions-index.json"
    
    if [ -f "$SESSION_FILE" ]; then
      python3 -c "
    import json, sys
    with open(sys.argv[1]) as f:
        sessions = json.load(f)
    if sessions:
        latest = sorted(sessions, key=lambda s: s.get('modified',''), reverse=True)[0]
        print(latest['id'])
    else:
        print('NONE')
    " "$SESSION_FILE" 2>/dev/null || echo "NONE"
    else
      echo "NONE"
    fi
  3. If the session ID is NONE → write "unavailable" in the session info section and continue
  4. 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/{ISSUE-ID}-..., 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)"
    # -> "{ISSUE-ID}" (Linear) / "120" (GitHub) / non-zero (could not extract)
  4. Cannot infer → create a new issue in step 6

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 ({ISSUE-ID})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 {ISSUE-ID} → 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/{ISSUE-ID}):
      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)"
      # -> "{ISSUE-ID}" / "120" / non-zero (could not extract)
    • Cannot infer → error: Specify an issue (e.g. /checkpoint resume 81 or {ISSUE-ID})

    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:{ISSUE-ID}" / non-zero (invalid)
  • github:<N> → use <N> directly as the GitHub issue number
  • linear:MAE-<N> → convert to a GitHub number in step 2 below
  • Non-zero (invalid) → error: Invalid issue reference (e.g. 81 or {ISSUE-ID})

Branch-name inference uses the same lib function:

extract_issue_ref_from_branch "$(git branch --show-current)"
# -> "{ISSUE-ID}" / "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("{ISSUE-ID}", 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 {ISSUE-ID}

Verified against the real API ({ISSUE-ID} / 2026-06-24): the response of get_issue(id="{ISSUE-ID}", includeRelations=true) carried {INTERNAL-LINK} in attachments[0].url, and the GitHub issue number 988 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 {ISSUE-ID})
The GitHub issue for --issue {ISSUE-ID} cannot be resolvedError: No GitHub issue corresponds to {ISSUE-ID}
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
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.