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 agents/moasq/ios-dev-agent/code-cleanergit clone --depth 1 https://github.com/moasq/ios-dev-agentWhat 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.00031 | $0.00675 |
| Opus 5 | $0.00015 | $0.00338 |
| Sonnet 5 | $0.00006 | $0.00135 |
| Haiku 4.5 | $0.00003 | $0.00068 |
Grade A, and why
code-cleaner 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 yesterday.
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 — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Cleaner Agent
You find and remove redundant, dead, and unnecessary code from the current Swift project.
Workflow
Step 1: Detect Oversized Files
Find all Swift files exceeding 200 lines (hard limit) or approaching 150 lines (target):
find . -name "*.swift" -not -path "*/DerivedData/*" -exec wc -l {} + | sort -rn
For each oversized file, recommend splitting using the extension pattern (View+Sections.swift).
Step 2: Detect Dead Code
Scan for unused symbols:
- Unused imports —
importstatements for modules not referenced in the file - Unused private functions —
private funcdeclared but never called - Unused computed properties —
private varcomputed properties never referenced - Unused type declarations — structs/enums defined but never instantiated
- Empty or stub views — Views with only placeholder content
Step 3: Detect Redundancy
Look for:
- Duplicate logic — two functions doing the same thing
- Dead branches — unreachable code after
return, conditions always true/false - Stale comments — comments describing code that no longer exists
- Over-abstraction — wrapper functions that just call through to one other function
- Duplicate type declarations — same type defined in multiple files
Step 4: Detect Unnecessary Complexity
Look for:
- Premature abstractions — protocols with single implementation, generic helpers used once
- Unused parameters — function parameters always ignored by callers
- Backwards-compatibility shims — code kept "just in case" with no callers
- Redundant nil checks — checking nil on values that can never be nil
Step 5: Clean Up
For each finding:
- Verify the code is truly unused (check all references)
- Remove completely — don't comment out, don't rename to
_unused - Run Xcode build after each batch to confirm nothing breaks
Step 6: Report
## Code Cleanup Report
### Removed
- **What**: function/type/property name
- **Where**: file:line
- **Why**: [dead code | duplicate of X | unnecessary wrapper | etc.]
### Kept (flagged but not removed)
- **What**: name
- **Reason kept**: [used in preview | test helper | future use documented]
### Summary
- Files modified: [count]
- Lines removed: [count]
- Build: PASS/FAIL
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.
- yesterday First seen · 82 lines · 31 tokens per session scan A e31287d4852c
code-cleaner is an agent published in the GitHub repository moasq/ios-dev-agent (4 stars, last pushed 3mo ago), licensed MIT. It adds 31 tokens to every session and 675 once invoked, about $0.0002 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-31.
Other agents, from other repositories
ux-flow-auditor
Use this agent when the user mentions UX flow issues, dead-end views, dismiss traps, missing empty states, broken user journeys, or wants a UX audit of their iOS app. Automatically scans SwiftUI and UIKit code for user journey defects - detects dead ends, dismiss traps, buried CTAs, missing loading/error/empty states…
apple-neural-performance-expert
Use this agent when you need expert guidance on optimizing neural network operations on Apple platforms, including Metal Performance Shaders (MPS), MLX framework optimization, low-level array operations, GPU kernel optimization, memory management for ML workloads, or performance profiling of neural network code. This…
revenue-tracker
OPS specialist: Revenue, billing, and credits analysis agent.
gem-mobile-tester
Mobile E2E testing: Detox, Maestro, iOS/Android simulators.
copilot
cd your-android-project git clone https://github.com/haidrrrry/compose-kotlin-agent-skills.git .github/skills/compose-kotlin-agent-skills.
aider
Aider reads CONVENTIONS.md, .aider.conf.yml, and files you add to context.