- Home
- Skills
- Testing & Debugging
- Website Tests: Test-First Checks on the Built Site
Works with the AI Agents you already use
Website Tests: Test-First Checks on the Built Site
Native Node.js TDD for web projects that validates HTML build output, asset integrity, and client business rules.
Free
Website Tests: Test-First Checks on the Built Site
Example session with this skill installed
Add a "Show more" button to our event photo galleries, and write the test first so we know it keeps working.
- Read your context and instructions
- Compiled the website tests
Feature: "Show more" for event galleries (test first, example)
1. Test written first, and seen failing:
test("event galleries show the first three items, then a Show more button", () => {
const html = page("events");
const event = html.slice(html.indexOf('id="library-opening"'), html.indexOf('id="food-drive"'));
assert.equal((event.match(/aria-label="View photo:/g) || []).length, 3);
assert.match(event, /Show 1 more photo/);
assert.doesNotMatch(event, /ribbon-cutting/, "the fourth photo waits for Show more");
});
node --test tests/ → fail: found 4 photos, no button (the feature doesn't exist yet: the right reason).
2. Smallest change: EventGallery renders items.slice(0, 3) and a "Show N more" button that reveals up to six at a time.
3. Whole suite:
| Test | Result |
|---|---|
| Every page builds, one h1, title, description | pass |
Internal links and every srcset URL resolve | pass |
| Images have alt, width, height; under 200 KB | pass |
Menu order; exactly one aria-current per page | pass |
| Galleries: first three, then Show more | pass |
13 pass, 0 fail. Built and checked the page in a browser: the button reveals the fourth photo and moves focus to it.
Connects securely to your tools. The creator never sees your data.
About this skill
Ship web projects with confidence by testing the actual build output rather than framework internals. This skill implements a strict test-driven development (TDD) workflow for static sites and web applications, ensuring every feature, client rule, and content fact is verified against the final HTML files. It eliminates the risk of broken links, missing assets, or incorrect business logic reaching production.
What it does
- HTML Validation verifies that every page builds correctly with essential SEO tags, one
h1, and accessibility skip links. - Asset Integrity checks that every internal link, image source, and
srcsetURL points to a physical file in the build directory. - Fact Checking ensures specific client data like phone numbers or addresses appear where required while flagging unsourced claims.
- Performance Budgeting monitors image file sizes to ensure they stay under defined limits and include necessary width/height attributes.
- Feature Contracts validates complex behaviors like mailto subjects, coordinate strings, and conditional UI components like video players.
How it works
- Red Stage writes a failing test for the new behavior or bug fix using Node's native test runner.
- Green Stage implements the minimal code change necessary to pass the test.
- Build & Verify runs the full suite against the
/out/directory and performs a visual check of the generated page. - Refactor & Update maintains the suite by updating tests that fail due to deliberate design changes.
Frameworks & tools
This skill uses the native node:test runner and node:assert/strict module, requiring zero external npm dependencies. It operates directly on the filesystem using node:fs to parse built HTML and assets.
Why this beats prompting it yourself
Standard prompts often suggest heavy testing frameworks like Jest or Playwright which add bloat and slow down development. This skill enforces a "test-first" methodology centered on the actual build artifacts, ensuring that what the user sees is exactly what was tested without false positives from framework script payloads.
Use cases
- Regression Testing during a site-wide refactor to ensure navigation and contact details remain unchanged.
- Link Auditing to automatically find 404s in internal links and image sources before deployment.
- Content Enforcement to guarantee specific business rules, like ensuring WhatsApp links only appear on specific pages.
- Asset Optimization to catch oversized images or missing alt text during the build process.
Known limitations
Does not test live network requests or external URLs. Tests are restricted to the local build output and filesystem. Requires a build step that generates static HTML files.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 5 days ago
- Free with an Agensi account
Nothing to install. It runs in your AI agent.
- Optional
Node.js 18+ (built-in test runner, no packages)
Permissions
What's inside
Frequently Asked Questions
New in Testing & Debugging
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.