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/talayash/agentrium/refactor-cleangit clone --depth 1 https://github.com/talayash/agentriumWhat 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.00000 | $0.00448 |
| Opus 5 | $0.00000 | $0.00224 |
| Sonnet 5 | $0.00000 | $0.00090 |
| Haiku 4.5 | $0.00000 | $0.00045 |
Grade A, and why
refactor-clean 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 2d 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.
What it actually says
Refactor Clean
Find and safely remove dead code, unused imports, and unused dependencies.
Instructions
Systematically find and remove dead code from the project. $ARGUMENTS
Phase 1: Unused Imports (TypeScript)
- Run
npx tsc --noEmit 2>&1and look for unused import warnings - Search for imports that are never referenced in their file
- Remove unused imports one file at a time
- Verify
npx tsc --noEmitstill passes after each removal
Phase 2: Unused Exports (TypeScript)
- For each exported function/type/const in
src/, search if it's imported anywhere - If an export has zero importers and is not an entry point, flag it
- Remove confirmed dead exports
- Verify build still passes
Phase 3: Dead Code (Rust)
- Run
cargo check 2>&1insrc-tauri/and look for dead_code warnings - Run
cargo clippy 2>&1for additional unused code detection - Remove unused functions, structs, and imports
- Verify
cargo checkstill passes after each removal
Phase 4: Unused Dependencies
- Check
package.json- search for each dependency's usage insrc/ - Check
Cargo.toml- search for each dependency's usage insrc-tauri/src/ - Flag dependencies with zero references (excluding build/config deps)
- Present list to user for confirmation before removing
Rules
- One removal at a time - verify build passes after each
- Never remove code you're not sure is dead - if in doubt, flag it but don't remove
- Don't touch test code unless explicitly asked
- Create a checkpoint first if there are uncommitted changes
Report
## Cleanup Report
- Unused imports removed: N
- Dead exports removed: N
- Dead Rust code removed: N
- Unused dependencies flagged: N
- Build status: ✅ PASS
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.
- 2d ago First seen · 48 lines · 0 tokens per session scan A 6c1fa64e3fb4
refactor-clean is a command published in the GitHub repository talayash/agentrium (39 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 448 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
spec-design
Create comprehensive technical design for a specification.
vibe-agents
Step 4 of the vibe-coding workflow: generate AGENTS.md + tool configs so the AI builder stays on track.
validate-gap
Analyze implementation gap between requirements and existing codebase.
spec-impl
Execute spec tasks using TDD methodology.
oss-docs
(user-owned) oss-docs harness — README 4-locale + docs-site publishing for the moai-adk-go OSS project (adk.mo.ai.kr, Vercel auto-deploy).
fix
Auto-detect and fix LSP errors, linting issues, and type errors.