chatbook: Instructions file for Claude Code

CLAUDE.md

chatbook CLAUDE.md is an instructions file for Claude Code from skanehira/chatbook. It costs 41,673 tokens per session, scanned C, original, MIT.

A project guide for chatbook, a PDF reader that lets one person select passages from technical books and ask an AI about them. It also documents the app's React, Hono, and Cloudflare setup.

In plain words
What is it for?
Starting the development server, running unit and browser tests, applying local database changes, checking code quality, and regenerating Cloudflare environment types.
Why use it?
It prevents agents from relying on outdated local-development assumptions or using the wrong commands and project conventions.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

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

Reuse

Borrowing it

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/skanehira/chatbook/claude-md.svg)](https://agentmods.dev/instructions/skanehira/chatbook/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/skanehira/chatbook/claude-md"><img src="https://agentmods.dev/badge/instructions/skanehira/chatbook/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 41,673 This file is loaded in full into every session.
When invoked 41,673 The same file — it is already loaded in full.
Security scan C 2 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.41673 $0.41673
Opus 5 $0.20837 $0.20837
Sonnet 5 $0.08335 $0.08335
Haiku 4.5 $0.04167 $0.04167

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

Security

Grade C, and why

chatbook CLAUDE.md scanned grade C with 2 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

下記の E2E 専用ストアを `rm -rf` してから、`wrangler d1 migrations apply`(`--persist-to` で

Makes network callslowCapability

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

curl -s -o /dev/null -w "%{http_code}\n" https://<worker 名>.<アカウント>.workers.dev/api/pdfs # 401
CLAUDE.md · 1,574 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

技術書を読みながら、気になった箇所を選択して AI に質問できる PDF リーダー。利用者は 1 人。 React 19 (SPA) + Hono (Worker) + D1 + R2 を単一の Cloudflare Workers プロジェクトにまとめ、 @cloudflare/vite-plugin で SPA と Worker を同一の vp dev で動かす。

公開先は https://<worker 名>.<アカウント>.workers.devwrangler.jsoncname と Cloudflare アカウントのサブドメインで決まる)で、API はログインの内側にある (下記「ログインとセッション」)。ローカルだけで動かしていた頃の前提(ログイン不要)は もう成り立たない。

コマンド

vp(Vite+)に統一。生の vite / vitest は直接叩かない。

vp dev                    # SPA + Worker を同時起動 (http://localhost:5173)
pnpm run db:migrate:local # D1 マイグレーション適用(初回 / migrations 追加時のみ、自動適用はしない)

pnpm test                 # フロント単体 (jsdom)
pnpm run test:worker      # Worker 単体 (@cloudflare/vitest-pool-workers)
pnpm run test:e2e         # E2E (Playwright)。サーバーは自動起動するので vp dev は不要

vp check                  # フォーマット + lint + 型チェック(--fix で自動修正)
vp exec wrangler types    # wrangler.jsonc の bindings/main 変更後に Env 型を再生成

単体テストを1ファイルだけ走らせる: vp exec vitest run src/front/lib/sseParser.test.ts 1 つの project だけ走らせる: pnpm run test:e2e --project=mobiledesktop / tablet / mobile) E2E を1件だけ走らせる: pnpm run test:e2e -g "テスト名の一部"-- を挟むと pnpm が それをそのまま playwright へ渡し、-g が効かないまま全件走る)

git push 時に lefthook の pre-pushvp check + vp build を実行し、失敗すると push はブロックされる。

worktree を作ったら最初に .dev.vars を用意する

.dev.vars は gitignore 済み(.gitignore:4)で worktree には複製されない。無いまま vp devpnpm run test:e2e の自動起動を含む)を動かすと、@cloudflare/vite-plugin が commit 済みの worker-configuration.d.ts を再生成し、LLM_* の宣言が消えた差分が 毎回出る。worktree を切ったら実装を始める前に用意する:

cp .dev.vars.example .dev.vars

.dev.vars.example が実際に読む鍵をそのまま並べてあるので、コピーすればそのまま動く (LLM_API_KEY はダミー、ログインは demo / demo)。

型の差分は値ではなく鍵の存在と並び順で決まるので、ダミー値でも空値でも消える—— LLM_BASE_URL / LLM_MODEL / LLM_WEB_SEARCH_SUPPORTED を値の空いた行で並べてあるのは そのためで、使わないときも行を消さず、並べ替えもしないこと(どちらも型が変わる。 commit 済みの worker-configuration.d.ts.dev.vars.example の並びで生成してある)。 現在の E2E は LLM へ 問い合わせないので、実キーが要るのは手で回答の生成を確かめるときだけ。そのときはメインクローンの .dev.vars からコピーする。チャット送信を E2E に足すなら実キーが要る——ダミー値では認証が 通らず、トークンが 1 つも届かないまま 60 秒のタイムアウトまで粘って落ちる。

Read the full file on GitHub · 1,574 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 · 1,574 lines · 41,673 tokens per session scan C 5189b539ce37

Subscribe to this mod's changes

chatbook CLAUDE.md is an instructions file published in the GitHub repository skanehira/chatbook (103 stars, last pushed 17d ago), licensed MIT. It adds 41,673 tokens to every session, about $0.2084 per session on Opus 5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

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

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

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

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