claude-baton: Instructions file for Claude Code

CLAUDE.md

claude-baton CLAUDE.md is an instructions file for Claude Code from bakabaka91/claude-baton. It costs 1,051 tokens per session, scanned A, original, MIT.

A repository guide for claude-baton, a Claude Code session-management project that saves checkpoints, resumes work, and creates end-of-day summaries in a local SQLite database.

In plain words
What is it for?
It is for developing, testing, and maintaining this TypeScript MCP server and its command-line tools.
Why use it?
It gives contributors the project structure, setup commands, and constraints needed to change the system safely.

Instructions file for Claude Code

Written for Claude Code: PreCompact hook event. Also seen: reads .claude/ paths; mentions Claude Code.

This is bakabaka91/claude-baton's own configuration. It tells Claude Code how to work on claude-baton 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-baton configures →

Reuse

Borrowing it

Nothing to install: this file belongs to bakabaka91/claude-baton. 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/bakabaka91/claude-baton/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/bakabaka91/claude-baton

Made for: Claude Code.

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-baton CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/bakabaka91/claude-baton/claude-md/github.svg)](https://agentmods.dev/instructions/bakabaka91/claude-baton/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/bakabaka91/claude-baton/claude-md"><img src="https://agentmods.dev/badge/instructions/bakabaka91/claude-baton/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for claude-baton CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/bakabaka91/claude-baton/claude-md"><img src="https://agentmods.dev/badge/instructions/bakabaka91/claude-baton/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,051 This file is loaded in full into every session.
When invoked 1,051 The same file — it is already loaded in full.
Security scan A 0 findings. 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.01051 $0.01051
Opus 5 $0.00526 $0.00526
Sonnet 5 $0.00210 $0.00210
Haiku 4.5 $0.00105 $0.00105

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

Security

Grade A, and why

claude-baton CLAUDE.md scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 94 lines

How it starts

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

claude-baton — Development Guide

What is this?

Session lifecycle management for Claude Code — checkpoint, resume, and EOD summaries via local SQLite. See PLAN.md for full spec.

Quick start

npm install
npm run build        # compile TypeScript
npm test             # run tests
npm run dev          # start MCP server (stdio)

Project structure

  • src/index.ts — MCP server entry, tool definitions
  • src/types.ts — TypeScript interfaces for all data models
  • src/store.ts — SQLite operations via sql.js (CRUD)
  • src/llm.ts — claude -p wrapper
  • src/cli.ts — CLI commands (setup, status, export, import, reset) + auto-checkpoint handler
  • src/utils.ts — Utility helpers
  • prompts/ — Auto-checkpoint, daily summary prompt templates
  • commands/ — Slash command files (memo-checkpoint, memo-resume, memo-eod, memo-retro)
  • tests/ — Test suite
  • bin/claude-baton.js — CLI entry point

Non-negotiable constraints

  1. Never touch git branches — no snapshots, no switching, no creating branches
  2. Single SQLite DB — all projects in ~/.claude-baton/store.db, never per-project files
  3. stdio transport — standard MCP, not SSE
  4. Zero API keys — all LLM calls via claude -p, never import anthropic SDK
  5. 3 dependencies max@modelcontextprotocol/sdk, sql.js, commander
  6. sql.js pure WASM — no native SQLite bindings, no better-sqlite3, no node-sqlite3

Agent routing (mandatory)

When working on code, use the scoped agent for that domain. Never let one agent touch another's files.

Work being done Agent Files owned
Data types, SQLite operations, utilities store src/types.ts, src/store.ts, src/utils.ts
MCP server, tool definitions, claude -p wrapper server src/index.ts, src/llm.ts
Prompts pipeline prompts/
CLI commands, bin entry point, slash commands cli src/cli.ts, bin/, commands/
Writing or updating tests test-gen tests/

Rules:

  • Every agent must load its required skills before writing code (listed in each agent's .md)
  • After any agent writes code: run /build and /test in the main conversation
  • Never trust agent output without verification — always run tests yourself

Read the full file on GitHub · 94 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. 7d ago First seen · 94 lines · 1,051 tokens per session scan A 6c55f227c688

Subscribe to this mod's changes

claude-baton CLAUDE.md is an instructions file published in the GitHub repository bakabaka91/claude-baton (25 stars, last pushed 5mo ago), licensed MIT. It adds 1,051 tokens to every session, about $0.0053 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.

Related

Other instructions, from other repositories