Skip to content

TsukiNi22/ai-utils / skills/ai/pause

Stop everything cleanly in the middle of a task so that it can go on later - no new step started, the step under way brought to a consistent state (never a file half edited or a build left broken), every background job / monitor / subagent / workflow / build / loop / scheduled wake-up started for the task stopped, nothing committed or pushed that the rules of the user do not allow, then a checkpoint written (goal, rules, done, interrupted, the exact next steps, what was stopped and how to start it again, files changed, decisions) and one short message - the work resumes at the next "continue" (continue-work). Use whenever the user says /pause, "stop tout proprement", "arrête-toi proprement", "mets en pause", "on reprendra plus tard", "stop et reprends au prochain continue", "pause the work", "stop cleanly".

FileKindSize
SKILL.mdskill md4.6 KB
requires.txtmarkdown14 B
scripts/checkpoint.shexecutablescript2.3 KB
templates/checkpoint.mdmarkdown968 B

scripts/checkpoint.sh

View on GitHub
#!/bin/bash
# The checkpoint of a paused task: one file per project, outside the project (nothing to commit or ignore).
#
# Usage: checkpoint.sh path [dir]   the file of the project of <dir> (default: the current folder, folder created)
#        checkpoint.sh show [dir]   print it (exit 1 when the project has none)
#        checkpoint.sh list         every checkpoint waiting, newest first (date, project)
#        checkpoint.sh done [dir]   the task is over: move it to done/ (kept, never deleted)
#
# The project is the root of the git repository of <dir>, or <dir> itself outside a repository. The files live in
# ${CLAUDE_PAUSE_DIR:-~/.claude/pauses}/<project path with / -> ->.md.
set -euo pipefail

##### Variables #####
PAUSES="${CLAUDE_PAUSE_DIR:-$HOME/.claude/pauses}"
COMMAND="${1:-}"

usage() {
    sed -n '4,7p' "$0" | sed 's/^# \{0,1\}//'
    exit "${1:-0}"
}

# Root of the project of a folder: its git repository, else the folder itself
project() {
    local dir="${1:-.}"
    [[ -d "$dir" ]] || { echo "Error: $dir is not a folder" >&2; exit 1; }
    \git -C "$dir" rev-parse --show-toplevel 2> /dev/null || (command cd "$dir" && command pwd)
}

file_of() {
    local root
    root="$(project "${1:-.}")"
    echo "$PAUSES/$(echo "$root" | tr '/' '-').md"
}

##### Commands #####
case "$COMMAND" in
    path)
        command mkdir -p "$PAUSES" # the skill writes the file right after
        file_of "${2:-.}"
        ;;
    show)
        file="$(file_of "${2:-.}")"
        [[ -f "$file" ]] || { echo "no checkpoint for $(project "${2:-.}")" >&2; exit 1; }
        cat "$file"
        ;;
    list)
        found=false
        for file in $(command ls -t "$PAUSES"/*.md 2> /dev/null); do
            found=true
            printf '%s  %s\n' "$(date -r "$file" '+%Y-%m-%d %H:%M')" "$(sed -n 's/^\*\*Project\*\*: *//p' "$file" | head -1 | sed 's/ · .*//')"
        done
        $found || echo "no checkpoint waiting"
        ;;
    done)
        file="$(file_of "${2:-.}")"
        [[ -f "$file" ]] || { echo "no checkpoint for $(project "${2:-.}")" >&2; exit 1; }
        command mkdir -p "$PAUSES/done"
        mv "$file" "$PAUSES/done/$(basename "$file" .md)-$(date '+%Y%m%d-%H%M%S').md"
        echo "checkpoint closed: $PAUSES/done/"
        ;;
    -h|--help) usage 0 ;;
    *) usage 1 ;;
esac
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 469kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 321kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 321kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 321kUpdated Claude CodeCodexVerifiedInstall