Auto-Pilot Handoff
Scannednpx machina-cli add skill silvesterdivas/context-engineer/auto-handoff --openclawAuto-Pilot Handoff
This skill activates automatically when the context budget warning hook announces RED zone via a [context-budget] RED ZONE systemMessage. Invocation is not required — this skill governs behavior after the hook fires.
When Handoff is Triggered
After completing any atomic unit of work (a file edit, a commit, a test run, a search), if the budget warning hook has announced RED zone via systemMessage:
- Stop starting new work. Finish only the immediately active operation.
- Do not read new files or begin exploratory searches.
- Proceed directly to generating the handoff files below.
Generate Enhanced TASK.md
Create or append to TASK.md in the project root using this template:
# Task: [Brief title]
## Goal
[Clear description of what needs to be accomplished]
## Context
- **Branch:** [current git branch]
- **Date:** [today's date]
- **Previous sessions:** [list any prior TASK.md sections or session IDs if known]
## Constraints
- [Tech stack, patterns, style requirements]
- [Any limitations or requirements discovered]
## Key Files
- [List the most relevant files for this task, with brief purpose notes]
## Key Decisions Made
- **[Decision]:** [What was decided]
- *Reasoning:* [Why this approach was chosen]
- *Rejected alternatives:* [What was considered and discarded, and why]
## Approaches Tried & Failed
- **[What was attempted]:**
- *Why it failed:* [Root cause]
- *Lesson:* [What to avoid or do differently next time]
Generate Enhanced PROGRESS.md
Create or append to PROGRESS.md in the project root using this template:
# Progress: [Same title as TASK.md]
## Completed
- [x] [Step done — be specific about what changed and where]
- [x] [Another completed step]
## Current State
[What's working, what's broken, what's uncommitted. Be precise — the next session starts cold.]
## Next Steps
1. [ ] [Immediate next action — most important first]
2. [ ] [Following action]
3. [ ] [Further actions in priority order]
## Blockers / Open Questions
- [Anything unresolved that the next session needs to decide]
- [External dependencies, unclear requirements, etc.]
## Session Log
- **[Date/Session ID]:** [Brief summary of what was accomplished and where things stand]
Handle Existing Files
If TASK.md or PROGRESS.md already exist in the project root:
- Do not overwrite. Append a new session section.
- For TASK.md: Add any new decisions, failed approaches, or constraint updates under the existing headings, or add a
## Session Update — [date]section. - For PROGRESS.md: Move newly completed items to the Completed list, update Current State, revise Next Steps, and add an entry to the Session Log.
Notify the User
After generating the files, inform the user clearly:
Context budget exhausted — handoff files saved.
I've created/updated
TASK.mdandPROGRESS.mdwith the current state of this task.To continue, start a new conversation with: "Read TASK.md and PROGRESS.md, then continue from where we left off."
Advisory, Not Mandatory
If the user explicitly says to continue working despite the RED zone warning:
- Comply with their request.
- Warn once that context degradation may cause hallucinations, repeated work, or forgotten context.
- Do not warn again after that — respect their decision.
Source
git clone https://github.com/silvesterdivas/context-engineer/blob/main/skills/auto-handoff/SKILL.mdView on GitHub Overview
Auto-Pilot Handoff triggers automatically when the context budget enters the RED zone. It preserves progress by stopping new work after the current operation and generates handoff documents (TASK.md and PROGRESS.md) to enable a smooth continuation in a fresh session.
How This Skill Works
The skill activates automatically when the context-budget RED ZONE systemMessage is issued, without user invocation. After completing any atomic unit of work, it prevents starting new tasks, avoids reading new files, and creates or appends to TASK.md and PROGRESS.md using the templates provided in this skill.
When to Use It
- Context budget is in RED zone during an active task
- The context-budget RED ZONE systemMessage has fired after an operation (edit/commit/test/run) and you’re not supposed to start new work
- You need to save progress and create handoff files before starting a fresh conversation
- You want to prevent reading new files or initiating explorations in this session
- You plan to hand off context to another agent or session by documenting decisions and progress
Quick Start
- Step 1: Wait for the [context-budget] RED ZONE signal to fire after the current operation completes
- Step 2: Allow the handoff to generate/append TASK.md and PROGRESS.md with the provided templates
- Step 3: Review the generated documents and resume in a new conversation by following the continuation instruction
Best Practices
- Let the RED zone signal complete the current atomic unit before handing off
- Do not read new files or start exploratory searches after RED is announced
- Ensure TASK.md includes a clear Goal, Context, Constraints, and Key Files relevant to the task
- Keep PROGRESS.md updated with Completed, Current State, Next Steps, and a concise Session Log
- Review and tailor the handoff templates to the project and stakeholder needs
Example Use Cases
- During a code refactor, budget warning triggers; hand off progress to a teammate with TASK.md and PROGRESS.md populated
- After a long-running test suite hits RED, preserve the current state for the next engineer before starting a new session
- End-of-sprint handoff: RED zone occurs and TASK.md/PROGRESS.md capture goals, context, and decisions for the next sprint
- A deep-dive search completes and RED is signaled; use handoff docs to transfer context to the next assistant
- Context degradation occurs; documents summarize decisions and remaining work for seamless resumption