Master backend architectures, REST API design, microservices, and server-side development across multiple languages. Use this as a central index to access specialized sub-skills.
日本語の概要は準備中です。原文の説明を表示しています。
Generates CQRS Commands and Handlers for PHP 8.5. Creates immutable command DTOs with handlers that modify state. Includes unit tests.
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
Generate CQRS-compliant Commands and Command Handlers with tests.
final readonly classPath: src/Application/{BoundedContext}/Command/
{Name}Command.php — Immutable command DTOPath: src/Application/{BoundedContext}/Handler/
{Name}Handler.php — Command processorPath: tests/Unit/Application/{BoundedContext}/
| Component | Path |
|---|---|
| Command | src/Application/{BoundedContext}/Command/ |
| Handler | src/Application/{BoundedContext}/Handler/ |
| Unit Tests | tests/Unit/Application/{BoundedContext}/ |
| Action | Command Name | Returns |
|---|---|---|
| Create new | CreateOrderCommand | ID |
| Confirm/Approve | ConfirmOrderCommand | void |
| Cancel/Reject | CancelOrderCommand | void |
| Update property | UpdateShippingAddressCommand | void |
| Add child | AddOrderLineCommand | void |
| Remove child | RemoveOrderLineCommand | void |
final readonly class {Name}Command
{
public function __construct(
public {ValueObject} $id,
public string $data
) {
if (empty($data)) {
throw new \InvalidArgumentException('Data is required');
}
}
public static function fromArray(array $data): self
{
return new self(
id: new {ValueObject}($data['id']),
data: $data['data']
);
}
}
final readonly class {Name}Handler
{
public function __construct(
private {Repository}Interface $repository,
private EventDispatcherInterface $events
) {}
public function __invoke({Name}Command $command): void
{
$aggregate = $this->repository->findById($command->id);
if ($aggregate === null) {
throw new NotFoundException($command->id);
}
$aggregate->doSomething($command->data);
$this->repository->save($aggregate);
foreach ($aggregate->releaseEvents() as $event) {
$this->events->dispatch($event);
}
}
}
public function __invoke(CreateCommand $command): AggregateId
{
$aggregate = Aggregate::create(
id: $this->repository->nextIdentity(),
...
);
$this->repository->save($aggregate);
foreach ($aggregate->releaseEvents() as $event) {
$this->events->dispatch($event);
}
return $aggregate->id();
}
| Anti-pattern | Problem | Solution |
|---|---|---|
| Returning Data | Query through command | Use Query for reads |
| No Validation | Invalid commands | Validate in constructor |
| Business Logic | Handler has decisions | Delegate to aggregate |
| Missing Events | Events not dispatched | Always dispatch after save |
| Direct Persistence | Bypassing aggregate | Always use aggregate methods |
For complete PHP templates and examples, see:
references/templates.md — Command, Handler, Test templates with patternsreferences/examples.md — CreateOrder, ConfirmOrder, CancelOrder examples and testsまだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Master backend architectures, REST API design, microservices, and server-side development across multiple languages. Use this as a central index to access specialized sub-skills.
日本語の概要は準備中です。原文の説明を表示しています。
在每次回复中使用固定前缀并列出本次实际参考的指令/文件,便于校验是否遵循上下文与规则。
日本語の概要は準備中です。原文の説明を表示しています。
Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.
日本語の概要は準備中です。原文の説明を表示しています。
Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.
日本語の概要は準備中です。原文の説明を表示しています。
Arquitecto de Soluciones Principal y Consultor Tecnológico de Andru.ia. Diagnostica y traza la hoja de ruta óptima para proyectos de IA en español.
日本語の概要は準備中です。原文の説明を表示しています。
[00] META. Orchestrate skills into dynamic chains for complex tasks. Analyzes the task, discovers available skills, builds an optimal chain, explains why each skill is needed, and executes step-by-step with user confirmation. Use for any complex task requiring multiple thinking/research/analysis steps. Triggers on "plan this", "how to approach", "what's the strategy", "build a plan", or any multi-step problem requiring skill orchestration.
日本語の概要は準備中です。原文の説明を表示しています。