Agent skill

Hlive Testing

by SamHennessy in SamHennessy/hlive

Write browser tests for HLive pages using the hlivetest package (github.com/SamHennessy/hlive/hlivetest) and Playwright.

MITAuto-check passedTesting & QA

Install Hlive Testing

skills CLI
$ npx skills add SamHennessy/hlive --skill hlive-testing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install SamHennessy/hlive hlive-testing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/SamHennessy/hlive.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugin/skills/hlive-testing .claude/skills/hlive-testing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
hlive-testing
GitHub stars
101
Token cost
~1.2k tokens
SKILL.md length
275 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

Write browser tests for HLive pages using the hlivetest package (github.com/SamHennessy/hlive/hlivetest) and Playwright.

  • Testing HLive UI behavior end-to-end — spinning up a test server
  • SKILL.md covers Setup, The harness pattern, Writing a test and hlivetest helpers, plus 2 more sections
  • Calls go and make
  • Driving a real browser (Click/ClickAndWait

What it does

Hlive Testing is an agent skill from SamHennessy/hlive. Write browser tests for HLive pages using the hlivetest package (github.com/SamHennessy/hlive/hlivetest) and Playwright. Use when testing HLive UI behavior end-to-end — spinning up a test server, driving a real browser (Click/ClickAndWait, TextContent, GetAttribute), and asserting with hlivetest.Diff. Use when an HLive task mentions tests, Playwright, or verifying interactive behavior.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Browser testing. It works with Playwright and GitHub. The repository describes itself as: HLive is a server-side WebSocket based dynamic template-less view layer for Go. The licence is MIT.

When your agent uses it

  • Testing HLive UI behavior end-to-end — spinning up a test server
  • Driving a real browser (Click/ClickAndWait
  • Asserting with hlivetest.Diff
  • An HLive task mentions tests

Example prompts

  • “/hlive-testing”

What it can do on your machine

Read from SKILL.md and the folder at commit bc5f920. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • go
    • make

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Hlive Testing loads about 1.2k tokens when it runs. Until then it costs about 101 tokens; SKILL.md has 275 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~101
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from SamHennessy/hlive at commit bc5f920, republished under its MIT licence (© SamHennessy). 275 words, ~1,173 tokens.

Download SKILL.mdSave it as .claude/skills/hlive-testing/SKILL.md (or your agent's skills folder).
name
hlive-testing
description
Write browser tests for HLive pages using the hlivetest package (github.com/SamHennessy/hlive/hlivetest) and Playwright. Use when testing HLive UI behavior end-to-end — spinning up a test server, driving a real browser (Click/ClickAndWait, TextContent, GetAttribute), and asserting with hlivetest.Diff. Use when an HLive task mentions tests, Playwright, or verifying interactive behavior.

HLive Testing

HLive's behavior lives in the browser round-trip, so it's tested by driving a real browser with Playwright via the hlivetest package. Tests boot an HLive server, open a browser page against it, interact, and assert on the resulting DOM.

Setup

Tests need Playwright browsers installed:

shell
make install-test
# or: go run github.com/playwright-community/playwright-go/cmd/playwright install --with-deps

Because these are heavy browser tests, guard them so go test -short skips them (the harness below does this).

The harness pattern

HLive's own suite (hlivetest/pages/) uses a small per-package harness. Copy it into your test package:

go
package pages_test

import (
    "testing"

    l "github.com/SamHennessy/hlive"
    "github.com/SamHennessy/hlive/hlivetest"
    "github.com/playwright-community/playwright-go"
)

type harness struct {
    server   *hlivetest.Server
    pwpage   playwright.Page
    teardown func()
}

func setup(t *testing.T, pageFn func() *l.Page) harness {
    t.Helper()

    if testing.Short() {
        t.Skip("skipping test in short mode.")
    }

    h := harness{
        server: hlivetest.NewServer(pageFn),
        pwpage: hlivetest.NewBrowserPage(),
    }

    h.teardown = func() {
        if err := h.pwpage.Close(); err != nil {
            t.Error(err)
        }
    }

    if _, err := h.pwpage.Goto(h.server.HTTPServer.URL); err != nil {
        t.Fatal("goto page:", err)
    }

    return h
}

NewServer takes a page factory (func() *l.Page) — the same kind of function you hand to l.NewPageServer. In a structured app (see the hlive-project skill) that's an exported factory from your page package, so a test imports it and passes it straight in: setup(t, page.Home).

Give the elements you select stable ids. With hhtml use the Id(...) attribute:

go
import (
    l "github.com/SamHennessy/hlive"
    . "github.com/SamHennessy/hlive/hhtml"
)

func Counter() *l.Page {
    count := l.Box(0)
    page := l.NewPage()
    page.DOM().Body().Add(
        Button(Id("btn"), l.On("click", func(_ context.Context, _ l.Event) {
            count.Lock(func(v int) int { return v + 1 })
        }), "+"),
        Div(Id("count"), count),
    )
    return page
}

Writing a test

go
func TestClick_OneClick(t *testing.T) {
    t.Parallel()

    h := setup(t, pages.Click()) // pages.Click() returns the page factory
    defer h.teardown()

    hlivetest.Diff(t, "0", hlivetest.TextContent(t, h.pwpage, "#count"))

    hlivetest.ClickAndWait(t, h.pwpage, "#btn") // click, then wait for the diff

    hlivetest.Diff(t, "1", hlivetest.TextContent(t, h.pwpage, "#count"))
}

Use ClickAndWait before an assertion (it waits for HLive's diff to apply). Use plain Click for intermediate clicks where you'll assert only at the end:

go
for i := 0; i < 9; i++ {
    hlivetest.Click(t, h.pwpage, "#btn")
}
hlivetest.ClickAndWait(t, h.pwpage, "#btn")
hlivetest.Diff(t, "10", hlivetest.TextContent(t, h.pwpage, "#count"))

hlivetest helpers

All take (t, pwpage, ...) unless noted:

  • Click(selector) — click without waiting for the diff.
  • ClickAndWait(selector) — click, then block until the diff is applied.
  • TextContent(selector) string — element text.
  • GetAttribute(selector, attribute) string — an attribute value.
  • GetID(selector) string — the element's HLive id.
  • Title(pwpage) string — page title.
  • Diff(want, got any) — assert equal, reporting a diff on failure (t.Error).
  • DiffFatal(want, got any) — same but t.Fatal.
  • FatalOnErr(err) — fail fast on an error.
  • NewServer(pageFn) *Server / NewBrowserPage() playwright.Page — fixtures.

For interactions hlivetest doesn't wrap (typing, hover, selects), use the playwright.Page directly (h.pwpage.Fill(...), .Hover(...)), then assert with hlivetest.Diff.

Running

shell
go test ./...          # full run (needs browsers)
go test -short ./...   # skips the browser tests

Reference

hlivetest/hlivetest.go, hlivetest/server.go, hlivetest/browser.go, and the examples hlivetest/pages/harness_test.go, hlivetest/pages/click_test.go, hlivetest/pages/click.go. Larger suites live under systemtests/.

© SamHennessy, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugin/skills/hlive-testing of SamHennessy/hlive.

Open the folder on GitHubat commit bc5f920

Compare with similar skills

Hlive Testing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Hlive Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Hlive Testing this skillSamHennessy/hlive101—~1.2kAutomated safety check: PassMIT
Reprovaadin/web-components582—~1.3kAutomated safety check: PassNone
Reprovaadin/flow-components129—~1.3kAutomated safety check: PassNone
Site Bugfixdebs-obrien/debbie.codes142—~960Automated safety check: PassNone
Handsontable Performance Testinghandsontable/handsontable22k—~3.4kAutomated safety check: PassCustom licence
Record E2E Giflablup/backend.ai-webui133—~907Automated safety check: NotesLGPL-3.0

Similar skills

  • Repro

    vaadin/web-components

    Reproduce a Vaadin web component bug from a GitHub issue in vaadin/web-components.

    582 GitHub stars~1.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Repro

    vaadin/flow-components

    Reproduce a Vaadin Flow component bug from a GitHub issue in vaadin/flow-components or a component-specific issue in vaadin/flow.

    129 GitHub stars~1.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Site Bugfix

    debs-obrien/debbie.codes

    Reproduce and fix a debbie.codes site bug with browser proof and a Playwright regression when useful.

    142 GitHub stars~960 tokensUpdated 7 days ago
    Testing & QAAuto-check passed
  • Handsontable Performance Testing

    handsontable/handsontable

    Guide to Handsontable's performance-tests package: Playwright scenarios measured through CDP traces and compared against golden baselines taken from the develop branch.

    22k GitHub stars~3.4k tokensUpdated today
    Testing & QAAuto-check passed
  • Record E2E Gif

    lablup/backend.ai-webui

    Record Playwright e2e tests as one GIF per test case (video → ffmpeg palette GIF) and return a markdown table for a PR description.

    133 GitHub stars~907 tokensUpdated today
    Testing & QAAuto-check: notes
  • Dev Issue

    hmislk/hmis

    Run a GitHub issue through its full lifecycle end-to-end: investigate, discuss the approach, gather test context (department/data), implement, rebuild + local redeploy, verify with Playwright and…

    236 GitHub stars~5k tokensUpdated today
    Testing & QAAuto-check passed

More from SamHennessy/hlive

  • Hlive Core

    SamHennessy/hlive

    Build UIs with HLive, the server-side virtual-DOM framework for Go (github.com/SamHennessy/hlive).

    101 GitHub stars~2.2k tokensUpdated 3 mo ago
    Auto-check passed
  • Hlive Hhtml

    SamHennessy/hlive

    Build HLive page markup with the hhtml package (github.com/SamHennessy/hlive/hhtml) — typed, autocompleting Go builders for HTML5 tags and attributes (Div, Button, A, Input, Class, Href, ...).

    101 GitHub stars~1.3k tokensUpdated 3 mo ago
    Auto-check passed
  • Hlive Project

    SamHennessy/hlive

    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…

    101 GitHub stars~1.3k tokensUpdated 3 mo ago
    Auto-check passed
  • Hlivekit

    SamHennessy/hlive

    Use the hlivekit toolkit (github.com/SamHennessy/hlive/hlivekit) for common HLive needs — dynamic lists of components (ComponentList / hlivekit.List), giving an input focus, running server logic…

    101 GitHub stars~1.1k tokensUpdated 3 mo ago
    Auto-check passed

Categories

Questions about Hlive Testing

What does Hlive Testing do?

Write browser tests for HLive pages using the hlivetest package (github.com/SamHennessy/hlive/hlivetest) and Playwright. Hlive Testing is an agent skill from SamHennessy/hlive.com/SamHennessy/hlive/hlivetest) and Playwright.

When should I use Hlive Testing?

Hlive Testing fits situations like: testing HLive UI behavior end-to-end — spinning up a test server; driving a real browser (Click/ClickAndWait; asserting with hlivetest.Diff; an HLive task mentions tests.

How do I install Hlive Testing in Claude Code?

Run `npx skills add SamHennessy/hlive --skill hlive-testing -a claude-code`. Or copy the skill folder (plugin/skills/hlive-testing in SamHennessy/hlive) into .claude/skills/hlive-testing in your project. Claude Code loads it when a task matches its description.

How do I install Hlive Testing in Codex?

Run `npx skills add SamHennessy/hlive --skill hlive-testing -a codex`. Or copy the skill folder (plugin/skills/hlive-testing in SamHennessy/hlive) into .agents/skills/hlive-testing in your project. Codex loads it when a task matches its description.

Can I use Hlive Testing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add SamHennessy/hlive --skill hlive-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hlive-testing, .gemini/skills/hlive-testing, .github/skills/hlive-testing and .opencode/skills/hlive-testing in your project.

What does Hlive Testing need to run?

Going by SKILL.md and its folder, Hlive Testing needs the command-line tools its instructions call (go and make).

Does Hlive Testing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Hlive Testing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Hlive Testing use?

Hlive Testing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Hlive Testing use?

About 1.2k tokens (SKILL.md is roughly 4.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Hlive Testing?

Skills that share tags, products or a category with Hlive Testing: Repro (vaadin/web-components, 582 stars), Repro (vaadin/flow-components, 129 stars), Site Bugfix (debs-obrien/debbie.codes, 142 stars) and Handsontable Performance Testing (handsontable/handsontable, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Hlive Testing?

SamHennessy (a GitHub user) maintains it in SamHennessy/hlive, which has 101 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on July 2, 2026.

Source: SamHennessy/hlive on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.