claude-handoff: Instructions file for Claude Code

AGENTS.md

claude-handoff AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from Vasilispapg/claude-handoff. It costs 4,121 tokens per session, scanned A, original, MIT.

Project instructions for claude-handoff, a Python tool that turns Claude Code session transcripts into handoff documents and ongoing project memory for another AI assistant.

In plain words
What is it for?
Use them when modifying claude-handoff, checking its generated single-file build, running its tests, or preparing a release.
Why use it?
They show coding agents where to start and which tests, smoke checks, build checks, and lint checks must pass before the project is considered healthy.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: SessionEnd hook event, but also the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

This is Vasilispapg/claude-handoff's own configuration. It tells Claude Code, Codex and OpenCode how to work on claude-handoff itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-handoff configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Vasilispapg/claude-handoff. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Vasilispapg/claude-handoff/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/Vasilispapg/claude-handoff

Made for: Claude Code, Codex, OpenCode.

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 claude-handoff AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/vasilispapg/claude-handoff/agents-md.svg)](https://agentmods.dev/instructions/vasilispapg/claude-handoff/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/vasilispapg/claude-handoff/agents-md"><img src="https://agentmods.dev/badge/instructions/vasilispapg/claude-handoff/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 4,121 This file is loaded in full into every session.
When invoked 4,121 The same file — it is already loaded in full.
Security scan A 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.04121 $0.04121
Opus 5 $0.02060 $0.02060
Sonnet 5 $0.00824 $0.00824
Haiku 4.5 $0.00412 $0.00412

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

Security

Grade A, and why

claude-handoff AGENTS.md scanned grade A 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 6d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

network — via stdlib `urllib` for API providers, or by spawning the local
AGENTS.md · 272 lines

How it starts

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

AGENTS.md — instructions for AI coding agents

What this project is

claude-handoff turns Claude Code session transcripts (JSONL in ~/.claude/projects) into a single clean handoff.md another LLM can continue from, and distills a project's whole history into a persistent memory brief (--brief) injected at session start. Stdlib only; runtime code is the claude_handoff/ package plus a generated single-file build in single/.

Start here (green in four commands)

python3 -m unittest discover -s tests -v      # run tests
python3 -m claude_handoff tests/fixtures/agent_session.jsonl -o -   # smoke run
python3 scripts/build_single.py --check       # single-file build is fresh
uvx ruff check claude_handoff scripts tests   # lint (config in pyproject)

If all four pass, the tree is healthy. Packaging check when you touched pyproject.toml: pip install -e . && claude-handoff --version && chf --version.

Orientation — read in this order, only as far as your task needs:

You want to… Read
Understand what the tool does for users README.md (60-second scenarios + full flag reference), docs/GUIDE.md (day-with-it walkthrough + --brief mechanics)
Find which file holds what INDEX.md, then the architecture map below
Touch the parser / JSONL schema docs/DEVELOPMENT.md §2 (schema notes) — mandatory before parser edits
Understand why a design is the way it is docs/DEVELOPMENT.md §3 (decision log, one row per decision)
Follow the working agreements Invariants + workflows + gotchas below

Hard invariants — do not break these

  • Zero runtime dependencies. Stdlib only. Do not add anything to pyproject.toml dependencies; do not import third-party packages. (Dev-only tooling like ruff via uvx is fine.)
  • One package, one generated single file. Runtime code lives in the claude_handoff/ package (map below) with acyclic from .module import name imports. single/claude_handoff.py is GENERATED by scripts/build_single.py — never edit it by hand; rebuild after any package change (CI fails when it is stale).
  • Python ≥ 3.9 compatibility (no match, no 3.10+ typing syntax outside from __future__ import annotations).
  • Parse defensively. The JSONL schema is undocumented and drifts across Claude Code versions. Unknown record types are skipped, never fatal; content may be a string or a block list; corrupt lines are tolerated.
  • Deterministic mode makes no network calls. Only --llm may touch the network — via stdlib urllib for API providers, or by spawning the local claude CLI for --llm claude-cli. No other subprocesses, no SDKs.
  • Never invent transcript content. The exporter reorganizes and truncates; it must not fabricate. LLM outputs that claim facts carry session citations so they stay verifiable.
  • Untrusted content stays data. Transcripts embed arbitrary external text; every prompt that consumes them, the handoff preamble, and the brief injection wrapper carry a data-not-instructions guard (pinned by InjectionDefenseTests — keep the phrase intact when editing prompts).
  • Redact before egress. Secret-shaped strings are stripped from anything sent to an LLM and from every final document (redact_secrets via redact_doc — a written or pasted handoff is egress too); default on, --no-redact opts out (CLI only; hook and MCP always redact, and the config file may never set no_redact).
  • Hooks are inert, not mute. They never raise, always exit 0, never call an LLM, and never create files on their own — but every swallowed error is reported on stderr (textutil.warn); tolerated parse/cache paths report under --debug / CLAUDE_HANDOFF_DEBUG=1 (textutil.debug). Never add a bare silent except.
  • Never truncate instructions. Size caps may trim transcripts and chunk notes, never the prompt rules or the user's --focus.
  • Cache is best-effort and content-addressed. A cache failure must never fail the run; bump CACHE_VERSION whenever CHUNK_PROMPT changes (brief note prompts self-invalidate — the prompt text is part of the hash). --focus goes only into the reduce pass so cached notes stay reusable.
  • Chunk calls are sequential for SERIAL_PROVIDERS (claude-cli, ollama) — parallel claude -p subprocesses conflict and local Ollama boxes choke. API providers fan out via ThreadPoolExecutor; keep the serial/parallel split.

Read the full file on GitHub · 272 lines

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. 6d ago First seen · 272 lines · 4,121 tokens per session scan A 0c617aa34a74

Subscribe to this mod's changes

claude-handoff AGENTS.md is an instructions file published in the GitHub repository Vasilispapg/claude-handoff (1 stars, last pushed 5d ago), licensed MIT. It adds 4,121 tokens to every session, about $0.0206 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens