session-transfer
Skill7 starsChanged 43 days agoMITView on GitHub
Create and resume agent-aware session handoffs across Codex, Claude Code, OpenCode, and unknown runtimes. Triggers on save state, create handoff, resume latest session, context pressure, /goal completion, or continue where we left off. Persists indexed, immutable handoffs so a new session can continue without chat or terminal history.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- ShlomiPorush/agent-skillstheir own version, first seen Nov 3, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- ShlomiPorush/agent-skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository83 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accessibility-enforcerSkill
- access-policy-designerSkill
- adaptive-guardSkill
- agent-reviewerSkill
- anti-ai-slop-designSkill
- api-mock-designerSkill
- api-observability-plannerSkill
- app-store-reviewerSkill
- ask-first-act-laterSkill
- assumption-checkerSkill
- auth-flow-designerSkill
- b2b-founder-roadmapSkill
- brand-name-labSkill
- breaking-change-detectorSkill
- changelog-generatorSkill
- checkpoint-guardianSkill
- claude-style-codingSkill
- claw-integration-designSkill
- context-compressorSkill
- contract-first-designerSkill
- coolify-orchestratorSkill
- crash-analystSkill
- data-lineage-tracerSkill
- data-maskerSkill
- deep-link-architectSkill
- design-intelligenceSkill
- design-md-enforcerSkill
- ecosystem-apiSkill
- ecosystem-databaseSkill
- ecosystem-mobileSkill
- ecosystem-orchestrationSkill
- ecosystem-productSkill
- ecosystem-reasoningSkill
- ecosystem-securitySkill
- ecosystem-webSkill
- error-recoverySkill
- fth-design-crafterSkill
- geo-auditorSkill
- geo-optimizerSkill
- index-advisorSkill
- jev-orchestratorSkill
- mastermind-loggerSkill
- memory-ledgerSkill
- migration-strategistSkill
- mobile-perf-auditorSkill
- mobile-security-auditorSkill
- multi-brain-debateSkill
- multi-brain-expertsSkill
- multi-brain-scoreSkill
- multi-brainSkill
- offline-sync-designerSkill
- onboarding-designerSkill
- output-criticSkill
- parallel-plannerSkill
- pgbouncer-architectSkill
- plan-hardenerSkill
- plan-implement-verify-recoverSkill
- proje-analizcisiSkill
- project-analyzerSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 10 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Do not treat this skill as Codex-only.
- Very specific: line 20
Before CREATE or RESUME, detect the active runtime.
- Very specific: line 55
Use local project time when reliable.
- Distinctive: line 71
Run the shipped helper (it detects the agent, writes the handoff, appends JSONL, and rewrites both indexes):
- Very specific: line 82
Write handoffs/YYYY-MM-DD-HHmm.md (suffix on collision).
- Very specific: line 84
Update <agent-dir>/INDEX.md and .session-transfer/INDEX.md.
- Very specific: line 102
Do not finalize if secrets are detected or the score is below 70.
- Distinctive: line 106
Prefer fast, low-context navigation.
- Very specific: line 114
Read .session-transfer/INDEX.md first when present.
- Distinctive: line 115
Prefer the current agent’s relevant unfinished handoff.
- Distinctive: line 117
Read only the selected handoff initially.
- Very specific: line 123
Follow references/resume-checklist.md.
- Distinctive: line 127
Not purely manual. At most one automatic handoff per logical work boundary.
- Distinctive: line 131
Do not auto-CREATE for a tiny copy change, simple formatting, or an isolated low-impact fix.
- Distinctive: line 137
When the runtime indicates remaining context is low enough to threaten reliable completion, persist before continuing or stopping:
- Distinctive: line 144
Do not hard-code a percentage that only works for one agent.
- Very specific: line 148
Every /goal that performed meaningful work (completed, partial, blocked, or interrupted/aborted) must run CREATE and succeed at …
- Distinctive: line 167
Read the global index before history.
≈ “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
Session Transfer
Persist substantial work as an immutable, indexed handoff so a later session — or a different coding agent — can continue without reconstructing chat or terminal history.
Mode Selection
CREATE — save state, pause, context is getting full, /goal is closing, or an automatic trigger fires.
RESUME — continue previous work, load the latest session, or resume unfinished work on a topic.
Do not treat this skill as Codex-only. Detect the active runtime, then write under that agent’s directory.
Agent Detection
Before CREATE or RESUME, detect the active runtime. Do not pick Codex, Claude Code, or OpenCode just because .codex, .claude, or .opencode already exist (a repo may contain all three).
Signal priority:
- Runtime / environment signals (
CODEX_*,CLAUDECODE/CLAUDE_CODE*,OPENCODE*) - Agent-specific execution or configuration context
- Explicit user instruction (
--agent, or “create this as a Claude handoff”) - Reliable agent self-identification
- Existing agent directory only as a weak supporting signal — never the sole reason
- Fallback: unknown / future runtime →
.agent
Directory mapping:
| Runtime | Directory |
| Codex | .codex |
| Claude Code | .claude |
| OpenCode | .opencode |
| Unknown / future | .agent |
Storage Layout
<agent-dir>/
├── INDEX.md
├── handoffs.jsonl
└── handoffs/
└── YYYY-MM-DD-HHmm.md
.session-transfer/
└── INDEX.mdExamples: .codex/handoffs/2026-08-18-1704.md, .claude/handoffs/2026-08-18-1830.md.
Use local project time when reliable. Timestamped files are immutable history — never overwrite an older one. On collision append a deterministic suffix (-2, -3, …). Older YYYY-MM-DD-HHMMSS-slug.md files stay readable for RESUME.
.session-transfer/INDEX.md is the primary navigation layer: current/recommended handoff, last source agent, topic, status, branch if known, next recommended action, recent cross-agent handoffs. Keep it compact. Do not copy full handoff bodies into any index. Do not invent git, repo, or agent fields you cannot verify.
Each agent INDEX.md is a lightweight current + recent table. handoffs.jsonl is one compact JSON object per line (fields only when known): id, created, agent, topic, status, trigger, branch, commit, file, previous_session, resumed_from, goal_status.
Status and Triggers
Status: completed | in-progress | partial | blocked | interrupted
Trigger: manual | goal-completion | substantial-work | context-pressure | agent-transfer | interrupted
Optional goal_status may track /goal outcome separately. Do not invent extra statuses or triggers.
CREATE
Run the shipped helper (it detects the agent, writes the handoff, appends JSONL, and rewrites both indexes):
python skills/session-transfer/scripts/create_handoff.py <topic> --status <status> --trigger <trigger>Useful flags: --agent, --workspace, --branch, --commit, --goal-status, --next-action, --continues-from, --resumed-from. Pass known fields; omit unknown ones.
- Detect the runtime (priority above).
- Inspect current repo/work state needed for an accurate handoff (git branch/commit/modified files when available).
- Determine status and trigger from the vocabularies above.
- Write
handoffs/YYYY-MM-DD-HHmm.md(suffix on collision). - Append one JSONL line.
- Update
<agent-dir>/INDEX.mdand.session-transfer/INDEX.md. - Reply with a concise confirmation only unless the user asks for the full document:
Session handoff created.
Status: completed
Handoff: .codex/handoffs/2026-08-18-1709.md
Global index updated: .session-transfer/INDEX.mdFill the handoff so a fresh session can continue without chat/terminal history. Use references/handoff-template.md. Include compact YAML metadata when known (session_id, created, source_agent, source_model, trigger, status, goal_status, topic, working_directory, branch, commit, previous_session, resumed_from). Prefer precise file paths, decisions, verification outcomes (passed / failed / not run), remaining work, and a single Next Recommended Action.
Then validate:
python skills/session-transfer/scripts/validate_handoff.py <handoff-file>Do not finalize if secrets are detected or the score is below 70. After a cross-agent resume, the next CREATE must record lineage: source_agent, resumed_from, previous_session.
RESUME
Prefer fast, low-context navigation. Do not scan every historical handoff unless indexes are missing.
python skills/session-transfer/scripts/resume_handoff.py
python skills/session-transfer/scripts/list_handoffs.py
python skills/session-transfer/scripts/check_staleness.py <handoff-file>- Read
.session-transfer/INDEX.mdfirst when present. - Prefer the current agent’s relevant unfinished handoff.
- Otherwise resume the latest compatible cross-agent handoff (Codex ↔ Claude Code ↔ OpenCode ↔
.agent). - Read only the selected handoff initially.
- Inspect current git/repo state. Verify referenced files still exist. Detect changes after the handoff (
check_staleness.py: FRESH / SLIGHTLY_STALE / STALE / VERY_STALE). - Continue from Next Recommended Action only after reconciliation. Never blindly trust a stale handoff over the repository.
If the global index is missing or corrupted: fall back to agent INDEX.md, then JSONL / handoff metadata. Reconstruct the smallest needed index with the resume --recover path (or recover_indexes); never delete timestamped handoffs. If JSONL and Markdown indexes disagree, verify against actual handoff files and repo state.
Follow references/resume-checklist.md. For chained work, read the newest handoff first; open a predecessor only if needed.
Automatic CREATE
Not purely manual. At most one automatic handoff per logical work boundary.
Treat work as substantial when any of these apply: feature/module implemented; architecture, schema/migration, API contract, auth/security, or deploy/infra changed; 5+ meaningful files; multi-phase work; meaningful build/test/debug; large context; continuation would otherwise require reconstructing state. A critical one-file architecture, migration, security, or contract change still qualifies.
Do not auto-CREATE for a tiny copy change, simple formatting, or an isolated low-impact fix.
A large /goal with many substeps gets one handoff at the end, not one after every substep. Intermediate auto-handoffs only when: context pressure, agent change, interruption, an explicit checkpoint, or an explicit user request.
Context pressure
When the runtime indicates remaining context is low enough to threaten reliable completion, persist before continuing or stopping:
trigger: context-pressure
status: in-progressDo not hard-code a percentage that only works for one agent. If there is no context signal, use session-length / complexity indicators — do not invent a percent.
/goal completion contract
Every /goal that performed meaningful work (completed, partial, blocked, or interrupted/aborted) must run CREATE and succeed at persistence/indexing before the goal is considered closed. Do not add or depend on other goal-workflow skills.
/goal → implement → verify → determine status → session-transfer CREATE → indexes → concise reply
Implementation ✓
Verification ✓
Handoff ✓
Index update ✓
----------------
GOAL DONE ✓Recovery
Indexes are navigation. Timestamped handoffs are history. If an index is missing, stale, or corrupted: do not delete handoffs; rebuild the smallest index from JSONL / handoff metadata; report the repair concisely.
Token efficiency
Read the global index before history. Read one selected handoff before older sessions. Keep indexes and JSONL compact. Do not print the full handoff after CREATE. Prefer repo verification over replaying chat.
Usage examples
Use session-transfer to create a handoff.Use session-transfer to resume the latest session.Use session-transfer to resume the latest unfinished billing work./goal ...
# session-transfer runs as the terminal persistence stepScripts
| Script | Purpose |
scripts/create_handoff.py <topic> | CREATE: immutable handoff + JSONL + indexes |
scripts/resume_handoff.py | RESUME: select current-agent or cross-agent handoff |
scripts/list_handoffs.py [path] | List handoffs across agent dirs |
scripts/validate_handoff.py <file> | Completeness, quality, secrets |
scripts/check_staleness.py <file> | Whether repo state still matches |
Resources
references/handoff-template.md— required sections and metadatareferences/resume-checklist.md— reconcile before continuing
🔗 Next Steps & Handoffs
<!-- BEGIN GENERATED: handoffs (generated from the ecosystem workflow map by build_ecosystems.py — do not edit by hand) -->Ecosystem: @ecosystem-orchestration — Agent Orchestration.
Workflows:
- Failure & Context Pressure Flow (
orch-resilience, step 3 of 3): last step → once it passes, complete the workflow and report the outcome.
Direct handoffs:
@memory-ledger— A resumed session needs an in-task ledger again.
Handoff contract: pass results to the next skill through an inline Handoff block in your reply with the fields skill, workflow, created_at, inputs, summary, and next (the handoff contract of @ecosystem-orchestration). If a next skill is not installed, continue with its step from the ecosystem map, or install it with npx skills add fatih-developer/fth-skills --skill <name> after the user agrees.
<!-- END GENERATED: handoffs -->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.

