samhennessy/hlive/hlive-project
Claude Code and agent skill by samhennessy/hlive
- community
Checking that the SKILL.md file is still in the repository.
Structure a real multi-page HLive application in Go — the main.go entry point and net/http routing, a page/ package of page factories, reusable component functions, static asset serving, and build/run setup. Use when starting a new HLive project, adding a page or route, organizing components across files, or deciding where state and assets live (beyond the single-file _example/ demos).
Install
npx vskill@latest install samhennessy/hlive/hlive-projectSKILL.md
Structuring an HLive project
HLive's _example/ demos are single files to keep them readable. A real app spreads across packages. This is the recommended layout (modeled on the hlive_docs app), using hhtml for markup — see the hlive-hhtml and hlive-core skills for the building blocks.
Layout
Keep it flat — most logic lives in page/. Add a sub-package under page/ only to group a feature's routes.
Entry point — main.go
Use the standard library net/http; HLive's PageServer is just an http.Handler. Register each page factory, then serve static files.
l.NewPageServer takes a page factory func() *l.Page. For routes that need extra wiring (their own handler, query params), expose a func() http.Handler instead (as demo.Clickers() does).
Pages — the page package
One exported, PascalCase factory per page, each returning *l.Page. Build the <head> (title + stylesheets) and <body> with hhtml, composing shared components:
There is no central layout wrapper; the per-page head/shell boilerplate is repeated (or factored into a small helper you call from each page). One *l.Page instance serves one connected user.
Reusable components
Shared UI is just unexported, camelCase functions returning l.Adder (the interface hhtml builders return), kept in page/components.go:
Call them inside page factories: Body().Add(Div(header(), ...)).
Where state lives
- Page-local reactive values:
l.Box(...)/l.NewLockBox[T](...), captured in
the page factory's closure and updated from l.On handlers.
- Feature state that spans components or goroutines (live demos, real-time
feeds): a struct holding the boxes plus methods, often with hlivekit.PubSub for fan-out. See the hlivekit skill and hlive_docs/page/demo/clicker.go.
Keep non-UI logic (parsing, calculations, data access) in plain Go packages under src/ so it's unit-testable without a browser.
Static assets
Put CSS/JS/images under assets/ and serve them as shown in main.go. Link them in each page's <head> with Link(Rel("stylesheet"), Href("/assets/...")).
Build & run
A justfile keeps commands handy (or use go directly):
go run . from the module root is enough for local development; the server serves ./assets relative to its working directory.
Reference
hlive_docs/main.go, hlive_docs/page/home.go, hlive_docs/page/components.go, hlive_docs/page/demo/clicker.go, hlive_docs/justfile. (hlive_docs is a work-in-progress and is mid-migration to hhtml — follow the structure, and prefer hhtml for new markup.) For testing pages from a page package, see the hlive-testing skill.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugin/skills/hlive-project/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/samhennessy/hlive/hlive-project)