Works with the AI Agents you already use

    Website Tests: Test-First Checks on the Built Site

    by Siyakha Digital by Thebe Ramathebane

    1

    Native Node.js TDD for web projects that validates HTML build output, asset integrity, and client business rules.

    Free

    Security scanned
    Website Tests: Test-First Checks on the Built Site

    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:

    TestResult
    Every page builds, one h1, title, descriptionpass
    Internal links and every srcset URL resolvepass
    Images have alt, width, height; under 200 KBpass
    Menu order; exactly one aria-current per pagepass
    Galleries: first three, then Show morepass

    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 srcset URL 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

    1. Red Stage writes a failing test for the new behavior or bug fix using Node's native test runner.
    2. Green Stage implements the minimal code change necessary to pass the test.
    3. Build & Verify runs the full suite against the /out/ directory and performs a visual check of the generated page.
    4. 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

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

    Read Files
    Listed5 days ago

    What's inside

    Frequently Asked Questions

    Unlike tools that test code logic, Site Tests validates the final HTML files in your build directory. This ensures that what your users actually see—including links, SEO tags, and asset paths—is functional and accurate before you deploy.

    This skill is compatible with any AI agent that can execute Node.js scripts and access a local filesystem. It is ideal for developers using static site generators (like Next.js, Astro, or Eleventy) that output to a directory like `/out` or `/dist`.

    No, this skill is built using the native Node.js test runner and file system modules. It requires zero external npm dependencies, keeping your project lightweight and avoiding the bloat associated with heavy testing frameworks like Jest or Playwright.

    Site Tests focuses exclusively on the local build output and filesystem integrity. It does not perform live network requests or verify external URLs, making it extremely fast and suitable for offline CI/CD pipelines.

    You receive the core TDD logic, a suite of pre-configured test patterns for HTML and asset validation, and the workflow instructions to integrate it into your agent's development cycle. This includes templates for link auditing, SEO verification, and content fact-checking.

    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.

    Free