ezos26/claude-skills/last-rites
Claude Code and agent skill by ezos26/claude-skills
- community
Checking that the SKILL.md file is still in the repository.
Context preservation skill for Claude Code sessions approaching context limit. Use when at ~90% context capacity to create a handoff document for the next session. Triggers on phrases like "last rites", "context handoff", "prepare handshake", "before compaction", or when user indicates context is running low. Creates an instruction document (not a summary) that the next Claude session can use to continue work seamlessly.
Install
npx vskill@latest install ezos26/claude-skills/last-ritesSKILL.md
Last Rites
Two-mode skill for session continuity: RECEIVE existing handoffs or CREATE new ones.
MODE DETECTION (READ FIRST)
Before doing anything, determine which mode you're in:
| Signal | Mode | Action | |
|---|---|---|---|
| User gives you a handoff file to read | RECEIVE | Read it, follow its instructions, start working | |
| User says "review the handoff" or "continue from handoff" | RECEIVE | The handoff is YOUR mission brief | |
| Context is ~90% full | CREATE | Generate new handoff for next session | |
| User says "last rites", "prepare handoff", "context getting full" | CREATE | Generate new handoff for next session |
CRITICAL: If a handoff already exists and user points you to it, you are the RECEIVER. Do NOT create a new handoff. Read it and work.
RECEIVE MODE (You're the New Claude)
The handoff document is your mission brief. It was written FOR YOU by the previous Claude session.
Receive Workflow
- Read the handoff the user points you to (e.g.,
docs/handoffs/002-feature.md) - Acknowledge what you learned: current state, critical knowledge, gotchas
- Start on "Next Actions" - these are your immediate tasks
- Read "Files to Read First" if you need more context
- Work - continue the task from where the previous session left off
What the Handoff Contains (For You)
- Quick Start: How to get productive in 30 seconds
- Git State: Uncommitted work, recent commits
- Critical Knowledge: Things you MUST know (imperatives, not history)
- Gotchas & Warnings: Traps the previous Claude found
- Next Actions: Your TODO list, start here
- Open Questions: Things to investigate
Receive Mode Output
After reading the handoff, say something like:
Then BEGIN WORKING. Do not ask permission. The handoff IS your permission.
CREATE MODE (You're Ending a Session)
Preserve critical context before session compaction by creating an instruction document for the next Claude instance.
WHY CONTEXT FORKING MATTERS (READ THIS FIRST)
You have context bias. After a long session, you're blind to:
- What you assumed but never verified
- Details you think are obvious but aren't documented
- Holes in your understanding that a fresh Claude would notice immediately
Fresh agents see what you can't. By spawning agents WITHOUT your context, they:
- Ask "wait, what is this?" about things you've stopped questioning
- Notice missing documentation you forgot to write
- Find gaps between what you did and what you think you did
This is not redundancy - it's triangulation. Five agents reading the same codebase will notice five different things. Their combined blind spots are smaller than yours.
CRITICAL: Context forking is mandatory. All intel agents MUST run in background (run_in_background: true). Their work stays in output files, NOT in your context. You only receive the final handoff path. If you skip this, you'll run out of context before the handoff is written.
Core Principle
You are NOT writing a summary or obituary. You are writing mission orders for the next Claude session. The handoff document IS the system prompt for your successor.
| Wrong | Right | |
|---|---|---|
| "We discovered that..." | "You must know that..." | |
| "The issue was..." | "Watch out for..." | |
| "We decided to..." | "Continue with..." | |
| Past tense narrative | Imperative instructions |
Workflow
Phase 0: Extract Session Brief (YOU DO THIS)
Before spawning any agents, extract the session context from your conversation. You have this context - the agents don't.
Create a Session Brief by answering these questions:
This brief is the foundation. Agents will verify it against reality.
Phase 1: Launch Background Intel Agents
Spawn five sub-agents in background mode. ALL must use run_in_background: true.
CRITICAL: Each agent gets a DIFFERENT verification focus + the Session Brief.
CRITICAL: Agent Output Handling
Background agents write JSONL transcripts to output files, not clean reports. Each agent prompt includes an OUTPUT FORMAT section that tells the agent to output a structured report as their final message. When reading agent outputs:
- The output file is JSONL (one JSON object per line)
- Look for the LAST assistant message with
"type":"text"content - That text contains the structured report
- Use
greportailto find the report, notRead(too large)
Example extraction:
Or have the synthesizer agent do the extraction since it can use bash.
Agent 1: Git State Verifier
GIT STATE REPORT ================ Match: [YES/NO] Discrepancies: [list or "none"]
Uncommitted Files:
- [file]: [staged/unstaged]
Recent Commits:
- [hash] [message]
Commit Recommendation: [one line message]
Lost Work Risk: [none/low/high + what]
Agent 2: Documentation Verifier
DOCUMENTATION REPORT ==================== Documented: [YES/PARTIAL/NO] Gaps: [list or "none"]
Next Handoff Number: [NNN] Existing Handoffs:
- [NNN]: [topic] [relevant: yes/no]
AGENTS.md Status: [exists/missing] [needs update: yes/no] Patterns to Add: [list or "none"]
TODO/FIXME Found:
- [file:line]: [text]
Agent 3: Code State Verifier
CODE STATE REPORT ================= Match: [YES/PARTIAL/NO] Discrepancies: [list or "none"]
Incomplete Implementations:
- [file:line]: [issue]
Missing Dependencies: [list or "none"]
Critical Files (read first):
- [file]: [why]
- [file]: [why]
Issues Found:
- [severity]: [description]
Agent 4: Test/Run Verifier
RUNNABILITY REPORT ================== Runnable: [YES/NO/PARTIAL] Blockers: [list or "none"]
Commands:
- Dev: [command]
- Build: [command]
- Test: [command]
Environment Required:
- [VAR]: [description]
Setup Steps:
- [step]
- [step]
Test Coverage: [exists/missing] [files if exist]
Agent 5: Gotcha Hunter
GOTCHA REPORT ============= Issues Found: [count]
Gotchas (Session Brief Missed):
- [severity]: [description]
Watch For:
- [issue]: [why]
Hardcoded Values:
- [file:line]: [value] [risk]
Unanswered Questions:
- [question]
Security/Anti-patterns:
- [issue or "none"]
After launching all 5 agents, you will receive 5 output file paths. Store these paths.
Phase 2: Launch Synthesizer Agent (Background)
Once all 5 intel agents complete, launch a sixth synthesizer agent - also in background:
Synthesizer Prompt Template:
Extract the last text content containing "REPORT"
cat [path] | grep '"text"' | tail -3 | grep -i 'report'
tail -20 [path] | grep -oP '"text":"[^"]REPORT[^"]"' | tail -1
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/last-rites/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ezos26/claude-skills/last-rites)