drupal-workflow
A Claude Code plugin for Drupal development with live workflow optimization. Provides 19 skills, 4 specialized agents, 10 commands, behavioral evals, session analysis, and the Magic Loop Autopilot — a live policy engine that classifies tasks, detects drift via weighted scoring, escalates interventions (hint → command → suppress), and self-tunes based on session replay data.
Installation
As a local plugin
claude --plugin-dir ./drupal-workflow
As an npm package (future)
npm install drupal-workflow
Requirements
- Claude Code CLI
- DDEV local development environment
- Drupal 10+ or 11+ project
- PHP 8.2+
Skills (19)
Skills provide domain knowledge that Claude can consult during development.
| Skill | Description |
|---|
| drupal-brainstorming | Explore requirements and design options before implementing. Entity design, service architecture, hook/event strategy. |
| drupal-delegation | Execute plans by dispatching specialized agents in parallel. Structured agent dispatch with tracking. |
| drupal-rules | Core development rules: code quality, security, services, testing. Auto-consulted when writing Drupal code. |
| drupal-testing | Practical testing patterns: curl smoke tests, drush eval, test scripts. Verifies implementations actually work. |
| drupal-service-di | Service definitions, dependency injection patterns, and interface design. |
| drupal-entity-api | Field types, entity CRUD, view modes, access control handlers, and content modeling. |
| drupal-caching | Cache bins, tags, contexts, CacheableMetadata, lazy builders, invalidation, and external caching. |
| drupal-hook-patterns | OOP hooks (Drupal 11), form alters, entity hooks, install/update hooks, and legacy bridges. |
| drupal-security-patterns | OWASP prevention patterns, access control, input sanitization, XSS protection. |
| drupal-coding-standards | PHPCS, PHPStan, naming conventions, and code style enforcement. |
| drupal-conventions | Translations, CSS conventions, error handling patterns. |
| drupal-config-management | Config split, config ignore, config readonly, environments, import/export workflows. |
| twig-templating | Twig template patterns, filters, theme suggestions, and component architecture. |
| verification-before-completion | Gate function preventing untested claims. Validates work before marking complete. |
| semantic-docs | Navigate business-logic-to-code mappings in docs/semantic/. Search by Logic ID, feature code, or entity schema. |
| discover | Docs-first codebase discovery. Use before Glob/Grep to get Logic IDs and file paths from semantic documentation. Now supports structural queries (service:, hook:, deps:, etc.). |
| structural-index | Auto-generated structural awareness for Drupal projects. Parses *.services.yml, *.routing.yml, hooks, plugins, and entity types to build dependency graphs and feature maps. |
| writing-plans | Write comprehensive implementation plans for sub-agents or complex tasks. |
| autopilot-tuner | Analyze autopilot effectiveness and self-tune the plugin. Reads session data, computes acceptance rates, and proposes policy/threshold/classifier changes. |
Agents (4)
Four focused agents covering the full Drupal development lifecycle: build, review, verify, document.
| Agent | Description |
|---|
| drupal-builder | Full-stack implementation: modules, themes, config, migrations, performance. |
| drupal-reviewer | Architecture, security audit, coding standards, and test writing. |
| drupal-verifier | Implementation verification via ddev drush eval, curl smoke tests, config checks. |
| semantic-architect | Generates semantic docs (Layer 3): business index, tech specs with Logic IDs, business schemas. |
Commands (10)
Slash commands for common development workflows.