storage-retention

storage-retention is a skill for Claude Code, Codex from get-bb/bb. It costs 24 tokens per session (4,402 once invoked), scanned A, original, MIT.

A tool for inspecting machine storage, removing unused files, and setting rules for archiving or deleting old conversation data. It provides command-line operations and a sidebar panel for reports and settings.

In plain words
What is it for?
Use it to review storage by machine, remove unnecessary files, retry worktree cleanup, clear a thread, or configure when threads and their stored data are archived or deleted.
Why use it?
It helps find storage usage and clean up orphaned, large, archived, or thread-specific files. It also makes retention rules explicit instead of leaving both policies at their default of never.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to review storage by machine, remove unnecessary files, retry worktree cleanup, clear a thread, or configure when threads and their stored data are archived or deleted.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/get-bb/bb/storage-retention
About the project

bb is an agentic IDE that lets users control, customize, and automate a software-development environment through a desktop app, web app, command-line interface, or HTTP API. Developers use it to run work in observable threads that can be steered or handed off to other agents. Its catalogue add-ons provide skills and instructions for working with bb.

get-bb/bb · 6,228 stars · on GitHub · getbb.app

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 get-bb/bb --skill storage-retention
Clone the repo
git clone --depth 1 https://github.com/get-bb/bb

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 storage-retention

