← ClaudeAtlas

project-templateslisted

Use when working on `.html.twig` files, Twig components, or Turbo stream templates.
ubermuda/loupe · ★ 2 · Data & Documents · score 65
Install: claude install-skill ubermuda/loupe
# Templates, Twig components and form theme ## Twig templates - Every `{% include %}` passes its variables explicitly with `with { ... } only`. Context does not cascade. - When you extract a shared partial, list every variable it reads. Pass them all at every include site. - Turbo stream templates run in a different controller context and inherit no page variables. Pass every variable explicitly. - Turbo stream templates target element IDs directly, for example `<turbo-stream target="event-hero-title">`. When you change or remove an element `id`, search the stream templates for that ID and update them. They live in another file, and a wrong ID raises no compile error. - Hard-reload (`ignoreCache: true`) before you inspect the live DOM with DevTools or the Chrome MCP. Turbo's page cache serves snapshots with stale class names. ### The authenticated layout owns `project` `base.html.twig` runs `{% set project = current_project() %}` before it yields `block body`. On a route with no project `{id}` param it resolves to null and silently clobbers a controller-passed variable named `project`. Never pass `project` from a param-less route to a template inside the authenticated layout. Use a distinct name (`wizardProject`), or forward the raw id string so `current_project()` resolves it. ## Module template namespaces Each module's `templates/Module/<Module>/` directory is registered as `@<Module>` in `config/packages/twig.yaml` under `twig.paths`. Reference module templates by th