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 | $0.00023 | $0.00963 |
| Sonnet 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 8d 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.
- 8d 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 (610 stars, last pushed 5d ago), licensed MIT. It adds 45 tokens to every session and 1,927 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
backend-development
Backend API design, database architecture, microservices patterns, and test-driven development. Use for designing APIs, database schemas, or backend system architecture.
cqrs-implementation
Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.
microservices-patterns
Design microservices architectures with service boundaries, event-driven communication, and resilience patterns. Use when building distributed systems, decomposing monoliths, or implementing microservices.
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.
earth2studio-create-datasource
Create and validate Earth2Studio data source wrappers (DataSource, ForecastSource, DataFrameSource, ForecastFrameSource) from remote stores. Do NOT use for fetching data with existing sources, model inference, or installation tasks.
ring:instrumenting-streaming-events
Instrumenting streaming events: wires lib-streaming event emission end-to-end into a Lerian Go service via a 13-gate cycle (catalog, Builder bootstrap, Emit sites, outbox, HTTP manifest, NoopEmitter fallback, integration and chaos tests), dispatching ring:backend-go under TDD. Consumes the validated…