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 skills add nWave-ai/nWave --skill nw-refactorgit clone --depth 1 https://github.com/nWave-ai/nWaveWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/nwave-ai/nwave/nw-refactor)<a href="https://agentmods.dev/skills/nwave-ai/nwave/nw-refactor"><img src="https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-refactor/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/nwave-ai/nwave/nw-refactor"><img src="https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What 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.1 | $0.00034 | $0.00675 |
| Opus 5.5 | $0.00014 | $0.00270 |
| Sonnet 5.5 | $0.00007 | $0.00135 |
| Haiku 4.5 | $0.00003 | $0.00068 |
Grade A, and why
nw-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 17d 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 — 34 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Post-green refactor
Preconditions
- Start only when the required check is green on the current commit. Refactor only the code your slice changed; never the oracle, its supports or feature records.
- Declared paradigm picks the smell catalogue: functional, object-oriented; procedural uses long function, duplication, unclear names, mixed decision and effect.
Procedure
- Work smallest level first: L1 readability (rename, constants, dead code), L2 complexity (extract, simplify conditionals), L3 responsibilities, L4 abstractions, L5 patterns, L6 SOLID. Start a level only when lower levels are clean in the changed code.
- Inside a managed delivery slice, the default is one behaviour-preserving move per commit, and the same check you ran on the parent is green on each commit. A standalone
/nw-refactorrequest follows the command's own batch-then-verify execution model (plan L1-L6, apply as one batch, run the suite once; nWave/tasks/nw/refactor.md). - Edit no test and no expected value; declared laws and expected values stay unchanged. A test that must change means the move altered behaviour: revert the move. A test that encodes an implementation detail: report it to its owner, do not edit it.
- If red after a move, fix or revert the production code only.
- Multi-class moves: list the dependency steps, do the leaf first, commit each green.
- A structural move made before new behaviour leaves oracle content untouched. Probe once: re-inject a break at the moved code, confirm a test fails, then restore.
Per changed unit apply, then record what was applied or why none was needed
- Object-oriented domain and application classes (not adapters, DTOs, read models, config): apply the Object Calisthenics rules by their rule numbers in nw-code-design-oo, strictly; a deliberate break is recorded with its smell, benefit and cost. Functional and procedural code skip this rule and use the paradigm smell classes.
- Apply the nw-code-design-oo rules on data-owner decisions and on sequence-only grouping to each changed unit.
- Each agreed literal (limit, label, name) lives in one place that every use reads.
- Judge in order: tests demonstrate behaviour; no semantic duplication; clarity; fewest elements. Remove a type only if the first three still hold; keep an element whose removal raises the whole-path burden.
- Do not add a framework or abstraction for a single caller.
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.
- 17d ago Changed · -70 lines · -4 tokens per session 568c57927d5f
- 24d ago Changed · +3 lines e61c4f2f4f8b
- 27d ago Changed · -3 lines de8bfa51f190
- 2mo ago First seen · 104 lines · 38 tokens per session scan A d3ae7401c1fc
nw-refactor is a skill published in the GitHub repository nWave-ai/nWave (636 stars, last pushed 11d ago), licensed MIT. It adds 34 tokens to every session and 675 once invoked, about $0.0001 per session on Opus 5.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-09-03.
nw-refactor compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| nw-refactornWave-ai/nWave | Skill | 636 | 11d ago | MIT | A | 34 | Claude Code |
| java-testing-junit-mockitomakifbaysal/tasktrooper | Skill | 123 | today | Apache-2.0 | A | 46 | Claude Code, Codex |
| test-writingandreaswasita/copilot-agents-dojo | Skill | 56 | 2mo ago | MIT | A | 11 | Claude Code, Codex |
| principle-test-behavior-not-implementationmichael-denyer/pstack-claude | Skill | 5.0k | today | MIT | A | 50 | Claude Code, Codex |
| temporal-python-testingwshobson/agents | Skill | 43k | 6d ago | MIT | A | 45 | Claude Code |
| test-automationa5c-ai/babysitter | Skill | 1.9k | 29d ago | MIT | A | 0 | Claude Code, Codex |
| JUnit 5 TestingPramodDutta/qaskills | Skill | 252 | 27d ago | MIT | A | 36 | Claude Code, Codex |