feat(me): add handoff skill for session context preservation - #628
Conversation
Writes a structured markdown file to ~/.claude/handoff/ capturing goals, decisions, open questions, and failed approaches so the next session can resume without losing context. Write-only; resume is handled by the user pasting the file into a new session.
📝 WalkthroughWalkthroughTwo new files define a "me:handoff" skill for preserving Claude session context. A design specification document outlines the skill's purpose, scope, trigger commands, and workflow. A skill definition file provides the executable specification with command handling, environment snapshot gathering, and structured markdown output formatting. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~4 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Repository rule violations found
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
plugins/me/skills/handoff/SKILL.md (1)
4-7:allowed-toolsis broader than necessary for this skill.
Bashwithout command scoping increases risk surface for a write-only archival workflow. Consider restricting to the exact commands used (git status,git diff --stat,git log,git branch,git rev-parse,pwd,mkdir) plusWrite/Read.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@plugins/me/skills/handoff/SKILL.md` around lines 4 - 7, The allowed-tools list in SKILL.md is too broad (includes Bash) — update allowed-tools to remove the general Bash entry and instead enumerate the exact shell commands needed (git status, git diff --stat, git log, git branch, git rev-parse, pwd, mkdir) alongside Write and Read; modify the allowed-tools block so it lists those command names as separate entries and remove the generic "Bash" token to limit the skill's execution surface.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/superpowers/specs/2026-04-22-me-handoff-skill-design.md`:
- Around line 33-38: The environment snapshot step labeled "환경 스냅샷 수집 (병렬)" is
missing the command to populate the frontmatter `commit`; add `git rev-parse
--short HEAD` to that list so the template's `commit` field is generated; update
the same list in the duplicate block referenced (lines 53–57) so both snapshot
sections include `git rev-parse --short HEAD` and remain self-consistent.
In `@plugins/me/skills/handoff/SKILL.md`:
- Around line 10-16: The documentation uses the trigger `/handoff` but the PR
and design use `me:handoff` (invoked as `/me:handoff`); update all occurrences
of the trigger string in this SKILL.md to the canonical trigger `me:handoff`
(and show examples as `/me:handoff`) so the documented command, examples, and
related sections (including the header and "What `/handoff` does" references)
consistently use `me:handoff`/`/me:handoff`.
- Around line 43-45: Update the fenced code block in SKILL.md's filename example
to satisfy MD031/MD040: add a language tag "text" to the inner triple backticks
and ensure there is a blank line before the opening fence and after the closing
fence (i.e., the numbered list item "Build filename" should be followed by an
empty line, then the ```text fence, the filename line, closing ```, and then
another blank line) so the snippet is lint-safe.
---
Nitpick comments:
In `@plugins/me/skills/handoff/SKILL.md`:
- Around line 4-7: The allowed-tools list in SKILL.md is too broad (includes
Bash) — update allowed-tools to remove the general Bash entry and instead
enumerate the exact shell commands needed (git status, git diff --stat, git log,
git branch, git rev-parse, pwd, mkdir) alongside Write and Read; modify the
allowed-tools block so it lists those command names as separate entries and
remove the generic "Bash" token to limit the skill's execution surface.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0305c84c-2a77-46a9-bba8-36fbf5ac0b8b
📒 Files selected for processing (2)
docs/superpowers/specs/2026-04-22-me-handoff-skill-design.mdplugins/me/skills/handoff/SKILL.md
| 1. 환경 스냅샷 수집 (병렬): | ||
| - `git status --short` | ||
| - `git diff --stat` | ||
| - `git log -5 --oneline` | ||
| - `git branch --show-current` | ||
| - `pwd` |
There was a problem hiding this comment.
Flow is missing the command needed to populate commit in frontmatter.
The template requires commit, but the snapshot step does not include git rev-parse --short HEAD. Add it to keep the procedure self-consistent.
Spec consistency patch
1. 환경 스냅샷 수집 (병렬):
- `git status --short`
- `git diff --stat`
- `git log -5 --oneline`
- `git branch --show-current`
+ - `git rev-parse --short HEAD`
- `pwd`Also applies to: 53-57
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/superpowers/specs/2026-04-22-me-handoff-skill-design.md` around lines 33
- 38, The environment snapshot step labeled "환경 스냅샷 수집 (병렬)" is missing the
command to populate the frontmatter `commit`; add `git rev-parse --short HEAD`
to that list so the template's `commit` field is generated; update the same list
in the duplicate block referenced (lines 53–57) so both snapshot sections
include `git rev-parse --short HEAD` and remain self-consistent.
| # /handoff: Write a session handoff file | ||
|
|
||
| Save the current session's context to `~/.claude/handoff/YYYY-MM-DD-HHmm-<topic>.md` as a structured markdown file. Runs only when the user explicitly asks for it. | ||
|
|
||
| There is no resume logic. The next session picks up context when the user pastes the file path or contents — Claude reads the frontmatter and the Resume Prompt section and takes it from there. | ||
|
|
||
| ## What `/handoff` does |
There was a problem hiding this comment.
Trigger name is inconsistent with the documented command (/me:handoff vs /handoff).
This file defines and describes /handoff, while the PR objective/design specify me:handooff (and /me:handoff). Please align on one canonical trigger to avoid user-facing command confusion and mismatched test behavior.
Suggested alignment patch
-# /handoff: Write a session handoff file
+# /me:handoff: Write a session handoff file
-## What `/handoff` does
+## What `/me:handoff` does
-## What `/handoff` does NOT do
+## What `/me:handoff` does NOT doAlso applies to: 23-29
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@plugins/me/skills/handoff/SKILL.md` around lines 10 - 16, The documentation
uses the trigger `/handoff` but the PR and design use `me:handoff` (invoked as
`/me:handoff`); update all occurrences of the trigger string in this SKILL.md to
the canonical trigger `me:handoff` (and show examples as `/me:handoff`) so the
documented command, examples, and related sections (including the header and
"What `/handoff` does" references) consistently use `me:handoff`/`/me:handoff`.
| ``` | ||
| ~/.claude/handoff/YYYY-MM-DD-HHmm-<topic>.md | ||
| ``` |
There was a problem hiding this comment.
Fix fenced block linting in filename example.
The inner fence in the numbered list is missing a language and blank-line spacing (matches MD031/MD040 warnings). Use a language tag (text) and ensure surrounding blank lines per lint rules.
Lint-safe markdown snippet
-3. **Build filename** — local time:
- ```
- ~/.claude/handoff/YYYY-MM-DD-HHmm-<topic>.md
- ```
+3. **Build filename** — local time:
+
+ ```text
+ ~/.claude/handoff/YYYY-MM-DD-HHmm-<topic>.md
+ ```📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ``` | |
| ~/.claude/handoff/YYYY-MM-DD-HHmm-<topic>.md | |
| ``` | |
| 3. **Build filename** — local time: |
🧰 Tools
🪛 markdownlint-cli2 (0.22.0)
[warning] 43-43: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 43-43: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 45-45: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@plugins/me/skills/handoff/SKILL.md` around lines 43 - 45, Update the fenced
code block in SKILL.md's filename example to satisfy MD031/MD040: add a language
tag "text" to the inner triple backticks and ensure there is a blank line before
the opening fence and after the closing fence (i.e., the numbered list item
"Build filename" should be followed by an empty line, then the ```text fence,
the filename line, closing ```, and then another blank line) so the snippet is
lint-safe.
# [16.14.0](v16.13.0...v16.14.0) (2026-04-22) ### Features * **me:** add handoff skill for session context preservation ([#628](#628)) ([6a3686c](6a3686c))
Summary
me:handoffskill that writes a structured markdown file to~/.claude/handoff/capturing current session context (goal, next steps, open questions, failed approaches, decisions, environment).YYYY-MM-DD-HHmm-<topic>.md(local time).Changes
plugins/me/skills/handoff/SKILL.md— skill body with template and content rulesdocs/superpowers/specs/2026-04-22-me-handoff-skill-design.md— design specTest plan
/me:handoffin a live session and verify file is written to~/.claude/handoff/with correct filename formatSummary by CodeRabbit
New Features
/handoffcommand, which captures session goals, current state, decisions, and environment snapshots into a timestamped markdown file for later resumption.Documentation