chatbook: Instructions file for Claude Code

CLAUDE.md

chatbook CLAUDE.md is an instructions file for Claude Code from skanehira/chatbook. It costs 46,545 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/github.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/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 chatbook CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/skanehira/chatbook/claude-md"><img src="https://agentmods.dev/badge/instructions/skanehira/chatbook/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46,545 This file is loaded in full into every session.
When invoked 46,545 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.46545 $0.46545
Opus 5.5 $0.18618 $0.18618
Sonnet 5.5 $0.09309 $0.09309
Haiku 4.5 $0.04655 $0.04655

Measured 1mo ago against content hash 79d987dc699b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-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 1mo 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,755 lines

How it starts

The opening of the file, as written. The whole thing — 1,755 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.dev(wrangler.jsonc の name と 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=mobile(desktop / tablet / mobile) E2E を1件だけ走らせる: pnpm run test:e2e -g "テスト名の一部"(-- を挟むと pnpm が それをそのまま playwright へ渡し、-g が効かないまま全件走る)

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

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

.dev.vars は gitignore 済み(.gitignore:4)で worktree には複製されない。無いまま vp dev(pnpm 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,755 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. 1mo ago Changed · +100 lines · +2,773 tokens per session 79d987dc699b
  2. 1mo ago Changed · +81 lines · +2,099 tokens per session dcb60dc89415
  3. 2mo 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 (106 stars, last pushed 5d ago), licensed MIT. It adds 46,545 tokens to every session, about $0.1862 per session on Opus 5.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

chatbook CLAUDE.md compared with instructions from other repositories

chatbook CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
chatbook CLAUDE.mdskanehira/chatbookInstructions file1065d agoMITC46,545Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot