From agent-spec-protocol
Validates an HTML file against the Agent Spec Protocol. Reads the file, runs every rule in the validation checklist, and returns a structured pass/fail report with XPath locations for every violation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agent-spec-protocol:validateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Validates an HTML file against the Agent Spec Protocol v1.0 spec.
Validates an HTML file against the Agent Spec Protocol v1.0 spec.
Read the full spec first: agent-spec-protocol skill.
An HTML file path. Read the full file before beginning.
Run every rule in the validation checklist. For each violation, record:
//section[3][@id='competitive'])Return a structured report:
AP Validation Report
File: [path]
Result: PASS | FAIL
Violations ([n]):
[xpath] — [rule] — found "[value]", expected [expected]
Warnings ([n]):
[xpath] — [advisory note]
Summary:
[n] sections checked
[n] required attributes verified
[n] dependency chains verified
If zero violations: Result: PASS. If any violation: Result: FAIL.
S1 — Valid HTML5: document must have <!DOCTYPE html>, <html>, <head>, <body>
S2 — Clean <html> element: <html> must not have any data-ap-* attributes
//html[@*[starts-with(name(),'data-ap-')]]data-ap-* attribute found on <html>S3 — Head metadata present: <head> must contain at least one <meta> with name attribute containing a colon (namespaced)
//head/meta[contains(@name,':')]SE1 — Element type: every AP section must be <section>, identified by presence of id starting with ap-
//*[@id[starts-with(.,'ap-')]]sectionSE2 — Required attributes: every AP section must have id, data-ap-agent, data-ap-stage, data-ap-status
<section id="ap-*">: check all four are present and non-emptySE3 — ID format: all AP section IDs must match ^ap-[a-z][a-z0-9-]*$
ap-SE4 — ID uniqueness: no two elements share the same id value
SE5 — Status vocabulary: data-ap-status must be one of:
pending, running, passed, failed, skipped, blocked
SE6 — Gate vocabulary: data-ap-gate (if present) must be one of:
required, optional, none
SE7 — Format vocabulary: data-ap-format (if present) must be one of:
prose, json, list, table, html, mixed
SE8 — Mutable vocabulary: data-ap-mutable (if present) must be one of:
agent, human, false
SE9 — Stage is integer: data-ap-stage must be a positive integer string (/^[1-9][0-9]*$/)
SE10 — Stage uniqueness: no two AP sections share the same data-ap-stage value
D1 — Depends-on references: every ID in data-ap-depends-on (space-separated) must match an existing id in the document
D2 — Context references: every ID in data-ap-context (space-separated) must match an existing id in the document
D3 — No circular dependencies: for each section with data-ap-depends-on, trace the dependency chain — no section may eventually depend on itself
C1 — No ap-* visual styling: ap-* classes are behavioral flags only. Flag a warning (not a violation) if an ap-* class is also targeted by a <style> block with non-layout CSS properties (color, font, background, border, etc.)
C2 — Advisory: sections with data-ap-mutable="false" should carry class ap-source-of-truth
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub revans/ap