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.
npx agentmods add instructions/kitepon/throughline/claude-mdgit clone --depth 1 https://github.com/kitepon/ThroughlineWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.18554 | $0.18554 |
| Opus 5 | $0.09277 | $0.09277 |
| Sonnet 5 | $0.03711 | $0.03711 |
| Haiku 4.5 | $0.01855 | $0.01855 |
Grade B, and why
Throughline CLAUDE.md scanned grade B 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 2d 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.
| [src/cli/install.mjs](src/cli/install.mjs) | `install` / `uninstall`(デフォルト global、`--project` で Claude ローカル)。global install は `~/.claude/settings.json` と slash commands に加えて `~/.codex/hooks.json` の UserPromptSubmit / P Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
| [src/os/portable-spawn-sync.mjs](src/os/portable-spawn-sync.mjs) | 旧 src/portable-spawn-sync.mjs。Windows の .cmd/.ps1/.mjs shim 解決つき spawnSync | How it starts
The opening of the file, as written. The whole thing — 390 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
このファイルは Claude Code がこのリポジトリで作業する際のガイダンスです。
プロジェクト概要
Throughline は Claude Code の hooks プラグインで、会話ターンを 3 層 (L1/L2/L3) に分解して SQLite に保存し、/clear 後も記憶を復元します。加えてマルチセッション対応のトークンモニター CLI も同梱しています。
Throughline は単独で install、設定、状態保存とschema migration、診断、復旧、更新、
release判定まで完結する。dotagentsは工場への配線と統合契約を担当するが、Throughlineの
状態や製品寿命を所有・制御しない。runtime-error collectionはThroughline自身の
runtime-errors enable|disable --jsonと製品所有configが管理し、工場側は公開JSON契約だけを使う。
現行版は v0.10.4(schema v9)。Claude Code、Codex、Grok、Cursorをfirst-class hostとして扱う。現行host契約はREADMEとADR 0021/0022、release gateはdocs/04_public_release_plan.mdを正とする。版ごとの変更・公開commit・CI・npm・tag・smoke履歴はCHANGELOG.mdとdocs/archive/, evidence/に置き、この常時読込正本へ複製しない。
設計の核 (v0.4.0 以降 + ADR 0014 二相化、docs/02_clear_auto_handoff_plan.md)
/clear後も SQLite はそのまま残る。前任セッションの全レコードを新 session_id に張り替える(記憶張り替え方式)- 二相ハンドオフ (ADR 0014): Claude Code は同一 project に短時間で複数の SessionStart を発火させることがあり、一部は transcript を生成しない幽霊セッションになる。SessionStart 時点では実体と幽霊を判別できない(本物の transcript も hook より数百 ms 遅れて作られる)ため、SessionStart は
pending_handoffsへの intent 登録のみを行い、merge + 注入は最初の UserPromptSubmit(= 実体の証明。幽霊はプロンプトを発火しない)で実行する。2026-07-17 に幽霊がバトンを先取りして実セッションが記憶ゼロで始まる incident が同日 2 回発生した(実測・機序は ADR 0014) - 引き継ぎ発火条件は 2 経路 (baton path 優先):
- baton path: 旧セッションで
/tlを実行すると UserPromptSubmit hook がhandoff_batonsテーブルにそのセッションの session_id を書き込み、次の新規セッションが初回プロンプト時に消費して merge。適格性はセッション誕生時刻基準で0 ≤ (誕生 − baton書込) ≤ TTL 1h。負 age(誕生後に書かれた baton)は消さずに残す=走行中セッションが横取りしない。source値関係なく発火する確定指名方法 - auto path: baton が無く SessionStart で
source='clear'を受け取ったとき、envTHROUGHLINE_DISABLE_AUTO_HANDOFFが'1'でなければfindLatestClaudePredecessor(transcript 実在フィルタ付き — 幽霊 twin を前任に選ばない)で前任を SessionStart 時点で解決・凍結し、初回プロンプト時に merge + 注入。組み込み/clearは実測したどのクライアントでも UserPromptSubmit に届かない。VS Code はsource='clear'を送るため auto path、Desktop は送らないため/tlを先に使う(経緯と実測は archive docs/12、upstream: anthropics/claude-code#76704) - baton 消費が auto 判定より先発なので両者は構造上同時成立しない
- baton path: 旧セッションで
- 注入内容 (ADR 0016, 2026-07-18〜): push は「現在地」だけ — ヘッダ + 現在地アンカー + 案内セクション(無条件表示)+ L2 を新しい順に丸ごと入るターンだけ全文(ターン原子・固定 N なし)。L1 は注入しない。窓 (20 ターン) の残りは
throughline recall --l2、それより古い全ターンはrecall --l1(要約 or 未要約明示)、一点掘りはthroughline detail <時刻>の pull 三段構成。範囲・境界 (ISO ms strict less-than)・件数・session は全部注入時に案内コマンドへ焼き込み、recall 側は窓を再計算しない。memo / thinking は注入しない - 注入予算 (ADR 0014): hook stdout は約 10k 字超で
<persisted-output>(path + 先頭 2KB preview)に file 化されモデル可視が劣化する(実測 9,501 字 inline / 15,286 字 file 化。10k 判定は per context string で multi-hook なら突破可能と実測済みだが構造的想定外として不採用 — ADR 0016)。注入はbuildBudgetedResumeContext(上限 9,500 字)で行う - thinking の L3 保存: assistant の extended thinking ブロックは
detailsテーブルにkind='thinking'で全ターン保存される。throughline detail <時刻>で取り出せるが、注入には含めない - 各レコードは
origin_session_idを保持するため、複数回の引き継ぎでも記憶がチェーン状に蓄積する(ホップ制限なし) CLAUDE_AUTOCOMPACT_PCT_OVERRIDEは 使わない(自動コンパクト依存の設計は放棄済み)- フォールバック / 逃げ道のコードを書かない — docs/04_public_release_plan.md §0 参照。silent try/catch、
exit(0)でのエラー隠蔽は禁止
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.
- 2d ago First seen · 390 lines · 18,554 tokens per session scan B 251dce6551cb
Throughline CLAUDE.md is an instructions file published in the GitHub repository kitepon/Throughline (2 stars, last pushed 3d ago), licensed MIT. It adds 18,554 tokens to every session, about $0.0928 per session on Opus 5. A static security scan graded it B with 2 findings (reads agent configuration directories, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
dev-flow AGENTS.md
Instructions for daphnee-ovo/dev-flow, covering dev-flow plugin, language policy, 注意事项, 命令 and 流程.
cc-safe-setup CLAUDE.md
Instructions for yurukusa/cc-safe-setup, covering project rules, safety, code style and git.
claude_extensions CLAUDE.md
Instructions for kimon1230/claude_extensions, covering global claude.md, persona, hard rules, code quality and planning.
UnseveredMemory CLAUDE.md
Claude Code instructions for blas0/UnseveredMemory, covering project instructions, tech stack, architecture, development and setup.
claude-hangar CLAUDE.md
Claude Code instructions for claude-hangar/claude-hangar, covering claude hangar — project instructions, what is this?, repository structure, language & communication and quality standards.
skill-olympus AGENTS.md
AGENTS.md instructions for Dannykkh/skill-olympus, covering agents.md, quick retrieval paths, recommended workflows, core rules (always apply) and native-first 구현 경계 (항상 적용).