/go-web:templuifrom go-web
Provides version-aware guidance for templUI v1 and shadcn-templ v2 components in Go/templ apps. Handles component installation, HTML-to-templ conversion, Script() setup, and legacy-to-current migration.
Ships in go-web. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Inspect go.mod, component imports, .templui.json, components.json, and local component
source before selecting examples or installing dependencies. Copied v1 components may have
no module dependency; components.json alone is not enough without its schema and provenance.
github.com/templui/templui, .templui.json, v1 component source, or original
templUI Pro/goilerplate v1–v2 blocks. Ask whether to upgrade before dependent edits.github.com/axadrn/shadcn-templ/v2 or shadcn-templ v2 configuration/source.
Read shadcn-templ.md; the v1 examples below do not apply automatically.Both generations require github.com/a-h/templ v0.3.1100 or later, which sanitizes spread
attributes and URLs in attributes. Raise older pins, regenerate, and rebuild before edits.
Whenever a new task encounters legacy usage, ask:
This uses legacy templUI v1. Would you like to upgrade to shadcn-templ, or keep v1 for this task?
Use the active surface's question UI when available and wait before edits that depend on the answer. Read-only inspection may continue. Honor an explicit choice already made in this task; ask again when a later task encounters legacy usage. If upgrading, explain the component, CSS, and JavaScript changes and agree on the migration scope before editing. Do not interpret a UI upgrade as permission to regenerate the app with goilerplate.
For new projects, offer shadcn-templ and verify its current release status (the v2 docs currently identify it as beta). If the user chooses v1, use the legacy references below. Do not silently introduce v1 through an older scaffold template.
The 222 legacy templUI Pro blocks (0BSD) are frozen on v1 and distinct from shadcn-templ blocks. Use them via legacy-blocks.md; upgrade with v1-to-v2-migration.md.
Use the following only after the user chooses to keep v1 for the current task.
Per templui.io: "Zero JS frameworks — Just vanilla. Just fast." templUI components use vanilla JavaScript via Script() templates for all interactivity (popovers, dropdowns, dialogs, tabs, etc.). They do NOT depend on Alpine.js, React, Vue, or any other framework.
Earlier versions of templUI integrated with Alpine.js. That dependency has been removed. If you find documentation or code referencing x-data/x-show/x-if directives inside templUI components, it's stale.
| Tool | Purpose | Use For |
|---|---|---|
| templUI | Pre-built UI components (vanilla JS) | Dropdowns, dialogs, tabs, sidebars, popovers, accordions |
| HTMX | Server-driven interactions | AJAX, form submissions, partial page updates, live search |
| Alpine.js (optional) | Lightweight client-side state | Toggles, animations, client-side filtering, transitions — used alongside templUI, not as an integration. Skip if you don't need a reactive state layer beyond what HTMX + Script() provide. |
| Floating UI | Positioning primitive (used internally by templUI) | Tooltips, popovers, dropdowns — usually transparent to users |
Read the relevant file for detailed patterns, code examples, and troubleshooting:
htmx-alpine-integration.md — HTMX + Alpine.js (optional, separate from templUI)For apps that choose to add Alpine.js as a client-side state layer alongside templUI. Read only when Alpine is actually in use. Covers: when to use HTMX vs Alpine vs combined, Alpine-Morph extension for state preservation across swaps, htmx.process() for Alpine conditionals, triggering HTMX from Alpine. Skip if your app uses templUI + HTMX + Script() without Alpine — that's templUI's recommended setup.
templ-interpolation.md — CRITICAL: Templ Interpolation in JavaScriptGo expressions { value } do NOT interpolate inside <script> tags. Five patterns to solve this:
data-* attrs + this.dataset{{ value }} inside <script> tagstempl.JSONScriptIncludes when-to-use table and common mistakes.
templui-cli.md — templUI CLI ToolInstall, init, add components, force-update, list available. Choose the existing project’s module-import or CLI-copy workflow; they use different import paths.
script-templates.md — Script() Templates (REQUIRED)Components with JavaScript need Script() calls in base layout <head>. Lists all Script() imports (popover, dropdown, dialog, accordion, tabs, carousel, toast, clipboard), component dependency table, and troubleshooting for non-working components.
conversion-and-audit.md — Converting Sites & AuditingConverting HTML/React/Vue to Go/Templ: process, syntax mapping, package structure. Templ syntax quick reference (props, conditionals, loops, composition). Audit checklist for Script() calls, CLI installation, consistency, dark mode, responsive. Import patterns and troubleshooting guide. Resource links for templUI, HTMX+Alpine, and templ docs.
conversion-and-audit.md (opens in a new tab)htmx-alpine-integration.md (opens in a new tab)legacy-blocks.md (opens in a new tab)script-templates.md (opens in a new tab)shadcn-templ.md (opens in a new tab)templ-interpolation.md (opens in a new tab)templui-cli.md (opens in a new tab)v1-to-v2-migration.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
5 skills in this plugin
/convert-to-go-projectConverts existing Express/Fastify, Django/Flask/FastAPI, Laravel/PHP, Next.js/React, and Go projects to Go + Templ + HTMX + Tailwind. Applies to whole-project migrations and existing Go projects that need this stack. Skips greenfield creation and isolated HTMX or templUI help./create-go-projectCreates a greenfield Go web project with Echo, Templ, HTMX, Tailwind, sqlc, goose, and Air. Use for new project scaffolding and requested application functionality. Skips conversion of existing applications./goilerplateGenerates new Go SaaS apps with goilerplate and updates or diagnoses generated apps. Use for goilerplate application workflows; skip component-only work (templui) and the separate create-go-project scaffold./htmxhtmx for Go/templ apps: hx-* attributes, swap strategies, triggers, OOB updates, SSE, WebSockets, forms, redirects, debounce, server integration. Trigger when user writes or pastes templates containing hx-* attributes, asks about HTMX swaps/triggers/OOB updates, or wires HTMX to a Go handler. SKIP generic web, fetch/AJAX, or templUI questions with no htmx context.npx claudepluginhub gopherguides/gopher-ai --plugin go-webOther plugins' skills for the same job