drupal-render-pipeline

drupal-render-pipeline is a skill for Claude Code, Codex 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 CodeCodex

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.

agentmods
npx agentmods add skills/trebormc/drupal-ai-agents/drupal-render-pipeline
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, Codex.

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00191 $0.01691
Opus 5 $0.00096 $0.00846
Sonnet 5 $0.00038 $0.00338
Haiku 4.5 $0.00019 $0.00169

Measured 5d ago against content hash 9e34a32180ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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. 5d 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 (10 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 191 tokens to every session and 1,691 once invoked, about $0.0010 per session on Opus 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

gke-compute-classes

Configures, optimizes, and troubleshoots GKE ComputeClasses. Use when configuring Spot VMs with on-demand fallback, targeting specific accelerators (GPUs/TPUs) or machine families, restricting ComputeClass access, or debugging pending pods related to node pool auto-creation. Do not use for cluster-level Node Auto…

google/skills · 83 tokens

application-design-center-design-deploy

Processes GCP infrastructure design and deployment workflows within Application Design Center (ADC). Use when: - Designing GCP infrastructure with Terraform. - Validating local HCL. - Performing best-practice plan scans. - Importing templates to Application Design Center (ADC). - Deploying templates. - Troubleshooting…

google/skills · 94 tokens

gke-reliability

Improves GKE workload reliability, using PDBs, health probes, and topology spread constraints. Use when configuring GKE workload reliability, setting up PDBs, or configuring GKE health probes (liveness, readiness, startup). Don't use for disaster recovery setup or full cluster backups (use gke-backup-dr instead).

google/skills · 73 tokens

gke-workload-security

Audits, configures, and hardens workload-level security controls for Google Kubernetes Engine (GKE) applications and namespaces. Covers running cluster security audits (auditcluster.sh), configuring Workload Identity Federation (impersonation, KSA/GSA binding, and pod setup), enforcing Network Policies (default-deny…

google/skills · 181 tokens

nemo-automodel-launcher-config

Configure NeMo AutoModel job launches for interactive runs, Slurm clusters, and SkyPilot cloud execution.

NVIDIA/skills · 30 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