drupal-render-pipeline

drupal-render-pipeline is a skill for Claude Code from trebormc/drupal-ai-agents. It costs 191 tokens per session (1,691 once invoked), scanned A, original, Apache-2.0.

A guide to Drupal's render pipeline, the system that turns page data into displayed output and carries cache information through it. It explains render arrays, responses, cache metadata, lazy builders, and cache invalidation.

In plain words
What is it for?
Use it when writing controllers, JSON endpoints, cached or personalized output, lazy builders, or code that invalidates cached Drupal content.
Why use it?
It helps prevent production-only problems such as missing cache information, incorrect cached pages, and personalized content making whole pages uncacheable.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it when writing controllers, JSON endpoints, cached or personalized output, lazy builders, or code that invalidates cached Drupal content.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/trebormc/drupal-ai-agents/drupal-render-pipeline
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add trebormc/drupal-ai-agents --skill drupal-render-pipeline
Clone the repo
git clone --depth 1 https://github.com/trebormc/drupal-ai-agents

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for drupal-render-pipeline

README.md
[![agentmods](https://agentmods.dev/badge/skills/trebormc/drupal-ai-agents/drupal-render-pipeline/github.svg)](https://agentmods.dev/skills/trebormc/drupal-ai-agents/drupal-render-pipeline)
Your own site
<a href="https://agentmods.dev/skills/trebormc/drupal-ai-agents/drupal-render-pipeline"><img src="https://agentmods.dev/badge/skills/trebormc/drupal-ai-agents/drupal-render-pipeline/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for drupal-render-pipeline

Your own site · 80×15
<a href="https://agentmods.dev/skills/trebormc/drupal-ai-agents/drupal-render-pipeline"><img src="https://agentmods.dev/badge/skills/trebormc/drupal-ai-agents/drupal-render-pipeline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 191 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,691 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00191 $0.01691
Opus 5.5 $0.00076 $0.00676
Sonnet 5.5 $0.00038 $0.00338
Haiku 4.5 $0.00019 $0.00169

Measured 1mo ago against content hash 9e34a32180ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

drupal-render-pipeline scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

ssh web curl -s -o /dev/null -D - http://localhost/PATH | grep -i "x-drupal-cache\|cache-tags\|cache-contexts"
.claude/skills/drupal-render-pipeline/SKILL.md · 148 lines

How it starts

The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Render Pipeline — Expert Rules

Basics (tags/contexts/max-age snippets, N+1) live in the performance-audit skill and the drupal-coding-standards rule. This skill covers the semantics that AI-generated code most often gets wrong — bugs that are invisible in development (cache disabled) and surface only in production.

Render arrays, not HTML strings or Response objects

An HTML page controller must return a render array. Returning new Response($html) or a concatenated string detaches the output from the render system: cache metadata from children is silently lost and the page becomes uncacheable or caches wrong.

  • Return a Response only when intentionally bypassing rendering (file downloads).
  • JSON endpoints: use CacheableJsonResponse and add cacheable dependencies — a plain JsonResponse carries no cache metadata.

Max-age bubbles minimum-wins — the reason lazy builders exist

Cache metadata propagates UP the render tree, and max-age takes the MINIMUM along the way: a single child with max-age: 0 forces the entire page to be uncacheable. So never place personalized content (username, cart count, per-user messages) directly in a render array — isolate it in a lazy builder so the rest of the page stays cached:

$build['greeting'] = [
  '#lazy_builder' => ['mymodule.greeting_builder:build', [$account_id]],
  '#create_placeholder' => TRUE,
];

Lazy builder arguments must be scalars (string, int, float, bool, NULL). They are serialized into placeholder markup — passing an entity or array throws. Pass the entity ID, load inside the builder. This is one of the most frequent AI-generated bugs.

BigPipe consumes these placeholders in production (streams the page, fills placeholders via chunked transfer). Rendering a placeholder to a string early defeats it.

Cache keys vs bubbling

#cache['tags'|'contexts'|'max-age'] describe the metadata that bubbles up. Only #cache['keys'] makes the render array ITSELF independently stored in the render cache. Without keys, the array is re-built every time its parent is — its metadata still bubbles.

Read the full file on GitHub · 148 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 148 lines · 191 tokens per session scan A 9e34a32180ba

Subscribe to this mod's changes

drupal-render-pipeline is a skill published in the GitHub repository trebormc/drupal-ai-agents (11 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 191 tokens to every session and 1,691 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

stripe-projects

Provision SaaS services + sync creds via Stripe Projects.

NousResearch/hermes-agent · 15 tokens

django-storages-s3

Use when configuring Django to store static and media files on AWS S3 with django-storages. Invoke when working with the STORAGES setting, S3 buckets, presigned URLs, CloudFront, or boto3-backed file storage in settings.py. Configures the Django 4.2+ STORAGES dict, public/private custom backends, presigned GET/POST…

Jeffallan/claude-skills · 138 tokens

websocket-engineer

Use when building real-time communication systems with WebSockets or Socket.IO. Invoke for bidirectional messaging, horizontal scaling with Redis, presence tracking, room management.

Jeffallan/claude-skills · 36 tokens

azure-eventhub-dotnet

Azure Event Hubs SDK for .NET. Use for high-throughput event streaming: sending events (EventHubProducerClient, EventHubBufferedProducerClient), receiving events (EventProcessorClient with checkpointing), partition management, and real-time data ingestion. Triggers: "Event Hubs", "event streaming"…

microsoft/skills · 94 tokens

azure-mgmt-botservice-dotnet

Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".

microsoft/skills · 78 tokens

wikipedia

Search and read Wikipedia via x wkp — MediaWiki API, no API key, zero install; query, extract, suggest, and DDG route in one module. Load for wiki, wikipedia, encyclopedia lookup, article summary.

x-cmd/x-cmd · 49 tokens