wrap
Skill1 starsChanged 49 days agoMITView on GitHub
Save NEXT, commit WIP, open the PR when a phase is done. Use when a task ends or on "wrap".
- Reads credentials
45 other projects use a version of this.
Adopted by
Most recently taken up by
- rhasselle-oddball/claude-skillstheir own version, first seen Nov 8, 2026
- jolleyDesign/claude-skillstheir own version, first seen Nov 8, 2026
- fjwood69/moritheir own version, first seen Nov 8, 2026
- egregore-labs/egregoretheir own version, first seen Nov 6, 2026
- mag123c/toktracktheir own version, first seen Nov 3, 2026
- AcKeskin/contexturetheir own version, first seen Nov 1, 2026
Used with
Projects with it also use update, remember and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AnthropicSkillupdate
Sync tasks and refresh memory from your current activity. Use when pulling new assignments from your project tracker into TASKS.md, triaging stale or overdue tasks, filling memory gaps for unknown people or projects, or running a comprehensive scan to catch todos buried in chat and email.
Also in 3 projects that use this
LangChainSkillremember
Review the current conversation and capture valuable knowledge — best practices, coding conventions, architecture decisions, workflows, and user feedback — into persistent memory (AGENTS.md) or reusable skills. Use when the user says: (1) remember this, (2) save what we learned, (3) update memory, (4) capture learnings.
Also in 3 projects that use this
termdockSkillrecall
Retrieves cross-session memories about past decisions, lessons, and patterns. Use when user asks about prior work, past decisions, or mentions a feature. Triggers include check memory, what did we decide, how did we solve.
Also in 3 projects that use this
Microsoft AzureSkillbuild
Build the TypeSpec Rust emitter from source. Run this after cloning the repo, after pulling changes, or when TypeScript source files have been modified.
Also in 3 projects that use this
SentrySkillreview
Fixture review skill.
Also in 7 projects that use this
SentrySkillspec
Produce a verified spec — problem, desired outcome, and acceptance criteria — before building. Use when given a GitHub/Linear issue link, when starting from a fuzzy in-conversation idea, or asked to "figure out what to do" / "scope this" / "what should I build" — whenever the *what* isn't yet pinned down. Grills the ambiguities, checks the premise against the code, and produces acceptance criteria you sign off on — then hands to design-first.
Also in 3 projects that use this
Other versions45 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 45
- UniClipboard/UniClipboard★ 2ksame name
- team-attention/stanford-cs146s-kr★ 294same name
- egregore-labs/egregore★ 293same name
- mag123c/toktrack★ 196same name
- neurofoo/agent-skills★ 111same name
- lsnackerman/raw-clauding-skills★ 45same name
- fjwood69/mori★ 32same name
- YahyaLendani/opus-tuner-claude-skill★ 14same name
- jackjin1997/ClawForge★ 12same name
- ucsandman/claude-skills★ 5same name
35 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 3 are distinctive, and 10 are very specific to this project.
0
Common
Most of the 40 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Run with Bash, exactly:
- Very specific: line 28
Run every bd command in this skill as store.bd, quoted.
- Very specific: line 33
Add a ## YYYY-MM-DD entry for today (or rewrite today's), with - Next: <NEXT line> first and at most 3 short lines after it: what is done, …
- Distinctive: line 35
After a tiny task done while a plan phase is open, NEXT goes back to that phase's step, so the plan picks up again.
- Very specific: line 39
Delete a ## Plan: section whose phases are all [x] once none of their PRs is open (gh pr view <N> --json state).
- Very specific: line 41
Keep only the 5 newest dated entries.
- Distinctive: line 57
Ask: did this session establish a durable project fact or decision a future session would otherwise rediscover (a constraint, convention, …
- Very specific: line 70
Commit only if git.dirty > 0, step 3 wrote a note, or step 2a changed a STATE.md the repo tracks.
- Very specific: line 71
Never commit on a branch in protected (trunks, the PROD branch, and where open PRs land).
- Very specific: line 72
Run git status, then stage files by name.
- Very specific: line 75
Always stamp NEXT with the commit it was written at, so /yah:where flags it once later commits make it stale:
- Very specific: line 83
If this project's auto-memory index (MEMORY.md in its memory folder under $CLAUDE_CONFIG_DIR or ~/.claude) is over 100 lines, say so and …
- Very specific: line 102
No run is live: run is null or run.alive is not true.
“Common” is measured: kept by at least 6 in 10 of the 40 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Wrap
Goal: after this, a fresh session (/clear) resumes from /yah:where alone. State lives in STATE.md, or in beads if the repo already uses it. Docs, memory and chat never hold progress.
1. Read the state
Run with Bash, exactly:
PY "${CLAUDE_SKILL_DIR}/../../scripts/where.py" --json --no-gh
PY is python on Windows and python3 elsewhere; use py -3 only if both fail.
Note state.plan (its spec is the plan file), state.phase (label, branch, id), store, git.branch, git.dirty, protected and next_stale.
next_stale set means commits landed after NEXT was written, so it may already be done. Run git log --oneline <next_stale.sha>..<next_stale.branch> and write the new NEXT from where those commits leave off.
store says where the plan is written; never work that out yourself. If store.note is set, tell the user first.
store.kindisbeadsandstate.planis set: use 2b.- Otherwise use 2a, STATE.md.
Run every bd command in this skill as store.bd, quoted. Never set, export or follow BEADS_DIR, and never run bd against a database outside this repo.
2a. STATE.md: write today's entry
Edit the file at store.path, or create it if it does not exist. In a linked worktree that is the main checkout's, which outlives the worktree.
- Add a
## YYYY-MM-DDentry for today (or rewrite today's), with- Next: <NEXT line>first and at most 3 short lines after it: what is done, what is half-done and where, any trap. - The NEXT line is what
/yah:whereprints as NEXT: one concrete action someone could start cold, at most 140 characters. Example: "Run make eval, then paste the table into PR #9". - After a tiny task done while a plan phase is open, NEXT goes back to that phase's step, so the plan picks up again.
- In the
## Plan:section, keep the phase lines (the outermost checkboxes) true:[x]done, exactly one[~]current,[ ]open, with| branch X | base Y | PR #Nfields. Indented checkbox lines under a phase are its sub-tasks. - While a phase is open, add 1 to 3 handoff lines indented under its phase line, plain, not checkboxes:
- Done: <what>,- Tried: <what> failed because <why>,- Decided: <what> because <why>. They are the phase'slog, which the next session reads before it starts. New lines go below the older ones. Keep only the newest 6; delete older ones. - A new follow-up becomes a
- [ ] <title>line under## Follow-ups(add the section if missing), never prose. Mark one being worked on[~]. Delete finished ones; the commit or PR is their record. - Delete a
## Plan:section whose phases are all[x]once none of their PRs is open (gh pr view <N> --json state). The plan file and the PRs keep its history, and the file the model reads each session stays short. - A step only the user can do (a review, a merge, a console step) ends with
(you), and names the command that does it when there is one, ready to paste in a terminal:Merge PR #13: gh pr merge 13 --merge (you)./yah:wherelists the open ones as waiting on the user. - Keep only the 5 newest dated entries; delete older ones. Leave anything else in the file alone, above all the
AIM:line under the#title: never move, reword or delete it.
2b. Beads: rewrite the phase bead's notes
Replace the notes with --notes, never --append-notes: each wrap rewrites NEXT, so the whole notes field is written again.
bd update <phase-id> --notes "<NEXT line>
<the phase's log: the newest 6 Done/Tried/Decided lines, with this session's added>"
- The NEXT rules in 2a apply to the first line; the log lines follow the rules in 2a.
- A new follow-up becomes a bead (
bd create "<title>" --silent), never prose. A step only the user can do gets-l human. Close finished ones:bd close <id>.
3. Brain note (only if the brain folder exists)
The folder is docs/brain at the repo root, unless yah's config sets brain_dir. No folder: skip this step.
Ask: did this session establish a durable project fact or decision a future session would otherwise rediscover (a constraint, convention, gotcha, or decision with its reason)? Progress belongs in NEXT; personal preferences belong in memory. If no, skip. If yes, write at most one note.
Run PY "${CLAUDE_SKILL_DIR}/../../scripts/brain.py" find <key words>, then:
- A listed note already holds the fact: edit it in place only if a detail changed, then run
brain.py index. - The fact replaces a listed note:
brain.py new ... --supersedes <old-slug>. Never delete a note. - Otherwise:
brain.py new --title "<fact>" --tldr "<one line, 200 chars or fewer>" --tags a,b --paths "<globs>" --source "<evidence>".
The source must be evidence: a PR, commit sha, issue, URL, path/to/file:line, or user, YYYY-MM-DD when the user stated it. A fact you inferred gets no --source; it goes to _pending.md for the user to review.
Stage what brain.py wrote (the note and INDEX.md, or _pending.md) with the WIP commit.
4. Commit work in progress, then stamp NEXT
Commit only if git.dirty > 0, step 3 wrote a note, or step 2a changed a STATE.md the repo tracks.
- Never commit on a branch in
protected(trunks, the PROD branch, and where open PRs land). If you are on one, stop and tell the user. - Run
git status, then stage files by name. Never stage.env*, credentials, or large generated files the repo does not already track. Stage STATE.md only if the repo already tracks it. git commit -m "wip(<phase label>): <what>". Do not push unless step 6 applies.
Always stamp NEXT with the commit it was written at, so /yah:where flags it once later commits make it stale:
- STATE.md or NOW.md the repo does not track: put
- At: <git rev-parse --short HEAD>right under- Next:. A tracked one needs no stamp; its own commit is the stamp. - Beads:
bd update <phase-id> --set-metadata next_sha=$(git rev-parse HEAD).
5. Memory
Save only durable, non-obvious lessons: a trap, a user preference, a fact that cost time to learn. Progress and status never go into memory. Update an existing memory rather than add a duplicate.
If this project's auto-memory index (MEMORY.md in its memory folder under $CLAUDE_CONFIG_DIR or ~/.claude) is over 100 lines, say so and offer to prune it.
6. Only if the phase is complete
The phase's done-when in the plan file (state.plan.spec: the path in ## Plan: <name> (<path>), or the epic's spec_id) is met and the tests pass.
- Review the branch diff: run
/code-review --fix, then/simplify, if available. Re-run the tests. - Push the feature branch in a Bash call of its own, with nothing chained to it; open the PR in the next call. Never push a branch in
protected. - Open the PR into the phase's base (
base, else the plan's target branch), following the project's title convention. If the base is another phase's branch, say so in the body. Move the phase's log lines into the body. Write the body to a temp file outside the repo, add the phase's map withPY "${CLAUDE_SKILL_DIR}/../../scripts/phasemap.py" P<n> --into <file> --no-gh(STATE.md or beads holds the PR numbers), and pass it with--body-file <file>, never--body: the run's deny rules can match words in an inline body. Updating an open PR, refresh its map the same way:gh pr view <N> --json body -q .bodyinto the file,--into, thengh pr edit <N> --body-file <file>. - Record it. STATE.md: mark the phase
[x], add| PR #<N>and delete its log lines. Beads:bd update <phase-id> --external-ref gh-<N>, thenbd close <phase-id> --reason "PR #<N> open". Then refresh the PR's map as in step 3, so it shows the phase done with its PR. - Claim the next phase and give it a NEXT line, stamped as in step 4. STATE.md: mark it
[~]. Beads:bd update <next-id> --claim. - No phase left in this plan, and another
## Plan:section has a phase with a- Parked: NEXT was <NEXT>line under it (STATE.md only): claim that phase. Mark it[~], take NEXT from its Parked line, stamped as in step 4, and delete the Parked line. The merge of this PR becomes a(you)follow-up with its command.
Merging is always the user's.
6.5 Hand the open phase to a run
Skip this step under /yah:resume: a run's own session never starts or stops a run. Skip it too when the user ended a run in this session, or chose to go on by hand after one ended: never restart a run unasked. Otherwise run step 1's command again and go on only when all of these hold:
- A plan phase is open (the one wrapped, or the one step 6 claimed), and its line does not end with
(you). - NEXT does not start with
NEEDS-HUMAN:. - No run is live:
runis null orrun.aliveis not true. - The tree is clean:
git.dirtyis 0, not counting a STATE.md the repo does not track.
Then run PY "${CLAUDE_SKILL_DIR}/../../scripts/run.py" --plan --detach in a Bash call of its own, --detach last. Exit 0: use the finish line for a started run. Any other exit: show its output and use the finish line for an open phase.
7. Finish with exactly this
Saved <phase label> NEXT = <the NEXT line>
Commit <short sha or none> PR <#N or none>
Merge <the merge command>
<finish line>The merge command is the one the user pastes in a terminal: gh pr merge <N> --merge. For a PR stacked on another PR, it is gh pr edit <N> --base <that PR's base> once that PR merges, then gh pr merge <N> --merge. Leave the Merge line out when no PR is open, or when /yah:where shows auto-merge: on for it.
The finish line, when step 6.5 started the run:
The run has <phase label>; this session can close. `/yah:where` or `yah <project>` shows its RUN line.Otherwise, when a plan phase is still open (the one wrapped, or the one step 6 claimed):
Safe to /clear. Then /yah:auto, or `yah <project>` from a terminal, hands <phase label> to autopilot (a detached `yah run --plan`); `/yah:auto here` works it by hand.With no plan phase open:
Safe to /clear. Then /yah:auto, or `yah <project>` from a terminal, picks up from NEXT.Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

