moai-adk: Skill for Claude Code

.claude/skills/moai-workflow-ddd/SKILL.md

moai-workflow-ddd is a skill for Claude Code from modu-ai/moai-adk. It costs 44 tokens per session (2,968 once invoked), scanned A, original, Apache-2.0.

A workflow for safely improving existing or legacy code without changing what it does. It uses tests that record current behavior before restructuring the code.

In plain words
What is it for?
Use it to analyze old code, create behavior-safety tests, and make small refactoring changes while repeatedly checking that the original behavior remains.
Why use it?
It reduces the risk of breaking undocumented behavior while cleaning up code with few tests or heavy technical debt.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

This is modu-ai/moai-adk's own configuration. It tells Claude Code how to work on moai-adk itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything moai-adk configures →

About the project

MoAI-ADK is a Go-based harness that organizes and verifies Claude Code work across planning, implementation, synchronization, and review stages. Developers use it to structure agentic coding tasks, apply quality gates, and route work across language models, while the catalogue entries extend its workflow with skills, hooks, commands, MCP servers, instructions, and settings.

modu-ai/moai-adk · 1,204 stars · on GitHub · adk.mo.ai.kr

Reuse

Borrowing it

Nothing to install: this file belongs to modu-ai/moai-adk. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/modu-ai/moai-adk/main/.claude/skills/moai-workflow-ddd/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/modu-ai/moai-adk

Made for: Claude Code.

Wrote 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.

agentmods badge for moai-workflow-ddd

README.md
[![agentmods](https://agentmods.dev/badge/skills/modu-ai/moai-adk/moai-workflow-ddd/github.svg)](https://agentmods.dev/skills/modu-ai/moai-adk/moai-workflow-ddd)
Your own site
<a href="https://agentmods.dev/skills/modu-ai/moai-adk/moai-workflow-ddd"><img src="https://agentmods.dev/badge/skills/modu-ai/moai-adk/moai-workflow-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.

agentmods 80×15 button for moai-workflow-ddd

Your own site · 80×15
<a href="https://agentmods.dev/skills/modu-ai/moai-adk/moai-workflow-ddd"><img src="https://agentmods.dev/badge/skills/modu-ai/moai-adk/moai-workflow-ddd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,968 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Anti-Refusal · line 403
    Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
    Fix: Remove instructions that suppress warnings, disclaimers, or ethical commentary. Let the agent surface safety-relevant caveats to the user.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.02968
Opus 5 $0.00022 $0.01484
Sonnet 5 $0.00009 $0.00594
Haiku 4.5 $0.00004 $0.00297

Measured 10d ago against content hash 321e1ab6d873, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

moai-workflow-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 10d 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.

.claude/skills/moai-workflow-ddd/SKILL.md · 433 lines

How it starts

The opening of the file, as written. The whole thing — 433 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Domain-Driven Development (DDD) Workflow

Development Mode Configuration (CRITICAL)

[NOTE] This workflow is selected based on .moai/config/sections/quality.yaml:

constitution:
  development_mode: ddd    # or tdd

When to use this workflow:

  • development_mode: ddd → Use DDD (this workflow)
  • development_mode: tdd → Use TDD instead (moai-workflow-tdd)

Key distinction:

  • DDD: Characterization-test-first for existing codebases with minimal test coverage
  • TDD (default): Test-first development for all work, including brownfield projects with pre-RED analysis

Quick Reference

Domain-Driven Development provides a systematic approach for refactoring existing codebases where behavior preservation is paramount. Unlike TDD which creates new functionality, DDD improves structure without changing behavior.

Core Cycle - ANALYZE-PRESERVE-IMPROVE:

  • ANALYZE: Domain boundary identification, coupling metrics, AST structural analysis
  • PRESERVE: Characterization tests, behavior snapshots, test safety net verification
  • IMPROVE: Incremental structural changes with continuous behavior validation

When to Use DDD:

  • Refactoring legacy code with existing tests
  • Improving code structure without functional changes
  • Technical debt reduction in production systems
  • API migration and deprecation handling
  • Code modernization projects
  • Greenfield projects (with adapted cycle - see below)

When NOT to Use DDD:

  • When behavior changes are required (modify SPEC first)
  • When the code already exists and the goal is behavior change rather than behavior-preserving refactoring (DDD preserves behavior; for new behavior, modify the SPEC first, or use TDD)

Greenfield Project Adaptation:

For new projects without existing code, DDD adapts its cycle:

  • ANALYZE: Requirements analysis instead of code analysis
  • PRESERVE: Define intended behavior through specification tests (test-first)
  • IMPROVE: Implement code to satisfy the defined tests

This makes DDD a superset of TDD - it includes TDD's test-first approach while also supporting refactoring scenarios.

Read the full file on GitHub · 433 lines

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.

  1. 10d ago First seen · 433 lines · 44 tokens per session scan A 321e1ab6d873

Subscribe to this mod's changes

moai-workflow-ddd is a skill published in the GitHub repository modu-ai/moai-adk (1,204 stars, last pushed today), licensed Apache-2.0. It adds 44 tokens to every session and 2,968 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-08-30.

Related

Other skills, from other repositories