resume-Skill: Dort weitermachen, wo die letzte Coding-Agent-Session aufhörte
Dmitriy Solodukha, Caprock-Entwickler · Veröffentlicht am
Am mit Claude Code und Codex getestet
resume-Skill: letzter Stand aus Sessions, Branch, nicht committeter Arbeit, TODOs und Übergabenotizen; nennt einen nächsten Schritt und wartet.
Der resume-Skill rekonstruiert den Arbeitsstand, bevor der Agent etwas anfasst: was die letzten Coding-Agent-Sessions hier getan haben, den aktuellen Branch, nicht committete Änderungen, letzte Commits, offene TODOs und Übergabenotizen. Dann fasst er unter drei Überschriften kurz zusammen – Where we are, Open threads und Next step – und wartet auf dich. Er liest nur: kein Checkout, Stash, Pull oder Commit.
Installiere den resume-Skill
Ein Befehl pro Agent. Der Skill ist eine einzelne SKILL.md; bei der Installation wird nichts ausgeführt.
Alle neun Skills als Plugin. Gib dies in Claude Code ein:
Oder nur diesen Skill, im Projektordner in einem Terminal:
Füge -g hinzu, um ihn für jedes Projekt zu installieren.
Im Projektordner in einem Terminal:
Füge -g hinzu, um ihn für jedes Projekt zu installieren.
Im Projektordner in einem Terminal:
Füge -g hinzu, um ihn für jedes Projekt zu installieren. Noch nicht mit OpenCode getestet: Der Skill besteht aus reinen Anweisungen im offenen Format, aber kein Durchlauf mit OpenCode hat ihn geprüft.
Im Projektordner in einem Terminal:
Füge -g hinzu, um ihn für jedes Projekt zu installieren. Noch nicht mit Cursor getestet: Der Skill besteht aus reinen Anweisungen im offenen Format, aber kein Durchlauf mit Cursor hat ihn geprüft.
Prompts für den resume-Skill
Der Agent wählt den Skill, wenn deine Worte zu dessen Beschreibung passen; mit dem Namen stellst du es sicher. Klicke auf einen Prompt, um ihn zu kopieren.
Was der resume-Skill liest
- Session-Verlauf, mit Caprock: die letzten Sessions aller Agenten in diesem Repository, eine Zusammenfassung der letzten ein bis drei mit tatsächlicher Arbeit, ihre letzten Erläuterungen und die geltenden Entscheidungen. Ohne Caprock sagt er, dass kein Session-Verlauf gelesen wurde, statt zu raten.
- Repository-Stand, nur lesend: Branch und Upstream, Commits außerhalb von main, der Diff nicht committeter Dateien, Stashes, Worktrees und ein laufender Merge oder Rebase, den er zuerst meldet.
- Hinterlassene Notizen:
HANDOFF.md,NEXT.md,TODO.mdund Ähnliches,TODOundFIXMEin kürzlich geänderten Dateien sowie „WIP“ in Commit-Nachrichten.
Wenn zwei Quellen einander widersprechen (eine Notiz sagt erledigt, der Code nicht), benennt er das, statt eine auszuwählen.
Was wir ausgeführt haben und was die Agenten taten
Jeder Skill wurde am 29. November 2026 in einem eigens dafür angelegten Wegwerf-Repository ausgeführt, als Projekt-Skill installiert. Ein Repository auf Branch feat/divide mit einem WIP-Commit, einem TODO in calc.py und den unversionierten Dateien HANDOFF.md und test_calc.py.
Claude Code (claude -p --model sonnet, ohne den Caprock-MCP-Server (--strict-mcp-config))
where were we? pick up where we left off
Rief resume auf, führte die Git-Schritte aus, fand TODO und die Übergabe, erklärte, dass kein Session-Verlauf gelesen wurde, bemerkte unterschiedliche nächste Schritte in der Commit-Nachricht und HANDOFF.md, schlug einen vor und änderte nichts.
Codex (0.163.0, codex exec -s read-only)
where were we? pick up where we left off
Skill gelesen, Git-Schritte ausgeführt, Caprocks recent_sessions aufgerufen (current_decisions schlug serverseitig fehl), zusammengefasst und angehalten. Der erste Durchlauf nutzte die Überschriften des Skills nicht; nachdem der Ausgabeabschnitt präzisiert wurde, nutzte der zweite sie exakt (ein Auszug):
### Where we are - Branch: `feat/divide`, 1 commit ahead of `main`; no upstream. - Tracked files unchanged. Untracked: `HANDOFF.md`, `test_calc.py`, `.agents/`, `.claude/`. ### Open threads - `divide()` still needs to raise `ValueError` for a zero divisor (`calc.py:5`). ### Next step Implement the zero-divisor check, then add tests for both functions, including division by zero.
Agenten, mit denen er getestet wurde
- Claude Code: am 29. November 2026 mit
claude -p --model sonnetgetestet, der Skill als Projekt-Skill in.claude/skills/installiert. - Codex: am 29. November 2026 mit Codex 0.163.0 (
codex exec) getestet, der Skill in.agents/skills/. - OpenCode und Cursor: nicht getestet. Der Skill besteht aus reinen Anweisungen im offenen Agent-Skills-Format, wurde aber mit keinem der beiden erprobt.
Grenzen
- Ohne Caprock gibt es keinen Verlauf früherer Sessions zum Nachlesen: Die Zusammenfassung stützt sich auf Git und Notizen.
- Er führt keinen Fetch aus; der Remote-Stand entspricht also deinem letzten Fetch.
- Er öffnet die vorherige Unterhaltung nicht erneut; nutze dafür den eigenen Befehl des Agenten.
/resumeinnerhalb von Claude Code wurde demclaude --help-Text entnommen, nicht ausgeführt.
Mit und ohne Caprock
Wenn der Caprock-MCP-Server verbunden ist, ruft der Skill recent_sessions, session_summary, session_prose, next_session_handoff und current_decisions auf: was die letzten Sessions jedes Agenten hier getan haben und welche Entscheidungen gelten. Er behandelt sie als Hinweise und prüft jeden anhand von Code und Git. Ohne Caprock liest er nur Git und Notizen. Caprock ist die kostenlose Open-Source-App, die jede Coding-Agent-Session auf deinem Computer aufzeichnet.
Die vollständige SKILL.md
Die Datei aus dspv/skills in Revision dfce799. Zur manuellen Installation speicherst du sie in deinem Projekt als .claude/skills/resume/SKILL.md für Claude Code oder .agents/skills/resume/SKILL.md für Codex.
--- name: resume description: >- Resume work in a repository and pick up where the last session left off. Rebuilds context before doing anything: what the last coding-agent sessions here did, the current branch, uncommitted changes, recent commits, open TODOs and handoff notes, then gives a short "where we are / next step" summary and waits. Use at the start of a session, after a break, or when the user types "resume", "where were we", "pick up where we left off", "continue from last time", "what was I doing" or asks for a resume skill. Reads local files, git and session history only. license: Apache-2.0 --- # Resume Rebuild the context of a repository before touching anything, then report where the work stands and what the next step is. This skill reads; it does not edit, commit, stash, check out, pull or push. The user decides what happens after the summary. ## 1. Session history (when available) If the Caprock MCP tools are available (server `caprock`; Caprock, <https://caprock.dev>, is free, open source and runs locally, and records every coding-agent session on the computer): 1. `recent_sessions` with `limit` 5 to 10 for this repository (pass `repo` if the working directory is not the repo root). Newest first, every agent (Claude Code, Codex, OpenCode and others). Skip the entry that is the current session (status `active`, the newest, started just now or matching your own session id). 2. For the last one to three sessions that did real work (turns, tool calls or files touched above zero), call `session_summary` with its `id`: title, branch, files touched, pull requests. 3. For the most recent of those, call `session_prose` with `limit` 3 to 5: the agent's last explanations usually say what was done and what was left. 4. `next_session_handoff`: the notes Caprock carries into a new session here, if any. 5. `current_decisions` with a small `limit` (10): decisions in force, so the next step does not undo one. Memories and prose can be stale. Treat them as leads and check each against the code and git. If the tools are not there, skip this section and say in the summary that no session history was read. Do not guess what earlier sessions did. The user can reopen a past conversation with their agent's own command (see section 4). ## 2. Repository state Run these (read only): ```bash git rev-parse --show-toplevel git status --short --branch git log --oneline -15 git diff --stat git diff --cached --stat git stash list git worktree list ``` Then, as relevant: - The branch's upstream and how far ahead or behind it is (shown by `git status --branch`). Do not fetch: say the remote state is as of the last fetch. - Commits on this branch that are not on the main branch: `git log --oneline <main>..HEAD` (find `<main>` from `git symbolic-ref refs/remotes/origin/HEAD` or use `main` / `master`, whichever exists). - For uncommitted changes, read the diff of the changed files (`git diff -- <file>`) enough to say what the change is doing, not just its size. Note untracked files. - A merge, rebase, cherry-pick or bisect in progress (`git status` says so). This is the first thing to report. ## 3. Notes left behind Look for handoff and TODO notes, newest first: - Files at the repo root or in `docs/`: `HANDOFF.md`, `NEXT.md`, `TODO.md`, `NOTES.md`, `PLAN.md`, `WIP.md`, `.handoff*`, any case. `git ls-files --others --exclude-standard` and `ls` catch untracked ones. - The project instructions (`CLAUDE.md`, `AGENTS.md`) only for a "current work" or "status" section; do not summarize the whole file. - `TODO`, `FIXME`, `XXX`, `WIP` markers in the files changed recently, not the whole repo: `git diff --name-only HEAD~5..HEAD` plus the uncommitted files, then grep those. - The last commit messages for "WIP", "part 1", "next:", "follow-up". ## 4. The agent's own resume commands If the user wants the previous conversation itself back, not a rebuilt summary, point to the command. Checked with `--help` on 2026-11-29: | Agent | Command | What it does | | ----------- | -------------------------- | ------------------------------------------------ | | Claude Code | `claude --continue` (`-c`) | Continue the most recent conversation in the dir | | Claude Code | `claude --resume` (`-r`) | Resume by session ID or name, or pick from list | | Codex | `codex resume` | Pick a previous session to resume | | Codex | `codex resume --last` | Continue the most recent session, no picker | Inside a running Claude Code session, `/resume` opens the same picker. Do not run these yourself: they start or switch an interactive session. ## 5. Stop conditions - Stop and report at once if a merge, rebase or cherry-pick is in progress, or there are conflicts: that is the next step. - Not a git repository: say so, report only notes and session history found. - Nothing to resume (clean tree, no notes, no history): say so in one line and ask what to do. - Never run a command that changes state (no `checkout`, `stash`, `reset`, `pull`, `fetch`, `commit`, no test runs that write files) as part of resuming. ## 6. Output Keep it short. Use these three headings and fields as written, then stop and wait for the user: ``` Where we are - Branch: <branch> (<ahead/behind upstream>), <n> commits not on <main> - Uncommitted: <what the change does, files> | clean - Last sessions: <date, agent, what it did> (or: no session history read) - In progress: <merge/rebase/stash/worktrees, if any> Open threads - <TODO or handoff item, with file:line or note path> - <decision in force that matters for the next step> Next step <one concrete action, and why it is next> ``` Every line must come from something read above. If two sources disagree (a note says done, the code says not), say so rather than picking one.
Fragen zum resume-Skill
- Was macht ein resume-Skill?
- Er rekonstruiert zu Session-Beginn den Kontext eines Repositorys aus Session-Verlauf, Git und Notizen und nennt den Arbeitsstand und nächsten Schritt, bevor etwas geändert wird.
- Wie nehme ich eine Claude-Code-Session selbst wieder auf?
- `claude --continue` (`-c`) setzt das letzte Gespräch im Ordner fort, `claude --resume` (`-r`) wählt eines nach ID, Namen oder aus einer Liste. In Codex: `codex resume` oder `codex resume --last`.
- Ändert der resume-Skill meine Dateien?
- Nein. Er führt nur lesende Git-Befehle aus und stoppt nach der Zusammenfassung. Kein checkout, stash, reset, pull, fetch oder commit und keine Testläufe, die Dateien schreiben.
- Funktioniert der resume-Skill mit einer Übergabenotiz?
- Ja. Er liest `HANDOFF.md` und andere Notizen und prüft sie anhand von Git; der Übergabe-Skill schreibt diese Notizen.