AGENT SKILL
templ
Use this skill when the user wants to compile or format templ templates, run the templ LSP, or work on a Go + htmx frontend project.
- License 许可
- MIT
- 最近更新
- 2026-11-02
- Stars
- ★ 57
- Forks
- 5
01 前言 Front Matter
- name
- templ
- description
- Use this skill when the user wants to compile or format templ templates, run the templ LSP, or work on a Go + htmx frontend project.
03 SKILL.md 正文
templ Plugin
templ lets you write HTML components in .templ files that compile to type-safe Go code — catching markup/attribute errors at build time instead of in the browser.
Commands
templ self version— Print templ versiontempl code generate— Compile .templ files to Go (templ generate; -f file, -path dir, -watch, -lazy)templ code fmt— Format .templ files in place (templ fmt; -fail to exit non-zero on diffs, -v verbose)templ lsp run— Run the templ language server (templ lsp; -http localhost:7474 for a web debug view)templ _ _— Passthrough to templ CLI
Usage Examples
- "Generate Go code from my .templ files"
- "Watch-mode regenerate templates while I edit"
- "Format all templates in this project"
Installation
go install github.com/a-h/templ/cmd/templ@latest
# or: brew install templ
Examples
templ generate # compile .templ -> *_templ.go
templ generate -watch # regenerate on change
templ generate -f page.templ # single file
templ fmt . # format all .templ files
templ lsp -http localhost:7474 # LSP + debug UI
Key Features
- Compile-time type checking for HTML markup and Go expressions
- First-class htmx/alpine pairing — attributes and expressions are typed
- LSP, formatter, and migrate/diagnose subcommands in one binary
04 同仓库更多 Skills
sc-machin-mcp
暂无简介
★ 57
supercli.quickstart
SuperCLI capability router — discover and execute CLI commands through namespace.resource.action interface
★ 57
zzdoc
Use this skill to compile scdoc manpages with a fast Zig-based compiler.
★ 57
zx
Use this skill when the user wants to a tool for writing better scripts using node.js.
★ 57
zvm
Use this skill when the user wants to manage multiple Zig compiler versions.
★ 57
quickstart
暂无简介
★ 57