Skip to content

feat(me): add handoff skill for session context preservation - #628

Merged
baleen37 merged 1 commit into
mainfrom
polymorphic-noodling-treehouse
Apr 22, 2026
Merged

feat(me): add handoff skill for session context preservation#628
baleen37 merged 1 commit into
mainfrom
polymorphic-noodling-treehouse

Conversation

@baleen37

@baleen37 baleen37 commented Apr 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds me:handoff skill that writes a structured markdown file to ~/.claude/handoff/ capturing current session context (goal, next steps, open questions, failed approaches, decisions, environment).
  • Write-only by design: resume is handled by the user pasting the file into a new session — no hook, no automatic trigger, no read logic.
  • Filename format: YYYY-MM-DD-HHmm-<topic>.md (local time).

Changes

  • plugins/me/skills/handoff/SKILL.md — skill body with template and content rules
  • docs/superpowers/specs/2026-04-22-me-handoff-skill-design.md — design spec

Test plan

  • Invoke /me:handoff in a live session and verify file is written to ~/.claude/handoff/ with correct filename format
  • Confirm omitted sections (no content) don't appear in the output
  • Paste generated file path into a new session and confirm Claude picks up context from frontmatter + Resume Prompt

Summary by CodeRabbit

  • New Features

    • Introduced the /handoff command, which captures session goals, current state, decisions, and environment snapshots into a timestamped markdown file for later resumption.
  • Documentation

    • Added design specification for the handoff skill, detailing its scope, user triggers, workflow, output format, and operational constraints.

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.
@baleen37
baleen37 enabled auto-merge (squash) April 22, 2026 00:24
@coderabbitai

coderabbitai Bot commented Apr 22, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Two 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

Cohort / File(s) Summary
Handoff Skill Specification & Definition
docs/superpowers/specs/2026-04-22-me-handoff-skill-design.md, plugins/me/skills/handoff/SKILL.md
New skill for preserving session context via /me:handoff command. Gathers environment snapshots, extracts conversation essentials, and writes timestamped markdown handoff files to ~/.claude/handoff/. Includes design constraints, anti-patterns, and required output template structure.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

Possibly related PRs

Poem

🐰 A handoff, what delight!
Context preserved for future's light,
Session snapshots, kebab-named files,
Resume later, skip the trial trials!
Hop-hop-handoff, no auto-fright!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(me): add handoff skill for session context preservation' directly and clearly summarizes the main change: adding a new 'handoff' skill to the 'me' plugin for preserving session context.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch polymorphic-noodling-treehouse

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

auto-merge was automatically disabled April 22, 2026 00:25

Repository rule violations found

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
plugins/me/skills/handoff/SKILL.md (1)

4-7: allowed-tools is broader than necessary for this skill.

Bash without 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) plus Write/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

📥 Commits

Reviewing files that changed from the base of the PR and between 0de71c8 and 2328f3b.

📒 Files selected for processing (2)
  • docs/superpowers/specs/2026-04-22-me-handoff-skill-design.md
  • plugins/me/skills/handoff/SKILL.md

Comment on lines +33 to +38
1. 환경 스냅샷 수집 (병렬):
- `git status --short`
- `git diff --stat`
- `git log -5 --oneline`
- `git branch --show-current`
- `pwd`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Comment on lines +10 to +16
# /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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

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 do

Also 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`.

Comment on lines +43 to +45
```
~/.claude/handoff/YYYY-MM-DD-HHmm-<topic>.md
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
```
~/.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.

@baleen37
baleen37 merged commit 6a3686c into main Apr 22, 2026
5 checks passed
@baleen37
baleen37 deleted the polymorphic-noodling-treehouse branch April 22, 2026 04:53
baleen-release-app Bot pushed a commit that referenced this pull request Apr 22, 2026
# [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))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant