Drupal AI Kit

A ready-to-use set of AI coding assistant configurations for Drupal 10/11 projects. It gives GitHub Copilot,
Codex and Claude Code the same project rules, coding standards, reusable skills and specialised subagents, so
every assistant on the team writes Drupal code the same way.

Why
AI assistants produce much better Drupal code when they know the project's conventions: where code lives, how services
are wired, how commits are named. Writing those rules separately for every tool leads to drift. This kit keeps one
shared source of truth; the settings of a tool are generated from it on the machine of the developer who uses that
tool.
Features
- One set of rules for all tools — everything lives once in
AGENTS.md and .ai-kit/.
- Install only your tool —
.ai-kit/install.sh claude (or codex, copilot) generates the settings that tool
reads. The repository carries no .claude/, .codex/ or Copilot files.
- Drupal-focused standards — Drupal Coding Standards, PHP 8.3+ with strict types, dependency injection,
logic-free Twig, Drupal Behaviors JS and a consistent Git workflow.
- Reusable skills — scaffold services and plugins, review performance, refactor to DI, write commit messages.
- Specialised subagents — back end, theme/front end, e2e testing, ops/deploy, SEO/analytics and code review.
- Safe defaults —
.env files are off-limits; no commits, pushes or production changes without explicit request.
Install
Composer (recommended) — from the Drupal project root:
composer require --dev slivorezka/drupal-ai-kit
vendor/bin/drupal-ai-kit init claude # or codex, copilot; several names at once work too
init copies AGENTS.md (only if the project has none) and .ai-kit/ into the project, adds the generated folders
to .gitignore and installs the named tools. Commit AGENTS.md, .ai-kit/ and .gitignore. After
composer update, run vendor/bin/drupal-ai-kit update: it refreshes .ai-kit/ and the installed tools and never
touches AGENTS.md, so keep project rules there, not in .ai-kit/.
Claude plugin — the skills and subagents with their topic guides, without AGENTS.md, Codex and Copilot; works in
Claude Code, Cowork and the Claude apps. Details in plugin/README.md:
/plugin marketplace add slivorezka/drupal-ai-kit
/plugin install drupal-ai-kit@drupal-ai-kit
Manually — copy the files as described in Getting Started.
What's Included
Topic Guides
| Topic | Covers |
|---|
| Drupal | Module development, hooks, plugins, entities |
| PHP | PHP 8.3+ coding standards and best practices |
| Twig | Templating rules, components, preprocess |
| JS | Drupal Behaviors, AJAX API, once() usage |
| Git | Branch naming, commit message format |
Skills
| Skill | Purpose |
|---|
create-drupal-service | Create a service class and register it |
create-drupal-plugin | Create a plugin (Block, FieldWidget, etc.) |
drupal-performance-review | Find query, caching and rendering issues |
drupal-refactor-to-di | Replace \Drupal:: calls with DI |
git-commit | Write a commit message in the project format |
generate-agents-md | Fill AGENTS.md with the project's real values |
Subagents
| Subagent | Area |
|---|
drupal-backend | Custom modules, hooks, services, plugins, Drush |
theme-frontend | Twig, SCSS, JS, libraries, responsive styling |
e2e-tester | Playwright end-to-end tests |
drupal-ops | Config sync, environments, CI/CD, production issues |
seo-analytics | Metatag, sitemap, structured data, GTM/GA4, consent |
code-reviewer | Read-only review of changes against project standards |
Repository Layout