Drupal Performance

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.

84 stars 5 forksDatabases

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add grasmash/drupal-claude-skills --skill drupal-performance
Manual install
git clone --depth 1 https://github.com/grasmash/drupal-claude-skills.git /tmp/drupal-claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/drupal-claude-skills/skills/drupal-performance ~/.claude/skills/drupal-performance

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Drupal Performance Optimization

Beyond raw query count, two related levers matter: maximize **WARM** (Dynamic
Page Cache HIT) requests via render-cache keys + cache tags/contexts — the
cold path is still common because authenticated routes are typically per-user
DPC-cached — and watch for **VariationCache conflicts** (cache context
consistency and "nothing in common" cache redirect warnings; see
`references/jsonapi-cache-context-consistency.md`).

## Measure the right thing FIRST (hard-won — read before profiling)

On the codebase these lessons come from, a whole audit went into xhprof +
Lighthouse and moved the needle almost not at all. The single thing that did:
**cutting cold-render query count.** Here is why the usual tools missed it,
and what to measure instead.

**The local-vs-prod latency gap is the whole story.** Local DDEV runs the DB
in the same container (~0.1 ms/query). Production runs a networked DB (and
usually a networked cache backend like Redis) at ~1+ ms/query. A cold
authenticated render doing ~1,500 queries is **~0.15 s local but ~2 s prod.**
Local wall-clock (xhprof, local Lighthouse) amortizes the dominant cost to
nothing, so everything "looks optimal locally." It isn't.

So, in order:

1. **Primary backend metric = cold-render REAL-SQL query count per route, not
   local wall-clock.** Query count is environment-invariant; prod TTFB ≈
   `real_sql_count × per-query network latency + cache-backend reads +
Read the full skill on GitHub

Details

Skill name
drupal-performance
Path
skills/drupal-performance/SKILL.md
License
MIT
Repo updated
1 October 2026

FAQ

What does the Drupal Performance skill do?

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.

How do I install the Drupal Performance skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add grasmash/drupal-claude-skills --skill drupal-performance. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Drupal Performance popular?

It lives in grasmash/drupal-claude-skills, which has 84 GitHub stars and 5 forks.

Related skills

Acquia Source

84

grasmash/drupal-claude-skills

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.

Frontend & Design

Canvas Contribution

84

grasmash/drupal-claude-skills

Workflow 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.

Frontend & Design

Claude Code MCP Setup

84

grasmash/drupal-claude-skills

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.

AI, LLMs & Agents

Datahub SQL Workflow

46

datahub-project/datahub-skills

Ground text-to-SQL work in DataHub catalog evidence. Use when a user asks to write, draft, debug, or execute SQL; answer a data question that requires SQL; calculate a metric; query named tables; or investigate SQL results with DataHub MCP tools available. Always begin with find_sql_context, even when the user already supplied tables or dataset URNs, and call inspect_tables_for_sql on the chosen tables before writing SQL.

Databases98

Drupal Ddev

84

grasmash/drupal-claude-skills

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.

Databases

Olore Drizzle Latest

119

olorehq/olore

Local Drizzle ORM documentation reference (latest). Drizzle ORM documentation. Use for Drizzle queries, schema definitions, migrations, column types, PostgreSQL/MySQL/SQLite dialects, and Drizzle Kit.

Databases

Browse the most popular Claude skills, all databases skills, or write your own with the skills generator.