cloudflare-api
Hit the Cloudflare REST API directly for operations that wrangler and MCP can't handle well. Bulk DNS, custom hostnames, email routing, cache purge, WAF rules,…
Extract a complete design system from an existing website or screenshot into a DESIGN.md file. Analyses colours, typography, component styles, spacing, and atmosphere through browser automation and HTML inspection. Produces a semantic design system document optimised for
$ npx -y skills add jezweb/claude-skills --skill design-system --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/design-systemContext preview
The summary Claude sees to decide when to auto-load this skill.
Extract a complete design system from an existing website or screenshot into a DESIGN.md file. Analyses colours, typography, component styles, spacing, and atmosphere through browser automation and HTML inspection. Produces a semantic design system document optimised for
name: design-system description: "Extract a complete design system from an existing website or screenshot into a DESIGN.md file. Analyses colours, typography, component styles, spacing, and atmosphere through browser automation and HTML inspection. Produces a semantic design system document optimised for consistent page generation. Triggers: 'extract design system', 'design system', 'create DESIGN.md', 'analyse the design', 'what design does this site use', 'extract styles from', 'reverse engineer the design'." allowed-tools: - Read - Write - Edit - Bash - Glob - Grep compatibility: claude-code-only
Analyse an existing website, HTML file, or screenshot and synthesise a semantic design system into a `DESIGN.md` file. The output is optimised for use with the `design-loop` skill and general page generation.
Ask the user for one of:
| Source | Method | |--------|--------| | **Live URL** | Browse via Playwright CLI or scraper, screenshot + extract HTML | | **Local HTML file** | Read the file directly | | **Screenshot image** | Analyse visually (limited — no exact hex extraction) | | **Existing project** | Scan `site/public/` for HTML files to analyse | | **Stitch project** | Use `@google/stitch-sdk` to fetch screen HTML + design theme |
1. **Browse the site** using Playwright CLI:
playwright-cli -s=design open {url}
playwright-cli -s=design screenshot --filename=.design/screenshots/source-desktop.png2. **Extract the full HTML** — either via scraper MCP or by reading the page source
3. **Resize and screenshot mobile** (375px):
playwright-cli -s=design resize 375 812 playwright-cli -s=design screenshot --filename=.design/screenshots/source-mobile.png
4. Close the session: `playwright-cli -s=design close`
Read the file directly and extract design tokens from the source.
Analyse the image visually. Note: colour extraction will be approximate without HTML source. Flag this limitation in the output.
If `@google/stitch-sdk` is installed and `STITCH_API_KEY` is set:
import { stitch } from "@google/stitch-sdk";
// List projects to find the target
const projects = await stitch.projects();
// Get project details (includes designTheme)
const project = stitch.project(projectId);
const screens = await project.screens();
// Get HTML from the main screen
const screen = screens[0]; // or find by title
const htmlUrl = await screen.getHtml();
const imageUrl = await screen.getImage();The Stitch `designTheme` object provides structured tokens directly:
{
"colorMode": "DARK",
"font": "INTER",
"roundness": "ROUND_EIGHT",
"customColor": "#40baf7",
"saturation": 3
}Map these to DESIGN.md sections:
Then also download and analyse the HTML for the full palette (Stitch's theme object only has the primary colour — the full palette is in the generated CSS).
Extract these from the HTML/CSS source:
Look in these locations (priority order):
1. **CSS custom properties** — `:root { --primary: #hex; }` or `@theme` blocks 2. **Tailwind config** — `<script>` block with `tailwind.config` or `@theme` in `<style>` 3. **Inline styles** — `style="color: #hex"` or `style="background: #hex"` 4. **Tailwind classes** — `bg-blue-600`, `text-gray-900` (map to palette) 5. **Computed from screenshot** — last resort, approximate
For each colour found, determine its **role**:
| Role | How to identify | |------|-----------------| | Primary | Buttons, links, active states, brand elements | | Background | `<body>` or `<html>` background | | Surface | Cards, containers, elevated elements | | Text Primary | `<h1>`, `<h2>`, main body text | | Text Secondary | Captions, metadata, muted text | | Border | Dividers, input borders, card borders | | Accent | Badges, notifications, highlights |
Extract:
| Token | Where to find | |-------|---------------| | Font families | Google Fonts `<link>`, `@import`, `font-family` in CSS | | Heading weights | `font-bold`, `font-semibold`, or explicit `font-weight` | | Body size | Base `font-size` on `<body>` or root | | Line height | `leading-*` classes or `line-height` CSS | | Letter spacing | `tracking-*` classes or `letter-spacing` CSS |
Identify patterns for:
**Critical**: The DESIGN.md should describe the design in **semantic, natural language** supported by exact values. This is not a CSS dump
Production workflow skills for Claude Code. Each skill guides Claude through a recipe to produce tangible output — scaffolded projects, generated assets, professional documents, deployed services. Ten plugins of practical, production-oriented skills.
Repo: jezweb/claude-skills
Hit the Cloudflare REST API directly for operations that wrangler and MCP can't handle well. Bulk DNS, custom hostnames, email routing, cache purge, WAF rules,…
Scaffold and deploy Cloudflare Workers with Hono routing, Vite plugin, and Static Assets. Describe project, scaffold structure, configure bindings, deploy. Use…
Generate Drizzle ORM schemas for Cloudflare D1 databases with correct D1-specific patterns. Produces schema files, migration commands, type exports, and…
Cloudflare D1 migration workflow: generate with Drizzle, inspect SQL for gotchas, apply to local and remote, fix stuck migrations, handle partial failures. Use…
Generate database seed scripts with realistic sample data. Reads Drizzle schemas or SQL migrations, respects foreign key ordering, produces idempotent…
Scaffold Hono API routes for Cloudflare Workers. Produces route files, middleware, typed bindings, Zod validation, error handling, and API_ENDPOINTS.md…