claude-tap is a local proxy and trace viewer for AI coding agents, recording and displaying their API requests, prompts, tool calls, responses, context, and token usage. It helps developers inspect and compare agent runs from tools such as Claude Code, Codex CLI, Gemini CLI, Cursor CLI, and others, while the catalogue skills and instruction support work with the project.
Borrowing it
Nothing to install: this file belongs to liaohch3/claude-tap. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/liaohch3/claude-tap/main/.agents/skills/js-in-html-testing/SKILL.mdgit clone --depth 1 https://github.com/liaohch3/claude-tapWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/liaohch3/claude-tap/js-in-html-testing)<a href="https://agentmods.dev/skills/liaohch3/claude-tap/js-in-html-testing"><img src="https://agentmods.dev/badge/skills/liaohch3/claude-tap/js-in-html-testing.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00025 | $0.00858 |
| Opus 5 | $0.00013 | $0.00429 |
| Sonnet 5 | $0.00005 | $0.00172 |
| Haiku 4.5 | $0.00003 | $0.00086 |
Grade A, and why
js-in-html-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.
JS-in-HTML Two-Layer Testing Strategy
For JavaScript logic embedded in HTML files (e.g., diff navigation in viewer.html), use a two-layer testing approach.
Layer 1: Python Unit Tests (fast algorithm verification)
Replicate core JS algorithms in Python and verify correctness via pytest.
Best for: pure computation logic, state decisions, matching algorithms — anything that doesn't depend on the DOM.
Example: tests/test_diff_matching.py
# Replicate JS findPrevSameModel / findNextSameModel
def find_diff_parent_by_prefix(entries, idx): ...
def find_next_by_prefix(entries, idx): ...
# Replicate JS updateNavButtons state computation
def compute_nav_button_states(entries, cur_idx):
prev_idx = find_diff_parent_by_prefix(entries, cur_idx)
...
return (prev_enabled, next_enabled)
Advantages: fast (0.02s), no browser dependency, integrates with existing pytest setup.
Layer 2: Playwright Browser Integration Tests (DOM interaction verification)
Generate HTML with test data embedded, open it in real Chromium via Playwright, and verify DOM state and user interactions.
Best for: button disabled states, overlay show/hide, keyboard events, click navigation, etc.
Example: tests/test_nav_browser.py
Building test HTML
def _build_test_html():
from claude_tap.viewer import VIEWER_SCRIPT_ANCHOR, _read_viewer_template
template = _read_viewer_template()
records = [json.dumps(e) for e in TEST_ENTRIES]
data_js = "const EMBEDDED_TRACE_DATA = [\n" + ",\n".join(records) + "\n];\n"
# Inject data into template
return template.replace(
VIEWER_SCRIPT_ANCHOR,
f"<script>\n{data_js}</script>\n{VIEWER_SCRIPT_ANCHOR}",
1,
)
Playwright fixture
@pytest.fixture(scope="module")
def browser_page(html_file):
from playwright.sync_api import sync_playwright
pw = sync_playwright().start()
browser = pw.chromium.launch(headless=True)
page = browser.new_page()
page.goto(f"file://{html_file}")
page.wait_for_selector(".sidebar-item", timeout=5000)
yield page
browser.close()
pw.stop()
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 124 lines · 25 tokens per session scan A d6391de81352
js-in-html-testing is a skill published in the GitHub repository liaohch3/claude-tap (3,177 stars, last pushed 13d ago), licensed MIT. It adds 25 tokens to every session and 858 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
prodtest
Senior-QA test pass on a newly implemented feature. Detects the project's real test stack, writes unit and functional/integration tests, then drives the running app with Playwright for end-to-end coverage, saving screenshots to a gitignored folder for human review. Asks upfront whether found bugs should be fixed or…
chrome-ext-testing
This skill should be used when writing or setting up tests for a Chrome extension. Trigger when: "test chrome extension", "extension unit test", "extension e2e test", "Vitest extension", "Playwright extension", "@webext-core/fake-browser", "test content script", "test service worker", "test messaging", "test storage"…
ui-test
Runs UI tests described in plain English by driving real Chrome via the Claude-in-Chrome extension. Covers end-to-end flows (clicks, forms, assertions), visual checks (screenshot + optional baseline diff), accessibility (axe-core), performance (Web Vitals + light Lighthouse-style metrics), and an interactive --debug…
playwright-stability
Make a Playwright E2E suite stable and realistic — kill flaky tests and authenticate like a real user via storageState (login once, reuse). Use when E2E tests are flaky, slow, re-login in every test, mock auth instead of using it, or when hardening a suite before relying on it.
audit-ui-e2e
Runs a beginner-mind end-to-end UI audit of any running app — local dev server, staging, production, or a specific URL. Drives Chrome through every interactive element on the target surface, collects structured findings (severity, category, where, symptom, impact, repro, triage), and hands the result off to…
capture-screens
Automatically navigates a web app using Playwright MCP and captures context-aware named screenshots at each product feature state. Names each file semantically based on context (e.g., checkout-payment-form-filled.png). Outputs a manifest.json mapping filenames to descriptions and a summary report. Use when documenting…