Skip to content
Skillpedia
APIs & servers (backend)81k · #1615

ddd-context

What it does

This skill creates a standard folder structure for a bounded context, which is a separate business area in a codebase. It is for developers who split a large app into clear parts.

When to use it

  • ✓When you start a new business area in a codebase.
  • ✓When you split a big application into separate parts with clear boundaries.
  • ✓When you want the same domain, application and infrastructure layout for a new module.

Skill link

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-ddd/skills/ddd-context/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-ddd/skills/ddd-context/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Set up a new billing area in my codebase with the standard folders.”

5 new skills a week. 1 minute to read.

How it works

The skill checks that the name is kebab-case and not already used, then creates the folders and index files for the domain, application and infrastructure layers. It also records the new area in the domain model store.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Create a bounded context directory structure for the given context name.

Parse $ARGUMENTS as the context name (kebab-case). If empty, list existing contexts.

Steps

  1. Validate name: Ensure the context name is kebab-case and does not already exist under src/.

  2. Create directory structure:

    src/<context-name>/
      domain/
        entities/
        value-objects/
        events/
        services/
        repositories/
      application/
      infrastructure/
    
  3. Generate index files:

    • src/<context-name>/domain/entities/index.ts -- barrel export for entities
    • src/<context-name>/domain/value-objects/index.ts -- barrel export for value objects
    • src/<context-name>/domain/events/index.ts -- barrel export for domain events
    • src/<context-name>/domain/services/index.ts -- barrel export for domain services
    • src/<context-name>/domain/repositories/index.ts -- barrel export for repository interfaces
    • src/<context-name>/domain/index.ts -- re-export all domain submodules
    • src/<context-name>/application/index.ts -- barrel export for application services
    • src/<context-name>/infrastructure/index.ts -- barrel export for infrastructure implementations
    • src/<context-name>/index.ts -- public API of the bounded context (re-exports domain and application only, NOT infrastructure)
  4. Store in domain model graph:

    mcp__plugin_ruflo-core_ruflo__agentdb_hierarchical-store({ key: "domain/context-<context-name>", value: "Bounded context <context-name> (parent: domain)", tier: "semantic" })
    mcp__plugin_ruflo-core_ruflo__agentdb_causal-edge({ sourceId: "entity:domain", targetId: "entity:context-<context-name>", relation: "contains" })
    mcp__plugin_ruflo-core_ruflo__memory_store({ key: "ddd-context-<context-name>", value: "Created bounded context", namespace: "tasks" })
    
  5. Report: Confirm the context was created and list the generated files.

FAQ

What name format should I use?

Use kebab-case, such as billing-invoices, and make sure no folder with that name already exists.

What does the public index expose?

It re-exports only the domain and application layers, not the infrastructure.

What happens if I run it without a name?

It lists the existing contexts instead of creating a new one.

Details

Original description by the author

Create and manage a DDD bounded context with standard directory structure. Use when starting a new subdomain, splitting a monolith into bounded contexts, or scaffolding the domain/application/infrastructure layout for a fresh module.

repo: ruvnet/ruflo

Popularity

GitHub stars
81k
Ranking position
#1615
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills