Agent skill

Ddd Refiner

by techygarg in techygarg/lattice

Facilitate a structured conversation to define DDD guardrails for domain design within a repository.

MITAuto-check passedDevelopment

Install Ddd Refiner

skills CLI
$ npx skills add techygarg/lattice --skill ddd-refiner -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install techygarg/lattice ddd-refiner --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/techygarg/lattice.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/ddd-refiner .claude/skills/ddd-refiner && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ddd-refiner
GitHub stars
198
Token cost
~3k tokens
SKILL.md length
1,572 words
Files
2 (incl. assets)
Skills in repo
33
Repo updated
First seen
Licence
MIT

At a glance

Facilitate a structured conversation to define DDD guardrails for domain design within a repository.

  • Works in 3 steps: Read .lattice/config.yaml -- does… → If yes, read that file. Ask the user → If no config or no existing document,…
  • Setting up domain design principles
  • SKILL.md covers What This Produces, Scope Clarification, Before You Begin and Choosing the Mode, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Ddd Refiner is an agent skill from techygarg/lattice. Facilitate a structured conversation to define DDD guardrails for domain design within a repository. Produces a formal ddd-principles.md document that the domain-driven-design atom will use as its override. Use when setting up domain design principles, defining aggregate rules, or when the user says 'setup DDD', 'define domain rules', 'DDD principles', or 'help me define my domain patterns'.

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including assets (for example `assets/template.md`).

It sits in Development, covering Domain-driven design. The repository describes itself as: Install engineering discipline into any AI coding assistant. Composable skills for design, implementation, review, and team standards. Better process, not just better prompts. The licence is MIT.

When your agent uses it

  • Setting up domain design principles
  • Defining aggregate rules
  • The user says setup DDD
  • Define domain rules

Example prompts

  • “setup DDD”
  • “define domain rules”
  • “DDD principles”
  • “/ddd-refiner”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Read .lattice/config.yaml -- does paths.ddd_principles point to a file?
  2. If yes, read that file. Ask the user
  3. If no config or no existing document, proceed with the full interview flow.

What it can do on your machine

Read from SKILL.md and the folder at commit 4d6c35f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ddd Refiner loads about 3k tokens when it runs. Until then it costs about 102 tokens; SKILL.md has 1,572 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~102
When it runs · the whole SKILL.md, loaded when a task matches
~3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from techygarg/lattice at commit 4d6c35f, republished under its MIT licence (© techygarg). 1,572 words, ~2,958 tokens.

Download SKILL.mdSave it as .claude/skills/ddd-refiner/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
ddd-refiner
description
Facilitate a structured conversation to define DDD guardrails for domain design within a repository. Produces a formal ddd-principles.md document that the domain-driven-design atom will use as its override. Use when setting up domain design principles, defining aggregate rules, or when the user says 'setup DDD', 'define domain rules', 'DDD principles', or 'help me define my domain patterns'.

DDD Refiner

What This Produces

  • Output: .lattice/standards/ddd-principles.md (or custom path from .lattice/config.yaml → paths.ddd_principles)
  • Two modes:
    • Overlay (mode: overlay): A slim document containing only sections that differ from the defaults. The domain-driven-design atom reads its embedded defaults first, then applies this document's sections on top. This is the expected common case.
    • Override (mode: override): A comprehensive standalone document that fully replaces the atom's embedded defaults. For teams with fundamentally different domain modeling principles.
  • Default mode: Overlay -- produces only what the user wants to change
  • Config key: paths.ddd_principles in .lattice/config.yaml
  • Template: Read ./assets/template.md for the full document structure, default content, and interview guidance comments

Scope Clarification

This skill defines the rules of domain crafting, not the domain model itself. The domain model evolves through features; this document defines the guardrails. It covers DDD tactical patterns only -- not strategic DDD (no context mapping, no microservice topology, no bounded context integration).

Before You Begin

Check for existing documents

Before starting the interview, check whether a custom document already exists:

  1. Read .lattice/config.yaml -- does paths.ddd_principles point to a file?
  2. If yes, read that file. Ask the user:
    • "You already have a custom DDD principles document. Would you like to revise it (update specific sections), start fresh (new interview), or add to it (add new sections)?"
    • Revise: Load the existing document, walk through only the sections the user wants to change, and update in place.
    • Start fresh: Proceed with the full interview flow below.
    • Add to it: Skip to the "New Sections" part of the interview.
  3. If no config or no existing document, proceed with the full interview flow.
Scan the repository

