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.

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use decision-mapping, setup-ts-deep-modules 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.
  • FabienDehopreSkill

    decision-mapping

    Turn a loose idea into a sequenced map of investigation tickets, then drive them to resolution one at a time.

    Also in 8 projects that use this

  • liufeng1976Skill

    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 52 projects that use this

  • RoentekSkill

    loop-me

    Grill me about specs for the workflows I want to build, within this workspace.

    Also in 63 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 110 projects that use this

  • GoogleSkill

    ask-matt

    Ask which skill or flow fits your situation. A router over the skills in this repo.

    Also in 107 projects that use this

  • LesaniSkill

    writing-fragments

    Grilling session that mines the user for fragments — heterogeneous nuggets of writing (claims, vignettes, sharp sentences, half-thoughts) — and appends them to a single document as raw material for a future article. Use when the user wants to develop ideas before imposing structure, or mentions "fragments", "ideate", or "raw material" for writing.

    Also in 67 projects that use this

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 172 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 172 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.