drupal-claude-skills
AGENTS.md81 starsChanged 42 days agoMITView on GitHub
A public collection of Claude Code skills and agents for Drupal development. This repository distributes reusable skills and agents that any Drupal project can install. It is NOT a Drupal project itself — it's a skill distribution repo. This copies skills from skills/ into your project's .claude/skills/ directory. Agents live in .claude/agents/ and must be copied manually: Copy the sample settings.json as a starting point: Review and customize for your project's needs. For Drupal Canvas Code Components, also install: The…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository25 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- acquia-sourceSkill
- canvas-contributionSkill
- claude-code-mcp-setupSkill
- design-reviewSkill
- drupal-api-endpointsSkill
- drupal-at-your-fingertipsSkill
- drupal-canvas-sdcSkill
- drupal-canvasSkill
- drupal-config-mgmtSkill
- drupal-config-reconcileSkill
- drupal-contrib-mgmtSkill
- drupal-ddevSkill
- drupal-deploy-safetySkill
- drupal-mailSkill
- drupal-performanceSkill
- drupal-search-apiSkill
- drupal-simple-oauthSkill
- drupal-testingSkill
- drupal-views-patternsSkill
- drupal-vite-themeSkill
- ivangrynenko-cursorrules-drupalSkill
- mockup-paritySkill
- sentry-integrationSkill
- skill-developerSkill
The file
We split this AGENTS.md into the rules it gives an agent
9 rules. About 0 are common, 1 is distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 73
After quality-gate passes and before telling the user work is complete, spawn the done-gate agent.
- Very specific: line 81
When CI fails with test errors, fix the named tests locally and run them individually until green before re-running the full suite — don't …
- Very specific: line 85
NEVER directly edit files in docroot/modules/contrib/ or docroot/core/.
- Very specific: line 87
Create a .patch file in patches/
- Very specific: line 89
Run composer patches-relock to add the patch to patches.lock.json.
- Very specific: line 90
Run composer reinstall drupal/<module> (or composer patches-repatch) to apply.
- Very specific: line 91
Commit the patch, composer.json, patches.lock.json, and the patched contrib file (hosts that deploy committed git state never run composer …
- Distinctive: line 97
When ending a work session, complete these steps:
- Very specific: line 126
Keep SKILL.md under 500 lines.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Drupal Claude Skills
A public collection of Claude Code skills and agents for Drupal development.
Repository Purpose
This repository distributes reusable skills and agents that any Drupal project can install. It is NOT a Drupal project itself — it's a skill distribution repo.
Install Skills
Via npx skills (recommended)
npx skills add grasmash/drupal-claude-skillsThis copies skills from skills/ into your project's .claude/skills/ directory.
Manual
cp -r skills/* /path/to/your/project/.claude/skills/Install Agents
Agents live in .claude/agents/ and must be copied manually:
cp -r .claude/agents/* /path/to/your/project/.claude/agents/Install Settings
Copy the sample settings.json as a starting point:
cp .claude/settings.json /path/to/your/project/.claude/settings.jsonReview and customize for your project's needs.
Canvas Ecosystem
For Drupal Canvas Code Components, also install:
npx skills add drupal-canvas/skillsAgent Workflow Guide
The following sections document how to use the included agents effectively in a Drupal project. Copy this guidance into your project's CLAUDE.md and adapt as needed.
Parallelization
Maximize parallel work. Spawn multiple sub-agents in a single message when tasks are independent. Use agent teams for features spanning Drupal + frontend. Research areas concurrently before implementing.
JavaScript Frameworks on Drupal
These skills cover the Drupal side only. When a task involves a JavaScript framework layered on Drupal (React, Vue, Angular, Svelte, Alpine, or whatever the project uses), in a theme, a decoupled front end, or Canvas code components, also find and load a skill for that framework (npx skills find <framework>, or the project's own skills). Follow that framework's current best practices, including its security guidance: XSS (v-html, dangerouslySetInnerHTML), build config, and dependency audit.
The Drupal skills here own the seam: JSON:API/REST auth and CSRF tokens, drupalSettings and its cache contexts, processed vs raw field values, and library/asset wiring.
Quality Gate (mandatory before commit)
Before committing code changes, spawn the quality-gate agent to review the diff. It checks security, performance, testing, and regressions. Proactively run the review before reaching the commit step — don't wait for a reminder. For agent teams, the team lead should spawn quality-gate after all teammates finish, not each teammate individually.
Done Gate (mandatory before declaring done)
After quality-gate passes and before telling the user work is complete, spawn the done-gate agent. It validates that the work actually works — builds succeed, tests pass, deliverables match the plan. Quality-gate checks code quality; done-gate checks functional correctness. Both must pass before declaring done.
Local Execution Verification (mandatory)
For any fix or feature that changes runtime behavior (cron jobs, drush commands, data processing, API endpoints, service logic), you MUST execute the changed code path locally via DDEV and verify the results before declaring done — passing unit tests is not sufficient. See the drupal-testing skill for the full discipline.
CI Test Fix Workflow
When CI fails with test errors, fix the named tests locally and run them individually until green before re-running the full suite — don't burn CI minutes iterating on known-broken tests. See the drupal-testing skill for the step-by-step workflow.
Contrib/Core Patch Policy
NEVER directly edit files in docroot/modules/contrib/ or docroot/core/. All changes to contributed modules and Drupal core MUST use patches:
- Create a
.patchfile inpatches/ - Register it in
composer.jsonunderextra.patches - Run
composer patches-relockto add the patch topatches.lock.json. composer-patches v2 applies patches from the lock file, not fromcomposer.json, so without the relock a new patch is silently dropped on every clean install. - Run
composer reinstall drupal/<module>(orcomposer patches-repatch) to apply. composer-patches patches a package only when Composer installs or updates it, so a plaincomposer installdoes not re-patch a module that is already installed. - Commit the patch,
composer.json,patches.lock.json, and the patched contrib file (hosts that deploy committed git state never runcomposer install)
Direct edits get overwritten by composer install/composer update. See the drupal-contrib-mgmt skill for full patch management workflows.
Session Completion (Landing the Plane)
When ending a work session, complete these steps:
- File issues for remaining work — Create issues for anything that needs follow-up
- Run quality gates (if code changed) — Tests, linters, builds
- Update issue status — Close finished work, update in-progress items
- Commit changes — Ensure all work is committed locally
- Ask before pushing — Ask the user if they want you to push to remote. Do NOT push automatically
- Hand off — Provide context for next session
Directory Structure
skills/ # Skills (installed via `npx skills add`)
.claude/agents/ # Agent definitions (manual copy)
.claude/settings.json # Sample settings (manual copy)
.claude/scripts/ # Sync scripts for upstream contentContributing
See CONTRIBUTING.md for guidelines.
Skill Format
Skills follow the Agent Skills Specification:
- Each skill is a directory under
skills/with aSKILL.mdfile - SKILL.md has YAML frontmatter with
nameanddescription - Keep SKILL.md under 500 lines; use
references/for details
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