Look for signals that inform the conversation:

  • Domain folder: Does a domain/ (or core/, model/) folder exist? What's inside it?
  • Existing aggregates: Are there entities, value objects, aggregate roots? How are they structured?
  • Anemic patterns: Are entities data holders or do they have behavior?
  • Identity patterns: Typed IDs, raw UUIDs, database-generated IDs?
  • Event patterns: Are domain events used? What naming convention?
  • Architecture docs: Any existing DDD documentation, ADRs, domain glossaries?

Share relevant findings with the user at the start: "I noticed your project already has [X patterns]. I'll use that as context."

If the project is new with no code, proceed with pure defaults as the starting point.

Choosing the Mode

The first decision in the conversation. Present the three options:

"How would you like to define your DDD principles?

  1. Customize specific sections (overlay) -- Keep the defaults and change only what differs for your project. This produces a slim document. Most teams choose this.
  2. Define everything from scratch (override) -- Walk through all sections and produce a comprehensive standalone document.
  3. Add project-specific sections only (overlay with additions) -- Keep all defaults as-is and add new sections for your team's specific rules (e.g., ubiquitous language glossary, bounded context boundaries).

The defaults cover standard DDD tactical patterns well. Option 1 is recommended unless your domain modeling approach is fundamentally different."

Map the choice:

  • Options 1 and 3 → mode: overlay
  • Option 2 → mode: override

Facilitation Approach

Conversation style
  • One section at a time. Do not dump all questions at once. Walk through the template sequentially.
  • Defaults-first. For each section, briefly summarize the default, then ask if it matches. Do not read the entire default verbatim -- summarize the key points and ask.
  • Record decisions, not discussion. The output document reads as a specification, not meeting notes. "We discussed X and decided Y" is wrong. "Y" is right.
  • Probe, don't interrogate. Use the probing questions in the template guidance comments as follow-ups when the user's answer is ambiguous, not as a checklist.
For overlay mode

This should be fast. Many sections will be "keep as-is."

  1. Present each section's default briefly (a 2-3 sentence summary, not full content).
  2. Ask: "Does this match your project, or would you like to change it?"
  3. If the user says it matches → skip it (section will NOT appear in the output).
  4. If the user wants changes → dive into that section, discuss the specifics, record the changes.
  5. At the end, ask: "Any sections you'd like to add that aren't in the defaults?" (e.g., ubiquitous language glossary, bounded context scope).
  6. Only sections the user changed or added appear in the output document.
For override mode

This is thorough. Every section gets attention and appears in the output.

  1. Walk through every section in full detail.
  2. User confirms, modifies, or replaces each section.
  3. All sections appear in the output -- defaults for unchanged ones, user's version for changed ones.
Common scenarios
  • "I agree with everything" → No custom document needed. Tell the user: "The embedded defaults are already active and match your preferences. No custom document is needed -- the domain-driven-design atom will use the defaults automatically."
  • "I agree except one section" → Overlay mode, interview that one section only.
  • "We have anemic entities and want to fix that" → Overlay §2 (entity patterns, anemic anti-pattern is inline) + §9 (entity checks).
  • "We don't use domain events yet" → Overlay §5 (domain events) with simplified approach or removal note. Also check §1 (cross-aggregate coordination, anti-pattern is inline).
  • "Our aggregates are too big" → Overlay §1 (aggregate design, god aggregate anti-pattern is inline) + §8 (decomposition guide).
  • "We want to add a ubiquitous language glossary" → Overlay with new §10 only.

Section-by-Section Interview Guide

Read ./assets/template.md and follow the <!-- INTERVIEW GUIDANCE: --> comments for each section. Those comments contain the specific questions to ask, probing questions, and what is customizable vs fixed.

Show full SKILL.md (681 more words)Show less
Cross-section dependency table

Decisions in early sections affect later sections. When a user changes an early section, flag the dependent sections:

Decision inAffectsHow
§1 — Aggregate boundaries§6 (repositories), §5 (events), §8 (decomposition)One repo per aggregate root; events for cross-aggregate coordination
§1 — Sizing thresholds§8 (decomposition triggers)Custom thresholds change decomposition warning signals
§2 — Entity identity strategy§3 (typed ID value objects), §6 (repository signatures)Typed IDs must be value objects; repository findById uses typed IDs
§3 — Value object catalog§2 (entity fields)New value objects appear in entity definitions
§5 — Event patterns§1 (cross-aggregate coordination)Events are the mechanism for cross-aggregate consistency
§6 — Repository patterns§1 (aggregate root identification)Only roots get repositories

When a dependency is triggered, inform the user: "Since you changed [X], we should also review [Y] -- it's affected by that decision."

Overlay-specific section flow

For each of the 9 sections:

  1. Summarize the section's key points in 2-3 sentences.
  2. Ask: "Does this match your project?"
  3. Yes → Move to the next section. This section will not appear in the output.
  4. No → Dive into the section details using the template guidance. Produce the user's version.
  5. After all 9 sections, ask about new sections.
