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-legacy-refactoring-dddgit 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-legacy-refactoring-ddd)<a href="https://agentmods.dev/skills/nwave-ai/nwave/nw-legacy-refactoring-ddd"><img src="https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-legacy-refactoring-ddd/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-legacy-refactoring-ddd"><img src="https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-legacy-refactoring-ddd.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.00045 | $0.01927 |
| Opus 5.5 | $0.00018 | $0.00771 |
| Sonnet 5.5 | $0.00009 | $0.00385 |
| Haiku 4.5 | $0.00005 | $0.00193 |
Grade A, and why
nw-legacy-refactoring-ddd 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 2mo 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 — 188 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Legacy Refactoring with DDD
Refactoring legacy systems using Domain-Driven Design as the strategic compass. DDD tells you WHERE and WHY to refactor; traditional techniques (progressive-refactoring, mikado-method) tell you HOW.
Principle: "Start simple, grow big" -- incremental steps tested at each stage.
Decision Framework: Before Refactoring
Ask three questions before any DDD refactoring:
- Business value: what business outcome does refactoring this area enable?
- Risk: what breaks if we refactor vs. if we do not?
- Cost: time, effort, disruption -- is it justified?
When NOT to Refactor
- System scheduled for replacement
- Stable system with no new development
- Cost exceeds benefit
- Team lacks DDD experience with no learning budget
- Domain is genuinely simple (CRUD-dominated)
Cynefin-Refactoring Mapping
| Cynefin Domain | Refactoring Approach |
|---|---|
| Clear | Apply established patterns directly; standard refactoring catalogs |
| Complicated | Analyze with experts, then apply patterns; multiple valid solutions |
| Complex | Probe with safe-to-fail experiments; EventStorming to discover patterns |
| Chaotic | Act first to stabilize, then refactor; emergency patches acceptable |
| Confusion | Gather information before deciding; avoid premature refactoring |
Migration Methodology (4 Phases)
Phase 1: Understand and Stabilize
- Run EventStorming to map current system (Big Picture)
- Assess complexity using Cynefin framework
- Write characterization tests for critical paths (Feathers technique)
- Identify bounded contexts in existing codebase via language divergence
Phase 2: Modularize the Monolith
- Introduce module structure aligned with bounded contexts
- Use mediator pattern for initial decoupling between modules
- Apply fitness functions to measure progress (coupling, cohesion, dependency direction)
- Refactor database schemas toward context alignment
Phase 3: Introduce Events and CQRS
- Replace mediator with event-driven communication
- Implement CQRS for contexts benefiting from read/write separation
- Split databases per bounded context using expand/contract pattern
- Use event-based data synchronization for cross-context data needs
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.
- 2mo ago First seen · 188 lines · 45 tokens per session scan A 67c0b290c43d
nw-legacy-refactoring-ddd is a skill published in the GitHub repository nWave-ai/nWave (636 stars, last pushed 11d ago), licensed MIT. It adds 45 tokens to every session and 1,927 once invoked, about $0.0002 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-legacy-refactoring-ddd compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| nw-legacy-refactoring-dddnWave-ai/nWave | Skill | 636 | 11d ago | MIT | A | 45 | Claude Code |
| backend-developmentsaajunaid/caddis-plugin | Skill | 0 | 3d ago | MIT | A | 22 | Claude Code, Codex |
| cqrs-implementationwshobson/agents | Skill | 43k | 6d ago | MIT | A | 35 | Claude Code |
| workflow-patternswshobson/agents | Skill | 43k | 6d ago | MIT | A | 35 | Claude Code |
| earth2studio-create-datasourceNVIDIA/skills | Skill | 4.2k | 2d ago | Apache-2.0 | A | 53 | Claude Code |
| fiber-rest-apimakifbaysal/tasktrooper | Skill | 123 | today | Apache-2.0 | A | 47 | Claude Code, Codex |
| outsystems-spec-driven-buildOutSystems/outsystems-mcp | Skill | 47 | 2d ago | MIT | A | 228 | Claude Code, Codex |