html-tools
This skill should be used when building single-file browser applications, client-side utilities, or interactive tools that need no backend. Covers patterns for state persistence, API integration, and advanced browser capabilities without React or build steps.
Best use case
html-tools is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
This skill should be used when building single-file browser applications, client-side utilities, or interactive tools that need no backend. Covers patterns for state persistence, API integration, and advanced browser capabilities without React or build steps.
Teams using html-tools should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/html-tools/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How html-tools Compares
| Feature / Agent | html-tools | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
This skill should be used when building single-file browser applications, client-side utilities, or interactive tools that need no backend. Covers patterns for state persistence, API integration, and advanced browser capabilities without React or build steps.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# HTML Tools
Build single-file applications combining HTML, CSS, and JavaScript that deliver useful functionality without build steps, frameworks, or servers.
Based on Simon Willison's patterns from building 150+ such tools.
## When to Use
- "Build me a tool that..."
- "Create a simple app to..."
- "Make a utility for..."
- Client-side data processing or visualization
- Tools that should work offline or be easily shared
- Prototypes that need to ship fast
## When to Skip
- Apps requiring authentication or persistent server storage
- Complex state management across many components
- Projects where React/Vue ecosystem benefits outweigh simplicity
## Core Principles
1. **Single file** — Inline CSS and JavaScript. One HTML file = complete tool.
2. **No React** — Vanilla JS or lightweight libraries only. Explicitly prompt "No React."
3. **No build step** — Load dependencies from CDNs, not npm.
4. **Small codebase** — Target a few hundred lines. If larger, reconsider scope.
## Development Workflow
### Starting a New Tool
1. Begin with Claude Artifacts, ChatGPT Canvas, or similar for rapid prototyping
2. Prompt explicitly: "Build this as a single HTML file. No React. No build steps."
3. For complex tools, use Claude Code or similar coding agents
4. Host on GitHub Pages for permanence
### Iterating
1. Remix existing tools as starting points
2. Record LLM transcripts in commit messages for documentation
3. Build debugging tools (clipboard viewer, CORS tester) to understand browser capabilities
## State Persistence Patterns
### URL State (for shareable links)
Store configuration in URL hash or query params. Users can bookmark or share exact state.
```javascript
// Save state to URL
function saveState(state) {
const params = new URLSearchParams(state);
history.replaceState(null, '', '?' + params.toString());
}
// Load state from URL
function loadState() {
return Object.fromEntries(new URLSearchParams(location.search));
}
// On page load
const state = loadState();
if (state.color) applyColor(state.color);
```
### localStorage (for secrets and large data)
Store API keys and user preferences without server exposure.
```javascript
// Store API key securely (never in URL)
localStorage.setItem('openai_api_key', key);
// Retrieve
const key = localStorage.getItem('openai_api_key');
// Prompt user if missing
if (!key) {
key = prompt('Enter your OpenAI API key:');
localStorage.setItem('openai_api_key', key);
}
```
## Data Input/Output Patterns
### Copy-Paste as Data Transfer
Treat clipboard as the universal data bus. Always include "Copy to clipboard" buttons.
```javascript
async function copyToClipboard(text) {
await navigator.clipboard.writeText(text);
showToast('Copied!');
}
// Rich clipboard (multiple formats)
async function copyRich(html, text) {
const blob = new Blob([html], { type: 'text/html' });
const item = new ClipboardItem({
'text/html': blob,
'text/plain': new Blob([text], { type: 'text/plain' })
});
await navigator.clipboard.write([item]);
}
```
### File Input Without Server
Accept file uploads that process entirely client-side.
```html
<input type="file" id="fileInput" accept=".json,.csv,.txt">
<script>
document.getElementById('fileInput').addEventListener('change', async (e) => {
const file = e.target.files[0];
const text = await file.text();
processFile(text, file.name);
});
</script>
```
### File Download Without Server
Generate and download files entirely in browser.
```javascript
function downloadFile(content, filename, mimeType = 'text/plain') {
const blob = new Blob([content], { type: mimeType });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = filename;
a.click();
URL.revokeObjectURL(url);
}
// Usage
downloadFile(JSON.stringify(data, null, 2), 'export.json', 'application/json');
```
## API Integration
### CORS-Enabled APIs (call directly from browser)
These APIs allow direct browser requests without a proxy:
| API | Use Case |
|-----|----------|
| GitHub API | Repos, gists, issues |
| PyPI | Package metadata |
| iNaturalist | Species observations |
| Bluesky | Social data |
| Mastodon | Fediverse data |
| OpenAI/Anthropic | LLM calls (with user's key) |
### LLM API Pattern
Call LLM APIs directly using localStorage-stored keys.
```javascript
async function callClaude(prompt) {
const key = localStorage.getItem('anthropic_api_key');
if (!key) throw new Error('No API key');
const response = await fetch('https://api.anthropic.com/v1/messages', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': key,
'anthropic-version': '2023-06-01',
'anthropic-dangerous-direct-browser-access': 'true'
},
body: JSON.stringify({
model: 'claude-sonnet-4-20250514',
max_tokens: 1024,
messages: [{ role: 'user', content: prompt }]
})
});
return response.json();
}
```
### GitHub Gists for Persistent State
Use gists as a free, CORS-friendly database.
```javascript
async function saveToGist(gistId, filename, content, token) {
await fetch(`https://api.github.com/gists/${gistId}`, {
method: 'PATCH',
headers: {
'Authorization': `token ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
files: { [filename]: { content: JSON.stringify(content) } }
})
});
}
```
## Advanced Capabilities
### Pyodide (Python in Browser)
Run Python, pandas, matplotlib entirely client-side.
```html
<script src="https://cdn.jsdelivr.net/pyodide/v0.24.1/full/pyodide.js"></script>
<script>
async function runPython(code) {
const pyodide = await loadPyodide();
await pyodide.loadPackage(['pandas', 'matplotlib']);
return pyodide.runPython(code);
}
</script>
```
### WebAssembly Libraries
Run compiled libraries in browser:
- **Tesseract.js** — OCR for images and PDFs
- **FFmpeg.wasm** — Video/audio processing
- **sql.js** — SQLite in browser
```html
<!-- Tesseract OCR example -->
<script src="https://cdn.jsdelivr.net/npm/tesseract.js@4/dist/tesseract.min.js"></script>
<script>
async function ocr(imageUrl) {
const result = await Tesseract.recognize(imageUrl, 'eng');
return result.data.text;
}
</script>
```
## Output Format
When building an HTML tool, deliver:
```
HTML TOOL: [name]
[Complete single-file HTML with inline CSS and JavaScript]
FEATURES:
- [Key capability 1]
- [Key capability 2]
USAGE:
[Brief instructions]
HOST: Save as .html and open in browser, or deploy to GitHub Pages.
```
## Reference
[Useful patterns for building HTML tools](https://simonwillison.net/2025/Dec/10/html-tools/) — Simon WillisonRelated Skills
html-to-image-automation
Automate Html To Image tasks via Rube MCP (Composio). Always search tools first for current schemas.
html-injection-testing
This skill should be used when the user asks to "test for HTML injection", "inject HTML into web pages", "perform HTML injection attacks", "deface web applications", or "test conten...
html-css-style-color-guide
Color usage guidelines and styling rules for HTML elements to ensure accessible, professional designs. Triggers on: **/*.html, **/*.css, **/*.js
advanced_tools
Use when finding files by name, searching code content, locating patterns with regex, exploring codebase, or batch refactoring across multiple files. Conforms to docs/reference/skill-routing-value-standard.md.
ai-tools
Google AI tools integration. Modules: Gemini API (multimodal: audio/image/video/PDF, 2M context), Gemini CLI (second opinions, Google Search, code review), NotebookLM (source-grounded Q&A). Capabilities: transcription, OCR, video analysis, image generation, web search, document queries. Actions: transcribe, analyze, extract, generate, query, search with Google AI. Keywords: Gemini, Gemini API, Gemini CLI, NotebookLM, audio transcription, image captioning, video analysis, PDF extraction, Google Search, second opinion, source-grounded, multimodal, web research. Use when: processing media files, needing second AI opinion, searching current web info, querying uploaded documents, generating images.
cli-modern-tools
Auto-suggest modern CLI tool alternatives (bat, eza, fd, ripgrep) for faster, more efficient command-line operations with 50%+ speed improvements
chrome-devtools
Control Chrome browser programmatically using chrome-devtools-mcp. Use when user asks to automate Chrome, debug web pages, take screenshots, evaluate JavaScript, inspect network requests, or interact with browser DevTools. Also use when asked about browser automation, web scraping, or testing websites.
api-tools
API testing, documentation, and development tools
ai-dev-tools-sync
Synchronize and update Claude Code and GitHub Copilot development tool configurations to work similarly. Use when asked to update Claude Code setup, update Copilot setup, sync AI dev tools, add new skills/prompts/agents across both platforms, or ensure Claude and Copilot configurations are aligned. Covers skills, prompts, agents, instructions, workflows, and chat modes.
agent-tools
Reference for configuring tool permissions when launching Claude Code agents. Use when setting up --allowedTools flags, restricting file access, or configuring agent permissions.
bgo
Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.
koan-entity-first
Entity<T> patterns, GUID v7 auto-generation, static methods vs manual repositories