Override-specific section flow

For each of the 9 sections:

  1. Present the section's full content.
  2. Ask: "Does this work as-is, or would you like to modify it?"
  3. As-is → Include the default content in the output unchanged.
  4. Modify → Discuss changes, produce the modified version.
  5. After all 9 sections, ask about new sections.
  6. All sections go in the output.

Output Assembly

For overlay mode
  1. YAML frontmatter: mode: overlay
  2. Overlay preamble text (from template)
  3. Table of contents listing only the included sections
  4. Only the sections the user changed or added
  5. Each section must be self-contained -- it is a complete replacement of that section in defaults. Do not write diffs or partial sections.
  6. Section headings must match defaults.md exactly (the atom matches sections by heading)
  7. New sections (§10+) are included after the default sections
  8. Footer with project name, date, mode
For override mode
  1. YAML frontmatter: mode: override
  2. Override preamble text (from template)
  3. Full table of contents (all 10+ sections)
  4. All sections: defaults for unchanged, user's version for changed, new sections at the end
  5. Footer with project name, date, mode
For both modes

Strip all <!-- INTERVIEW GUIDANCE: --> comments from the output. The final document is a clean specification.

Determine output path:

  1. If .lattice/config.yaml exists and has paths.ddd_principles, use that path.
  2. Otherwise, default to .lattice/standards/ddd-principles.md.

Write the document:

  1. Create .lattice/standards/ directory (and .lattice/ parent) if it does not exist.
  2. Write the document to the determined path.

Update config:

  1. If .lattice/config.yaml does not exist, create it with:
    yaml
    paths:
      ddd_principles: .lattice/standards/ddd-principles.md
  2. If .lattice/config.yaml exists but has no paths.ddd_principles, add the key. Preserve all existing content.
  3. If .lattice/config.yaml exists and already has the key, no config change needed.

Confirm to user: "Your DDD principles document has been written to [PATH] in [overlay|override] mode. The domain-driven-design atom will now use it [on top of the defaults | instead of the defaults]."

Document Quality Checks

Before writing the final document, verify:

Overlay mode checks
  • Each included section is self-contained and complete (not a diff or partial section)
  • Section headings match defaults.md exactly (for section matching by the atom)
  • No <!-- INTERVIEW GUIDANCE: --> comments remain
  • Frontmatter has mode: overlay
  • Only changed/added sections are included -- unchanged sections are omitted
Override mode checks
  • Every section from the template is present (§1 through §9, plus any new sections)
  • Terminology is consistent throughout all sections
  • Code examples use pseudocode (language-agnostic, same style as defaults.md)
  • Validation checklist (§9) is consistent with the rules defined in §1 through §7
  • Inline anti-pattern warnings align with the patterns defined in their respective sections
  • No <!-- INTERVIEW GUIDANCE: --> comments remain
  • Frontmatter has mode: override
  • Document is readable as a standalone specification
Both modes
  • Frontmatter is valid YAML with correct mode value
  • Document is well-formatted markdown
  • Config file (.lattice/config.yaml) is correctly updated
  • Output path exists and is writable

© techygarg, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (assets) in skills/ddd-refiner of techygarg/lattice.

  • SKILL.md
  • assets/template.md

Open the folder on GitHubat commit 4d6c35f

Compare with similar skills

Ddd Refiner next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ddd Refiner compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ddd Refiner this skilltechygarg/lattice198—~3kAutomated safety check: PassMIT
Domain Modelingfossasia/eventyay-interpretation1.6k31 repos~821Automated safety check: PassApache-2.0
Architecture Governancezai-org/ZCode7.5k—~1.2kAutomated safety check: PassApache-2.0
Evolutionary Modular Architecturetech-leads-club/agent-skills7k—~3.7kAutomated safety check: PassCC-BY-4.0
Domain Modelingbrim-borium/spotify_sdk1665 repos~806Automated safety check: PassApache-2.0
Domain Modeling and Glossarywindmill-labs/windmill18k—~622Automated safety check: PassCustom licence

