agentleFS
anivaranivar/agentic-sdlc/skills/session-handoff/SKILL.md

session-handoff

Skill0 starsChanged 51 days agoMITView on GitHub

Keep work coherent across sessions, compactions and full context windows. State lives in files, not the conversation: a progress file and a JSON feature list whose entries later sessions change only in their status and evidence. Each session starts by reading them, the git log and the basic check, takes one feature, and ends with a checkpoint commit. A feature passes only on a recorded end-to-end check. Go-aheads, boundaries and decisions are written down when they are settled, because compaction keeps only a summary. Knowledge that outlives the task moves to the repository. Triggers on: "pick up where we left off", "resume", "continue the work", "new session", "after compaction", "the context is full", "context rot", "handoff", "progress file", "feature list", "multi-session", "long task", "remember this for next time", "what did we decide".

164 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ascii-diagram, research-fleet 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.
  • SethGammonSkill

    ascii-diagram

    Generate perfectly aligned ASCII diagrams — architecture, flow, sequence, box-and-arrow. Uses a programmatic character-grid approach so alignment is guaranteed by math, not token prediction. Includes post-render verification.

    Also in 4 projects that use this

  • SethGammonSkill

    research-fleet

    Parallel research using Fleet wave mechanics. Spawns multiple scout agents, each investigating a different angle of the same question. Findings are compressed between waves. Produces a unified research brief from multiple independent perspectives.

    Also in 3 projects that use this

  • ferocknewSkill

    doc-reader

    当用户要求"读取 Word 文档"、"解析 DOCX 文件"、"将 Word 转换为 Markdown"、"提取文档内容"、"读取 docx"时,或者需要在 JavaScript/Node.js 环境中读取 Microsoft Word 文档(.docx)并转换为 Markdown、HTML 或纯文本格式时使用此 skill。

    Also in 3 projects that use this

  • vicoa-aiSkill

    live-preview

    Start a local app in the current user project, expose it through a tunnel, and return preview details in structured Markdown. Use when the user asks for a preview URL, public URL, shareable localhost, mobile/web preview, or tunnel setup.

    Also in 4 projects that use this

  • mcabreradevSkill

    bug-diagnosis

    Use when something is broken, failing or intermittent. Diagnose before fixing: a command that goes red on this bug first, then falsifiable hypotheses.

    Also in 4 projects that use this

  • botlearn-aiSkill

    doc-gen

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 140 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read by path and line range, not whole trees.

    line 92
  2. Very specific:

    Before a long new stretch, start a fresh session from the progress file, or compact with a focus (/compact keep the go-aheads, the held …

    line 95
  3. Distinctive:

    Keep the agent file short and specific.

    line 98

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

Session handoff

A conversation is working memory. It fills, it gets less reliable as it grows, and compaction cuts it to a summary. Files in the working tree are the memory that lasts. Keep the state of long work in them, and start every session from them.

The rules

IdRuleIn practice
HANDOFF-1State that spans sessions lives in files.agent/progress.md and .agent/features.json on the working branch. The feature list is JSON because a model rewrites Markdown more freely than JSON; later sessions change only status and evidence.
HANDOFF-2A session starts by reading and ends by committingStart: git log --oneline -20, the progress file, the feature list, then the basic check (just check, or what the repository's agent file names). Fix a broken tree before new work. End: a checkpoint commit and a progress entry, leaving a tree that could merge.
HANDOFF-3One feature at a time, passing only on evidencestatus becomes passing only with the check's command and result in evidence. Where the work is near the limit of what the model does reliably, a fresh agent or a person judges it, not the session that built it.
HANDOFF-4What is settled is written down when it is settledA go-ahead, a boundary ("don't push"), a decision, a held call: into the progress file in the same turn. After a compaction or in a new session, re-read the progress file and the sources a claim rests on. The summary points at evidence; it is not evidence (EVID-1).
HANDOFF-5Knowledge that outlives the task goes to the repositoryA convention to the repository's agent file (SETUP-1), a hard-to-reverse decision to a decision record (DECIDE-1), a finding to a dated research document (EVID-10). A session's own memory holds preferences and pointers to those files.

The files

.agent/features.json. Write it once at the start, from the plan or the ticket. Later sessions change two fields.

{
  "finish": "just check exits 0 and every feature has status passing",
  "features": [
    {
      "id": "F1",
      "what": "Search rejects a page token with 400",
      "check": "uv run pytest tests/test_search.py -k page_token",
      "status": "todo",
      "evidence": ""
    }
  ]
}

status is one of todo, doing, passing, blocked. evidence is the commit sha, the command and its result: 4f2c1a9 uv run pytest tests/test_search.py -k page_token: 3 passed.

.agent/progress.md. Append; never rewrite an earlier entry.

# Progress: <task>
Finish condition: <the check that shows it> · Branch: <branch>

## Settled
| When (UTC) | What | Source |

## Held calls
| Call | Rule | Why it waits |

## Sessions
### <UTC date and time>
Did: <what changed, with shas> · Checked: <command> → <result> · Next: <the next item>

"Source" is where the decision came from: the user in chat, the launch prompt, a decision record. An unattended run writes its held calls here and copies them into its run report (RUN-3).

The files are working files of the branch. Remove .agent/ in the last commit before the pull request unless the repository keeps it.

Keep the window small

Accuracy falls as the window grows, even when the task stays the same, and text that resembles the answer costs more than its length. So:

  • Read by path and line range, not whole trees. Search first, then open what the search points to.
  • Send a large read to a subagent that returns a short summary with its citations; re-open what it cites before relying on it.
  • Before a long new stretch, start a fresh session from the progress file, or compact with a focus (/compact keep the go-aheads, the held calls and the next step). A fresh session that reads good files starts focused; a long one carries every stale turn.
  • Keep the agent file short and specific. Each line of it loads into every session.

What survives compaction in Claude Code

KeptLost
The project-root CLAUDE.md, rules without paths:, auto memory and skill descriptions, re-read from diskAnything said only in the conversation: a go-ahead, a boundary, a correction
Up to five recently changed files, re-readOlder file reads and tool output
Invoked skills, cut to the start of each and dropped oldest first when over budgetThe end of a long skill

A standing instruction belongs in a file, not in the chat. A skill author puts its rules at the top of SKILL.md, because only the start may come back.

Companion skills

NeedSkill
A run that nobody watchesinvoke unattended-runs
The slice each session landsthin-slices
Where a decision or a research finding goesdecision-records
The agent file the next session readssetup-conventions
The judge who did not build itreview-change
Calibrating what a progress entry claimsevidence

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.