Agent skill

Local Testing

by lobehub in lobehub/lobe-ui

Local browser verification for the lobe-ui component library and documentation site.

MITAuto-check passedFrontend & Design

Install Local Testing

skills CLI
$ npx skills add lobehub/lobe-ui --skill local-testing -a claude-code

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

GitHub CLI
$ gh skill install lobehub/lobe-ui local-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/lobehub/lobe-ui.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/local-testing .claude/skills/local-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
local-testing
GitHub stars
2.2k
Token cost
~2.1k tokens
SKILL.md length
526 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Local browser verification for the lobe-ui component library and documentation site.

  • Works in 8 steps: Open the canonical documentation path… → Confirm the current sidebar entry… → Open the manifest-backed standalone… → …
  • Verify component
  • SKILL.md covers Start or reuse the development…, Select a route from repository…, Stable selectors and Capture runtime failures, plus 2 more sections
  • Calls pnpm, jq and curl

What it does

Local Testing is an agent skill from lobehub/lobe-ui. Local browser verification for the lobe-ui component library and documentation site. Uses agent-browser against the React Router and Vite development server, including component pages, manifest-backed standalone demos, theme states, and responsive layouts. Trigger on local test, UI test, verify component, test in browser, visual check, or screenshot demo.

Its SKILL.md is about 2.1k 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 Frontend & Design, covering Design systems, Browser automation and Static sites and blogs. It works with Vite, React Router, React and TypeScript. The repository describes itself as: 🍭 Lobe UI - an open-source UI component library for building AIGC web apps. The licence is MIT.

When your agent uses it

  • Verify component
  • Test in browser
  • Screenshot demo

Example prompts

  • “/local-testing”

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Open the canonical documentation path and confirm the expected title.
  2. Confirm the current sidebar entry through [aria-current="page"].
  3. Open the manifest-backed standalone route and confirm [data-standalone-demo] exists.
  4. Exercise every changed interaction using accessible control names.
  5. Verify relevant light and dark appearance states through [data-demo-appearance].
  6. Verify desktop and mobile viewport behavior when layout is affected.
  7. Capture a screenshot for visual evidence and inspect semantic state with eval.
  8. Drain captured browser errors and inspect the development-server log.

What it can do on your machine

Read from SKILL.md and the folder at commit 6b4ecd3. 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:

    • pnpm
    • jq
    • curl
    • rg

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

  • Network

    No URLs in SKILL.md. Its commands use pnpm and curl, which can reach the network depending on how they are called.

    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

Local Testing loads about 2.1k tokens when it runs. Until then it costs about 93 tokens; SKILL.md has 526 words of instructions outside code blocks.

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

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 lobehub/lobe-ui at commit 6b4ecd3, republished under its MIT licence (© lobehub). 526 words, ~2,078 tokens.

