xpath-testing — community xpath-testing, explorbot, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Perfect for Web Scraping Agents needing precise HTML element targeting via XPath expressions. AI Agent for Explorotary Browser Testing

testomatio testomatio
[0]
[0]
Updated: 3/5/2026

Agent Capability Analysis

The xpath-testing skill by testomatio is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

Perfect for Web Scraping Agents needing precise HTML element targeting via XPath expressions.

Core Value

Empowers agents to iteratively query HTML files using XPath, ensuring accurate element identification without directly reading HTML files, leveraging CLI tools for seamless interaction with HTML structures in the 'test-data/' directory.

Capabilities Granted for xpath-testing

Debugging complex XPath queries
Automating HTML element extraction
Testing web page structure changes

! Prerequisites & Limits

  • Requires CLI tool access
  • Limited to HTML files in 'test-data/' directory
  • No direct HTML file reading allowed
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

xpath-testing

Install xpath-testing, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

XPath Testing Skill

Test XPath expressions against HTML files in test-data/ to find specific elements. You play a "game" — given a user's request, iteratively query XPath until you find the right element and a unique XPath for it.

Rules

  • NEVER read HTML files directly — only use the CLI tool to query them
  • You may list files in test-data/ to see what's available
  • Work iteratively: start broad, then narrow down

Workflow

1. Identify Target

Ask the user:

  • Which HTML file in test-data/? (list files if needed)
  • What element are they looking for?

2. Explore with Broad Queries

Start with broad XPath patterns to understand the page:

bash
1bun .claude/skills/xpath-testing/xpath-query.ts test-data/<file> "//button" 2bun .claude/skills/xpath-testing/xpath-query.ts test-data/<file> "//a[@href]" 3bun .claude/skills/xpath-testing/xpath-query.ts test-data/<file> "//*[@role]"

3. Narrow Down

Use the tool output to refine your XPath until you find the target element. Run as many queries as needed.

4. Present Result

Once you find the element, present:

  1. Brief explanation of what the element is
  2. Element outer HTML from the tool output
  3. Unique XPath that matches exactly 1 element

5. Verify Uniqueness

MANDATORY: Run the tool one final time with your unique XPath to confirm it returns exactly 1 result. If it returns more than 1, refine further.

CLI Tool Reference

bash
1bun .claude/skills/xpath-testing/xpath-query.ts <html-file> <xpath-expression>

Exit codes:

  • 0 — elements found
  • 1 — no matches
  • 2 — invalid XPath or error

XPath Cheat Sheet

Basic Element Selectors

//button                          All buttons
//a[@href]                        All links with href
//input                           All inputs
//select                          All select dropdowns
//form                            All forms

ARIA and Accessibility

//*[@role='button']               Elements with button role
//*[@role='link']                 Elements with link role
//*[@role='navigation']           Navigation landmarks
//*[@aria-label]                  Elements with aria-label
//*[@aria-label='Close']          Specific aria-label
//*[@aria-expanded='true']        Expanded elements

Attribute Matching

//input[@type='email']            Email inputs
//input[@name='username']         Input by name
//*[@id='main-content']           Element by ID
//*[contains(@class, 'btn')]      Class contains "btn"
//*[starts-with(@id, 'user-')]    ID starts with "user-"

Text Content

//*[text()='Submit']              Exact text match
//*[contains(text(), 'Save')]     Text contains "Save"
//button[contains(., 'Delete')]   Button containing "Delete" (includes descendants)
//a[normalize-space()='Login']    Link with normalized text "Login"

Structural / Combined

//form//input[@type='email']      Email input inside a form
//nav//a[@href]                   Links inside nav
//table//tr                       Table rows
//*[@role='dialog']//button       Buttons inside dialogs
//ul/li                           Direct child list items
//div[@class='modal']//input      Inputs inside modal div

Positional

(//button)[1]                     First button
(//button)[last()]                Last button
//ul/li[position()<=3]            First 3 list items
//table//tr[2]/td[3]              Cell at row 2, col 3

Logical Operators

//input[@type='text' or @type='email']    Text or email inputs
//button[not(@disabled)]                   Non-disabled buttons
//*[@role='button' and @aria-label]        Buttons with aria-label

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is xpath-testing?

Perfect for Web Scraping Agents needing precise HTML element targeting via XPath expressions. AI Agent for Explorotary Browser Testing

How do I install xpath-testing?

Run the command: npx killer-skills add testomatio/explorbot/xpath-testing. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for xpath-testing?

Key use cases include: Debugging complex XPath queries, Automating HTML element extraction, Testing web page structure changes.

Which IDEs are compatible with xpath-testing?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for xpath-testing?

Requires CLI tool access. Limited to HTML files in 'test-data/' directory. No direct HTML file reading allowed.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add testomatio/explorbot/xpath-testing. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use xpath-testing immediately in the current project.

Related Skills

Looking for an alternative to xpath-testing or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI