twig-components

twig-components is a skill for Claude Code from dev-toolings/superpowers-symfony. It costs 26 tokens per session (363 once invoked), scanned A, a copy of brainstorming, MIT.

A guide for building reusable interface components with Symfony UX Twig Components. Twig is Symfony's template language, and components are reusable pieces of a web page.

In plain words
What is it for?
Use it to build Twig components with props, slots, anonymous components, and CVA styling patterns.
Why use it?
It helps keep templates organized by defining component properties, content areas, and reusable styling options.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the superpowers-symfony plugin — 44 skills, 13 commands, 7 agents, 1 hook shipped together

Good fit Use it to build Twig components with props, slots, anonymous components, and CVA styling patterns.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dev-toolings/superpowers-symfony/twig-components
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 dev-toolings/superpowers-symfony --skill twig-components
Clone the repo
git clone --depth 1 https://github.com/dev-toolings/superpowers-symfony

Made for: Claude Code.

Or install superpowers-symfony, the plugin that ships this one along with the rest of its 44 skills, 13 commands, 7 agents, 1 hook.

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 twig-components

README.md
[![agentmods](https://agentmods.dev/badge/skills/dev-toolings/superpowers-symfony/twig-components/github.svg)](https://agentmods.dev/skills/dev-toolings/superpowers-symfony/twig-components)
Your own site
<a href="https://agentmods.dev/skills/dev-toolings/superpowers-symfony/twig-components"><img src="https://agentmods.dev/badge/skills/dev-toolings/superpowers-symfony/twig-components/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 twig-components

Your own site · 80×15
<a href="https://agentmods.dev/skills/dev-toolings/superpowers-symfony/twig-components"><img src="https://agentmods.dev/badge/skills/dev-toolings/superpowers-symfony/twig-components.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 363 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 81% copy Near-identical to another mod 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.00026 $0.00363
Opus 5.5 $0.00010 $0.00145
Sonnet 5.5 $0.00005 $0.00073
Haiku 4.5 $0.00003 $0.00036

Measured 23d ago against content hash 65c328c10d86, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

twig-components scanned grade A with 0 findings 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 23d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

81% identical to brainstorming — 40 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

content/skills/twig-components/SKILL.md · 44 lines

What it actually says

Twig Components (Symfony)

Use when

  • Extracting a repeated piece of Twig into a reusable component.
  • Building a component with props, slots, computed logic, or CVA variants.
  • Making a component reactive with Live Components (search, counters, forms).

Default workflow

  1. Choose the kind: anonymous (template only), class-based #[AsTwigComponent], or #[AsLiveComponent].
  2. Declare props as public mutable properties; use mount() for derived values.
  3. Expose content injection through blocks (slots) rather than more props.
  4. For Live Components, mark writable state with #[LiveProp(writable: true)] and debounce user input.
  5. Test the PHP class with InteractsWithTwigComponents.

Guardrails

  • Never make public props readonly: they are assigned after instantiation.
  • Inject services as private readonly, never as public props.
  • Only mark a LiveProp writable when the browser must change it.
  • Keep one responsibility per component.

Progressive disclosure

  • Use this file for execution posture and risk controls.
  • Open references when deep implementation details are needed.

Output contract

  • Component classes and templates, with their props and slots.
  • Live state and actions, when the component is reactive.
  • A component test for mount and render.

References

  • reference.md
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 23d ago Changed · +2 lines 65c328c10d86
  2. 1mo ago Changed · +2 lines · -3 tokens per session 9a7e76b0ed4f
  3. 1mo ago First seen · 40 lines · 29 tokens per session scan A 926b54025ba6

Subscribe to this mod's changes

twig-components is a skill published in the GitHub repository dev-toolings/superpowers-symfony (227 stars, last pushed 23d ago), licensed MIT. It adds 26 tokens to every session and 363 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 81% identical to brainstorming, differing in 40 lines, and is treated as a copy.

Related

Other skills, from other repositories

popular-web-designs

54 real design systems (Stripe, Linear, Vercel) as HTML/CSS.

NousResearch/hermes-agent · 23 tokens

scroll-craft

Build premium scroll-driven landing pages for service, product, food, and drink brands. Plan the visitor journey, page grammar, emotional peak, and bespoke signature move. Create dimensional heroes with independent visual planes, restrained motion, and separate mobile composition. Use supplied photos and footage or…

nateherkai/scroll-craft · 177 tokens

prism-ui

Implement a complete UI screen or feature from a Form visual spec. Use when asked to "build a page", "implement this screen", "build the frontend for this feature", or "create this UI".

tonone-ai/tonone · 45 tokens

prism-audit

Frontend audit — bundle size, dependencies, accessibility, performance, component quality. Use when asked for "frontend review", "performance audit", "accessibility check", or "bundle size".

tonone-ai/tonone · 42 tokens

design-system-reference

Style guides and implementation rules for frontend design. Works with design-discovery agent which handles context gathering and VS-based style recommendations. Contains detailed style guides, anti-patterns, and implementation checklists.

wigtn/wigtn-plugins · 43 tokens

colors

Color systems for web interfaces — OKLCH conversion and palette generation, contrast measurement (APCA/WCAG), gamut and P3 fallbacks, theming, one meaning per color. INVOKE PROACTIVELY when converting color values, building or extending a palette or token set, checking or reporting contrast, or theming light and dark…

PrabhdeepSingh/claude-plugins · 99 tokens