Connect to an Acquia Source ("Source powered by Drupal CMS") site — its JSON:API and MCP endpoints, OAuth2 auth, the @drupal-canvas CLI, and the Canvas Page API deploy workflow. Use when wiring an AI agent or app to a Source CMS site, building/uploading Drupal Canvas Code Components, deploying landing pages via the Page API, or registering the Source MCP server with Claude Code/Cursor.
Skills
grasmash/drupal-claude-skills
npx skilld add grasmash/drupal-claude-skills --allWorkflow for contributing features and fixes to the Drupal Canvas module on drupal.org while consuming it from a separate project: the two-repository setup, Canvas UI development, issue forks, merge requests, and composer patches. Use when developing a Canvas feature or bug fix intended for upstream, or when moving a local Canvas change onto a drupal.org issue. Extends drupal-contrib-mgmt with Canvas-specific details.
Add and configure MCP (Model Context Protocol) servers in Claude Code. Use when adding new MCP servers, configuring remote MCP, setting up OAuth MCP servers, troubleshooting MCP connections, or running /mcp diagnostics. Covers stdio, HTTP, and SSE transport types.
Use when a UI change is about to be declared done, when reviewing a user-facing diff, or when asked for a design/QA pass on a screen. Also use before merging any change that alters rendered output. Covers live-environment interaction review, mockup parity, visual polish, accessibility, robustness, and a triage-matrix report format.
Patterns for custom Drupal API endpoints that use UUIDs instead of sequential IDs: route, controller, and fetch templates, response-shape contracts for installed app clients, webhook handlers, authenticated cURL testing, and the JSON:API filter-access cache-poisoning fix. Use when creating custom routes, AJAX or JSON endpoints for a frontend or mobile app, webhook receivers, or JSON:API filters, and before adding an endpoint, to check whether an existing one already serves the need.
Drupal 9-11 core API patterns from Selwyn Polit's book "Drupal at Your Fingertips". In-depth references cover services and dependency injection, hooks, events, plugins, entities, Form API, routes and controllers, Twig, caching, AJAX, database queries, configuration, Paragraphs, and Drupal Test Traits; every other chapter (views, blocks, migrate, drush, taxonomy, and more) is linked online. Use when writing or reviewing custom Drupal module or theme code and a worked example or API refresher is needed for one of these subsystems.
Entry point for Drupal Canvas Code Components (React/JSX). Points to the officially maintained drupal-canvas/skills suite (component definition, metadata, push, styling, data fetching, regions, page definition, content templates) and to this repo's complements for Twig SDCs and upstream contribution. Use when creating, modifying, or pushing Canvas Code Components, or when deciding which Canvas skill applies.
Drupal Canvas SDC (Single Directory Components) with Twig templates. Use when creating, modifying, or troubleshooting Twig-based Canvas components in themes/modules, component.yml schemas, Canvas registration (props need title, required props need examples), canvas.component config entities, component versioning and outdated instances, config drift after a Canvas upgrade, Canvas preview issues, or page builder functionality. For React/JSX Code Components, see the upstream drupal-canvas/skills suite.
Guides Drupal configuration management safely - single-config export/set/delete, config:import and config:export (cim/cex) with preview-first --no --diff, config:status checks, Config Split (complete vs partial splits, csex/csim, activation), and syncing config from remote environments through Terminus, acli, platform/upsun, lagoon or drush aliases. Use when exporting or importing Drupal config, inspecting or changing a single config object, merging production config into a feature branch, working with config_split, or diagnosing config that will not import or vanishes from config/default on export.
Reconcile Drupal configuration drift between a working tree and a deployed environment one item at a time, deciding import (disk wins) vs export (DB wins) vs skip for each difference. Use when `drush config:status` shows drift, after pulling a fresh DB, before a deploy, or when local config and a remote/prod environment disagree. Pantheon/Terminus-aware but works with any remote alias; never writes to production.
Manages Drupal contributed modules via Composer - module updates and major-version upgrades, cweagans/composer-patches v2 (patches.lock.json, composer patches-relock, verifying patches are applied), mglaman/composer-drupal-lenient, Drupal 11 compatibility checks with upgrade_status, committing an optimized vendor/ autoloader, and contributing fixes back to drupal.org via issue forks and merge requests. Use when updating or upgrading contrib modules, applying, finding or creating patches, a patch fails or keeps regressing after composer install, resolving Composer dependency or drupal/core version conflicts, checking Drupal 11 readiness or deprecations, or contributing to a drupal.org issue queue.
Provides DDEV local development patterns for Drupal - ddev commands, .ddev/config.yaml, database import/export and snapshots, Drush and Composer through ddev, Xdebug, local Solr, Mutagen performance, and recovery from Docker, Mutagen and router failures. Use when running ddev start/restart/exec/drush/composer, editing .ddev/config.yaml, importing or snapshotting a database, debugging slow or hung DDEV containers, or recovering a local environment after a Docker crash.
Things that pass locally and then break, or silently lose data, on a Drupal deploy. Use when planning or running a deploy, writing a hook_update_N / post-update / deploy hook, running drush updb / updatedb / config:import / drush deploy on a remote environment, a site is stuck in maintenance mode after a failed or killed update, adding a column to a custom_field field, an update hook talks to an external API (payment provider, cloud, SaaS), changing a service constructor or *.services.yml / drush.services.yml arguments, a Drush command is missing from drush list, or committing vendor/ for a host that deploys git state (ComposerAutoloaderInit not found). Covers deploy-path planning per change class, the updb → cr → cim → cr tail, maintenance-mode stranding, the custom_field addColumn() truncate trap, update hooks that re-fire on every environment, service arity, Drush command discovery, and committed-vendor autoloader skew.
Drupal mail system configuration for local testing (Mailpit) and production (Mailchimp Transactional). Covers HTML email rendering, Content-Type headers, sender/formatter plugins, and troubleshooting. Use when testing emails locally, debugging email issues, or configuring mail delivery.
Drupal performance review and optimization patterns and anti-patterns, backend and frontend. Treats cold-render database query count and volume per route as the core metric, because networked production databases cost roughly 10x or more per query than local, so local wall-time and Lighthouse hide real TTFB. Use when reviewing, profiling, or changing performance, before declaring performance work done, or for slow pages and high TTFB, N+1 queries, entity loads in loops, cache contexts and tags, render cache metadata, and CacheableJsonResponse endpoints.
Search API configuration, boosting strategies, and processor patterns for Drupal. Covers index field types, custom boost processors, number-field and engagement-metric boosting, Solr field-type drift on config export, and reindexing workflows. Use when configuring or debugging a Search API index, tuning relevance or result ranking, writing a custom search processor, or when search results are missing, stale, or ordered unexpectedly.
Explains OAuth2 authentication in Drupal with the simple_oauth module - TokenAuthUser AND-permission logic, scope/role intersection, OAuth2 scope entities and the dynamic scope provider, mobile app password-grant token requests, field_permissions and JSON:API field access under a token, Bearer-token CSRF 403s, consumer TTLs, and debugging token permission denials. Use when an OAuth/Bearer token is denied a permission the user has, configuring consumers, clients or scopes, requesting tokens from a mobile or decoupled app, or getting 403s on JSON:API requests made with a Bearer token.
Test-driven development for Drupal with PHPUnit and Drupal Test Traits (DTT). Use when writing or fixing tests, deciding what is worth a test, reproducing a bug before fixing it, choosing a bootstrap level (Unit vs Kernel vs ExistingSite/functional), testing permission gates, adding Playwright visual verification, or debugging tests that silently run zero assertions. Covers the bug-fix RED-first discipline, the worth-a-test rubric, bootstrap cost tradeoffs, negative tests, the anonymous-403 permission trap, DTT gotchas, and the PHPUnit-version pin that makes Drupal tests pass vacuously.
Working with Drupal Views — both the build/optimize mechanics (cache plugins, exposed filters, pager, relationships, row plugins, REST/data_export displays, render caching, query cost) AND the decision of whether to use a View at all vs. a custom controller/query/JSON:API. Load when creating ANY listing/feed/table/grid/leaderboard/block-of-rows or REST/JSON listing endpoint; when a View is slow or loads full entities it does not render; when adding/editing exposed filters, sorts, pagers, relationships, or a view's cache settings; or when deciding "View vs custom vs JSON:API" for a new query surface.
Patterns and pitfalls for a fast custom Drupal 10/11 theme built with Vite + Tailwind CSS v4 + Single Directory Components (SDC) via the drupal/vite module. Use when creating or changing a Vite-built theme, editing vite.config.js, *.libraries.yml with `vite:` keys, Tailwind v4 `@theme`/tokens/preflight, SDC component CSS, content-hashed dist assets or the Vite manifest; when a cold render is slow or 504s ("gateway timeout cold, fine after retries", "works for anonymous, hangs for logged-in"), assets 404 after a deploy, a JS/CSS fix "works locally but not in prod", styles silently vanish (tokens resolve to nothing, images cropped wrong, list bullets gone), or committed dist drifts from a fresh build. Covers the drupal/vite dev-server probe, `version:`/`preprocess:` rules, anti-monolith bundling, owning the markup, View Transitions + Speculation Rules instead of a JS framework.
Drupal security and coding rules from Ivan Grynenko's cursorrules, organised by OWASP Top 10 (2021) category: authentication, access control, injection (SQL, XSS), cryptographic failures, security misconfiguration, vulnerable dependencies, SSRF, insecure design, integrity, and logging, plus database standards and file permissions. Use when writing or reviewing Drupal code for security, handling user input, building queries, handling file uploads, adding permission or access checks, making outbound HTTP requests, or preparing a security review.
Workflow for porting static HTML mockups into themed Drupal Twig/SDC routes without dropping working capabilities: a two-gate reconciliation process, per-delta classification (style, structural, or conflict with a prior decision), fixing through shared components, and a Playwright-verified visual diff ledger. Use when porting a mockup screen into a route, conforming an existing route to its mockup, or executing any parity or reskin work item. Load alongside design-review.
Sentry error monitoring integration for a Drupal site. Use when analyzing Sentry issues, debugging production errors, investigating N+1 queries, adding comments to issues, documenting error analysis, or working with performance monitoring. Covers MCP tools, the comment API, common issue patterns, and the raven module's performance-tracing gotchas.
Create and manage Claude Code skills following Anthropic best practices and the agentskills.io specification. Use when creating new skills, understanding trigger patterns, debugging skill activation, or implementing progressive disclosure. Covers SKILL.md structure, YAML frontmatter schema, trigger types, enforcement levels, hook mechanisms, and progressive disclosure.
Curated skills from @grasmash. Checked GitHub just now