Similar skills

  • Domain Modeling

    fossasia/eventyay-interpretation

    Build and sharpen a project's domain model. An agent skill from fossasia/eventyay-interpretation.

    1.6k GitHub starsUsed in 31 repos~821 tokens
    DevelopmentAuto-check passed
  • Apply the repository's architecture policy to code changes by generating a bounded context package, checking module and layer boundaries, and reporting baseline-aware violations.

    7.5k GitHub stars~1.2k tokensUpdated 9 days ago
    DevelopmentAuto-check passed
  • Evolutionary Modular Architecture

    tech-leads-club/agent-skills

    Guides design of modular-monolith platforms with DDD, flat-by-aggregate modules, anti-corruption layers, outbox events and resilience, plus an architecture document with SVG diagrams.

    7k GitHub stars~3.7k tokensUpdated 18 days ago
    DevelopmentAuto-check passed
  • Domain Modeling

    brim-borium/spotify_sdk

    Build and sharpen a project's domain model. An agent skill from brim-borium/spotify_sdk.

    166 GitHub starsUsed in 5 repos~806 tokens
    DevelopmentAuto-check passed
  • Domain Modeling and Glossary

    windmill-labs/windmill

    Actively challenges vague or conflicting terminology as you design, and keeps a living domain glossary file up to date in real time.

    18k GitHub stars~622 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Ddd

    swamp-club/swamp

    Domain Driven Design guidance for TypeScript/Deno codebases.

    644 GitHub stars~1.4k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from techygarg/lattice

All 33 skills in this repo
  • Architecture Compass

    techygarg/lattice

    Architectural thinking partner for an existing repository — scans the codebase, conducts a structured interview, agrees on current architectural state and recommended direction, and produces a…

    198 GitHub stars~4.4k tokensUpdated 3 days ago
    Auto-check passed
  • Lattice Init

    techygarg/lattice

    Guided setup and upgrade-check experience for Lattice projects -- scans the repository, detects existing configuration and outdated conventions, suggests refiners and available upgrades in priority…

    198 GitHub stars~3.3k tokensUpdated 3 days ago
    Auto-check passed
  • Skill Align

    techygarg/lattice

    Audit and fix all Lattice documentation, README, docs/, PROJECT.md, GitHub issue templates, and CLAUDE.md to ensure they are fully aligned with the current skill inventory.

    198 GitHub stars~2k tokensUpdated 3 days ago
    Auto-check passed
  • Skill Validate

    techygarg/lattice

    Validate any Lattice SKILL.md against all tier conventions — atoms, molecules, and refiners.

    198 GitHub stars~1.5k tokensUpdated 3 days ago
    Auto-check passed
  • Architecture Refiner

    techygarg/lattice

    Facilitate a structured conversation to define architecture principles for a repository.

    198 GitHub stars~3.7k tokensUpdated 3 days ago
    Auto-check passed
  • Clean Code Refiner

    techygarg/lattice

    Facilitate a structured conversation to define clean code principles for a repository.

    198 GitHub stars~3k tokensUpdated 3 days ago
    Auto-check passed

Categories

Questions about Ddd Refiner

What does Ddd Refiner do?

Facilitate a structured conversation to define DDD guardrails for domain design within a repository. Ddd Refiner is an agent skill from techygarg/lattice. Facilitate a structured conversation to define DDD guardrails for domain design within a repository.

When should I use Ddd Refiner?

Ddd Refiner fits situations like: setting up domain design principles; defining aggregate rules; the user says setup DDD; define domain rules.

How do I install Ddd Refiner in Claude Code?

Run `npx skills add techygarg/lattice --skill ddd-refiner -a claude-code`. Or copy the skill folder (skills/ddd-refiner in techygarg/lattice) into .claude/skills/ddd-refiner in your project. Claude Code loads it when a task matches its description.

How do I install Ddd Refiner in Codex?

Run `npx skills add techygarg/lattice --skill ddd-refiner -a codex`. Or copy the skill folder (skills/ddd-refiner in techygarg/lattice) into .agents/skills/ddd-refiner in your project. Codex loads it when a task matches its description.

Can I use Ddd Refiner in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add techygarg/lattice --skill ddd-refiner -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ddd-refiner, .gemini/skills/ddd-refiner, .github/skills/ddd-refiner and .opencode/skills/ddd-refiner in your project.

What does Ddd Refiner need to run?

SKILL.md names no scripts, command-line tools or credentials: Ddd Refiner is instructions for the agent only.

Does Ddd Refiner access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Ddd Refiner safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Ddd Refiner use?

Ddd Refiner is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ddd Refiner use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ddd Refiner?

Skills that share tags, products or a category with Ddd Refiner: Domain Modeling (fossasia/eventyay-interpretation, 1.6k stars), Architecture Governance (zai-org/ZCode, 7.5k stars), Evolutionary Modular Architecture (tech-leads-club/agent-skills, 7k stars) and Domain Modeling (brim-borium/spotify_sdk, 166 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ddd Refiner?

techygarg (a GitHub user) maintains it in techygarg/lattice, which has 198 GitHub stars. The repository holds 33 skills in this directory. The repository was last updated on October 6, 2026.

Source: techygarg/lattice on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.