Download SKILL.mdSave it as .claude/skills/local-testing/SKILL.md (or your agent's skills folder).
name
local-testing
description
Local browser verification for the lobe-ui component library and documentation site. Uses agent-browser against the React Router and Vite development server, including component pages, manifest-backed standalone demos, theme states, and responsive layouts. Trigger on local test, UI test, verify component, test in browser, visual check, or screenshot demo.

Local UI Automation Testing

Use agent-browser to verify the local documentation site visually and programmatically.

LayerCommand or toolAuthority
Development serverpnpm run docs:devReact Router and Vite
Documentation routessite/content/compatibility.jsonFrozen path authority
Navigation and document registryCompiled content manifestRuntime result
Standalone demo routessite/content/compatibility.jsonFrozen compatibility inventory
Browser automationagent-browserChromium through CDP

Do not assume a fixed port or derive standalone IDs from filenames. The server selects the first available port, while the compatibility manifest is the route authority.

Start or reuse the development server

Prefer the server already associated with the current task. Otherwise start one in the background and retain its log for port discovery and error inspection:

bash
LOG=/tmp/lobe-ui-docs-dev.log
nohup pnpm run docs:dev > "$LOG" 2>&1 &
disown

Wait for the actual URL emitted by Vite. The log contains a value matching http://localhost:[0-9]+; never substitute a hard-coded default.

bash
LOG=/tmp/lobe-ui-docs-dev.log
for i in $(seq 1 60); do
  URL=$(grep -Eo 'http://localhost:[0-9]+' "$LOG" | head -1)
  [ -n "$URL" ] && curl -fsS -o /dev/null "$URL" && break
  sleep 1
done
test -n "$URL"
printf '%s\n' "$URL"

If no URL appears, inspect the complete log before retrying. Do not start multiple servers merely because an expected port is occupied.

Select a route from repository manifests

Documentation pathnames are frozen in site/content/compatibility.json; this is the path authority. The content manifest is the compiled runtime result. For a known document source, query its canonical public path before opening it:

bash
SOURCE='src/Button/index.mdx'
DOC_PATH=$(jq -r --arg source "$SOURCE" \
  '.documents[] | select(.source == $source) | .pathname' \
  site/content/compatibility.json)
test -n "$DOC_PATH"
agent-browser open "$URL$DOC_PATH"

Standalone demo IDs come from site/content/compatibility.json. Query the manifest by source path:

bash
SOURCE='src/Button/demos/index.tsx'
jq -r --arg source "$SOURCE" \
  '.demoReferences[] | select(.source == $source) | "/~demos/" + .legacyId' \
  site/content/compatibility.json

Open the returned route directly. This preserves legacy IDs such as /~demos/docs-demo-docs and avoids reimplementing the canonical-ID algorithm in shell code.

bash
agent-browser open "$URL/~demos/docs-demo-docs"
agent-browser wait --load networkidle
agent-browser snapshot -i

Use the full documentation page when verifying navigation, API tables, search, table of contents, or the relationship between several demos. Use the standalone route for isolated component interaction and rendering checks.

Stable selectors

Prefer accessible names and repository-owned state attributes over generated class names.

SurfaceStable selector
Active documentation link[aria-current="page"]
Standalone demo root[data-standalone-demo]
Demo appearance[data-demo-appearance="light"] or [data-demo-appearance="dark"]
Demo editability[data-demo-editable="true"] or [data-demo-editable="false"]
Demo layout[data-demo-layout]
Live preview state[data-live-state="active"]
Documentation navigation[aria-label="Component documentation"]
Search dialog[aria-label="Search documentation"]
Source editor[aria-label="Demo source editor"]

Use role and accessible-name queries for desktop controls:

bash
agent-browser click 'button[aria-label="Search documentation"]'
agent-browser fill 'input[aria-label="Search documentation"]' 'Button'
agent-browser click 'button[aria-label="Use dark demo theme"]'
agent-browser eval 'document.querySelector("[aria-current=page]")?.textContent'

After switching to a mobile viewport, use button[aria-label="Open search"] from the header.

Re-run agent-browser snapshot -i after every navigation or hot update because element references may have been invalidated.

Show full SKILL.md (176 more words)Show less

Capture runtime failures

Install an interceptor before interaction when the scenario can trigger asynchronous rendering:

bash
agent-browser eval --stdin << 'EVALEOF'
(function () {
  window.__CAPTURED_ERRORS = [];
  var originalError = console.error;
  console.error = function () {
    var message = Array.from(arguments).map(function (value) {
      if (value instanceof Error) return value.stack || value.message;
      return typeof value === 'object' ? JSON.stringify(value) : String(value);
    }).join(' ');
    window.__CAPTURED_ERRORS.push(message);
    originalError.apply(console, arguments);
  };
  window.addEventListener('error', function (event) {
    window.__CAPTURED_ERRORS.push('window.onerror: ' + (event.error?.stack || event.message));
  });
  window.addEventListener('unhandledrejection', function (event) {
    window.__CAPTURED_ERRORS.push('unhandledrejection: ' + (event.reason?.stack || event.reason));
  });
  return 'installed';
})()
EVALEOF

After interaction, collect browser and server evidence:

bash
agent-browser eval 'JSON.stringify(window.__CAPTURED_ERRORS || [])'
tail -n 100 /tmp/lobe-ui-docs-dev.log | rg -i 'error|warn|failed'

Treat hydration warnings, uncaught exceptions, unhandled rejections, and failed module loads as test failures. A screenshot without these checks is insufficient.

Required verification flow

For a component change, exercise the smallest complete flow:

  1. Open the canonical documentation path and confirm the expected title.
  2. Confirm the current sidebar entry through [aria-current="page"].
  3. Open the manifest-backed standalone route and confirm [data-standalone-demo] exists.
  4. Exercise every changed interaction using accessible control names.
  5. Verify relevant light and dark appearance states through [data-demo-appearance].
  6. Verify desktop and mobile viewport behavior when layout is affected.
  7. Capture a screenshot for visual evidence and inspect semantic state with eval.
  8. Drain captured browser errors and inspect the development-server log.

Example semantic inspection:

bash
agent-browser eval --stdin << 'EVALEOF'
JSON.stringify({
  activeLink: document.querySelector('[aria-current="page"]')?.textContent?.trim(),
  appearance: document.querySelector('[data-demo-appearance]')?.getAttribute('data-demo-appearance'),
  editable: document.querySelector('[data-demo-editable]')?.getAttribute('data-demo-editable'),
  standalone: Boolean(document.querySelector('[data-standalone-demo]')),
})
EVALEOF

Cleanup

Keep the server alive across related iterations. When explicit cleanup is required, derive its port from the same log and stop only that listener:

bash
PORT=$(grep -Eo 'http://localhost:[0-9]+' /tmp/lobe-ui-docs-dev.log | head -1 | sed 's/.*://')
PIDS=$(lsof -nP -iTCP:"$PORT" -sTCP:LISTEN -t)
[ -n "$PIDS" ] && kill $PIDS

Do not close all browser sessions or terminate unrelated development servers.

© lobehub, 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 .agents/skills/local-testing of lobehub/lobe-ui.

Open the folder on GitHubat commit 6b4ecd3

Compare with similar skills

Local 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.

Local Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Local Testing this skilllobehub/lobe-ui2.2k—~2.1kAutomated safety check: PassMIT
Cometchat React V7 Patternscometchat/cometchat-skills129—~1.2kAutomated safety check: NotesMIT
Frontend Design UltimateaAAaqwq/AGI-Super-Team1052 repos~2.7kAutomated safety check: PassMIT
Shadcn Tailwind UILiarMTTT/TavernWeave148—~1.7kAutomated safety check: PassCustom licence
Redesign My Landingpageinstructa/agent-skills139—~1.8kAutomated safety check: PassNone
Devwaynesutton/markdown-site628—~854Automated safety check: PassMIT

Similar skills

  • Cometchat React V7 Patterns

    cometchat/cometchat-skills

    Framework wiring for the React v7 UI Kit across Vite, Create React App, Next.js, React Router (incl.

    129 GitHub stars~1.2k tokensUpdated 2 days ago
    Frontend & DesignAuto-check: notes
  • Frontend Design Ultimate

    aAAaqwq/AGI-Super-Team

    Create distinctive, production-grade static sites with React, Tailwind CSS, and shadcn/ui — no mockups needed.

    105 GitHub starsUsed in 2 repos~2.7k tokens
    Frontend & DesignAuto-check passed
  • Shadcn Tailwind UI

    LiarMTTT/TavernWeave

    Build, restyle, or review accessible React interfaces that use shadcn/ui, Radix UI primitives, and Tailwind CSS.

    148 GitHub stars~1.7k tokensUpdated 3 days ago
    Frontend & DesignAuto-check passed
  • Redesign My Landingpage

    instructa/agent-skills

    Build, critique, and iterate high-converting marketing or product landing pages using React + Vite + TypeScript + Tailwind and shadcn/ui components, with all icons sourced from Iconify.

    139 GitHub stars~1.8k tokensUpdated 8 days ago
    Frontend & DesignAuto-check passed
  • Dev

    waynesutton/markdown-site

    Full-stack Convex development guidelines covering React, Vite, TypeScript, mutations, auth, design system, and documentation practices.

    628 GitHub stars~854 tokensUpdated 4 mo ago
    Frontend & DesignAuto-check passed
  • Vite Shadcn Tailwind4

    IgorWarzocha/Opencode-Workflows

    Initialize shadcn/ui + Tailwind CSS v4 in Vite projects (Vite-specific, not Next.js/Remix).

    122 GitHub stars~1.3k tokensUpdated 8 mo ago
    Frontend & DesignAuto-check passed

More from lobehub/lobe-ui

  • Building With Lobe UI

    lobehub/lobe-ui

    Build UI with the LobeHub design ecosystem — @lobehub/ui (plus its base-ui, chat, mobile, awesome, brand, mdx, i18n namespaces), @lobehub/icons, @lobehub/charts, @lobehub/fluent-emoji and…

    2.2k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Using Docs Kit

    lobehub/lobe-ui

    Set up and author a documentation site with @lobehub/docs-kit (the lobedocs CLI, React Router + Vite static docs used by ui.lobehub.com).

    2.2k GitHub stars~2.8k tokensUpdated today
    Auto-check passed

Questions about Local Testing

What does Local Testing do?

Local browser verification for the lobe-ui component library and documentation site. Local Testing is an agent skill from lobehub/lobe-ui. Local browser verification for the lobe-ui component library and documentation site.

When should I use Local Testing?

Local Testing fits situations like: verify component; test in browser; screenshot demo.

How do I install Local Testing in Claude Code?

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

How do I install Local Testing in Codex?

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

Can I use Local 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 lobehub/lobe-ui --skill local-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/local-testing, .gemini/skills/local-testing, .github/skills/local-testing and .opencode/skills/local-testing in your project.

What does Local Testing need to run?

Going by SKILL.md and its folder, Local Testing needs the command-line tools its instructions call (pnpm, jq, curl and rg).

Does Local Testing access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Local 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 Local Testing use?

Local 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 Local Testing use?

About 2.1k tokens (SKILL.md is roughly 8.3k 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 Local Testing?

Skills that share tags, products or a category with Local Testing: Cometchat React V7 Patterns (cometchat/cometchat-skills, 129 stars), Frontend Design Ultimate (aAAaqwq/AGI-Super-Team, 105 stars), Shadcn Tailwind UI (LiarMTTT/TavernWeave, 148 stars) and Redesign My Landingpage (instructa/agent-skills, 139 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Local Testing?

lobehub (a GitHub organization) maintains it in lobehub/lobe-ui, which has 2,217 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 7, 2026.

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