Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

project-ddd

БесплатноБез исполняемых скриптовНе проверен

Pragmatic Domain-Driven Design for Laravel projects — business-first, not academic. Helps restructure Laravel apps from default flat structure into…

nasrulhazimот nasrulhazim★ 26 звёзд на GitHub

Об этом скилле

Domain-Driven Design — Pragmatic Laravel

Restructure Laravel applications into domain-based organisation. Business objectives first — increase revenue, reduce OPEX, ship faster. Not academic DDD, but practical domain separation that your team can maintain.

Philosophy

"Kita orang meniaga nak increase sales, kurangkan OPEX. Bukan nak berfilasuf pasal kod."

This skill applies DDD where it creates real business value:

  • Clear ownership — each domain maps to a business capability, team knows what they own
  • Independent velocity — domains can evolve without breaking each other
  • Reduced OPEX — less accidental complexity, faster onboarding, fewer cross-cutting bugs
  • Business alignment — code structure mirrors how the business actually works

Command Reference

Command Description
/project-ddd discover Interview to identify bounded contexts from business processes
/project-ddd plan Generate migration plan from flat Laravel to domain structure
/project-ddd scaffold Scaffold a new domain with all layers
/project-ddd migrate Move existing code into domain structure (guided, step-by-step)
/project-ddd wire Create/update domain service providers and autoloading
/project-ddd test Update architecture tests for DDD structure
/project-ddd audit Check existing domain structure for violations


Companion: graphify

graphify builds a persistent, queryable knowledge graph of a codebase — tree-sitter AST parsing for code plus semantic extraction for docs. It answers structural questions far faster than grepping, and it is installed by default with this toolkit.

Use it before a manual sweep whenever the question is structural.

graphify extract .                       # build (or refresh) the graph — once per repo
graphify query "how does authentication work"
graphify path UserController InvoiceRepository   # call chain between two nodes
graphify explain app/Services/BillingService.php

If graphify-out/ already exists in the target repo, treat the question as a graph query first and fall back to file reading only for what the graph cannot answer. If graphify is not installed, carry on with the normal file-reading approach — it is an accelerator, never a prerequisite.

1. /project-ddd discover — Domain Discovery

Purpose

Identify bounded contexts by interviewing the user about their business processes, not their code structure.

Interview Questions

Ask in this order:

  1. What does your business do? (one sentence)
  2. What are the main things your users do? (list activities/workflows)
  3. What are your revenue streams? (what gets you paid)
  4. What teams or roles exist? (who owns what)
  5. What external systems do you integrate with? (payments, email, SMS, APIs)
  6. What are your biggest pain points right now? (what breaks, what's slow)

Output

Produce a Domain Map table:

## Domain Map

| Domain | Business Capability | Key Models | Owner | Priority |
|---|---|---|---|---|
| Identity | User auth, roles, profiles | User, Role, Team | Core | High |
| Billing | Subscriptions, invoicing | Plan, Subscription, Invoice | Revenue | High |
| Catalogue | Products, pricing, inventory | Product, Category, Price | Revenue | Medium |
| Fulfilment | Orders, shipping, tracking | Order, Shipment, Tracking | Ops | Medium |
| Notification | Alerts, emails, SMS | Channel, Template, Delivery | Support | Low |
| Shared | Base models, common traits | Base, Activity, Setting | Core | — |

Rules:

  • Always include a Shared domain for cross-cutting concerns
  • Priority is based on business impact, not code complexity
  • Each domain should map to a real business capability, not a technical concept
  • If a "domain" is just a CRUD wrapper, it probably belongs inside another domain

2. /project-ddd plan — Migration Plan

Purpose

Generate a step-by-step migration plan to move from flat Laravel to domain structure.

Step 1: Analyse Current Structure

Read the project's current app/ directory and categorise:

  • Models and their relationships
  • Controllers and which models they touch
  • Jobs, Events, Listeners and their domain affinity
  • Services, Actions and their responsibilities

Step 2: Generate Migration Plan

Produce a numbered task list grouped by domain:

## Migration Plan

### Phase 1: Foundation
- [ ] Task 1: Scaffold src/ directories and configure autoloading
- [ ] Task 2: Move Shared domain models (Base, Activity, Setting)

### Phase 2: Core Domains
- [ ] Task 3: Move [Domain] domain layer (Models, Events, Contracts)
- [ ] Task 4: Move [Domain] application layer (Jobs, Services, Actions)
- [ ] Task 5: Move [Domain] infrastructure layer (Registrars, Exports)

### Phase 3: Supporting Domains
- [ ] Task 6: Move [Domain] domain (Models, Jobs, webhook handlers)
- [ ] Task 7: Move remaining shared infrastructure

### Phase
Полный SKILL.md на GitHub

Установить project-ddd в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/arch-tests.mdreferences/domain-structure.mdreferences/migration-checklist.md

FAQ

Что делает скилл project-ddd?

Pragmatic Domain-Driven Design for Laravel projects — business-first, not academic. Helps restructure Laravel apps from default flat structure into domain-based organisation with clear bounded contexts, domain layers (Models, Events, Contracts, Value Objects), application layers (Actions, Jobs, Services), and infrastructure layers (Registrars, Exports, Integrations). Focuses on what matters to the business: reducing OPEX through maintainable code, increasing velocity through clear ownership, and enabling teams to work independently on bounded contexts. Includes domain discovery interview, migration planner, scaffolding, service provider wiring, autoloading config, and architecture test updates. Use this skill whenever the user asks to restructure a Laravel app into domains, apply DDD, organise by business context, migrate to modular structure, or says "restructure app guna DDD", "nak buat domain-based structure", "organise code ikut business domain", "migrate to DDD", "buat bounded context", "refactor monolith to domains", "nak modular structure", "domain layer untuk module ni", "how to structure my Laravel app by domains", or "tolong susun code ikut domain". Assumes Laravel Kickoff as baseline — works alongside project-laravel conventions.

Как установить скилл project-ddd?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл project-ddd запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить project-ddd с