ClaudSkills / Content / content-misc

Craft Twig Guidelines

Category: Content  ·  Sub-category: content-misc
type:review
Twig coding standards and conventions for Craft CMS 5 templates. ALWAYS load this skill when writing, editing, or reviewing any .twig file in a Craft CMS project — even for small edits. Covers: variable naming (camelCase, no abbreviations), null handling (?? operator, ??? with empty-coalesce plugin), whitespace control ({%- trimming, NOT {%- minify -%}), include isolation (always use 'only'), Craft Twig helpers ({% tag %}, tag(), attr(), |attr filter, |parseAttr, |append, svg()), collect() for props and class collections, .implode(), comment headers with ========= separators on component files, and common pitfalls (snake_case, macros as components, hardcoded colors). Triggers on: Twig template creation, editing, or review; .twig files; {% include %} with 'only'; {% tag %} and polymorphic elements; collect() and props.get(); class string building; attr() and |attr filter; svg() with styling and aria; ?? and ??? null coalescing; whitespace control and blank lines in output; minify alternatives; Twig file headers and comment blocks; variable naming conventions in Twig; currentSite, siteUrl, craft.entries, .eagerly(), .collect in template context. NOT for Twig architecture patterns, atomic design structure, or template routing (use craft-site). NOT for PHP code (use craft-php-guidelines). NOT for content modeling or field configuration (use craft-content-modeling).

What this skill does

Craft Twig Guidelines is a community-contributed Claude Code skill in the content-misc sub-category. It ships as a SKILL.md file that Claude Code auto-discovers under ~/.claude/skills/craft-twig-guidelines/ and loads when your prompt matches the skill's trigger.

Who uses this skill

The Craft Twig Guidelines skill is built for content creators, marketers, copywriters, SEO professionals, and editorial teams. It is part of the open ClaudSkills registry, a community-curated catalog of 56,000+ capabilities you can install for Claude Code — the Claude CLI agent.

How to install

Free

Manual install (2 steps)

mkdir -p ~/.claude/skills/craft-twig-guidelines
curl -L https://claudskills.com/skills/craft-twig-guidelines/SKILL.md \
  -o ~/.claude/skills/craft-twig-guidelines/SKILL.md

Or just download SKILL.md directly and drop it into ~/.claude/skills/craft-twig-guidelines/. Claude Code auto-discovers it on next session.

Skills live at ~/.claude/skills/craft-twig-guidelines/SKILL.md on macOS/Linux, or %USERPROFILE%\.claude\skills\craft-twig-guidelines\SKILL.md on Windows. See the full install guide for step-by-step instructions.

Pro

One-click install via the desktop app

The ClaudSkills desktop app installs any skill directly into ~/.claude/skills/ with one click — no terminal required. Pro starts at $9/mo or $149 lifetime.

Pro

For the full experience including quality scoring and one-click install features for each skill — upgrade to Pro.

More Content skills

Browse all Content skills in the ClaudSkills registry, or explore these other picks from the same category:

Browse all Content skills → Top 100 skills
Part of ClaudSkills — the open registry for Claude Code skills.  ·  What's New  ·  Install guide  ·  About  ·  llms.txt

Part of Acreator Store — Adam Lankamer's AI tools: GifPerfect · AspectPerfect · SlomoPerfect · Ucaption · UTagger · AutoXPoster · TestYourSkills