From drupal-workflow
Brainstorms Drupal feature requirements, entity designs, service architecture, and hook/event strategies before coding new modules or changes.
npx claudepluginhub gkastanis/drupal-workflow --plugin drupal-workflowThis skill uses the workspace's default tool permissions.
Structured exploration before implementation. Prevents the most expensive Drupal mistakes: wrong entity type, wrong test type, missing access control, unnecessary complexity.
Loads Drupal methodology references like TDD, SOLID, DRY, Library-First and delegates to dev-guides-navigator for online guides during Phase 2 feature design and architecture drafting.
Transforms vague ideas into clear, validated designs via structured dialogue before implementing features, architecture changes, or behavior modifications.
Guides interactive brainstorming for Laravel features and refactors, clarifying goals, domain, data models, APIs, side-effects, testing, and Sail environments.
Share bugs, ideas, or general feedback.
Structured exploration before implementation. Prevents the most expensive Drupal mistakes: wrong entity type, wrong test type, missing access control, unnecessary complexity.
Ask yourself (or the user) these questions before anything else:
discover deps:MODULE or check the structural indexDo NOT skip this. The most common failure mode is building the wrong thing correctly.
Drupal's most consequential early decision is how data is stored:
| If the data... | Use |
|---|---|
| Has revisions, access control, fields, views | Content entity |
| Is site configuration (settings, mappings) | Config entity |
| Is transient/computed (cache, queue, state) | No entity — use State API, Queue, or cache |
| Is a simple key-value pair | \Drupal::state() or config |
Common trap: Creating a content entity when config entity or State API would suffice. Content entities are expensive (DB tables, access handlers, views integration). Only use them when you need the full entity lifecycle.
For each component, decide:
| Concern | Options | Default choice |
|---|---|---|
| Business logic | Service class | Always a service, never in controller/hook |
| Data access | Entity API | Never raw SQL |
| User interaction | Form API + controller | Form for mutations, controller for display |
| Background work | Queue + AdvancedQueue | Not cron hooks |
| External calls | Guzzle via DI | Never file_get_contents |
| Events | EventSubscriber | Prefer over hooks for cross-module concerns |
| Display | Twig + preprocess | Heavy logic in preprocess, not Twig |
Blast radius check: Before multi-module changes, run discover deps:FEATURE to see what depends on what.
Document your decisions in 3-5 lines:
Entity: config entity (settings only, no revisions needed)
Services: my_module.processor (business logic), my_module.client (external API)
Hooks: hook_cron for scheduled check, #[Hook] attribute style
Access: custom permission 'administer my_module'
Test: Kernel test for service, Functional for admin form
This becomes the input for writing-plans or direct implementation.
After brainstorming, you should have:
Hand this to writing-plans for detailed implementation planning, or to @drupal-builder for direct implementation.