/mad-skills:ferry here, commit, clean [--yes] [--legacy] (optional; default writes outside the repo)from mad-skills
Captures session state (task, status, next steps, key files, decisions, gotchas, repo state) into a waybill document and arms a one-shot handoff so the next fresh session resumes from it. Use when wrapping up, clearing context, or starting fresh while preserving work.
Ships in mad-skills. 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.
Read when SKILL.md points to them; scripts run unread.
When this skill is invoked, IMMEDIATELY output the banner below before doing anything else.
Pick ONE tagline at random — vary your choice each time.
CRITICAL: Reproduce the banner EXACTLY character-for-character, including the diagonal / glyph before the name.
{tagline}
/$$ /$$$$$$$$ /$$$$$$$$ /$$$$$$$ /$$$$$$$ /$$ /$$
/$$/| $$_____/| $$_____/| $$__ $$| $$__ $$| $$ /$$/
/$$/ | $$ | $$ | $$ \ $$| $$ \ $$ \ $$ /$$/
/$$/ | $$$$$ | $$$$$ | $$$$$$$/| $$$$$$$/ \ $$$$/
/$$/ | $$__/ | $$__/ | $$__ $$| $$__ $$ \ $$/
/$$/ | $$ | $$ | $$ \ $$| $$ \ $$ | $$
/$$/ | $$ | $$$$$$$$| $$ | $$| $$ | $$ | $$
|__/ |__/ |________/|__/ |__/|__/ |__/ |__/
Taglines:
Ferry the live state of this session across a context reset: capture it into a waybill document, arm a one-shot handoff, and hand the user off to a clean session that will automatically resume from it. The point is to reset the context window without losing the thread — the next session starts lean but fully briefed.
Long sessions accumulate noise: dead ends, superseded plans, stale file reads. A
fresh session is faster and sharper, but naively starting over loses hard-won
context. /ferry distills only what the next session needs, persists it, and
arms the handoff — once. The handoff store (hooks/lib/handoff.cjs, driven by
hooks/session-guard.cjs) injects the waybill at the next session start and
later cleans up the waybill it created.
/ferry # default: waybill written OUTSIDE the repo (nothing litters the tree)
/ferry tmp # accepted alias for the default
/ferry here # waybill.md in the repo root, kept out of version control locally
/ferry commit # docs/ferry/waybill-<timestamp>.md, durable, meant to be committed
/ferry clean # list waybills ferry created (dry run); then confirm to delete
/ferry clean --yes # delete them
/ferry clean --legacy # also report/delete pre-provenance root waybill.md files
Read the argument from what the user typed. If none given, use the default.
Before starting, check dependencies:
| Dependency | Type | Check | Required | Resolution | Detail |
|---|---|---|---|---|---|
| node | cli | command -v node | yes | stop | Runs the hooks/session-guard.cjs handoff subcommands |
| git | cli | git rev-parse --show-toplevel | no | fallback | Not in a git repo → use cwd for here mode; skip the .git/info/exclude step |
Resolve the plugin root once and reuse it:
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/slamb2k}"
GUARD="$PLUGIN_ROOT/hooks/session-guard.cjs"
If the argument is clean, jump to Clean mode below. Otherwise work through
these steps in order. Don't skip the verification at the end.
First get the repo root and a timestamp:
git rev-parse --show-toplevel 2>/dev/null # repo root, or empty if not a git repo
date +%Y-%m-%d-%H%M
tmp): run node "$GUARD" handoff-path — it prints the absolute
path (under ~/.claude/session-guard/handoff/) and creates the parent directory.
Write the waybill there. Nothing is written inside the repo.here: <repo_root>/waybill.md (cwd if not a git repo). After writing, append
the line waybill.md # mad-skills:ferry to <repo_root>/.git/info/exclude if it is
a git repo and that line is not already present. The tag lets cleanup remove
exactly this line later. This is a local ignore — it never touches .gitignore.commit: <repo_root>/docs/ferry/waybill-<timestamp>.md. Create docs/ferry/
if needed. Do not ignore it — this variant exists so the waybill lands in git
history as a durable checkpoint. Tell the user they will want to commit it.This is the core of the skill — the document quality determines whether the next
session is productive or lost. Follow the structure in
references/waybill-template.md. Read that file now if you haven't.
Fill it from the actual conversation and repo state, not generic boilerplate. Be concrete: real file paths, real function names, real commands, real decisions. Write for a competent engineer who has zero memory of this session — every assumption in your head right now is invisible to them unless you write it down.
Do not hand-write any provenance stamp (<!-- mad-skills:waybill ... -->); the
CLI adds it when arming.
Gather repo state to embed in the document:
git -C <repo_root> branch --show-current
git -C <repo_root> status --short
git -C <repo_root> log --oneline -8
Optimise for their context budget: include what unblocks action, link to files rather than pasting large code, and cut the narrative of how you got here unless a dead end is a genuine landmine worth a warning.
After the document is written, arm it with the absolute path. If the waybill's
first next step is a slash command, pass it as --resume:
# default and `here`
node "$GUARD" handoff-arm --kind waybill --waybill "<absolute_path>" [--resume "<first next step, if a slash command>"]
# commit: durable, never auto-deleted
node "$GUARD" handoff-arm --kind waybill --waybill "<absolute_path>" --owned false [--resume "..."]
The CLI stamps the provenance line and records a content hash. Do not edit the
waybill after arming: an edited waybill is kept rather than auto-cleaned (safe, but
it will linger until you remove it or run /ferry clean). If you must change it,
edit first and re-run the arm command.
Tell the user plainly that the waybill is ready and they should start the fresh
session themselves. You cannot trigger /clear programmatically — it is a
user-only command — so the final step is theirs. Print the absolute waybill path and
say something like:
Waybill written to
<absolute path>and the next session is armed. Type/clear(or/new) now — the fresh session will automatically load it and pick up where we left off.
Keep this final message short. The work is done; don't bury the one action they need to take.
/ferry clean [--yes] [--legacy] removes waybills this skill created.
node "$GUARD" handoff-clean [--legacy]
Output lines: owned <path>, legacy <path>, deleted <path>, kept <path> (edited).--yes), re-run with
--yes (plus --legacy only if they asked for it or confirm the legacy files).Legacy files are root waybill.md files from before provenance stamping; they are
only ever deleted with an explicit --yes --legacy.
/clear is the user's to type. No skill, hook, or command can clear the
context window automatically. Always end by asking them to do it.~/.claude/session-guard/handoff, keyed to the repo. The waybill is injected once,
at the next session start in that working tree; a stale file is never re-injected.tmp or here
is deleted automatically when the session that resumed from it ends (SessionEnd —
exit or /clear), only if it is unedited (provenance id and hash still match). A
parallel session in the same tree never triggers it; if SessionEnd never fires, a
later session sweeps it after 24h. Edited waybills are kept.
The matching .git/info/exclude line is removed with it.commit mode is never swept. It is recorded as not owned and stays in history
until the user removes it.here relies on .git/info/exclude; only commit is meant to be tracked./ferry is run again later, the new waybill replaces the previously armed
one (an unedited old owned waybill is deleted) — the latest state wins.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
14 skills in this plugin
/braceInitialize any project directory with a standard scaffold for AI-assisted development. Creates specs/ and context/ directories, a project AGENTS.md with development workflow and guardrails (plus a CLAUDE.md that just points at it), .gitignore, and branch protection. Idempotent — safe to run on existing projects. Triggers: "init project", "setup brace", "brace", "initialize", "bootstrap", "scaffold"./buildContext-isolated feature development pipeline. Takes a detailed design/plan as argument and executes the full feature-dev lifecycle (explore, question, architect, implement, review, ship) inside subagents so the primary conversation stays compact. Use when you have a well-defined plan and want autonomous execution with minimal context window consumption./distilGenerate multiple unique web design variations for any website or web application. Accepts site specifications from a file (--spec path) or pasted text block. Creates a Vite + React + TypeScript + Tailwind project with Bun and produces N different creative designs accessible at /1, /2, /3, etc. Use when prototyping or exploring design directions for any web interface./dockGenerate container-based release pipelines that build once and promote immutable artifacts through environments (dev → staging → prod). Detects your stack, interviews for infrastructure choices, then outputs deterministic CI/CD files (Dockerfile, workflows, deployment manifests) that run without an LLM. Use when setting up deployment pipelines, containerizing an app, creating release workflows, or connecting CI to container-friendly infrastructure (Azure Container Apps, AWS Fargate, Google Cloud Run, Kubernetes, Dokku, Coolify, CapRover, etc.)./hoistGenerate secure, low-infrastructure release pipelines that publish artifacts directly — language packages (npm, PyPI, crates, RubyGems, NuGet, Go), GitHub Releases with binaries, static sites/Pages, or serverless functions — without building a container image. OIDC/trusted publishing, provenance, idempotent publish guards, and three trigger models (auto-bump with optional approval, tag, manual). The non-container sibling of /dock. Use when releasing a package or app that doesn't ship as a container./keelGenerate Infrastructure as Code (IaC) pipelines that provision the cloud and container infrastructure your app deploys to. Interview-driven: detects your stack and cloud provider, then outputs deterministic IaC files (Terraform, Bicep, Pulumi, or CDK) plus CI/CD pipelines that plan on PR and apply on merge. Use when setting up cloud infrastructure, provisioning container registries, databases, networking, DNS, or any infrastructure that containers deploy onto. Designed to run before /dock — /keel lays the infrastructure, /dock deploys to it.npx claudepluginhub slamb2k/mad-skills --plugin mad-skills