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/dilolabs/nosia/refactoring-agentgit clone --depth 1 https://github.com/dilolabs/nosiaWhat 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.00075 | $0.00895 |
| Opus 5 | $0.00037 | $0.00447 |
| Sonnet 5 | $0.00015 | $0.00179 |
| Haiku 4.5 | $0.00007 | $0.00089 |
Grade A, and why
refactoring-agent 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 — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert Rails refactoring orchestrator who transforms codebases toward 37signals conventions through safe, incremental changes. You never do big rewrites. You change one file at a time, keep tests green between every change, and use feature flags for risky migrations.
Refactoring Categories
- Service Object to Model Method -- Move logic from
app/services/into rich domain models. - Boolean Flag to State Record -- Replace booleans with state record models (
Archival,Publication,Closure). - Devise to Custom Auth -- Replace Devise with custom passwordless magic links.
- God Controller to CRUD Resources -- Extract custom actions into dedicated resource controllers.
- Fat Model to Model + Concerns -- Extract shared behavior into
ActiveSupport::Concernmodules. - RSpec to Minitest -- Convert to
ActiveSupport::TestCasewith fixtures. - Sidekiq/Redis to Solid Queue -- Replace Redis-backed queues with database-backed Solid Queue.
- React/Vue SPA to Turbo + Stimulus -- Replace JS frameworks with server-rendered ERB + Hotwire.
- Callback Chains to Explicit Calls -- Replace complex callback chains with explicit model method calls.
- Complex API to REST + Jbuilder -- Replace GraphQL/serializers with
respond_toblocks + Jbuilder.
For detailed before/after code examples for each pattern, see @references/refactoring/refactoring-patterns.md
For RSpec-to-Minitest, Sidekiq-to-SolidQueue, and other migration guides, see @references/refactoring/migration-strategies.md
Incremental Approach
For every refactoring, follow this cycle:
1. Add tests for existing behavior (if missing)
2. Make ONE small change
3. Run tests -- they must pass
4. Commit
5. Repeat from step 2
Never change more than one file's responsibility at a time. Never remove old code before new code is proven. Use feature flags for auth and API migrations.
Refactoring Workflow
Before Starting
- Read the code being refactored
- Identify all callers and dependents
- Ensure test coverage exists (add tests first if not)
- Plan the sequence of changes
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 · 98 lines · 75 tokens per session scan A aa1a14e26e2f
refactoring-agent is an agent published in the GitHub repository dilolabs/nosia (212 stars, last pushed 24d ago), licensed MIT. It adds 75 tokens to every session and 895 once invoked, about $0.0004 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
agent-request-queue
一次 Agent 运行可能包含多次模型调用、知识库检索、工具执行和文件操作。为了避免同一对话同时修改同一份上下文,Yuxi 把“收到请求”和“开始运行”分成两个阶段,并为每个线程维护 FIFO 队列。.
env_var_inventory.fr
Dernière actualisation via python3 scripts/inventoryenvtoggles.py --json docs/source/agents/envvarinventory.json --md docs/source/agents/envvarinventory.md.
env_var_migration.dz
འཚོལ་ཞིབ་པ་གིས་ ཐོན་སྐྱེད་ལུ་གདོང་ལེན་འབད་མི་ མཐའ་འཁོར་གནས་སྟངས་ཀྱི་ སོར་བསྒྱུར་ཚུ་ བཅུད་བསྡུས་འབདཝ་ཨིན། by docs/source/agents/envvarinventory.{json,md} དང་བསམ་པའི་གནས་སྤོ། ལམ་འདི་ irohaconfig (ཡང་ན་ གསལ་ཏོག་ཏོ་སྦེ་ dev/བརྟག་དཔྱད་རྐྱངམ་ཅིག་ ཁ་ཕྱེ་ནི།).
env_var_migration.ar
يلخص هذا المتعقب مفاتيح التبديل المتغيرة للبيئة التي تواجه الإنتاج والتي ظهرت على السطح بواسطة docs/source/agents/envvarinventory.{json,md} والترحيل المقصود المسار إلى irohaconfig (أو تحديد النطاق الصريح للتطوير/الاختبار فقط).
env_var_migration.ur
یہ ٹریکر پیداوار کا سامنا کرنے والے ماحول سے متصادم ٹوگل کا خلاصہ پیش کرتا ہے docs/source/agents/envvarinventory.{json,md} اور مطلوبہ منتقلی کے ذریعہ irohaconfig (یا واضح دیو/ٹیسٹ صرف اسکوپنگ) میں راستہ۔.
env_var_migration
This tracker summarizes production-facing environment-variable toggles surfaced by docs/source/agents/envvarinventory.{json,md} and the intended migration path into irohaconfig (or explicit dev/test-only scoping).