README.md
[![agentmods](https://agentmods.dev/badge/skills/get-bb/bb/storage-retention/github.svg)](https://agentmods.dev/skills/get-bb/bb/storage-retention)
Your own site
<a href="https://agentmods.dev/skills/get-bb/bb/storage-retention"><img src="https://agentmods.dev/badge/skills/get-bb/bb/storage-retention/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 storage-retention

Your own site · 80×15
<a href="https://agentmods.dev/skills/get-bb/bb/storage-retention"><img src="https://agentmods.dev/badge/skills/get-bb/bb/storage-retention.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,402 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.00024 $0.04402
Opus 5.5 $0.00010 $0.01761
Sonnet 5.5 $0.00005 $0.00880
Haiku 4.5 $0.00002 $0.00440

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

Security

Grade A, and why

storage-retention 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.

plugins/storage-retention/skills/storage-retention/SKILL.md · 159 lines

How it starts

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

Storage & retention

Enable bb plugin enable bb--storage-retention. All three policies default to Never. Open the plugin's sidebar panel for machine reports and retention settings. All settings in the panel save immediately when changed. All commands return JSON. Use the owning server's normal SDK/plugin RPC transport.

bb storage retention
bb storage retention --archive-after 30 --delete-after 90
bb storage retention --archive-after 30 --delete-after 90 --save --yes
bb storage retention --archive-after never --delete-after never --save --yes
bb storage retention --cold-store-after 14 --save --yes
bb storage cold-store --thread THREAD_ID --yes
bb storage cold-list --search "flaky test" --limit 20
bb storage cold-list --limit 50 --after LAST_THREAD_ID
bb storage restore --thread THREAD_ID
bb storage cold-delete --thread THREAD_ID --yes
bb storage retention --delete-storage-on-archive true --save --yes
bb storage retention --delete-storage-on-archive false --save --yes
bb storage retention --delete-dev-data-on-checkout-removal true --save --yes
bb storage usage
bb storage usage --rescan
bb storage usage --machine HOST_ID --rescan
bb storage usage --machine HOST_ID
bb storage remove-orphans --machine HOST_ID --yes
bb storage clear-large-files --yes
bb storage clear-large-files --machine HOST_ID --yes
bb storage retry-worktree-cleanup --machine HOST_ID
bb storage clear-thread --thread THREAD_ID --yes
bb storage clear-archived-files --machine HOST_ID --yes
bb storage remove-dev-instances --machine HOST_ID --yes
bb storage remove-dev-instances --machine HOST_ID --instance NAME --yes
bb storage remove-external-worktrees --machine HOST_ID --yes
bb storage remove-external-worktrees --machine HOST_ID --path WORKTREE_PATH --yes
bb storage remove-external-worktrees --machine HOST_ID --path WORKTREE_PATH --force --yes

Without --save, retention thresholds only preview affected thread counts. --cold-store-after moves threads archived that many days to cold storage: one .jsonl.zst thread file each in <dataDir>/plugins/bb--storage-retention/cold-storage/. The plugin deletes the thread, holds the end of the delete through the thread.delete_finalize hook until threads.experimental_export has written the file, then lets bb remove the rows. It skips pinned and running threads and threads another thread still points at as its parent, source or lifecycle owner (those follow once their children are moved). bb storage cold-store refuses such a thread and names the threads that point at it, because deleting it would take its children with it. Cold storage is listed in the plugin panel (a Cold storage row with the total count, size and last move, which opens a page with search, Show more, Restore and Delete) and by bb storage cold-list, newest first, with totalCount, totalBytes, movingCount and lastStoredAt for the matching threads and hasMore; pass the last thread ID as --after for the next page. Restore (or bb storage restore --thread ID) imports the file back, and a restored archived thread counts as archived from that moment. It first restores the cold-stored threads it points at as parent, source or lifecycle owner, so those links survive, and returns restoredThreadIds. Each file is an ordinary thread file, so bb thread import FILE also brings it back; the hourly run then drops it from cold storage, and moving it again writes a fresh file. If the plugin is disabled while a thread is still being written, bb removes that thread without a copy. Days must be whole numbers from 1 to 3650, or never. Unspecified settings preserve their saved values. Saved policies apply across all projects. The hourly run processes up to 50 trees per action and skips groups with pinned members. Archiving can remove worktrees including uncommitted changes. Deleting removes history and thread storage. Preview first and save only when authorized.

Delete thread storage on archive defaults to off. Set --delete-storage-on-archive to true or false, or use the switch in the retention panel, which saves immediately. It applies to future manual and automatic archives, including each cascaded child, while the plugin is enabled; it does not clear previously archived threads. Conversations and uploaded attachments are kept. Pinned threads are skipped. Cleanup waits for stopped threads and online persistent machines. Pending cleanup survives reloads and retries every minute; unarchiving or deleting cancels it, and turning the setting off discards pending work on the next cleanup pass. Failures are logged and retried. Threads without an environment need a completed scan to identify their storage machine, just like clear-thread. Each clear logs the thread ID, its archive time and the bytes removed, so a cleared archive can be told apart from a live thread that lost its storage.

Read the full file on GitHub · 159 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 Changed · +1 lines e88e46247132
  2. 7d ago Changed · +27 lines · +4 tokens per session 7ed80e06defd
  3. 23d ago Changed · +2 lines 8a2da2a83453
  4. 1mo ago Changed · +15 lines 8510af4f1d9b
  5. 1mo ago Changed · +5 lines ba2296b27daa
  6. 1mo ago Changed bcd3e70e13c8
  7. 1mo ago Changed db9b4b63238e
  8. 1mo ago First seen · 109 lines · 20 tokens per session scan A 7d2b5b7b9e74

Subscribe to this mod's changes

storage-retention is a skill published in the GitHub repository get-bb/bb (6,228 stars, last pushed today), licensed MIT. It adds 24 tokens to every session and 4,402 once invoked, about $0.0001 per session on Opus 5.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-10-08.

Related

storage-retention compared with skills from other repositories

storage-retention next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
storage-retentionget-bb/bbSkill6.2ktodayMITA24Claude Code, Codex
configuring-grovebearlike/GroveSkill913d agoMITB92Claude Code
workflowzhinkgit/embeddedskillsSkill8214d agoMITA65Claude Code
termiotermio-sh/termioSkill714todayMITA117Claude Code, Codex
develop-inspection-featureexplyt/spring-pluginSkill1705d agoApache-2.0A103Claude Code, Codex
rotateVinix24/vnx-orchestrationSkill623d agoMITA69Claude Code
meeting-prepetrebels/claude-code-growth-osSkill242d agoMITA56Claude Code