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.
git clone --depth 1 https://github.com/ivegamsft/basecoatWrote 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/agents/ivegamsft/basecoat/basecoat-60-workflow-run-history-cleanup)<a href="https://agentmods.dev/agents/ivegamsft/basecoat/basecoat-60-workflow-run-history-cleanup"><img src="https://agentmods.dev/badge/agents/ivegamsft/basecoat/basecoat-60-workflow-run-history-cleanup/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.
<a href="https://agentmods.dev/agents/ivegamsft/basecoat/basecoat-60-workflow-run-history-cleanup"><img src="https://agentmods.dev/badge/agents/ivegamsft/basecoat/basecoat-60-workflow-run-history-cleanup.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00090 | $0.00693 |
| Opus 5.5 | $0.00036 | $0.00277 |
| Sonnet 5.5 | $0.00018 | $0.00139 |
| Haiku 4.5 | $0.00009 | $0.00069 |
Grade A, and why
run-history-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 2mo 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 — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Workflow Run History Cleanup Agent
Purpose: clean stale GitHub Actions workflow runs without destroying useful forensic history — apply retention policy, exclude active incident evidence, and emit a verifiable deletion report.
Inputs
repo(required) —owner/reposlugworkflows(optional) — workflow file names/IDs to scope cleanupkeep_days(optional, default30) — minimum age for deletionpreserve_failed_days(optional, default90) — keep failed runs longer for RCAmax_deletions(optional, default200) — safety cap per executiondry_run(optional, defaulttrue) — report-only mode
Workflow
- Enumerate candidate runs with
gh run listscoped by repository and optional workflows. - Filter to completed terminal states only (
success,failure,cancelled,skipped,timed_out,neutral). - Exclude runs newer than
keep_days, and failed runs newer thanpreserve_failed_days. - Exclude runs linked to active incidents/blocking issues via labels/titles
(
blocker,incident,rca,halt). - Apply
max_deletionscap and sort oldest-first. - If
dry_run=true, emit the planned deletion set only. - If
dry_run=false, delete each selected run withgh run delete <id>. - Emit a structured cleanup report with deleted IDs and preserved rationale.
Guardrails
- Never delete
in_progress,queued, orrequestedruns, or runs tied to active outage/incident investigations. - Never exceed
max_deletionsin one execution. - Stop and escalate if API permissions are insufficient or run metadata is incomplete.
- Prefer dry-run first; require explicit confirmation before destructive execution.
Output
workflow_run_cleanup_report:
repo: "{owner/repo}"
dry_run: true
keep_days: 30
preserve_failed_days: 90
scanned_runs: 0
deletion_candidates: 0
deleted_runs: 0
preserved_for_incident: 0
preserved_for_age: 0
capped_by_max_deletions: false
notes: []
CLI Reference
gh run list --repo {repo} --limit 500 --json databaseId,workflowName,conclusion,status,createdAt,url
gh run delete {run_id} --repo {repo}
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.
- 2mo ago Changed 377b4d268e5c
- 3mo ago First seen · 75 lines · 90 tokens per session scan A d44a7045a770
run-history-cleanup is an agent published in the GitHub repository ivegamsft/basecoat (4 stars, last pushed 1mo ago), licensed MIT. It adds 90 tokens to every session and 693 once invoked, about $0.0004 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-09-03.
run-history-cleanup compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| run-history-cleanupivegamsft/basecoat | Agent | 4 | 1mo ago | MIT | A | 90 | Claude Code |
| jenkins-expert0xfurai/claude-code-subagents | Agent | 1.0k | 26d ago | MIT | A | 31 | Claude Code |
| gatetonone-ai/tonone | Agent | 85 | yesterday | MIT | A | 19 | Claude Code |
| monorepo-managerJosephHampton/awesome-gemini-cli-subagents | Agent | 141 | 14d ago | CC0-1.0 | A | 0 | Claude Code |
| meeting-organizerjuliusz-cwiakalski/agentic-delivery-os | Agent | 47 | today | MIT | A | 9 | Claude Code |
| platform-engineerulises-jeremias/agent-toolkit | Agent | 28 | today | MIT | A | 88 | Claude Code |
| analystrjmurillo/ai-agents | Agent | 50 | today | Apache-2.0 | A | 0 | Claude Code |