
DDD Context Manager
FreeEffortlessly scaffold DDD bounded contexts.
Free · Opens the source repo
What DDD Context Manager does
The DDD Context Manager is a tool designed for developers working with Domain-Driven Design (DDD) principles. It provides a streamlined way to create and manage bounded contexts, which are essential for organizing complex applications into manageable subdomains. By using this skill, you can quickly set up a standard directory structure that adheres to DDD best practices, ensuring consistency and clarity in your codebase.
When you invoke the DDD Context Manager, it validates the provided context name to ensure it follows kebab-case conventions and does not conflict with existing contexts. Upon validation, it generates a comprehensive directory structure that includes folders for domain entities, value objects, events, services, and repositories, as well as application and infrastructure layers. This structure not only organizes your code but also facilitates a clear separation of concerns, making it easier to develop and maintain your application.
Additionally, the skill automatically generates index files for each of the created directories. These index files serve as barrel exports, allowing for easier imports and better modularization of your code. This feature is particularly useful when working in teams or on large projects, as it promotes a consistent approach to managing imports across different modules. The DDD Context Manager also stores the created context in a domain model graph, ensuring that your project’s structure is well-documented and easily navigable.
This skill is ideal for developers who are starting new projects based on DDD principles, splitting existing monolithic applications into bounded contexts, or simply looking to scaffold a new module with a clear and organized structure. By leveraging this tool, you can focus on building your domain logic without getting bogged down in the initial setup process.
When to use it
Use this tool when starting a new subdomain or when restructuring a monolithic application into bounded contexts.
When not to use it
This skill may not be suitable for projects that do not follow DDD principles or for those requiring a custom directory structure.
What you can build with it
Starting a New Project
When initiating a new application based on DDD principles, use this skill to quickly scaffold the necessary directory structure.
Restructuring a Monolith
If you're splitting a monolithic application into bounded contexts, this tool helps organize the new structure efficiently.
Creating Modules for a Team
For team projects, this skill ensures a consistent directory layout, making collaboration easier and code management more straightforward.
How to install DDD Context Manager
View source1. Install with the skills CLI
npx skills add ruvnet/ruflo/ddd-context --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by ruvnetCreate a bounded context directory structure for the given context name.
Parse $ARGUMENTS as the context name (kebab-case). If empty, list existing contexts.
Steps
-
Validate name: Ensure the context name is kebab-case and does not already exist under
src/. -
Create directory structure:
src/<context-name>/ domain/ entities/ value-objects/ events/ services/ repositories/ application/ infrastructure/ -
Generate index files:
src/<context-name>/domain/entities/index.ts-- barrel export for entitiessrc/<context-name>/domain/value-objects/index.ts-- barrel export for value objectssrc/<context-name>/domain/events/index.ts-- barrel export for domain eventssrc/<context-name>/domain/services/index.ts-- barrel export for domain servicessrc/<context-name>/domain/repositories/index.ts-- barrel export for repository interfacessrc/<context-name>/domain/index.ts-- re-export all domain submodulessrc/<context-name>/application/index.ts-- barrel export for application servicessrc/<context-name>/infrastructure/index.ts-- barrel export for infrastructure implementationssrc/<context-name>/index.ts-- public API of the bounded context (re-exports domain and application only, NOT infrastructure)
-
Store in domain model graph:
mcp__plugin_ruflo-core_ruflo__agentdb_hierarchical-store --parent "domain" --child "context:<context-name>" --relation "contains" mcp__plugin_ruflo-core_ruflo__memory_store --key "ddd-context-<context-name>" --value "Created bounded context" --namespace tasks -
Report: Confirm the context was created and list the generated files.
Frequently asked questions about DDD Context Manager
Similar skills
Rhino 3D Scripting
Streamline your Rhinoceros 3D scripting tasks.
MVVM Toolkit
Streamline ViewModel development with source generators.
FreeCAD Scripts
Generate Python scripts for FreeCAD automation and modeling.
Azure Architecture Builder
Design and deploy Azure infrastructure using natural language.
Command Development
Streamline your command creation for Claude Code.
Create Cowork Plugin
Easily build and package plugins through guided sessions.
