From drupal-dev-framework
Searches Drupal core modules for patterns like forms, entities, services, plugins, controllers; returns file paths, quick references, and grep/glob strategies.
How this skill is triggered — by the user, by Claude, or both
Slash command
/drupal-dev-framework:core-pattern-finderThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Search Drupal core for implementation patterns and return file references.
Search Drupal core for implementation patterns and return file references.
Activate when you detect:
Check these common patterns first before searching:
| Pattern | Path |
|---|---|
| ConfigFormBase | core/modules/system/src/Form/SiteInformationForm.php |
| FormBase | core/modules/node/src/Form/NodeForm.php |
| ConfirmFormBase | core/modules/node/src/Form/NodeDeleteForm.php |
| EntityForm | core/modules/user/src/ProfileForm.php |
| Pattern | Path |
|---|---|
| Content Entity | core/modules/node/src/Entity/Node.php |
| Config Entity | core/modules/field/src/Entity/FieldConfig.php |
| Entity List Builder | core/modules/node/src/NodeListBuilder.php |
| Pattern | Path |
|---|---|
| Entity Type Manager | core/lib/Drupal/Core/Entity/EntityTypeManager.php |
| Plugin Manager | core/lib/Drupal/Core/Block/BlockManager.php |
| Event Subscriber | core/modules/system/src/EventSubscriber/ConfigCacheTag.php |
| Pattern | Path |
|---|---|
| Block Plugin | core/modules/system/src/Plugin/Block/SystemBrandingBlock.php |
| Field Formatter | core/modules/text/src/Plugin/Field/FieldFormatter/TextDefaultFormatter.php |
| Field Widget | core/modules/text/src/Plugin/Field/FieldWidget/TextareaWidget.php |
| Condition Plugin | core/modules/system/src/Plugin/Condition/RequestPath.php |
| Pattern | Path |
|---|---|
| ControllerBase | core/modules/system/src/Controller/SystemController.php |
| Entity Controller | core/modules/node/src/Controller/NodeController.php |
If pattern matches table above, return that path immediately.
If not in quick reference, search using these strategies:
For class/interface patterns:
Use Grep with pattern: "class {PatternName}" or "interface {PatternName}"
Path: core/
For specific implementations:
Use Grep with pattern: "extends {BaseClass}" or "implements {Interface}"
Path: core/modules/
For service patterns:
Use Glob with pattern: core/modules/*/src/*Manager.php
or: core/lib/Drupal/Core/*/*.php
Once file found, use Read tool and identify:
Format your response as:
## Core Pattern: {Pattern Name}
### Primary Example
`{file_path}`
**Key methods:**
- `{method1}()` (line {X}): {what it does}
- `{method2}()` (line {Y}): {what it does}
**Dependencies:**
- {service_name}: {purpose}
### Additional Examples
- `{path2}` - {variation description}
- `{path3}` - {variation description}
### Usage Notes
{Any gotchas or important considerations}
STOP and ask user:
npx claudepluginhub camoa/claude-skills --plugin drupal-dev-frameworkProvides Drupal 10/11 service definitions, constructor injection, interfaces, and plugin factories. Use when creating services, registering dependencies, or service container patterns.
Finds code examples and design patterns like API endpoints, authentication, database queries, and error handling in the codebase. Triggered for 'how to implement X', 'show examples of X', or following conventions.
Searches internal codebase patterns and GitHub for open-source implementation references, filtering repos by quality and extracting code excerpts.