connect

connect is a command for coding agents from CPUtester5465/countbean-plugin. It costs 23 tokens per session (691 once invoked), scanned A, original, MIT.

A command that connects Claude to a hosted Countbean book, meaning an online personal finance ledger, using browser approval or an existing access key.

In plain words
What is it for?
Use it to check connection status, start browser-based approval, wait for approval, or connect with a supplied access key.
Why use it?
It guides the connection process and prevents unsafe or confusing reconnection attempts, especially when browser approval is required.

Command

Part of the countbean plugin — 1 skill, 7 commands, 1 MCP server shipped together

Install

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.

agentmods
npx agentmods add commands/cputester5465/countbean-plugin/connect
Clone the repo
git clone --depth 1 https://github.com/CPUtester5465/countbean-plugin

Or install countbean, the plugin that ships this one along with the rest of its 1 skill, 7 commands, 1 MCP server.

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 connect

README.md
[![agentmods](https://agentmods.dev/badge/commands/cputester5465/countbean-plugin/connect.svg)](https://agentmods.dev/commands/cputester5465/countbean-plugin/connect)
Your own site
<a href="https://agentmods.dev/commands/cputester5465/countbean-plugin/connect"><img src="https://agentmods.dev/badge/commands/cputester5465/countbean-plugin/connect.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 691 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00023 $0.00691
Opus 5 $0.00012 $0.00345
Sonnet 5 $0.00005 $0.00138
Haiku 4.5 $0.00002 $0.00069

Measured 3d ago against content hash ab6f0f89afc4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

connect scanned grade A with 0 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 3d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin/commands/connect.md · 49 lines

What it actually says

Connect this Claude session to the user's hosted Countbean book.

Arguments (may arrive in either order, on one line, or not at all): $ARGUMENTS

Do this in order:

  1. If $ARGUMENTS contains a cbk_… token, call connect_book with it (pass the whole argument string as api_key — the tool sorts cbk_… from bok_… itself). Then go to step 4.

  2. If there are no arguments, call connection_status first.

    • Already connected and reachable → say which book, and stop. Do not reconnect.

    • Not connected → prefer browser approval. It needs no key at all, so do not ask for one. Two calls, in this order: a. start_device_authorization — returns immediately with a short code and a link. b. Show the user both, verbatim, and wait for them to approve. They open the link, pick which book to connect, and approve it. c. await_device_approval — blocks until they approve, then saves the connection.

      Never call (c) before showing the code from (a): until the user sees it they have nothing to type, and the grant expires in ten minutes.

    • Only if the user would rather paste a key by hand — or their browser is on a different machine — tell them where it is, in this exact shape:

      Open your book at app.countbean.comConnect ClaudeCreate key. It shows you one line to paste back here. The key is shown once. Then stop and wait. Do not guess a key, do not offer to create one — the plugin cannot mint keys, only the signed-in book page can.

  3. If the user pastes something that is not a key (e.g. only a bok_…), say which half is missing and where it is shown. Never write a partial connection.

  4. Report the result verbatim-ish. connect_book verifies against the live book before it saves, so its answer is authoritative:

    • Connected → confirm the book id, then call book_status and show the account count and latest commit, so the user sees their real book rather than a claim about it.
    • Refused → relay the reason. The common ones are a mistyped paste, a key that was revoked, and a key issued for a different book than the id given. Do not retry silently.

Notes:

  • This takes effect immediately — no restart, no environment variables, no .env edit. Credentials are stored in ~/.countbean/credentials.json, readable only by the user.
  • If the user would rather use a .env or shell exports, those still work and take precedence: COUNTBEAN_API_KEY and COUNTBEAN_BOOK_ID. Mention this only if they ask.
  • To undo: disconnect_book.
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. 3d ago First seen · 49 lines · 23 tokens per session scan A ab6f0f89afc4

Subscribe to this mod's changes

connect is a command published in the GitHub repository CPUtester5465/countbean-plugin (17 stars, last pushed 8d ago), licensed MIT. It adds 23 tokens to every session and 691 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.