heex-templates

Community

Enforce clean HEEx templates with best practices.

Authorcode0100fun
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Phoenix HEEx template guidelines help teams write and review templates consistently, preventing common mistakes around interpolation, forms, and rendering.

Core Features & Use Cases

  • Enforces correct HEEx usage and syntax across templates, including proper interpolation and literal braces handling.
  • Guides the use of Phoenix.Component forms and to_form for form construction, avoiding outdated helpers.
  • Standardizes app wide imports of template helpers in html_helpers for consistency across LiveViews and components.
  • Provides rules for conditional rendering using cond or case, and cautions against invalid patterns like if with else if.
  • Establishes proper class list syntax for dynamic classes and ensures deterministic DOM IDs for testability.
  • Clarifies comments in HEEx templates using the approved HEEx comment syntax and supports safe block constructs.
  • Outlines the interpolation rules for attributes and bodies, including safe handling of literal braces.

Quick Start

Audit a HEEx template by applying these rules: ensure ~H usage, Phoenix.Component form helpers, unique DOM IDs, and safe interpolation patterns.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: heex-templates
Download link: https://github.com/code0100fun/botfiles/archive/main.zip#heex-templates

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.