lake-meter
What it does
Per-step model recommendations and cost estimates for coding-agent plans.
- Connects パソコンで動く
- Account or key No key needed
- Category 開発者ツール
一緒に使える
この種の作業を AI に教える Skill。これと一緒に使えます
graphify
Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.
archify
Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.
この順位の理由
一覧は利用スコア(100 点満点)で並びます。内訳は次のとおり
| 人気 | 4/80 | GitHub スターか週間ダウンロード数。大きい方を 60、小さい方を 20 で数えます |
|---|---|---|
| 新しさ | 12/12 | 30 日以内のリリースかコード更新で満点 |
| 応答中 | 0/8 | 前回の確認でクラウドのエンドポイントが応答 |
| 利用スコア | 16/100 |
品質: 基本チェック 3/3 項目に合格(表示のみ、並び順には不使用) · 勢い: データなし (「急上昇」タブでのみ使用)
インストール
使っているAIアプリを選んで、設定をコピーしてください。
チェック 3/3 合格 · あなたのパソコンで動きます · ✓ コマンド確認済み 2026年11月16日
まず:どの AI を使っていますか?
使っているアプリを選ぶと、下に手順が表示されます。
Claude につなげますが、先に準備が必要です
先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
AI にインストールしてもらう
このメッセージを Claude のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。
このパソコンの Claude に MCP server lake-meter を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "mcpServers": { "lake-meter": { "command": "npx", "args": [ "-y", "lake-meter", "mcp" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、lake-meter のツールが本当に表示されるか確認する。このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。
Node.js を入れる(まだなければ)
もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter
node -v- バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
- "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
ターミナルの開き方
Mac:⌘ + Space を押し、Terminal と入力して Enter
Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」
まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です
入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です:
node -v一度入れれば、Node.js を使うすべてのツールで使えます
パソコン版 Claude アプリの設定ファイルを開く
SettingsDeveloperEdit Config
この設定を貼り付けて保存
{ "mcpServers": { "lake-meter": { "command": "npx", "args": [ "-y", "lake-meter", "mcp" ] } } }Claude を終了してもう一度開く
試してみる
lake-meter を使って、私に何ができるか教えて、1 つやってみせて✓ Claude が lake-meter を使っていると言うか、回答に lake-meter のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
ChatGPT はまだ lake-meter につなげません
lake-meter はパソコンに入れて使うものですが、ChatGPT は Web 上で動くサーバーにしかつなげません
代わりにできること
A · lake-meter につなげるアプリを使う
- 先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
- 先にパソコンへ Node.js を入れてください(1 回だけ)
- 先にパソコンへ Node.js を入れてください(1 回だけ)
- 先にパソコンへ Node.js を入れてください(1 回だけ)
B · 開発者ツール の中で ChatGPT につなげる別のサーバー
同じカテゴリでよく使われているものから、キーなしでアドレスだけでつなげるものを選びました
- Sentry✓ ChatGPT
- Compiler Explorer✓ ChatGPT
- GitDiagram✓ ChatGPT
Claude Code につなげますが、先に準備が必要です
先にパソコンへ Node.js を入れてください(1 回だけ)
AI にインストールしてもらう
このメッセージを Claude Code のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。
このパソコンの Claude Code に MCP server lake-meter を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):claude mcp add --scope user lake-meter -- npx -y lake-meter mcp 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、lake-meter のツールが本当に表示されるか確認する。このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。
Node.js を入れる(まだなければ)
もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter
node -v- バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
- "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
ターミナルの開き方
Mac:⌘ + Space を押し、Terminal と入力して Enter
Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」
まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です
入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です:
node -v一度入れれば、Node.js を使うすべてのツールで使えます
ターミナルを開く
Mac:Command+スペースで Terminal と入力 · Windows:PowerShell を開く
このコマンドを貼り付けて Enter
claude mcp add --scope user lake-meter -- npx -y lake-meter mcpClaude Code で /mcp と入力
lake-meter が一覧にあり、接続済みと表示されれば OK です
試してみる
lake-meter を使って、私に何ができるか教えて、1 つやってみせて✓ Claude Code が lake-meter を使っていると言うか、回答に lake-meter のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
Cursor につなげますが、先に準備が必要です
先にパソコンへ Node.js を入れてください(1 回だけ)
AI にインストールしてもらう
このメッセージを Cursor のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。
このパソコンの Cursor に MCP server lake-meter を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "mcpServers": { "lake-meter": { "command": "npx", "args": [ "-y", "lake-meter", "mcp" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、lake-meter のツールが本当に表示されるか確認する。このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。
Node.js を入れる(まだなければ)
もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter
node -v- バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
- "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
ターミナルの開き方
Mac:⌘ + Space を押し、Terminal と入力して Enter
Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」
まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です
入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です:
node -v一度入れれば、Node.js を使うすべてのツールで使えます
Cursor の AI チャットを Agent モードで開く
試してみる
lake-meter を使って、私に何ができるか教えて、1 つやってみせて✓ Cursor が lake-meter を使っていると言うか、回答に lake-meter のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Cursor のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
VS Code につなげますが、先に準備が必要です
先にパソコンへ Node.js を入れてください(1 回だけ)
AI にインストールしてもらう
このメッセージを VS Code のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。
このパソコンの VS Code に MCP server lake-meter を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "servers": { "lake-meter": { "type": "stdio", "command": "npx", "args": [ "-y", "lake-meter", "mcp" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、lake-meter のツールが本当に表示されるか確認する。このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。
Node.js を入れる(まだなければ)
もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter
node -v- バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
- "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
ターミナルの開き方
Mac:⌘ + Space を押し、Terminal と入力して Enter
Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」
まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です
入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です:
node -v一度入れれば、Node.js を使うすべてのツールで使えます
VS Code の AI チャットを Agent モードで開く
試してみる
lake-meter を使って、私に何ができるか教えて、1 つやってみせて✓ VS Code が lake-meter を使っていると言うか、回答に lake-meter のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に VS Code のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
開発者向け:ターミナルのコマンドと JSON 設定
パソコンにインストール
Claude Code
claude mcp add --scope user lake-meter -- npx -y lake-meter mcpClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"lake-meter": {
"command": "npx",
"args": [
"-y",
"lake-meter",
"mcp"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"lake-meter": {
"command": "npx",
"args": [
"-y",
"lake-meter",
"mcp"
]
}
}
}VS Code (mcp.json)
{
"servers": {
"lake-meter": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"lake-meter",
"mcp"
]
}
}
}この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
ひと目でわかる
- 週あたりのダウンロードi
- 311/週
- 接続方法
- パソコンで動く
- 最新バージョンi
- 0.1.3
- レジストリ公開日i
- 2026年11月16日
- コードの最終更新i
- 2026年11月16日
- 作者
- getlake
- パッケージ
npm: lake-meter- ウェブサイト
- getlake.github.io
- レジストリでの状態
- 有効
使えるアプリ
このサーバーのつなぎ方と、各アプリの公式ドキュメントに基づきます。2026年11月10日に確認。
パソコン上で動かせるアプリ
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
できること
パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。
基本チェックi
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月16日にチェック
- ✓ 合格
作者とリポジトリが一致
レジストリ名は、リポジトリを所有するGitHubアカウント getlake で確認済みです
- ✓ 合格
今もメンテナンスされている
コードの最終更新:今日
- ✓ 合格
ライセンスがある
MITを使用
- – 対象外
エンドポイントが応答する
これはパソコンで動くため、インターネット上のエンドポイントはありません
- – 対象外
OAuthでサインイン
パソコンで動き、代わりにローカルの設定を使います
- … 未チェック
ツールの説明に隠れた指示がない
パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです
公開済みの脆弱性(OSV.dev)
まだ確認していません
作者の方へ:再確認の依頼・情報の誤りの報告
作者向け:README にバッジを付ける
作者の方は、このコードを README に貼れます。バッジはこのページにリンクします。
[](https://mcp.popnx.com/en/servers/getlake-lake-meter)話し合い
質問、コツの共有、使えないことの報告ができます。「役に立った」の多い順です。
ユーザーレビュー
まだレビューはありません
開発者ツールのほかのサーバーとの比較i
- このカテゴリのほかの5964件のうち0%よりスターが多い
- このカテゴリのほかの5964件のうち99%より最近レジストリに公開
- 基本チェックの結果が、このカテゴリのほかの5964件のうち100%と同じかそれ以上
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
よくある質問
lake-meterは安全ですか?
当てはまる基本チェック3項目のうち3項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
どんなキーやコードが必要ですか?
レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。
パソコンで動きますか、それともクラウドですか?
あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。
今もメンテナンスされていますか?
GitHubリポジトリの最終更新は今日、最新バージョン(0.1.3)がレジストリに届いたのは今日です。
どのアプリで使えますか?
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.jsも必要です。
代わりに使えるものは?
同じカテゴリには:GitDiagram, Appllama, Cloudflare MCP, Omnara, Repowise
似た働きのほかの候補
同じカテゴリでほかの作者のもの。コマンドは確認済み。公式を先に、次にスター順。
カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
GitDiagram
Architecture diagrams, explanations and Mermaid source for public GitHub repositories.
Appllama
Study screens, flows and paywalls from top-earning iOS apps, then build from what wins.
Omnara
Deploy durable AI agents with Omnara, an open-source managed-agent platform.
Repowise
Codebase intelligence for AI coding agents: graph, git history, docs, decisions, code health.
| これ lake-meter | GitDiagram | Appllama | Cloudflare MCP | Omnara | Repowise | |
|---|---|---|---|---|---|---|
| 動く場所 | パソコンにインストールが必要 | クラウドで動き、インストール不要 | クラウドで動き、インストール不要 | クラウドで動き、インストール不要 | クラウドで動き、インストール不要 | クラウドでもパソコンにインストールでも使える |
| キーが必要 | いいえ | いいえ | いいえ | いいえ | いいえ | いいえ |
| Claude で + から追加 | いいえ | いいえ | いいえ | はい | いいえ | いいえ |
| 基本チェック | 3/3 | 4/4 | 4/4 | 4/4 | 4/4 | 5/5 |
| ライセンス | MIT | MIT | MIT | Apache-2.0 | Apache-2.0 | AGPL-3.0 |
| 料金 | 登録情報に費用の記載なし | 登録情報に費用の記載なし | 登録情報に費用の記載なし | 登録情報に費用の記載なし | 登録情報に費用の記載なし | 登録情報に費用の記載なし |
作者のREADME
READMEを開く
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
lake-meter
A model for every step, and a hard stop for every run. For Claude Code.
Claude Code is great until a run loops, fans out into subagents, or quietly eats your 5‑hour window on a step a cheaper model could have done. lake-meter adds two things using only Claude Code's own extension points (hooks, statusline, skills, MCP):
- Model per step. When Claude writes a plan in plan mode, lake-meter rates each step's complexity, recommends the cheapest model that should handle it (Haiku / Sonnet / Opus), and estimates tokens and dollars per step and in total, next to the cost of running everything on Opus. The table appears inside Claude Code's own "Ready to code?" plan dialog.
- A per-run cap that stops and asks. Set
$5(or a token budget, or a % of your 5‑hour window). When a run reaches it, the next tool call becomes a permission prompt: Yes continues with +50% headroom, No stops Claude right there. In unattended modes it ends the turn instead. - An end-of-run receipt. Measured tokens and list-price dollars for the run, split by model and subagents, compared with the plan's estimate.
Local only. No account, no server, no telemetry.
npx lake-meter init
That's the whole install. Restart Claude Code (or open /hooks) and work as usual.
What you see
In plan mode, at the top of the plan dialog:
Ready to code?
Here is Claude's plan: ▎ Lake Meter estimate: $3.53–$13.0 with a model per step, vs $3.96–$14.5 all on Opus 5.5. Table at the end.
and at the end of the plan:
┌─────┬─────────────────────────────────────┬────────────┬─────────────────────┬───────────┬─────────────┐
│ # │ Step │ Complexity │ Recommended model │ Tokens │ Est. cost │ ├─────┼─────────────────────────────────────┼────────────┼─────────────────────┼───────────┼─────────────┤ │ 1 │ Add retry settings to config │ 1/5 │ Haiku 5.5 (haiku) │ 40k–161k │ <$0.01 │ │ 2 │ Design an idempotent delivery queue │ 5/5 │ Opus 5.5 (opus) │ 1.5M–6.2M │ $2.10–$8.22 │ │ 3 │ Implement the retry worker │ 4/5 │ Opus 5.5 (opus) │ 720k–2.6M │ $1.01–$3.38 │ │ 4 │ Expose delivery status in the API │ 3/5 │ Sonnet 5.5 (sonnet) │ 284k–1.0M │ $0.21–$0.71 │ │ 5 │ Tests for failure paths │ 3/5 │ Sonnet 5.5 (sonnet) │ 284k–1.0M │ $0.21–$0.71 │ │ 6 │ Update the changelog │ 1/5 │ Haiku 5.5 (haiku) │ 40k–161k │ <$0.01 │ └─────┴─────────────────────────────────────┴────────────┴─────────────────────┴───────────┴─────────────┘ Total: $3.53–$13.0 vs $3.96–$14.5 with everything on Opus 5.5 (about 10% less).
When the cap is reached, before the next tool call:
│ Hook PreToolUse:Bash requires confirmation for this command:
│ Lake Meter: this run has used about $2.15 (cap $2.00). Approve to continue with +$1.00 headroom. │ Deny to stop here. Or run /meter cap to set a new cap. [settings] Do you want to proceed? ❯ 1. Yes
- No
When the run ends:
Stop says: Lake Meter · run $3.44 · 524k tok (313k cache reads, 155k out) · Opus 5.5 $3.44 · cap $7.00
Since plan approved: $3.25 measured vs $3.53–$13.0 estimated
All the time, in the statusline: ◒ Lake · run $0.65 / $5.00 · session $4.54 · 5h 42%
(These are copied from a real Claude Code 2.1.322 session; see Verification.)
Commands
npx lake-meter@latest init | install hooks, statusline, /meter skill and two subagents (installed by default; skip with --no-agents) into ~/.claude |
npx lake-meter@latest init --project | install hooks into this repo's .claude/settings.local.json (also writes .claude/skills and .claude/agents with machine-specific paths: don't commit them) |
npx lake-meter@latest init --cap 10 --no-agents --statusline | set the cap, skip the subagents, replace an existing statusline |
/meter, /meter cap 10, /meter cap off, /meter report | inside Claude Code (uses one short model turn to display) |
npx lake-meter@latest cap 10 · npx lake-meter@latest status · npx lake-meter@latest report | same, from any terminal, no model turn (or npm i -g lake-meter and drop npx) |
npx lake-meter@latest plan plan.md [--why] [--openai] [--json] (flags after the file) | plan breakdown for any markdown plan |
npx lake-meter@latest mcp | MCP server with estimate_plan and meter_status (works in Cursor too) |
npx lake-meter@latest uninstall | remove everything init added (your settings are restored; a backup of the original is kept as settings.json.lake-meter.bak) |
Config
~/.lake-meter/config.json (per-project override: .lake-meter.json in the repo root):
{
"capUsd": 5, "capTokens": null, "capFiveHourPct": null, "sessionCapUsd": null, "onCap": "ask", "extendPct": 50, "warnPct": 80, "provider": "anthropic", "annotatePlans": true }
| Key | Meaning |
|---|---|
capUsd | per run, API list-price equivalent. null = off |
capTokens | per run, all tokens incl. cache reads |
capFiveHourPct | e.g. 80: stop when your 5-hour subscription window passes 80% (needs the statusline) |
sessionCapUsd | across the whole session |
onCap | "ask" = permission prompt; "stop" = end the turn |
extendPct | headroom granted when you press Yes |
warnPct | one heads-up (to you and to Claude) at this % of the cap |
provider | "anthropic" or "openai" for plan recommendations |
annotatePlans | add the table to plan files in plan mode |
Simplest: npx lake-meter@latest cap 10 writes this file for you.
A run is everything from one prompt you submit until Claude stops.
Cursor and other MCP clients
Add to ~/.cursor/mcp.json (or any MCP client's config):
{ "mcpServers": { "lake-meter": { "command": "npx", "args": ["-y", "lake-meter@latest", "mcp"] } } }
Then ask the agent to "estimate this plan with lake-meter". In Cursor you get the per-step model and cost breakdown. The cap and the receipt are Claude Code only, because Cursor doesn't expose per-run token usage to extensions.
Measured vs estimated (read this)
| How | Accuracy | |
|---|---|---|
| Tokens per run | Measured. Read from Claude Code's session transcript (message.usage on each response, de-duplicated by message id) plus subagent transcripts in /subagents/. | Exact as reported by the API, up to transcript write lag (see limits). |
| Dollars per run | Computed from measured tokens × list prices in src/prices.json, per request, including cache writes (5m/1h), cache reads and Haiku's long-context tier. | Matches Claude Code's own total_cost_usd in our tests. It's an API-equivalent figure: on Pro/Max you don't pay it per token; it tells you how heavy a run was. Your invoice can differ (discounts, batch, regions). |
| 5-hour window % | Reported by Claude Code to the statusline (rate_limits.five_hour.used_percentage, Pro/Max only). | As accurate as Claude Code's own number. |
| Plan breakdown | Estimate. Keyword and size heuristics rate each step 1–5; token budgets per complexity live in prices.json (assumptions). Run npx lake-meter@latest plan plan.md --why to see every reason. | Rough. Ranges are wide on purpose. Tune the budgets from your own npx lake-meter@latest report history. |
| Model recommendation | Opinion, encoded as complexity → tier (1–2 Haiku, 3 Sonnet, 4–5 Opus). Frontier models are never recommended by default. | A starting point, not a guarantee of quality. |
Prices last verified 2026‑11‑12 from Anthropic pricing and OpenAI pricing. To update, edit src/prices.json, or drop an override at ~/.lake-meter/prices.json with the same shape.
How it works
init copies a pinned runtime to ~/.lake-meter/runtime (so hooks run in ~50 ms with plain node, no npx per call) and adds to your Claude Code settings:
| Extension point | What lake-meter does |
|---|---|
UserPromptSubmit hook | marks the start of a run |
PreToolUse hook (*) | reads new transcript bytes, prices them, and returns permissionDecision: "ask" when the cap is reached (or continue: false in bypassPermissions / dontAsk / onCap: "stop"). On ExitPlanMode it records the plan estimate and gives Claude a one-line note about cheaper subagents |
PostToolUse hook (*) | if the tool we asked about ran, you pressed Yes, so headroom is added. When Claude writes a plan file in plan mode, appends the per-step table to it |
Stop hook | prints the receipt (systemMessage, never blocks) and appends one line to ~/.lake-meter/runs.jsonl |
statusLine | shows the meter and stores Claude Code's own session cost and rate-limit % for the window cap. Only installed if you don't already have a statusline |
~/.claude/skills/meter | the /meter command |
~/.claude/agents/lake-light.md, lake-standard.md | subagents pinned to haiku and sonnet (installed by default; skip with --no-agents), so the per-step advice is actionable. Claude only uses them if it decides to |
Limits (honest list)
- The cap is checked before each tool call. A single long model response can overshoot it, and the final text answer of a turn isn't gated. Expect a run to end slightly above the cap.
- Transcript lag. Claude Code writes transcripts asynchronously, so the newest response may land a moment late. Spend can lag by about one response.
- Pressing No interrupts the turn. Claude Code doesn't run Stop hooks on interrupts, so there's no receipt for that turn;
npx lake-meter@latest statusstill has the numbers. - "Run" = one submitted prompt. Background subagent reports and
/loopiterations also fireUserPromptSubmitand start a new run; usesessionCapUsdto bound the whole session. - Dollar figures are list-price equivalents, not your bill. On subscriptions use
capTokensorcapFiveHourPctif dollars feel abstract. - Plan breakdown is heuristic and English-keyword based. Unknown models count tokens but not dollars (and the receipt says so).
- `/meter` costs one short model turn because skills run through the model; the CLI commands don't.
- Claude Code only for caps and receipts. Cursor, Codex and others get the MCP plan estimate.
Privacy
Step titles are stored locally in ~/.lake-meter, along with config and a run log of token and dollar totals. Nothing leaves the machine. No prompts or code are stored. lake-meter makes no network requests, and there's no telemetry. Debugging: touch ~/.lake-meter/debug logs raw hook inputs locally to ~/.lake-meter/debug.jsonl; delete the file to stop.
Verification
npm test: 54 tests (pricing math, transcript parsing and de-duplication, plan splitting and scoring, every hook path, install/uninstall round-trip, MCP over stdio, a simulated session through the real CLI).test/real-claude.test.jsruns the real Claude Code binary (2.1.322 at time of writing) against a local mock of the Messages API (scripts/mock-anthropic.js, no account needed). It checks that the hooks fire, the cap produces a permission decision,bypassPermissionsstops the turn, and that lake-meter's measured run cost equals Claude Code's owntotal_cost_usd. Skipped when no Claude Code binary is installed.- The screens in What you see were captured from an interactive Claude Code session driven against the same mock.
Demo (from a clone, no account needed)
npm run demo # simulated session: plan breakdown → cap prompt → receipt
Teams
Works with [lake-gate](