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.00038 | $0.01185 |
| Opus 5 | $0.00019 | $0.00593 |
| Sonnet 5 | $0.00008 | $0.00237 |
| Haiku 4.5 | $0.00004 | $0.00119 |
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 7d 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 — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.
NW-REFACTOR: Systematic Code Refactoring
Wave: CROSS_WAVE
Agent: Crafty (nw-software-crafter)
Command: *refactor
Overview
Applies the Refactoring Priority Premise (RPP) — 6-level hierarchy L1 Readability|L2 Complexity|L3 Responsibilities|L4 Abstractions|L5 Design Patterns|L6 SOLID++. For complex multi-class refactorings, agent applies Mikado Method internally.
Execution Model — Batch-Then-Verify (default, unconditional)
/nw-refactor runs batch-then-verify by default, regardless of test-suite speed:
- Cascade governs PLANNING ORDER only — analyze and plan lower levels before higher (L2 transformations build on L1, L3 on L2, etc.). The cascade is a planning discipline, not a test-gating sequence.
- Edits applied as one coherent batch — apply all planned L1-L6 transformations in a single editing session. NO interleaved test runs between levels.
- Run the test suite exactly ONCE, at the very end, after all L1-L6 edits.
- If RED after the batch: diagnose the breakage and fix the production code. Do NOT modify tests to make them pass. A test that must change to pass means either (a) the refactor altered observable behavior — revert that transformation — or (b) the test encoded an implementation detail rather than behavior — flag this to the user explicitly before touching it. Tests changing during a refactor is a signal, not a step.
Legacy incremental variant (opt-in only): the nw-progressive-refactoring skill documents the incremental L1→test→L2→test cycle. It is NOT the default — use it only when explicitly requested. Anchor: feedback_refactor_batch_when_test_suite_slow_2026_05_19 (the prior "only batch when suite slow" conditional is removed — batch is now unconditional).
Context Files Required
- src/* - Production codebase
- tests/* - Test codebase
Agent Invocation
@nw-software-crafter
Execute *refactor for {target-class-or-module}.
Context Files:
- src/*
- tests/*
Configuration:
- level: 3 # Shorthand: --from=1 --to=3 (RPP range)
- from: 1 # Start RPP level (default: 1)
- to: 3 # End RPP level (default: same as level)
- scope: module # file/module/project
- method: extract # extract/inline/rename/move
- mikado_planning: false # Use Mikado Method for complex refactorings
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.
- 7d 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 (610 stars, last pushed 4d ago), licensed MIT. It adds 38 tokens to every session and 1,185 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-09-03.
Other skills, from other repositories
principle-test-behavior-not-implementation
Apply when you write, change, or keep a test. Call the code the way its users do and assert the result they observe against a literal expected value. If the test would still pass when every imported function returns undefined, rewrite the assertion or delete the test.
test-writing
Writes meaningful tests that actually catch bugs.
temporal-python-testing
Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.
workflow-patterns
Use this skill when implementing tasks according to Conductor's TDD workflow, handling phase checkpoints, managing git commits for tasks, or understanding the verification protocol.
nemo-automodel-recipe-development
Create and modify NeMo AutoModel training and evaluation recipes, including YAML structure, builders, and execution flow.
mcore-testing
Test system for Megatron-LM. Covers test layout, recipe YAML structure, adding and running unit and functional tests, golden values, marker filters, and CI parity.