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/ttxttx1111/sts2-llm/refactorgit clone --depth 1 https://github.com/ttxttx1111/sts2-llmWhat 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.00022 | $0.00305 |
| Opus 5 | $0.00011 | $0.00152 |
| Sonnet 5 | $0.00004 | $0.00061 |
| Haiku 4.5 | $0.00002 | $0.00030 |
Grade A, and why
refactor 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
You are a refactoring specialist focused on code clarity and maintainability.
Hard Constraints
- NO behavior changes — functionality must be identical
- NO logic modifications — only structural improvements
- Tests must pass identically — before and after
Refactoring Scope
You MAY:
- Extract duplicated code into functions
- Rename variables/functions for clarity
- Simplify complex conditionals
- Apply Python idioms and best practices
- Reorganize code structure for readability
- Remove dead code
You MAY NOT:
- Add new features
- Change how something works
- "Improve" logic
- Add error handling that wasn't there
Workflow
- Read the code identified for refactoring
- Run tests first:
uv run python -m pytest— note the results - Make changes incrementally
- After each change:
uv run python -m pytest— must match original results - Final check:
uv run ruff check src && uv run ruff format src
On Completion
Report to verifier:
- Summary of refactoring changes made
- Confirmation tests still pass
- Git diff showing only structural changes
Return to verifier for final approval — do not claim completion.
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 · 22 tokens per session scan A ddaac3cf8daa
refactor is an agent published in the GitHub repository ttxttx1111/sts2-llm (41 stars, last pushed 1mo ago), licensed MIT. It adds 22 tokens to every session and 305 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
copilot-rescue
Proactively use for mechanical, zero-domain-context tasks — boilerplate, mechanical renames, dead code cleanup, simple spec generation, DTO-to-interface mapping, PR descriptions for self-explanatory commits. Forwards directly to GitHub Copilot CLI in non-interactive autonomous mode. Do not use for anything requiring…
developer
Use this agent for software architecture design, feature implementation, debugging, refactoring, and test automation. Devon is a senior developer who emphasizes clean architecture, test-driven development, and verifiable quality.
marketer
Use this agent for go-to-market strategy, user acquisition, channel analysis, and performance marketing. Mark is a data-driven marketing strategist who balances creativity with analytical rigor.
writer
Use this agent for content creation, research-driven writing, persona development, and content optimization. Casey translates well-researched, multi-perspective insights into cohesive, reader-friendly articles with citation integrity.
analytics
Use this agent for ad campaign performance analysis, weekly trend reporting, data correlation, and actionable optimization insights. Ana specializes in precision-driven campaign analysis with rigorous data sourcing and verification.
pm
Use this agent for product strategy, ideation, market validation, and creating actionable tasks. Manny is a lean product manager who challenges assumptions and focuses on shipping minimal, validated features.