handoff

handoff is a skill for Claude Code, Codex from 7xuanlu/wenlan. It costs 41 tokens per session (2,017 once invoked), scanned B, original, Apache-2.0.

A workflow for closing a Wenlan work session and saving its important context for later.

In plain words
What is it for?
Updating the project Brief, saving typed captures, writing a chronological session log, and resolving the correct project space.
Why use it?
It keeps project status, durable memories, and the session history aligned so the next session can continue with reliable information.

Skill for Claude CodeCodex

Written for Claude Code and Codex: allowed-tools in frontmatter, but also agents/openai.yaml present. Also seen: mentions Codex.

Good fit Updating the project Brief, saving typed captures, writing a chronological session log…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/7xuanlu/wenlan/handoff
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add 7xuanlu/wenlan --skill handoff
Clone the repo
git clone --depth 1 https://github.com/7xuanlu/wenlan

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for handoff

README.md
[![agentmods](https://agentmods.dev/badge/skills/7xuanlu/wenlan/handoff.svg)](https://agentmods.dev/skills/7xuanlu/wenlan/handoff)
Your own site
<a href="https://agentmods.dev/skills/7xuanlu/wenlan/handoff"><img src="https://agentmods.dev/badge/skills/7xuanlu/wenlan/handoff.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,017 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.02017
Opus 5 $0.00020 $0.01009
Sonnet 5 $0.00008 $0.00403
Haiku 4.5 $0.00004 $0.00202

Measured 7d ago against content hash bdb2af30a729, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade B, and why

handoff scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

resolver="$(find "$HOME/.codex/plugins/cache" -path '*/wenlan/*/bin/resolve-space.sh' 2>/dev/null | head -1)"
plugin-codex/skills/handoff/SKILL.md · 204 lines

How it starts

The opening of the file, as written. The whole thing — 204 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/handoff

Close the session with three separate artifacts:

  1. A typed update to the daemon-owned Space Brief.
  2. Durable MCP captures in that Space.
  3. A chronological session log in ~/.wenlan/sessions/.

The daemon Brief is current-work authority. Its ~/.wenlan/sessions/_status/<space>.md projection is a one-way human receipt. Never read, edit, or overwrite that receipt as authority.

1. Resolve repository and Space

handoff_arg="<the Space name passed to /handoff, empty when none>"
# The resolver ships inside the installed plugin; the relative path only
# exists in a wenlan checkout.
resolver="$(find "$HOME/.codex/plugins/cache" -path '*/wenlan/*/bin/resolve-space.sh' 2>/dev/null | head -1)"
resolved="$("${resolver:-plugin-codex/bin/resolve-space.sh}" --cwd "$PWD" --arg "$handoff_arg" --new-repo-fallback 2>/dev/null)"
space="$(printf '%s\n' "$resolved" | cut -f1)"
source_layer="$(printf '%s\n' "$resolved" | cut -f2)"

If the user passed a Space name (/wenlan:handoff <space>), pass it as --arg <space> to resolve-space.sh.

Print space and source_layer. Explicit pins, defaults, and mappings still win. cwd-repo-new is the approved first-handoff fallback: use the canonical repository basename, which the user can override through normal Space config. Do not invent any other Space name.

Outside a Git repository, do not derive a new Space from the directory basename. If resolution still leaves space empty, skip the Brief read and typed update, do not issue Space-scoped captures, and continue with the unscoped session log and any unscoped durable captures. Outside a Git repository, a pin, explicit argument, default, or mapping still resolves a Space, and the Brief update and captures still run.

2. Read the Brief before composing deltas

W="$(command -v wenlan || echo "$HOME/.wenlan/bin/wenlan")"
brief_before=""
brief_absent=0
daemon_down=0
if [ -n "$space" ]; then
  if [ "$source_layer" = "cwd-repo-new" ]; then
    space_probe_status=0
    space_probe="$("$W" --format json spaces show "$space" 2>&1)" || space_probe_status=$?
    if [ "$space_probe_status" -eq 0 ]; then
      brief_before="$("$W" --format json --space "$space" brief)"
      source_layer="cwd-repo"
    elif [ "$space_probe" = "Error: space '$space' not found" ]; then
      brief_absent=1
    elif printf '%s' "$space_probe" | grep -qE 'tcp connect error|daemon not reachable'; then
      daemon_down=1
      brief_before=""
      echo "wenlan daemon unreachable — this handoff will queue its writes"
    else
      printf "%s\n" "$space_probe" >&2
      exit "$space_probe_status"
    fi
  else
    brief_status=0
    brief_output="$("$W" --format json --space "$space" brief 2>&1)" || brief_status=$?
    if [ "$brief_status" -eq 0 ]; then
      brief_before="$brief_output"
    elif printf '%s' "$brief_output" | grep -qE 'tcp connect error|daemon not reachable'; then
      daemon_down=1
      brief_before=""
      echo "wenlan daemon unreachable — this handoff will queue its writes"
    else
      printf "%s\n" "$brief_output" >&2
      exit "$brief_status"
    fi
  fi
fi

Read the full file on GitHub · 204 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 204 lines · 41 tokens per session scan B bdb2af30a729

Subscribe to this mod's changes

handoff is a skill published in the GitHub repository 7xuanlu/wenlan (63 stars, last pushed yesterday), licensed Apache-2.0. It adds 41 tokens to every session and 2,017 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

shodh-memory

Persistent memory system for AI agents. Use this skill to remember context across conversations, recall relevant information, and build long-term knowledge. Activate when you need to store decisions, learnings, errors, or context that should persist beyond the current session.

varun29ankuS/shodh-memory · 53 tokens

engraphis-memory

Give the agent durable, scoped, explainable memory across sessions and repositories through the Engraphis MCP tools. Use when you learn a convention, decision, bug cause/fix, or user preference worth keeping; when prior context would help before you answer or act (to avoid re-asking or re-deriving); when asked "why is…

Coding-Dev-Tools/engraphis · 134 tokens

braindb

Memory recall and save. Use at every conversation start and whenever the user shares personal information, expertise, project context, preferences, or decisions worth remembering long-term.

dimknaf/braindb · 36 tokens

braindb-agent

Persistent memory across sessions via the BrainDB agent. Use at conversation start and whenever you need to recall what you know about the user or save new information to long-term memory.

dimknaf/braindb · 40 tokens

braindb-custom-profile

How to author a BrainDB custom profile — prompt add/replace fragments and an optional keyless ingestor — that shapes wiki naming/structure and feeds a custom ingestion source, with zero effect on defaults when inactive.

dimknaf/braindb · 49 tokens

deeprefine

Agent-native DeepRefine refinement loop — same control flow as DeepRefine.refine(), graphify search instead of FAISS, session LLM, dry-run review before approved graph writes.

HKUST-KnowComp/DeepRefine-Skill · 42 tokens