From drupal-dev-framework
Designs specs for module components (services, forms, entities, plugins, controllers) generating architecture markdown with purpose, interface, dependencies, pattern references, and file locations.
How this skill is triggered — by the user, by Claude, or both
Slash command
/drupal-dev-framework:component-designerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Design individual components (services, forms, entities, plugins) and document them.
Design individual components (services, forms, entities, plugins) and document them.
Activate when you detect:
Ask if unclear:
What type of component is this?
1. Service (business logic)
2. Form (user input)
3. Entity (data storage)
4. Plugin (extensible behavior)
5. Controller (routing)
Ask based on type:
For Services:
1. What operations does this service perform?
2. What other services does it need?
3. Should it dispatch events?
For Forms:
1. What type? (ConfigFormBase, FormBase, ConfirmFormBase)
2. What fields are needed?
3. What validation?
4. What happens on submit?
For Entities:
1. Content entity or config entity?
2. What fields/properties?
3. What relationships to other entities?
4. Access control needs?
For Plugins:
1. What plugin type?
2. What does each plugin variation do?
3. What configuration does it need?
Use core-pattern-finder skill to locate a reference implementation in core.
Use Write tool to create {project_path}/architecture/{component_name}.md:
# Component: {ComponentName}
## Type
{Service | Form | Entity | Plugin | Controller}
## Purpose
{One paragraph from user input}
## Interface
### Public Methods
| Method | Parameters | Returns | Description |
|--------|------------|---------|-------------|
| methodName() | $param: Type | ReturnType | What it does |
### Events (if service)
| Event | When Dispatched |
|-------|-----------------|
| event.name | Condition |
## Dependencies
| Service | Purpose |
|---------|---------|
| entity_type.manager | {why needed} |
## Pattern Reference
Based on: `{path from core-pattern-finder}`
Apply from reference:
- {what to copy}
Adapt for our needs:
- {what to change}
## File Locations
- Class: `src/{Type}/{ComponentName}.php`
- Service definition: `my_module.services.yml`
- Routing: `my_module.routing.yml` (if controller)
## Acceptance Criteria
- [ ] {criterion 1}
- [ ] {criterion 2}
- [ ] {criterion 3}
Use Edit tool to add component reference to architecture/main.md:
## Components
### {ComponentName}
Type: {type}
Purpose: {one line}
Design: See `architecture/{component_name}.md`
Show user:
Component designed: {ComponentName}
Files created:
- architecture/{component_name}.md
Based on core pattern:
- {pattern_reference}
Ready for implementation in Phase 3.
Review the design? (yes/no)
STOP and wait for user:
npx claudepluginhub camoa/claude-skills --plugin drupal-dev-frameworkBrainstorms Drupal feature requirements, entity designs, service architecture, and hook/event strategies before coding new modules or changes.
Generates structured technical design documents defining interfaces, data flows, key decisions with rationale, and acceptance criteria for software implementations.
Generates technical design documents for SDD workflow, covering architecture patterns, component specs, data models, and API interfaces from approved requirements. Invoke via /sdd-design <feature-name>.