/greybeard:wrapfrom greybeard
Determines whether a session or worktree can be safely closed by evaluating hard stops (unfinished migrations, broken trunk, near-complete work, unwritable brief) and inventorying uncommitted changes.
Ships in greybeard. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The optional input is the text supplied with this skill invocation, through a slash command or a plain-language request. If none was supplied, follow the no-input behavior below.
Answer one question about the supplied input — or, if that's empty, about this whole session: can I close this and delete the worktree?
There are two rulings, and you owe me exactly one of them: finish it now, or wrap it — turn what's here into something durable and tell me it's safe to delete. "Mostly done, maybe keep it around" is not a ruling — it is the third outcome, the one you get by declining to choose, and it is the most expensive of the three: a worktree nobody will reopen and nobody dares delete.
The test is not "is this important" — it's "what dies when the worktree dies, and can I afford to lose it?" A worktree is a checkout. It is cheap to recreate and carries nothing by itself. Everything load-bearing either lives somewhere outside it or is about to be deleted.
Four things override every other consideration. If any holds, the ruling is finish now — no artifact substitutes, and "I'll open an issue for it" is how it ships broken.
main. That cost lands on whoever starts next, who has none of your context.Look, don't recall. Run the checks and report what they said:
git status --porcelain — uncommitted edits and untracked files. Untracked is where the new file you never git added is hiding.git log --oneline @{upstream}..HEAD — commits that exist only on this machine. fatal: no upstream configured for branch is not a failure, it's the answer: the branch has never been pushed, so all of it is local — git log --oneline --not --remotes lists it.git stash list — the stack is shared across worktrees; an entry pushed from here outlives the worktree but loses the only person who knew what it was.Then the item that never shows up in any of those, and is the reason most handoffs are useless: the context. What you tried that didn't work, why the obvious approach is wrong, the reproduction that took twenty minutes to find, the file you ruled out. The diff survives; that dies with the session. It is the most expensive thing in the worktree and the only one with no automatic record.
Last, the open loops: the item that passes the test above and still gets dropped. List every step still open when this session ends, whoever owns it:
Each needs an owner and a tracker URL: an issue, a PR, a board card. A list in a doc or in chat is not a tracker. It survives the worktree, so it passes the test, and it still reminds no one.
One artifact per kind of thing, not three copies of one. Match the form to what has to survive:
| What's here | Where it goes |
|---|---|
| Nothing — merged, clean, no unpushed commits, no open loops | Nowhere. Say so and close. |
| A lead or a hunch. No code, no decision | A /sidenote entry — it already lives in git's common dir, outside every worktree. |
| A decision, a design, knowledge the next change needs | A doc in the repo, committed and pushed. Memory is an index, not an archive (§7). |
| A defined next task, nothing written yet | A GitHub issue: title + the brief below. |
| Code exists and is incomplete | Commit it on the branch, push it, open a draft PR whose body is the brief. |
Knowledge and tasks don't share a form. When the session leaves both the reasoning and steps still to do, the reasoning goes in the doc and the steps go in one issue that links to it: a checklist, in order, with an owner on each line. The easy mistake is folding the steps into the doc's Left section because the doc already exists.
Two notes on that last pair. A pull request needs at least one commit — there is no PR with an empty diff, so "a PR with just a description" is either an issue, or a PR whose diff is the brief committed as a doc. And once the branch is pushed, the branch is the artifact: deleting the worktree costs you nothing. Never delete a worktree whose branch is unpushed and unmerged — that is the one deletion that actually loses work.
Whichever form you picked, the body is the same five lines, written for someone who was not here:
Goal — what this is for, in one line.
Done — what works now, and the check you actually ran to know it.
Left — the exact next step and who owns it. Not "continue the refactor".
Rejected — approaches that don't work, and why. This is the part that dies with the context.
Verify — the command or check that says it's finished.
Anchor it: the file:line where the next agent starts reading. And keep it honest — if you never ran the test, "tests not run" goes in the brief. A caveat about your own work is an unmet success criterion (§4), not a footnote to bury; the next agent will trust this document instead of checking, exactly as you would.
gh issue create --title "…" --body-file … and gh pr create --draft --title "…" --body-file … each print a URL — quote it. A commit that was never pushed is not a handoff, it is the same work in a smaller box (§4: it compiles is not it works).git worktree remove <path>, run from another checkout — and say plainly if it needs -f, because a dirty tree means step 2 didn't finish.Not yet, and that step is the one thing.Safe to close — <URL> carries it.Not yet — <the one thing> has to close here first.Where this sits next to /sidenote: a sidenote parks a thought so the current task keeps its pace; /wrap rules on the session. An open sidenote never blocks a wrap — but if this branch was the only context that made one legible, fold it into the brief before the worktree goes.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub clawnify/greybeard --plugin greybeard7 skills in this plugin
/check-resolvableAudit the whole skill/tool library so it stays a DRY, MECE resolver — no duplicate skills, no overlaps, no gaps. Use after adding or editing a skill, or when the library feels cluttered./pressure-testPressure-test the current approach against scalability, long-term, and efficiency, then recommend the best option. Use when the user asks to pressure-test a decision or audit the session's approaches./sidenotePark a passing thought as a later-task without derailing the current one — logged, not acted on. Use when the user asks to park a thought, sends SIDENOTE:, or wants to list parked notes./skillifyTurn something you just did into a reusable skill and register it in the resolver. Use when the user says "skillify this", "make that a skill", or after completing a non-trivial procedure worth repeating./verify-responsiveThe default way to check a responsive UI — render the real page at real viewport widths in fixed-width iframes, then drive and assert it from the parent. Use whenever you need to see or verify a layout at a given width: a mobile or tablet breakpoint, or small-screen-only behavior. Reach for it first, ahead of resizing a window./visualizeDraw the thing under discussion: the process change or the code shape, whichever the question is about, grounded in the real code and anchored to file:line. Use when the user asks to visualize a change, a process, a flow, code, or architecture; use verify-responsive to check a running UI at a viewport width.