source-command-handoff
Skill0 starsChanged 6 months agoMITView on GitHub
Capture session state for the next agent or session to continue
In this repository55 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-developmentSkill
- agent-teamsSkill
- ai-sdkSkill
- analyzing-financial-statementsSkill
- cache-componentsSkill
- chrome-devtoolsSkill
- Codex-automation-recommenderSkill
- Codex-md-improverSkill
- code-reviewSkill
- Command DevelopmentSkill
- creating-financial-modelsSkill
- data-visualizationSkill
- debugSkill
- develop-ai-functions-exampleSkill
- evolve-ai-layerSkill
- excalidraw-diagramSkill
- find-skillsSkill
- frontend-designSkill
- Hook DevelopmentSkill
- make-skill-templateSkill
- markdown-to-htmlSkill
- mcp-builderSkill
- MCP IntegrationSkill
- pdfSkill
- playwrightSkill
- Plugin SettingsSkill
- Plugin StructureSkill
- refactorSkill
- researchSkill
- security-best-practicesSkill
- skill-creatorSkill
- Skill DevelopmentSkill
- smithery-ai-cliSkill
- source-command-commit-and-deploySkill
- source-command-commitSkill
- source-command-create-prdSkill
- source-command-create-rulesSkill
- source-command-empty-redeploySkill
- source-command-evaluateSkill
- source-command-executeSkill
- source-command-plan-featureSkill
- source-command-primeSkill
- source-command-reviewSkill
- source-command-self-healSkill
- source-command-validateSkill
- sql-queriesSkill
- statistical-analysisSkill
- vscode-ext-localizationSkill
- webapp-testingSkill
- web-artifacts-builderSkill
- web-design-guidelinesSkill
- Writing Hookify RulesSkill
- xlsxSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 16 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill when the user asks to run the migrated source command handoff.
- Very specific: line 23
Not every session needs a handoff.
- Distinctive: line 27
Before ending a long session where work will continue
- Distinctive: line 28
Before hitting context limits (be proactive, not reactive)
- Distinctive: line 29
When switching from one phase to another
- Very specific: line 30
Instead of relying on /compact for critical ongoing work
- Distinctive: line 31
Not needed: when work is fully committed and there's no pending state
- Distinctive: line 39
If no HANDOFF.md exists, skip to Step 2.
- Distinctive: line 43
Run these to understand what's actually happened:
- Distinctive: line 56
Check if commits in the git log address that item (look at commit messages, files changed)
- Distinctive: line 59
Keep items as still in-progress only if they genuinely remain unfinished
- Distinctive: line 77
If working in a git worktree, capture:
- Distinctive: line 95
In Progress / Next Steps: Only items that are genuinely unfinished.
- Very specific: line 106
If uncommitted changes exist, suggest /commit first
- Distinctive: line 122
Don't include full file contents — reference paths
- Distinctive: line 123
Don't include conversation transcripts — summarize
- Very specific: line 124
Don't be vague ("fix the bug") — be specific ("fix SSE reconnection in src/hooks/useSSE.ts")
- Distinctive: line 125
Don't skip Dead Ends — this prevents the most common wasted effort
- Distinctive: line 126
Don't carry forward completed tasks — if git shows it's done, it's done
- Distinctive: line 127
Don't accumulate "In Progress" items across sessions without verifying they're still relevant
- Distinctive: line 128
Don't keep dead ends about problems that have been solved
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
source-command-handoff
Use this skill when the user asks to run the migrated source command handoff.
Command Template
Handoff: Write Session State
Relationship to /prime
/prime starts sessions. /handoff ends them. They are a pair:
- New session begins ->
/primereads HANDOFF.md (among other things) and orients - Session does work
- Session ending ->
/handoffwrites HANDOFF.md for the next/primeto pick up
Not every session needs a handoff. If the work is self-contained and fully committed, there's nothing to hand off. Use /handoff when there's meaningful in-progress state the next session needs.
When to Use
- Before ending a long session where work will continue
- Before hitting context limits (be proactive, not reactive)
- When switching from one phase to another
- Instead of relying on
/compactfor critical ongoing work - Not needed when work is fully committed and there's no pending state
Process
1. Reconcile with Existing State
If a HANDOFF.md already exists, read it first. This is the previous session's understanding of what was in-progress and what came next. You'll reconcile it against reality in the next step.
If no HANDOFF.md exists, skip to Step 2.
2. Gather State & Cross-Reference Git
Run these to understand what's actually happened:
git status
git diff --stat HEAD
git log --oneline -20
git branch --show-current
git worktree listIf a previous HANDOFF.md existed, cross-reference its "In Progress / Next Steps" items against the git log:
- Walk through each
- [ ]item from the old handoff - Check if commits in the git log address that item (look at commit messages, files changed)
- Mark items as completed if the git log shows the work was done
- Mark items as stale/irrelevant if the codebase has moved past them (e.g., the feature was scrapped, the approach changed, the file was deleted)
- Keep items as still in-progress only if they genuinely remain unfinished
This is the critical step. The goal is to produce a truthful snapshot, not to accumulate a backlog.
3. Analyze This Session
Review everything that happened in the current session:
- What was the original goal?
- What has been completed?
- What is still in progress or blocked?
- What key decisions were made and WHY?
- What files were created or modified?
- What errors were encountered and resolved?
- What dead ends were explored?
Worktree State
If working in a git worktree, capture:
- Worktree path: output of
pwd - Feature branch: output of
git branch --show-current - Main repo path: first line of
git worktree list - Merge status: is the feature ready to merge, or still in progress?
This is critical — the next session needs to know where to cd to resume work.
4. Write HANDOFF.md
Save to HANDOFF.md in the project root (the main repo, not the worktree). Use this template as the structure — fill in every section with real data from reconciliation + current session:
@.codex/templates/HANDOFF-template.md
Reconciliation rules for each section:
- Recently Completed (Last Session): Items finished in THIS session only. Do not carry forward completed items from prior handoffs — they live in git history now. Cap at ~5 most relevant items. If nothing was completed this session, omit this section.
- In Progress / Next Steps: Only items that are genuinely unfinished. If the old handoff had 8 next steps and 6 were committed, those 6 disappear. The 2 remaining carry forward alongside any new items from this session.
- Dead Ends: Carry forward from previous handoff if still relevant (the next agent still needs to avoid them). Drop dead ends about approaches to problems that have since been solved.
- Key Decisions: Carry forward decisions that still constrain future work. Drop decisions about completed features unless they set precedent for ongoing work.
5. Confirm
- Confirm file path
- Suggest the next session's first prompt:
Read HANDOFF.md and continue from where the previous session left off. - If uncommitted changes exist, suggest
/commitfirst
Quality Criteria
A good handoff should:
- Let a fresh agent continue without clarifying questions
- Be under 100 lines
- Reflect the current state, not a cumulative log of all sessions
- Include enough "why" that the next agent makes the same decisions
- Explicitly list dead ends to prevent wasted work
- Have a concrete "first action"
- Have zero completed items in the "In Progress" section
Anti-patterns
- Don't include full file contents — reference paths
- Don't include conversation transcripts — summarize
- Don't be vague ("fix the bug") — be specific ("fix SSE reconnection in
src/hooks/useSSE.ts") - Don't skip Dead Ends — this prevents the most common wasted effort
- Don't carry forward completed tasks — if git shows it's done, it's done
- Don't accumulate "In Progress" items across sessions without verifying they're still relevant
- Don't keep dead ends about problems that have been solved
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
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.

