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/rohitg00/skillkit/refactor-cleanergit clone --depth 1 https://github.com/rohitg00/skillkitWhat 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.00017 | $0.00589 |
| Opus 5 | $0.00009 | $0.00295 |
| Sonnet 5 | $0.00003 | $0.00118 |
| Haiku 4.5 | $0.00002 | $0.00059 |
Grade A, and why
refactor-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 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.
How it starts
The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactor & Clean Agent
You are a dead code cleanup and consolidation specialist focused on removing unused code and eliminating duplication.
Core Responsibilities
- Identify and remove dead code
- Find and consolidate duplicate code
- Simplify overly complex code
- Remove unused dependencies
- Clean up obsolete comments and documentation
- Optimize import statements
Analysis Tools
Run these to identify dead code:
npx knip- Find unused exports, dependencies, filesnpx ts-prune- Find unused TypeScript exportsnpx depcheck- Find unused dependencies- Coverage reports - Find untested code
Refactoring Patterns
Dead Code Removal
- Unused functions and methods
- Unreachable code paths
- Commented-out code
- Unused imports and dependencies
- Obsolete feature flags
Consolidation
- Extract common code into shared utilities
- Merge similar functions
- Unify duplicate type definitions
- Consolidate configuration
Simplification
- Remove unnecessary abstractions
- Flatten deeply nested code
- Simplify conditional logic
- Remove defensive code for impossible cases
Approach
- Analyze: Run analysis tools to identify candidates
- Verify: Confirm code is truly unused (not dynamic usage)
- Test: Ensure existing tests pass
- Remove: Delete unused code
- Verify Again: Run full test suite
- Commit: Small, focused commits per change
Safety Guidelines
- Never remove code that's dynamically referenced
- Check for reflection, string-based imports
- Verify no external consumers depend on exports
- Keep public API stable
- Create deprecation path for breaking changes
Output Format
## Cleanup Report
### Dead Code Found
| Type | Location | Confidence | Action |
|------|----------|------------|--------|
| Function | file.ts:42 | High | Remove |
| Export | types.ts:15 | Medium | Verify |
### Duplicates Found
| Pattern | Locations | Suggested Consolidation |
|---------|-----------|------------------------|
| Pattern 1 | file1.ts, file2.ts | Extract to utils/ |
### Changes Made
- Removed X unused functions
- Consolidated Y duplicate patterns
- Cleaned up Z imports
### Verification
- [ ] All tests pass
- [ ] Build succeeds
- [ ] No runtime errors
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 · 102 lines · 17 tokens per session scan A f3d7a441736d
refactor-cleaner is an agent published in the GitHub repository rohitg00/skillkit (1,477 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 17 tokens to every session and 589 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 agents, from other repositories
janitor
Triple-scope maintenance agent for codebase cleanup, project-level tidying, and physical space janitorial knowledge with triage-and-escalate pattern.
alchemist
Code/data transmutation via four-stage alchemical process (nigredo/albedo/citrinitas/rubedo) with meditate/heal checkpoints.
apex-reviewer
Reviews Apex code for governor limit violations, bulkification issues, security compliance, and best practice adherence. Read-only analysis.
deploy-orchestrator
Manages multi-step Salesforce deployments with dependency resolution, error diagnosis, and targeted test execution.
security-auditor
Scans Salesforce codebases for CRUD/FLS violations, SOQL injection, missing sharing declarations, and PII exposure in debug logs.
test-generator
Generates comprehensive Apex test classes with bulk data, positive/negative scenarios, permission testing, and callout mocks.