From ac-tools
Generates interactive, semantic HTML prototypes for human+AI agent use with Tailwind+DaisyUI (Tier A) or React+shadcn/ui+Vite (Tier B). Includes Playwright previews for iteration.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ac-tools:human-agentic-designThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generates live, interactive prototype designs optimized for dual human+agent interaction. Every prototype is equally usable by humans (visual interaction) and AI agents (programmatic interaction via accessibility trees).
Generates live, interactive prototype designs optimized for dual human+agent interaction. Every prototype is equally usable by humans (visual interaction) and AI agents (programmatic interaction via accessibility trees).
Detect available capabilities. Run these checks silently (no user prompting):
# Check Playwright MCP availability (tool list includes mcp__playwright__*)
# Check Node.js
which node 2>/dev/null && node --version
Tier Selection:
node binary found in PATH -> Offer Tier B (React + shadcn/ui + Vite)Report detected tier to user in one line:
Environment: Tier [A|B] | Playwright: [available|unavailable] | Node: [vX.Y.Z|not found]
If user explicitly requests a tier, honor that request regardless of detection.
Identify from user prompt:
If page type matches a built-in template, use it as starting point. Read the template from templates/<type>.html within this skill directory.
Tier A (HTML + Tailwind CDN + DaisyUI CDN):
cookbook/tier-a.md for boilerplate and CDN URLscookbook/agent-principles.md for the 8 mandatory principlesindex.html (or multiple linked HTML files for multi-page)<script> tagstemplates/<type>.html and customizeTier B (React + shadcn/ui + Vite):
cookbook/tier-b.md for scaffold structurecookbook/agent-principles.md for the 8 mandatory principlespackage.json, vite.config.ts, tsconfig.json, src/ treeMANDATORY for ALL generated code (both tiers):
<main>, <nav>, <header>, <footer>, <article>, <section>, <button> (not <div onclick>)data-testid on every interactive element (semantic names)<script type="application/ld+json"><label for>, <fieldset> + <legend>)Output directory: /tmp/claude-prototypes/<session-id>/
Generate <session-id> as: YYYYMMDD-HHMM-<slug> where <slug> is a 2-3 word kebab-case description of the prototype.
# Create output directory
mkdir -p /tmp/claude-prototypes/<session-id>
Write all files using the Write tool.
If Playwright MCP is available:
Tier A preview:
1. Start server: python3 -m http.server 8080 -d /tmp/claude-prototypes/<session-id>
2. Navigate: mcp__playwright__browser_navigate -> http://localhost:8080
3. Screenshot: mcp__playwright__browser_take_screenshot (desktop viewport)
4. A11y snapshot: mcp__playwright__browser_snapshot
5. Responsive: mcp__playwright__browser_resize (375x667) -> screenshot -> resize back
Tier B preview:
1. Install deps: cd /tmp/claude-prototypes/<session-id> && npm install
2. Start Vite: npm run dev (background)
3. Navigate: mcp__playwright__browser_navigate -> http://localhost:5173
4. Screenshot: mcp__playwright__browser_take_screenshot
5. A11y snapshot: mcp__playwright__browser_snapshot
6. Responsive: mcp__playwright__browser_resize (375x667) -> screenshot -> resize back
If Playwright MCP unavailable: Output file paths and manual open instructions:
Prototype ready at: /tmp/claude-prototypes/<session-id>/index.html
To preview:
Option 1: open /tmp/claude-prototypes/<session-id>/index.html
Option 2: cd /tmp/claude-prototypes/<session-id> && python3 -m http.server 8080
Then open http://localhost:8080
After generating, validate against checklist (read cookbook/validation.md):
<main> element<h1> elementdata-testid on all <button>, <input>, <select>, <textarea>, <a> elements<div onclick> patterns (use <button> instead)<input> elements have associated <label> or aria-label<script> presentReport validation result. Fix any failures before delivering.
When user provides feedback:
Provide:
npm install && npm run dev)The skill's allowed-tools includes Playwright MCP tools. If these tools are available in the current session, the preview loop is enabled. If not available (tools not registered), graceful fallback to file paths only.
Do NOT error or warn loudly about Playwright absence. Simply skip the preview step and provide file paths.
if command -v node &>/dev/null; then
NODE_VERSION=$(node --version)
echo "Node.js $NODE_VERSION detected - Tier B available"
else
echo "Node.js not found - Tier A only"
fi
If python3 -m http.server 8080 fails (port in use), try 8081, 8082, etc. up to 8090.
Vite auto-increments ports. If 5173 is taken, it uses 5174, etc. No manual handling needed.
| Scenario | Behavior |
|---|---|
| Playwright MCP unavailable | Output file paths, print manual open instructions. NO error. |
| Node.js not installed | Stay on Tier A. Inform user Tier B requires Node.js. |
| CDN unreachable (offline) | Warn user. Suggest: npm install -D tailwindcss daisyui |
| Vite dev server fails | Fall back to Tier A single-file generation. |
| Port conflict | Auto-increment port (see above). |
| Template not found | Generate from scratch using principles + tier cookbook. |
<div onclick> -- always use <button> or <a><main>, <nav>, <header>, <footer><h1> then <h3>)data-testid on interactive elementsdata-testid names like field1, btn2 -- use semantic namesAfter generation, output a summary:
## Prototype Generated
**Tier**: A (HTML + Tailwind CDN + DaisyUI CDN)
**Type**: <page-type>
**Files**:
- /tmp/claude-prototypes/<session-id>/index.html
**Preview**: [screenshot if Playwright available]
**A11y Validation**: PASS | X landmarks detected: main, nav, header, footer
**Semantic Checks**: PASS | h1 present, heading hierarchy valid, N data-testid attributes
To open: open /tmp/claude-prototypes/<session-id>/index.html
When testing responsive design via Playwright MCP:
| Device | Width | Height |
|---|---|---|
| Mobile | 375 | 667 |
| Tablet | 768 | 1024 |
| Desktop | 1440 | 900 |
cookbook/agent-principles.md -- 8 agent-friendly design principles with code examplescookbook/tier-a.md -- Tier A boilerplate, CDN URLs, vanilla JS patternscookbook/tier-b.md -- Tier B scaffold, package.json, Vite config, shadcn/ui setupcookbook/preview-loop.md -- Playwright MCP integration details and fallback behaviorcookbook/validation.md -- Semantic HTML validation checklisttemplates/landing.html -- Landing page templatetemplates/dashboard.html -- Dashboard templatetemplates/form.html -- Multi-step form templatetemplates/blog.html -- Blog/article templatetemplates/portfolio.html -- Portfolio/gallery templatenpx claudepluginhub waterplanai/agentic-config --plugin ac-toolsCreates high-fidelity HTML design artifacts including prototypes, slide decks, landing pages, UI mockups, and animations. Uses Playwright for browser rendering and screenshot verification.
**TRIGGER: about to populate `AskUserQuestion` options with `preview:` content for any visual UI / screen / layout / component / animation comparison.** STOP and ask the user one short question first: *"Would you like a quick inline chip comparison, or a full HTML prototype you can open in the browser?"* The chip is fast but flattens color, type, spacing, and motion into monospace text; the HTML prototype is heavier but real. Asking costs one question; skipping costs a full redo if they wanted HTML — always ask. **No carve-out for "simulate", "demo", "mock up", "quick decision" — those framings name the surface, not an exception.** When the user picks HTML, this skill creates HTML prototypes for visual design, component playgrounds, animation tuning, and design system exploration — even when the final surface is React, Swift, SwiftUI, Android, or another framework. Use whenever the user wants to mock, prototype, sketch, tune, or explore any UI element — components, animations, transitions, layouts, design systems — before committing to production code. HTML is the fastest design-thinking surface; reach for it even for non-web targets. For N alternatives use html-brainstorm-grid; for a single tunable component use this skill.
Generates production-grade frontend UIs via design reasoning framework, style selection, anti-pattern avoidance, accessibility, and responsive standards for React/Vue/Svelte/HTML.