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/gpt-cmdr/ras-commander/agent-cleanfilesgit clone --depth 1 https://github.com/gpt-cmdr/ras-commanderWrote 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/gpt-cmdr/ras-commander/agent-cleanfiles)<a href="https://agentmods.dev/commands/gpt-cmdr/ras-commander/agent-cleanfiles"><img src="https://agentmods.dev/badge/commands/gpt-cmdr/ras-commander/agent-cleanfiles.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.1 | $0.00000 | $0.01020 |
| Opus 5 | $0.00000 | $0.00510 |
| Sonnet 5 | $0.00000 | $0.00204 |
| Haiku 4.5 | $0.00000 | $0.00102 |
Grade A, and why
agent-cleanfiles 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 — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Perform a general cleanup pass on the repository for periodic maintenance. For task-specific cleanup, use /agent-taskclose instead.
Context Difference
| Command | When | Context Level | Aggressiveness |
|---|---|---|---|
/agent-taskclose |
End of task | Maximum (knows task files) | High - consolidate & clean task artifacts |
/agent-cleanfiles |
Periodic | Limited (general scan) | Moderate - clean completed tasks, flag uncertain |
1. Agent Tasks Cleanup (DO THIS FIRST)
Review agent_tasks/.agent/BACKLOG.md for completed tasks:
Identify Completed Tasks
Scan BACKLOG.md for tasks marked [x] or in the "Completed" section:
- Note task IDs (e.g.,
gauge-001,lib-001,gui-001) - Check if they have associated folders in
agent_tasks/tasks/
Archive Completed Task Folders
For each completed task with a folder in agent_tasks/tasks/:
agent_tasks/tasks/{task-id}-{name}/
├── TASK.md # Task description
├── RESULT.md # Completion summary
└── {files} # Working files
Action: Move entire folder to agent_tasks/.old/tasks/
# Example
mv agent_tasks/tasks/gui-automation-integration agent_tasks/.old/tasks/
Clean Orphaned Task Files
Check for standalone files in agent_tasks/ that relate to completed work:
- Planning documents for completed features
- Session handoffs that are now stale
- Research notes incorporated elsewhere
Action: Move to agent_tasks/.old/planning/ or agent_tasks/.old/sessions/
Update STATE.md Reference
If STATE.md references completed tasks as "current focus", note this for user to update.
2. Subagent Outputs Cleanup
Scan .claude/outputs/ for stale outputs:
Identify Stale Outputs
- Files older than 30 days with no references
- Outputs superseded by newer analysis
- Findings already incorporated into permanent hierarchy
Archive Stale Outputs
Move to .old/: Outdated but potentially useful for reference
Move to .old/recommend_to_delete/: Obviously temporary or failed outputs
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 · 146 lines · 0 tokens per session scan A 0843fe7da29b
agent-cleanfiles is a command published in the GitHub repository gpt-cmdr/ras-commander (79 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,020 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.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.