Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words

lake-meter

by getlakeversion 0.1.3i★ 0iRuns on your computer
Registry nameio.github.getlake/lake-meter

How to install

What it does

Per-step model recommendations and cost estimates for coding-agent plans.

  • Connects Runs on your computer
  • Account or key No key needed
  • Category Developer tools

Use together with

Skills that teach the AI this kind of work; they work alongside this one

rea

Reverse engineer anything with agents, from app behavior down to native binaries.

by morluto★ 461,7511 skills

Skill · How-to guide

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.

by Graphify-Labs★ 148,3521 skills

Skill · How-to guide

archify

Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.

by tt-a1i★ 96,7571 skills

Skill · How-to guide

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity4/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness12/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score16/100

Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 16, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server lake-meter for Claude on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "lake-meter": { "command": "npx", "args": [ "-y", "lake-meter", "mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the lake-meter tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  3. Paste these settings and save the file

    {
      "mcpServers": {
        "lake-meter": {
          "command": "npx",
          "args": [
            "-y",
            "lake-meter",
            "mcp"
          ]
        }
      }
    }
  4. Quit Claude and open it again

  5. Try it

    Use lake-meter and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using lake-meter or shows a lake-meter tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect lake-meter yet

lake-meter runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect lake-meter

  • Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • Install Node.js on your computer first (one time)
  • Install Node.js on your computer first (one time)
  • Install Node.js on your computer first (one time)

B · Others in Developer tools that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server lake-meter for Claude Code on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user lake-meter -- npx -y lake-meter mcp 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the lake-meter tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  3. Paste this command and press Enter

    claude mcp add --scope user lake-meter -- npx -y lake-meter mcp
  4. Type /mcp in Claude Code

    You should see lake-meter listed as connected

  5. Try it

    Use lake-meter and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using lake-meter or shows a lake-meter tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server lake-meter for Cursor on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "lake-meter": { "command": "npx", "args": [ "-y", "lake-meter", "mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the lake-meter tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  3. Open the AI chat in Cursor in Agent mode

  4. Try it

    Use lake-meter and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using lake-meter or shows a lake-meter tool in the answer, you are connected

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server lake-meter for VS Code on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "lake-meter": { "type": "stdio", "command": "npx", "args": [ "-y", "lake-meter", "mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the lake-meter tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  3. Open the AI chat in VS Code in Agent mode

  4. Try it

    Use lake-meter and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using lake-meter or shows a lake-meter tool in the answer, you are connected

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use lake-meter💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user lake-meter -- npx -y lake-meter mcp

Claude 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"
      ]
    }
  }
}

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

Downloads per weeki
311/wk
Connection
Runs on your computer
Latest versioni
0.1.3
Published to registryi
Nov 16, 2026
Code last changedi
Nov 16, 2026
Maker
getlake
Packages
npm: lake-meter
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 16, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account getlake, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed today

  • ✓ Pass

    Has a licence

    Uses MIT

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

Not checked yet

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/getlake-lake-meter.svg)](https://mcp.popnx.com/en/servers/getlake-lake-meter)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Developer toolsi

  • More stars than 0% of the other 5964 servers in this category
  • Published to the registry more recently than 99% of the other 5964 servers in this category
  • Basic checks equal to or better than 100% of the other 5964 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is lake-meter safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

The registry does not list a required key, though some servers ask you to sign in on first use.

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed today, and the latest version (0.1.3) reached the registry today.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Node.js on your computer.

What can I use instead?

In the same category: GitDiagram, Appllama, Cloudflare MCP, Omnara, Repowise

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

GitDiagram

Architecture diagrams, explanations and Mermaid source for public GitHub repositories.

by ahmedkhaleel2004Widely used★ 18.9KUpdated 2 months ago

Runs in the cloud✓ service owner · gitdiagram.comTried by the PopNx team

Appllama

Study screens, flows and paywalls from top-earning iOS apps, then build from what wins.

by AppllamaWidely used★ 5.2KUpdated 3 months ago

Runs in the cloud✓ service owner · appllama.io

Cloudflare MCP

Cloudflare MCP servers

by cloudflareWidely used★ 4.5KUpdated 14 months ago

Runs in the cloud✓ service owner · mcp.cloudflare.comTried by the PopNx team

Omnara

Deploy durable AI agents with Omnara, an open-source managed-agent platform.

by omnara-aiWidely used★ 3.4KUpdated 2 months ago

Runs in the cloud✓ service owner · omnara.com

Repowise

Codebase intelligence for AI coding agents: graph, git history, docs, decisions, code health.

by repowise-devWidely used↓ 6.5K/wk★ 8.1K Stars for the whole repoUpdated 3 days ago

Computer or cloud✓ service owner · repowise.dev
Compared with similar ones
This one
lake-meter
GitDiagramAppllamaCloudflare MCPOmnaraRepowise
Runs whereInstalls on your computerRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installCloud or install on your computer
Needs a keyNoNoNoNoNoNo
Add with + in ClaudeNoNoNoYesNoNo
Basic checks3/34/44/44/44/45/5
LicenseMITMITMITApache-2.0Apache-2.0AGPL-3.0
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

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):

  1. 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.
  2. 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.
  3. 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

  1. 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 initinstall hooks, statusline, /meter skill and two subagents (installed by default; skip with --no-agents) into ~/.claude
npx lake-meter@latest init --projectinstall 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 --statuslineset the cap, skip the subagents, replace an existing statusline
/meter, /meter cap 10, /meter cap off, /meter reportinside Claude Code (uses one short model turn to display)
npx lake-meter@latest cap 10 · npx lake-meter@latest status · npx lake-meter@latest reportsame, 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 mcpMCP server with estimate_plan and meter_status (works in Cursor too)
npx lake-meter@latest uninstallremove 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 }

KeyMeaning
capUsdper run, API list-price equivalent. null = off
capTokensper run, all tokens incl. cache reads
capFiveHourPcte.g. 80: stop when your 5-hour subscription window passes 80% (needs the statusline)
sessionCapUsdacross the whole session
onCap"ask" = permission prompt; "stop" = end the turn
extendPctheadroom granted when you press Yes
warnPctone heads-up (to you and to Claude) at this % of the cap
provider"anthropic" or "openai" for plan recommendations
annotatePlansadd 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)

HowAccuracy
Tokens per runMeasured. 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 runComputed 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 breakdownEstimate. 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 recommendationOpinion, 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 pointWhat lake-meter does
UserPromptSubmit hookmarks 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 hookprints the receipt (systemMessage, never blocks) and appends one line to ~/.lake-meter/runs.jsonl
statusLineshows 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/meterthe /meter command
~/.claude/agents/lake-light.md, lake-standard.mdsubagents 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 status still has the numbers.
  • "Run" = one submitted prompt. Background subagent reports and /loop iterations also fire UserPromptSubmit and start a new run; use sessionCapUsd to bound the whole session.
  • Dollar figures are list-price equivalents, not your bill. On subscriptions use capTokens or capFiveHourPct if 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.js runs 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, bypassPermissions stops the turn, and that lake-meter's measured run cost equals Claude Code's own total_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](

Only the beginning is shown; read the rest in the repo