OpenAgents Control is a framework that adds plan-first, approval-based coding workflows to OpenCode, an AI coding framework. Developers and teams use it to make agents follow shared coding patterns, work across several programming languages, and validate changes through testing and review. The catalogue includes its agents, skills, commands, plugin, and hook.
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.
npx agentmods add commands/darrenhinde/openagentscontrol/oac-cleanupgit clone --depth 1 https://github.com/darrenhinde/OpenAgentsControlWrote 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.
[](https://agentmods.dev/commands/darrenhinde/openagentscontrol/oac-cleanup)<a href="https://agentmods.dev/commands/darrenhinde/openagentscontrol/oac-cleanup"><img src="https://agentmods.dev/badge/commands/darrenhinde/openagentscontrol/oac-cleanup.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00014 | $0.00803 |
| Opus 5 | $0.00007 | $0.00402 |
| Sonnet 5 | $0.00003 | $0.00161 |
| Haiku 4.5 | $0.00001 | $0.00080 |
Grade A, and why
oac-cleanup 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Clean Up Temporary Files
Remove old temporary files from the .tmp directory to free up disk space.
What Gets Cleaned
The cleanup script checks three directories:
.tmp/sessions/- Session context files older than 7 days.tmp/tasks/- Completed task files older than 30 days.tmp/external-context/- Cached external documentation older than 7 days
Usage
Interactive Cleanup (Recommended)
!`bash ${CLAUDE_PLUGIN_ROOT}/scripts/cleanup-tmp.sh`
This will:
- Scan for old temporary files
- Show you what will be deleted with sizes
- Ask for confirmation before deleting
Force Cleanup (Skip Confirmation)
!`bash ${CLAUDE_PLUGIN_ROOT}/scripts/cleanup-tmp.sh --force`
⚠️ Warning: This deletes files immediately without confirmation.
Custom Age Thresholds
# Clean sessions older than 14 days
!`bash ${CLAUDE_PLUGIN_ROOT}/scripts/cleanup-tmp.sh --session-days=14`
# Clean tasks older than 60 days
!`bash ${CLAUDE_PLUGIN_ROOT}/scripts/cleanup-tmp.sh --task-days=60`
# Clean external context older than 3 days
!`bash ${CLAUDE_PLUGIN_ROOT}/scripts/cleanup-tmp.sh --external-days=3`
# Combine options
!`bash ${CLAUDE_PLUGIN_ROOT}/scripts/cleanup-tmp.sh --session-days=14 --task-days=60 --force`
What Gets Preserved
The script is smart about what it deletes:
- Active sessions - Never deleted (even if old)
- In-progress tasks - Only completed tasks are eligible for cleanup
- Recent files - Files newer than the threshold are kept
Configuration
You can customize default cleanup thresholds in your .oac config file:
cleanup:
auto_prompt: true # Prompt for cleanup on session start
session_days: 7 # Days before suggesting session cleanup
task_days: 30 # Days before suggesting task cleanup
external_days: 7 # Days before suggesting external context cleanup
See /install-context for more about configuration.
Output
The script outputs JSON with cleanup results:
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.
- 5d ago First seen · 126 lines · 14 tokens per session scan A 9a5e4f84023b
oac-cleanup is a command published in the GitHub repository darrenhinde/OpenAgentsControl (4,823 stars, last pushed 2d ago), licensed MIT. It adds 14 tokens to every session and 803 once invoked, about $0.0001 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.
Other commands, from other repositories
fix
Auto-fix linting, formatting, and common issues.
doctor
Run the specrails health check to validate that all prerequisites are correctly configured for this repository.
webui
Start the Claude Paper web UI.
device-info
扫描设备 + 自动识别芯片型号/VID:PID + 给出驱动建议.
hw-troubleshoot
硬件诊断一键排查 —— 扫描 I²C 设备 + 检查供电 + 分析信号质量.
convert-table
将 Excel 表格转为 CSV 或在对话中展示.