Skill / SKILL.md

Craft Twig Guidelines

michtio/craftcms-claude-skills

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 'only'), Craft Twig helpers ({% tag %}, tag(), attr(), |attr, |parseAttr, |append, svg()), collect() for props and class collections, .implode(), ========= comment headers on component files, and pitfalls (snake_case, macros as components, hardcoded colors).
1 views 90 repository starsUpdated Nov 27, 2026
Overview

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 'only'), Craft Twig helpers ({% tag %}, tag(), attr(), |attr, |parseAttr, |append, svg()), collect() for props and class collections, .implode(), ========= comment headers on component files, and pitfalls (snake_case, macros as components, hardcoded colors).

Installation & variants

Download the repository, including the skill’s supporting files.

git clone -- 'https://github.com/michtio/craftcms-claude-skills' skill-source

Use the complete skill-source/skills/craft-twig-guidelines directory with your client’s skill installer.

  • skills/craft-twig-guidelines

    main · SKILL.md

    Open installation source

    Source directory recorded from the imported repository path

Source directory skills/craft-twig-guidelines

Compatibility & requirements

Declared tools

Bash(sh ${CLAUDE_SKILL_DIR}/scripts/craft-version.sh)

Source instructions
Read source instructions

Open to load source instructions

Original SKILL.md

Open to load the original file

Source & validation
Source status
Awaiting source check
Format validation
Format valid
Checked at
Pending source check
Content SHA-256
059158e7dcbb324eca33698a416c6e6a5ceb88840563f9fa6b2906f4c9d2c787
Discussion
Comments Be the First to Comment

Please log in to comment

    No comments yet

Related skills