# Create Cqrs Bulk Commands

> >

- **Type:** Skill
- **Install:** `agentstack add skill-jeffsenso-prestashop-skills-create-cqrs-bulk-commands`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [jeffsenso](https://agentstack.voostack.com/s/jeffsenso)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [jeffsenso](https://github.com/jeffsenso)
- **Source:** https://github.com/jeffsenso/prestashop-skills/tree/main/skills/prestashop-module-development/ps9-core-ai/Component/CQRS/skills/create-cqrs-bulk-commands

## Install

```sh
agentstack add skill-jeffsenso-prestashop-skills-create-cqrs-bulk-commands
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# create-cqrs-bulk-commands

See [CQRS/CONTEXT.md](../../CONTEXT.md#bulk-handlers) for the bulk handler pattern (`AbstractBulkCommandHandler`, `BulkCommandExceptionInterface`, continue after failure).

## 1. Bulk delete command

Create `src/Core/Domain/{Domain}/Command/BulkDelete{Domain}sCommand.php`:

- Constructor takes `array $ids` (scalar `int[]`)
- Single getter: `getIds(): array`

## 2. Bulk status command

Create `src/Core/Domain/{Domain}/Command/BulkToggle{Domain}StatusCommand.php`:

- Constructor takes `array $ids` (`int[]`) and `bool $expectedStatus`
- `$expectedStatus = true` means enable, `false` means disable
- Getters: `getIds(): array` and `getExpectedStatus(): bool`

## 3. Bulk handlers

All bulk handlers follow the same structure. Create in `src/Adapter/{Domain}/CommandHandler/`:

### Bulk delete handler

`BulkDelete{Domain}sHandler.php`:

- For each ID, call the repository delete
- Collect failures, continue with remaining IDs

### Bulk status handler

`BulkToggle{Domain}StatusHandler.php`:

- For each ID, load entity, set `active = $command->getExpectedStatus()`, update
- Use the target status from the command — do not flip the current value

## 4. Handler interfaces

Create in `src/Core/Domain/{Domain}/CommandHandler/`:
- `BulkDelete{Domain}sHandlerInterface`
- `BulkToggle{Domain}StatusHandlerInterface`

Both return `void`. The bulk exception is thrown, not returned.

## Rules

Conventions (AbstractBulkCommandHandler, continue after failure, BulkCommandExceptionInterface) are in [CQRS/CONTEXT.md](../../CONTEXT.md#bulk-handlers). Skill-specific reminders:

- Be consistent with the single-entity commands on ID typing
- Skip this skill entirely if the entity has no bulk grid actions

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [jeffsenso](https://github.com/jeffsenso)
- **Source:** [jeffsenso/prestashop-skills](https://github.com/jeffsenso/prestashop-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-jeffsenso-prestashop-skills-create-cqrs-bulk-commands
- Seller: https://agentstack.voostack.com/s/jeffsenso
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
