AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Templ Http

skill-xe-skills-templ-http · by Xe

Integrate templ components with Go HTTP server using net/http. Use when connecting templ to web server, creating HTTP handlers, mentions 'templ server', 'HTTP routes', or 'serve templ components'.

No reviews yet
0 installs
4 views
0.0% view→install

Install

$ agentstack add skill-xe-skills-templ-http

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-xe-skills-templ-http)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Templ Http? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Templ HTTP Integration

Use progressive disclosure: begin with the handler pattern, then add routing and middleware only as needed.

Level 1: Minimal Integration

Use this skill when serving templ from net/http.

  1. Parse request input.
  2. Build view model/data.
  3. Render templ component with r.Context().
  4. Handle render errors and status codes.
func homeHandler(w http.ResponseWriter, r *http.Request) {
    if err := components.HomePage().Render(r.Context(), w); err != nil {
        http.Error(w, "render failed", http.StatusInternalServerError)
        return
    }
}

Level 2: Routing and Request Data

  • Routes: start with http.NewServeMux() and explicit handlers.
  • Methods: branch on r.Method when endpoint serves multiple actions.
  • Input sources: query (r.URL.Query()), form (r.ParseForm() + FormValue), path segments.
  • Status discipline: set status before rendering non-200 responses.
  • Post/Redirect/Get: redirect after successful form POSTs.

Level 3: Production Patterns

  • Add middleware for auth/logging/request IDs.
  • Return component-based error pages for consistent UX.
  • Serve static files with http.FileServer and a dedicated prefix.
  • Keep handler functions thin; move business logic into services.
func usersHandler(w http.ResponseWriter, r *http.Request) {
    switch r.Method {
    case http.MethodGet:
        users := listUsers(r.Context())
        _ = components.UserList(users).Render(r.Context(), w)
    default:
        http.Error(w, "method not allowed", http.StatusMethodNotAllowed)
    }
}

Escalate to Other Skills

  • Need reusable view APIs: use templ-components.
  • Need HTMX partial responses: use templ-htmx.
  • Need syntax corrections in .templ: use templ-syntax.

References

  • Handlers and routing: resources/handlers-and-routing.md
  • Middleware and errors: resources/middleware-and-errors.md
  • Request data and response patterns: resources/request-and-response-patterns.md
  • Go net/http: https://pkg.go.dev/net/http
  • templ server-side rendering: https://templ.guide/server-side-rendering/

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.