bos-cost-optimization

bos-cost-optimization is a skill for Claude Code, Codex from cynthiajones34/GBrain. It costs 31 tokens per session (2,187 once invoked), scanned A, original, MIT.

A cost-control guide for running a personal gbrain knowledge base with modest storage and search needs. It covers choices for the database, text-search services, models, backups, and scheduled enrichment.

In plain words
What is it for?
It helps install, tune, and audit gbrain spending, including search modes, embedding providers, synthesis models, expansion, enrichment schedules, and backups.
Why use it?
It helps avoid paying for infrastructure sized for large teams when one person has a much smaller workload. It also identifies settings that add cost without being necessary.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for gbrain. Also seen: positional $N argument; built for gbrain.

Good fit It helps install, tune, and audit gbrain spending, including search modes, embedding providers, synthesis models, expansion, enrichment schedules, and backups.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cynthiajones34/gbrain/bos-cost-optimization
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.

Any agent
npx skills add cynthiajones34/GBrain --skill bos-cost-optimization
Clone the repo
git clone --depth 1 https://github.com/cynthiajones34/GBrain

Made for: Claude Code, Codex.

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 bos-cost-optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/cynthiajones34/gbrain/bos-cost-optimization/github.svg)](https://agentmods.dev/skills/cynthiajones34/gbrain/bos-cost-optimization)
Your own site
<a href="https://agentmods.dev/skills/cynthiajones34/gbrain/bos-cost-optimization"><img src="https://agentmods.dev/badge/skills/cynthiajones34/gbrain/bos-cost-optimization/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bos-cost-optimization

Your own site · 80×15
<a href="https://agentmods.dev/skills/cynthiajones34/gbrain/bos-cost-optimization"><img src="https://agentmods.dev/badge/skills/cynthiajones34/gbrain/bos-cost-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,187 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00031 $0.02187
Opus 5 $0.00015 $0.01094
Sonnet 5 $0.00006 $0.00437
Haiku 4.5 $0.00003 $0.00219

Measured 8d ago against content hash 53c137efdd3c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

bos-cost-optimization 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 8d 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.

skills/bos-cost-optimization/SKILL.md · 182 lines

How it starts

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

BOS Cost Optimization Playbook

This skill is the operating manual for keeping the BOS gbrain deployment at floor cost. Every optimization in here has been tested on a single-operator scale (~500–5K pages, 1K–5K queries/mo). Read it before any change that touches search mode, embedding provider, or synthesis model.

The target: $0–5/mo for a single operator

The default gbrain install assumes enterprise scale (100K+ pages, 100K+ queries/mo, multi-user). For a single-operator personal brain, every default is over-provisioned. The minimum-cost posture is:

Component Minimum-cost choice Monthly cost at 1K queries/mo
Database PGLite embedded $0
Embeddings Google Gemini free tier (gemini-embedding-001 at 768d) $0
Reranker (skipped — vector + BM25 + RRF only) $0
Search mode conservative $0 (smaller chunks → fewer synthesis tokens)
Synthesis model Haiku 4.5 $0.80–1.50
LLM expansion OFF $0
Cron enrichment Once weekly, not nightly $0
Backup storage Local on the Railway volume $0

Floor: ~$1/mo with active use. Ceiling: ~$5/mo at moderate use. Anything above $10/mo means a knob has drifted.

Why no reranker

The upstream gbrain default uses ZeroEntropy's bundled reranker. ZeroEntropy paused new signups as of August 2026, so this fork ships without one. The cost is small (~3-5% P@5 hit) and the floor is $0 lower.

If ZeroEntropy reopens: re-enable by setting search.reranker enabled=true in config and exporting ZEROENTROPY_API_KEY. Compare quality before/after with gbrain eval retrieval-quality and decide whether the reranker quality lift is worth the API key.

The 7 levers, ranked by $/quality impact

  1. Default to Google Gemini free tier. gemini-embedding-001 at 768d, free tier allows ~1,500 requests/day. That's a 500-page brain with normal use, and the daily limit means we won't hit it from a single import. Use your existing Google account — no new signup, no card, no email verification loop.

Read the full file on GitHub · 182 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. 8d ago First seen · 182 lines · 31 tokens per session scan A 53c137efdd3c

Subscribe to this mod's changes

bos-cost-optimization is a skill published in the GitHub repository cynthiajones34/GBrain (0 stars, last pushed 1mo ago), licensed MIT. It adds 31 tokens to every session and 2,187 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-31.