planckbot CLAUDE.md

planckbot CLAUDE.md is an instructions file for coding agents from opcastil11/planckbot. It costs 5,147 tokens per session, scanned C, original, Apache-2.0.

Project instructions for PlanckBot, a tool that observes and reduces the amount of information passed between an AI model and its tools.

In plain words
What is it for?
Developing PlanckBot’s data collection, model training, tool proxy, scheduling, pattern detection, command-line interface, and dashboard.
Why use it?
They describe the project’s architecture and operating rules for filtering, compressing, or sometimes avoiding tool input and output to reduce token use.

Instructions file

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 instructions/opcastil11/planckbot/claude-md
Clone the repo
git clone --depth 1 https://github.com/opcastil11/planckbot

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 planckbot CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/opcastil11/planckbot/claude-md.svg)](https://agentmods.dev/instructions/opcastil11/planckbot/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/opcastil11/planckbot/claude-md"><img src="https://agentmods.dev/badge/instructions/opcastil11/planckbot/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 5,147 This file is loaded in full into every session.
When invoked 5,147 The same file — it is already loaded in full.
Security scan C 2 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.05147 $0.05147
Opus 5 $0.02573 $0.02573
Sonnet 5 $0.01029 $0.01029
Haiku 4.5 $0.00515 $0.00515

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

Security

Grade C, and why

planckbot CLAUDE.md scanned grade C 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 4d 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.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

Repo: **https://github.com/opcastil11/planckbot** (private). Auth via the `store` credential helper (`~/.git-credentials`). For `gh` CLI, pull the token with `git credential fill` and export as `GH_TOKEN=...` — the store

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- `src/planckbot/tools/meta.py :: edit_tool(name, patch, registry, versions, checkpoints)` — applies a unified diff OR a full-source replacement to a registered tool's module file, runs an AST whitelist (no new imports,
CLAUDE.md · 198 lines

How it starts

The opening of the file, as written. The whole thing — 198 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PlanckBot

Adaptive tiny-model layer for LLM token optimization. Sits between a host LLM (Claude, GPT-4, etc.) and its tools. Observes every tool call, trains a per-tool LoRA adapter (<1B params, SmolLM2 base), and at runtime filters / compresses / short-circuits tool I/O to save tokens.

Standalone product — not a dependency of Orquesta. Orquesta is only one ingest source among several.

Repo layout

src/planckbot/
  db/          — SQLite schema + dataclasses (schema v2)
  ingest/      — TripleSource ABC + manual.py + orquesta.py
  tools/       — registry, triples store, builtin tools
  experiments/ — experiment manager + metrics
  training/    — LoRA trainer (HF Trainer + PEFT)
  models/      — loader, inference (`predict()` with confidence), checkpoints
  proxy/       — intercept layer + MCP stdio server (`planckbot-mcp`)
  cron/        — background scheduler (CronStore, JobRegistry, Daemon, scanner)
  synth/       — Layer D: pattern detector, synthesize_tool, `planckbot-synth` MCP server
  cli.py       — `planckbot` entry point with subcommands (ui, status, train, label, cron, synth …)
  ui/          — NiceGUI workbench (dashboard, how-it-works, tools, activity, experiments, training, models, cron, synth, mascots, projects)
  paper/       — internal research-log module (paper_log table + export helper; not user-facing)
scripts/       — train_smoke.py, train_tool.py, proxy_demo.py, mcp_preflight.py, auto_label.py
static/branding/ — PlanckBots logo + favicon (used by UI + empty states)
tests/         — 94 tests; full suite runs in ~5s (no torch needed for most)
data/          — SQLite DB + LoRA checkpoints (gitignored except data/fixtures/)

Tech stack

  • Python 3.12, uv-managed venv at .venv/
  • SQLite (local, schema in db/migrations.py)
  • PyTorch CPU + transformers + peft + datasets for training
  • NiceGUI (FastAPI) for the workbench UI
  • mcp SDK for the proxy/stdio server
  • No test framework beyond pytest; asyncio mode auto

Running things

Read the full file on GitHub · 198 lines

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. 4d ago First seen · 198 lines · 5,147 tokens per session scan C 76158e9d070e

Subscribe to this mod's changes

planckbot CLAUDE.md is an instructions file published in the GitHub repository opcastil11/planckbot (1 stars, last pushed 5d ago), licensed Apache-2.0. It adds 5,147 tokens to every session, about $0.0257 per session on Opus 5. A static security scan graded it C with 2 findings (reaches for credential files, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.