# Templ Templates

> Edit and troubleshoot server-side HTML templates (.templ), including regeneration and handler wiring.

- Skill: `majiayu000/templ-templates` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add majiayu000/templ-templates`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/templ-templates/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- License: MIT
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/templ-templates

---


## Where templates live
- Layouts: `internal/adapters/http/templates/layouts/*.templ`
- Pages: `internal/adapters/http/templates/pages/*.templ`

## Standard workflow
1. Edit `.templ` files.
2. Regenerate:

```bash
make templ-generate
# or (full): make generate
```

3. Run tests/build:

```bash
go build ./...
make test
```

## Handler wiring
- Handlers typically render templates from `internal/infrastructure/http/handlers/*`.
- Set content type: `text/html; charset=utf-8`.

## Common pitfalls
- Forgetting to run `templ generate` (compile errors referencing missing `*_templ.go`).
- Putting business logic in templates; keep logic in handlers/domain and pass data in.

