Skill resume: retoma el trabajo donde lo dejó la última sesión del agente de programación
Dmitriy Solodukha, desarrollador de Caprock · Publicado el
Probado el en Claude Code y Codex
La skill resume reconstruye sesiones, rama, trabajo sin commit, TODO y notas de traspaso donde lo dejaste; propone un siguiente paso y espera.
La skill resume reconstruye el estado del trabajo antes de que el agente toque nada: qué hicieron aquí las últimas sesiones de agentes de programación, la rama actual, los cambios sin commit, los commits recientes, los TODO pendientes y las notas de traspaso. Luego ofrece un resumen breve bajo tres encabezados, Where we are, Open threads y Next step, y te espera. Solo lee: no ejecuta checkout, stash, pull ni commit.
Instala la skill resume
Un comando por agente. La skill es un único SKILL.md; no se ejecuta nada al instalarla.
Las nueve skills como plugin. Escribe esto dentro de Claude Code:
O solo esta skill, desde la carpeta de tu proyecto en una terminal:
Añade -g para instalarla en todos los proyectos.
Desde la carpeta de tu proyecto, en una terminal:
Añade -g para instalarla en todos los proyectos.
Desde la carpeta de tu proyecto, en una terminal:
Añade -g para instalarla en todos los proyectos. Aún no se ha probado en OpenCode: la skill contiene instrucciones sencillas en el formato abierto, pero ninguna ejecución en OpenCode la ha verificado.
Desde la carpeta de tu proyecto, en una terminal:
Añade -g para instalarla en todos los proyectos. Aún no se ha probado en Cursor: la skill contiene instrucciones sencillas en el formato abierto, pero ninguna ejecución en Cursor la ha verificado.
Prompts que usan la skill resume
El agente elige la skill cuando tus palabras coinciden con su descripción; nombrarla lo asegura. Haz clic en un prompt para copiarlo.
Qué lee la skill resume
- Historial de sesiones, con Caprock: las últimas sesiones de cada agente en este repositorio, un resumen de las últimas entre una y tres que hicieron trabajo real, sus últimas explicaciones y las decisiones vigentes. Sin Caprock indica que no se leyó ningún historial de sesiones, en lugar de adivinar.
- Estado del repositorio, solo lectura: rama y upstream, commits que no están en main, el diff de los archivos sin commit, stashes, worktrees y un merge o rebase en curso, del que informa primero.
- Notas que se dejan:
HANDOFF.md,NEXT.md,TODO.mdy similares,TODOyFIXMEen archivos modificados recientemente, y “WIP” en mensajes de commit.
Cuando dos fuentes discrepan (una nota dice que está hecho y el código dice que no), lo indica en lugar de elegir una.
Qué ejecutamos y qué hicieron los agentes
Cada skill se ejecutó el 29 de noviembre de 2026 en un repositorio desechable creado para ella, con la skill instalada como skill del proyecto. Un repositorio en la rama feat/divide con un commit WIP, un TODO en calc.py, y HANDOFF.md y test_calc.py sin seguimiento.
Claude Code (claude -p --model sonnet, sin el servidor MCP de Caprock (--strict-mcp-config))
where were we? pick up where we left off
Invocó resume, ejecutó los pasos de git, encontró el TODO y el traspaso, indicó que no se había leído ningún historial de sesiones, observó que el mensaje del commit y HANDOFF.md indicaban pasos siguientes distintos, propuso uno y no cambió nada.
Codex (0.163.0, codex exec -s read-only)
where were we? pick up where we left off
Leyó la skill, ejecutó los pasos de git, llamó a recent_sessions de Caprock (current_decisions falló en el servidor), resumió y se detuvo. La primera ejecución no usó los encabezados de la skill; tras concretar más la sección de salida, la segunda los usó exactamente (un extracto):
### 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.
Agentes en los que se probó
- Claude Code: probado el 29 de noviembre de 2026 con
claude -p --model sonnet, con la skill instalada como skill de proyecto en.claude/skills/. - Codex: probado el 29 de noviembre de 2026 con Codex 0.163.0 (
codex exec), con la skill en.agents/skills/. - OpenCode y Cursor: sin probar. La skill consiste en instrucciones en el formato abierto Agent Skills, pero ninguna ejecución en ninguno de los dos la ha verificado.
Límites
- Sin Caprock, no hay historial de sesiones anteriores que leer: el resumen se basa en git y las notas.
- No ejecuta fetch, así que el estado remoto corresponde al último fetch que hiciste.
- No vuelve a abrir la conversación anterior; para eso, usa el comando propio del agente.
/resumedentro de Claude Code se tomó del texto declaude --help, no se ejecutó.
Con Caprock y sin él
Cuando el servidor MCP de Caprock está conectado, la skill llama a recent_sessions, session_summary, session_prose, next_session_handoff y current_decisions: lo que hicieron aquí las últimas sesiones de cada agente y las decisiones vigentes. Los trata como pistas y contrasta cada uno con el código y git. Sin Caprock, solo lee git y las notas. Caprock es la app gratis y de código abierto que registra cada sesión de agentes de programación en tu computadora.
El SKILL.md completo
El archivo tal como está en dspv/skills en la revisión dfce799. Para instalarlo manualmente, guárdalo como .claude/skills/resume/SKILL.md para Claude Code o .agents/skills/resume/SKILL.md para Codex en tu proyecto.
--- 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.
Preguntas sobre la skill resume
- ¿Qué hace una skill de reanudación?
- Reconstruye el contexto de un repositorio al inicio de una sesión a partir del historial de sesiones, git y las notas, y te indica en qué punto está el trabajo y cuál es el siguiente paso antes de cambiar nada.
- ¿Cómo reanudo la sesión de Claude Code en sí?
- `claude --continue` (`-c`) continúa la conversación más reciente de la carpeta; `claude --resume` (`-r`) elige una por ID, por nombre o de una lista. En Codex, `codex resume` o `codex resume --last`.
- ¿Cambiará mis archivos la skill resume?
- No. Ejecuta comandos de git de solo lectura y se detiene después del resumen. No ejecuta checkout, stash, reset, pull, fetch ni commit, ni pruebas que escriban archivos.
- ¿Funciona la skill resume con una nota de traspaso?
- Sí. Lee `HANDOFF.md` y otras notas, y las contrasta con git; la skill handoff escribe esas notas.