init

A setup command for Countbean, a bookkeeping application that records finances in a digital ledger. It connects to an online book or creates one on the computer, then sets up basic account categories.

In plain words
What is it for?
Use it to connect an existing hosted book, create a local book, choose its name and currency, and create a starter chart of accounts.
Why use it?
It provides a guided starting point for choosing where the ledger lives and connecting the required tools before any bookkeeping work begins.

Command

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/init
Clone the repo
git clone --depth 1 https://github.com/CPUtester5465/countbean-plugin
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 962 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.00030 $0.00962
Opus 5 $0.00015 $0.00481
Sonnet 5 $0.00006 $0.00192
Haiku 4.5 $0.00003 $0.00096

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

Security

Grade A, and why

init 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 yesterday.

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/init.md · 69 lines

What it actually says

You are setting up the user's Countbean book. Arguments: $ARGUMENTS

Arguments are interpreted by shape, not by position:

  • a cbk_… token → hosted credentials pasted by hand; treat as /countbean:connect.
  • otherwise → first token = book name (optional), second = 3-letter currency (optional, default USD).

Do this in order:

  1. Find out where you are. Call connection_status.

    • If the tools are unavailable entirely (no mcp__countbean__*), the MCP server did not start. Tell the user to run /mcp to see the error the server printed — it names the cause — and that /reload-plugins retries it. First launch builds a Python venv and can take ~30s. Stop here; nothing below can work.
    • HOSTED mode and reachable → they already have a cloud book. Report it, then go to step 4.
    • HOSTED mode but NOT reachable → relay the reason; a revoked or mistyped key is the usual one. Offer to reconnect (step 2). Stop.
    • LOCAL mode → step 2.
  2. Ask which they want. Do not assume.

    Hosted (recommended, free to try) — their ledger runs on our infrastructure, opens in a browser, and is shared with an accountant by invite. Connecting it is TWO tool calls, in this order:

    a. start_device_authorization — returns immediately with a code and a link. b. Show the user both, verbatim, and wait for them to act. They open the link, pick which book to connect, and approve. c. await_device_approval — blocks until they approve, then saves the connection.

    Do not call (c) before showing the code from (a). The code is what the user types; if it is still sitting in your context when you start blocking, they have nothing to type and the grant expires after ten minutes.

    Prefer this over asking for a key. The user never has to find, copy or paste a credential.

    Fall back to /countbean:connect cbk_… bok_… only if they already have a key in hand, or the browser is on a different machine.

    Local — a git-backed Beancount ledger in ~/.countbean/main on this machine only. No browser UI, no sharing, no backups but their own. If they choose this, call create_book with name (from $1, else ask, else "My Books") and currency ($2 uppercased, else "USD").

  3. Never silently pick one. A local book the user believes is hosted is the worst outcome here: it looks like it works, and none of it is backed up or reachable from the web app.

  4. Seed the opening structure. Offer to set up a starter chart of accounts. If the user agrees (or says something like "set up my money situation"), use open_accounts to open sensible accounts — typically Assets:Checking, Assets:Savings, Liabilities:CreditCard, Income:*, Expenses:* — following the double-entry rules in the countbean-accounting skill. Skip this if the book already has accounts.

  5. Confirm against the book, not your own memory. Call book_status and show the location, currency and account count it returns. Then point at what is next: /countbean:ingest <file> to import statements, /countbean:report for reports, and — if hosted — the book's page in the browser for the full ledger UI.

If the user has no book yet on the hosted side, start_device_authorization will still work but the approval page will tell them to create one first from their dashboard. Relay that; do not try to create a hosted book from here — the plugin cannot, and create_book is refused in hosted mode for exactly that reason.

Keep it brief and friendly. Never invent balances — only record what the user tells you.

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. yesterday First seen · 69 lines · 30 tokens per session scan A d132495418fa

Subscribe to this mod's changes

init is a command published in the GitHub repository CPUtester5465/countbean-plugin (17 stars, last pushed 6d ago), licensed MIT. It adds 30 tokens to every session and 962 once invoked, about $0.0002 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.