agentleFS
amurthygithubamurthygithub/Sharevalue_claude_skills/.claude/skills/handoff/SKILL.md

handoff

Skill1 starsChanged 6 months agoMITView on GitHub

Snapshot the active ticket session (done / tried-and-failed / next step + git state) into a gitignored .claude/handoff-notes.md so a fresh agent resumes without re-walking dead ends.

195 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use which-skill, wait-what and 10 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.
  • risadamsSkill

    which-skill

    Router over this pack's skills and flows. Ask it "which skill fits X" when you don't remember what's available.

    Also in 5 projects that use this

  • AWSSkill

    wait-what

    Stop. That last message did not land: re-pitch it.

    Also in 51 projects that use this

  • AWSSkill

    to-questionnaire

    Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

    Also in 41 projects that use this

  • loulanyueSkill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 15 projects that use this

  • RoentekSkill

    writing-beats

    Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.

    Also in 20 projects that use this

  • RoentekSkill

    writing-fragments

    Writing, explore — mine raw fragments, no structure yet.

    Also in 20 projects that use this

  • +5 more from aws
  • +1 more from Roentek

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 167 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Not inside the repo → exit 1.

    line 28
  2. Very specific:

    Run exactly this one block.

    line 37
  3. Very specific:

    Does not write to .claude/active-ticket.md (/work-on owns that file).

    line 82
  4. Distinctive:

    Does not commit, push, or touch any tracked file.

    line 83
  5. Very specific:

    Does not put the note prose into the audit trail — only branch + sha.

    line 84

“Common” is measured: kept by at least 6 in 10 of the 167 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Capture a mid-session handoff snapshot for the active ticket. Run when context is running low, before closing a long worktree session, or when handing a half-built feature to a fresh agent.

Why a separate sidecar: /work-on rewrites .claude/active-ticket.md on every re-entry, so anything written there is lost on the next session. Handoff state goes to a gitignored .claude/handoff-notes.md instead — durable across sessions, never committed, never clobbered. This skill is a single Bash block with no hooks; it never touches work-on, ship, or settings.json.

Contract

  • Input: --note is REQUIRED (the tried-and-failed / do-not-retry text); --did and --next are optional. Arg-based, never interactive — if --note is absent, print the usage line and exit 1.
  • Side effect: appends one snapshot block to .claude/handoff-notes.md and one audit shard via scripts/runlog.sh.
  • Refusals (fail-closed):
    • Not inside the repo → exit 1.
    • No .claude/active-ticket.md → exit 1 (nothing to hand off; run /work-on).
    • .claude/handoff-notes.md is NOT gitignored → exit 1. This guard is load-bearing: the note body may contain dead-end debugging prose, and writing it to a tracked file would leak it into git history. The skill refuses to write until the path is confirmed gitignored.

The block

Run exactly this one block. Fill NOTE / DID / NEXT from the parsed args as single-quoted literals (escape an embedded single quote as '\''); pass '' for DID/NEXT when not supplied.

cd "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || { echo "Run /handoff from inside the repo."; exit 1; }
NOTE='<--note value>'; DID='<--did value or empty>'; NEXT='<--next value or empty>'
case "$DID"  in '<'*'>') DID='';;  esac
case "$NEXT" in '<'*'>') NEXT='';; esac
case "$NOTE" in ''|'<'*'>') echo 'Usage: /handoff --note "<tried-and-failed; do-not-retry>" [--did "..."] [--next "..."]  (--note required)'; exit 1;; esac

[ -f .claude/active-ticket.md ] || { echo "No .claude/active-ticket.md here; run /work-on <TRACKER_TEAM_KEY>-NNN first."; exit 1; }
# Fail-closed gitignore guard — never write dead-end prose to a tracked file.
grep -qxF '.claude/handoff-notes.md' .gitignore || { echo "Refusing to write: .claude/handoff-notes.md is not gitignored."; exit 1; }

# CUSTOMIZE: match your tracker's ticket-id shape (e.g. TICKET-123) in the
# active-ticket.md header and in the branch-drift check below.
TICKET=$(grep -m1 -oE '^# Active ticket: <TRACKER_TEAM_KEY>-[0-9]+' .claude/active-ticket.md | grep -oE '<TRACKER_TEAM_KEY>-[0-9]+')
[ -n "$TICKET" ] || { echo "Could not read a ticket id from the active-ticket.md header."; exit 1; }

BRANCH=$(git rev-parse --abbrev-ref HEAD); SHA=$(git rev-parse --short HEAD); NUM=${TICKET#<TRACKER_TEAM_KEY>-}
case "$BRANCH" in
  *"$NUM"*) ;;
  *) echo "WARN: branch '$BRANCH' does not match $TICKET (possible worktree drift); writing anyway." ;;
esac

{
  printf '\n## Handoff snapshot: %s @ %s\n' "$(date -u +%Y-%m-%dT%H:%M:%SZ)" "$SHA"
  printf '**Ticket:** %s  **Branch:** %s\n\n' "$TICKET" "$BRANCH"
  printf '### Done (confirmed)\n%s\n\n' "${DID:-_(not specified)_}"
  printf '### Tried and failed (DO NOT RETRY)\n%s\n\n' "$NOTE"
  printf '### Next step\n%s\n\n' "${NEXT:-_(not specified)_}"
  printf '### Current file state\n```\n'; git diff --stat HEAD; printf '\nrecent commits:\n'; git log --oneline -5; printf '```\n'
} >> .claude/handoff-notes.md

# Audit shard body carries ONLY branch + sha (no user prose) so the committed
# trail stays PII-free. The note text lives only in the gitignored sidecar.
./scripts/runlog.sh append handoff "$TICKET" "snapshot | branch=$BRANCH | sha=$SHA"

echo "Handoff snapshot appended to .claude/handoff-notes.md (@ $SHA)"
echo "Resume with: /work-on $TICKET, then Read .claude/handoff-notes.md"

What /handoff does NOT do

  • Does not write to .claude/active-ticket.md (/work-on owns that file).
  • Does not commit, push, or touch any tracked file.
  • Does not put the note prose into the audit trail — only branch + sha.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.