bos-refresh

bos-refresh is a command for Claude Code from opensesh/karimo-overview. It costs 0 tokens per session (512 once invoked), scanned A, original, Apache-2.0.

A context-cache refresh command for BOS, which stores short summaries of a project’s files and structure for the agent. It regenerates the summaries in `.bos/context/`.

In plain words
What is it for?
Use it to refresh all summaries or only the architecture, components, or library section, and to see what was regenerated.
Why use it?
It updates the agent’s project notes after the codebase changes, so the stored architecture and component information is current.

Command for Claude Code

Written for Claude Code: installed under .claude/.

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/opensesh/karimo-overview/bos-refresh
Clone the repo
git clone --depth 1 https://github.com/opensesh/karimo-overview

Made for: Claude Code.

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-refresh

README.md
[![agentmods](https://agentmods.dev/badge/commands/opensesh/karimo-overview/bos-refresh.svg)](https://agentmods.dev/commands/opensesh/karimo-overview/bos-refresh)
Your own site
<a href="https://agentmods.dev/commands/opensesh/karimo-overview/bos-refresh"><img src="https://agentmods.dev/badge/commands/opensesh/karimo-overview/bos-refresh.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 512 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.1 $0.00000 $0.00512
Opus 5 $0.00000 $0.00256
Sonnet 5 $0.00000 $0.00102
Haiku 4.5 $0.00000 $0.00051

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

Security

Grade A, and why

bos-refresh 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 6d 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.

.claude/commands/bos-refresh.md · 79 lines

How it starts

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

/bos-refresh - Regenerate BOS Context Cache

Regenerate the L0/L1 context summaries in .bos/context/.

Usage

/bos-refresh [--all] [--section <name>]

Arguments

Argument Description
--all Regenerate all sections (default)
--section <name> Regenerate specific section: architecture, components, lib

Behavior

  1. Run the context generator script:

    bunx tsx .bos/scripts/generate-context.ts
    
  2. Report what was regenerated:

    • Number of L1 sections updated
    • Total files analyzed
    • Git commit hash
  3. Show cache freshness from manifest.json

Output Files

The command regenerates:

.bos/context/
├── index.md                 # L0: Project overview (~500 tokens)
├── architecture/
│   ├── index.md             # L1: Architecture overview
│   ├── app-router.md        # L1: Next.js routing patterns
│   └── data-flow.md         # L1: Data flow patterns
├── components/
│   ├── index.md             # L1: Component library overview
│   ├── ui.md                # L1: Design system primitives
│   └── chat.md              # L1: Chat components
├── lib/
│   ├── index.md             # L1: Core libraries overview
│   ├── ai.md                # L1: AI provider system
│   └── supabase.md          # L1: Database services
└── manifest.json            # Cache metadata

When to Use

Run /bos-refresh when:

  • Starting a new feature that touches multiple areas
  • After significant codebase changes
  • When context feels stale or inaccurate
  • Periodically during development sessions

Implementation

# Run the generator
bunx tsx .bos/scripts/generate-context.ts

# Check freshness
cat .bos/context/manifest.json | jq '.generatedAt, .gitCommit'
  • .claude/reference/context-layers.md - L0/L1/L2 model explanation
  • .bos/scripts/generate-context.ts - Generator implementation
  • /bos-search - Search context with vector similarity (Phase B2)

Read the full file on GitHub · 79 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. 6d ago First seen · 79 lines · 0 tokens per session scan A ca0e35729a12

Subscribe to this mod's changes

bos-refresh is a command published in the GitHub repository opensesh/karimo-overview (11 stars, last pushed 4mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 512 tokens. 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.