{"items":[{"id":"cmugwhwrb01ltqu06tm2ixgo9","slug":"addyosmani-web-quality-skills-accessibility","name":"accessibility","description":"Audit and improve web accessibility following WCAG 2.2 guidelines. Use when asked to \"improve accessibility\", \"a11y audit\", \"WCAG compliance\", \"screen reader support\", \"keyboard navigation\", or \"make accessible\".","authorId":"gh:addyosmani","authorName":"addyosmani","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":2836,"pricePerCall":0,"manifest":{"name":"accessibility","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Audit and improve web accessibility following WCAG 2.2 guidelines. Use when asked to \"improve accessibility\", \"a11y audit\", \"WCAG compliance\", \"screen reader support\", \"keyboard navigation\", or \"make accessible\".","permissions":[],"systemPrompt":"# Accessibility (a11y)\n\nComprehensive accessibility guidelines based on WCAG 2.2 and Lighthouse accessibility audits. Goal: make content usable by everyone, including people with disabilities.\n\n## Evidence-led audit workflow\n\nWhen a rendered page is available:\n\n1. Run a live Lighthouse Accessibility audit when that capability is available; with Chrome DevTools MCP, use `lighthouse_audit`. Use mobile navigation mode for a general public page or snapshot mode when reloading would lose authenticated or user-created state.\n2. Use failed audit nodes to localize the relevant component or template instead of searching the whole repository for generic patterns.\n3. Inspect a rendered accessibility-tree snapshot for names, roles, states, landmarks, and heading structure; with Chrome DevTools MCP, use `take_snapshot`. Exercise the affected flow with the keyboard.\n4. Fix the source, then re-run the same audit and manual interaction.\n\nIf the live tools are unavailable, use Lighthouse CLI or axe for automated coverage and complete the same manual checks. Automated tools detect only a subset of accessibility barriers: a score of 100 is not WCAG conformance, and a low score does not replace issue-level evidence.\n\n## WCAG Principles: POUR\n\n| Principle | Description |\n|-----------|-------------|\n| **P**erceivable | Content can be perceived through different senses |\n| **O**perable | Interface can be operated by all users |\n| **U**nderstandable | Content and interface are understandable |\n| **R**obust | Content works with assistive technologies |\n\n## Conformance levels\n\n| Level | Requirement | Target |\n|-------|-------------|--------|\n| **A** | Minimum accessibility | Must pass |\n| **AA** | Standard compliance | Should pass (legal requirement in many jurisdictions) |\n| **AAA** | Enhanced accessibility | Nice to have |\n\n---\n\n## Perceivable\n\n### Text alternatives (1.1)\n\n**Images require alt text:**\n```html\n<!-- ❌ Missing alt -->\n<img src=\"chart.png\">\n\n<!-- ✅ Descriptive alt -->\n<img src=\"chart.png\" alt=\"Bar chart showing 40% increase in Q3 sales\">\n\n<!-- ✅ Decorative image (empty alt) -->\n<img src=\"decorative-border.png\" alt=\"\" role=\"presentation\">\n\n<!-- ✅ Complex image with longer description -->\n<figure>\n  <img src=\"infographic.png\" alt=\"2024 market trends infographic\" \n       aria-describedby=\"infographic-desc\">\n  <figcaption id=\"infographic-desc\">\n    <!-- Detailed description -->\n  </figcaption>\n</figure>\n```\n\n**Icon buttons need accessible names:**\n```html\n<!-- ❌ No accessible name -->\n<button><svg><!-- menu icon --></svg></button>\n\n<!-- ✅ Using aria-label -->\n<button aria-label=\"Open menu\">\n  <svg aria-hidden=\"true\"><!-- menu icon --></svg>\n</button>\n\n<!-- ✅ Using visually hidden text -->\n<button>\n  <svg aria-hidden=\"true\"><!-- menu icon --></svg>\n  <span class=\"visually-hidden\">Open menu</span>\n</button>\n```\n\n**Visually hidden class:**\n```css\n.visually-hidden {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  padding: 0;\n  margin: -1px;\n  overflow: hidden;\n  clip: rect(0, 0, 0, 0);\n  white-space: nowrap;\n  border: 0;\n}\n```\n\n### Color contrast (1.4.3, 1.4.6)\n\n| Text Size | AA minimum | AAA enhanced |\n|-----------|------------|--------------|\n| Normal text (< 18px / < 14px bold) | 4.5:1 | 7:1 |\n| Large text (≥ 18px / ≥ 14px bold) | 3:1 | 4.5:1 |\n| UI components & graphics | 3:1 | 3:1 |\n\n```css\n/* ❌ Low contrast (2.5:1) */\n.low-contrast {\n  color: #999;\n  background: #fff;\n}\n\n/* ✅ Sufficient contrast (7:1) */\n.high-contrast {\n  color: #333;\n  background: #fff;\n}\n\n/* ✅ Focus states need contrast too (3:1 against background, WCAG 1.4.11) */\n:focus-visible {\n  outline: 2px solid currentColor;\n  outline-offset: 2px;\n}\n```\n\n**Don't rely on color alone:**\n```html\n<!-- ❌ Only color indicates error -->\n<input class=\"error-border\">\n<style>.error-border { border-color: red; }</style>\n\n<!-- ✅ Color + icon + text -->\n<div class=\"field-error\">\n  <input aria-invalid=\"true\" aria-describedby=\"email-error\">\n  <span id=\"email-error\" class=\"error-message\">\n    <svg aria-hidden=\"true\"><!-- error icon --></svg>\n    Please enter a valid email address\n  </span>\n</div>\n```\n\n### Media alternatives (1.2)\n\n```html\n<!-- Video with captions -->\n<video controls>\n  <source src=\"video.mp4\" type=\"video/mp4\">\n  <track kind=\"captions\" src=\"captions.vtt\" srclang=\"en\" label=\"English\" default>\n  <track kind=\"descriptions\" src=\"descriptions.vtt\" srclang=\"en\" label=\"Descriptions\">\n</video>\n\n<!-- Audio with transcript -->\n<audio controls>\n  <source src=\"podcast.mp3\" type=\"audio/mp3\">\n</audio>\n<details>\n  <summary>Transcript</summary>\n  <p>Full transcript text...</p>\n</details>\n```\n\n---\n\n## Operable\n\n### Keyboard accessible (2.1)\n\n**All functionality must be keyboard accessible.** Prefer native interactive elements — `<button>`, `<a href>`, and form controls handle Enter/Space activation, focus, and assistive-tech semantics for free. Only add manual keyboard handling when you cannot use a native element.\n\n```html\n<!-- ❌ Non-interactive element with click only: not focusable, no keyboard activation -->\n<div class=\"card\" onclick=\"handleAction()\">Open</div>\n\n<!-- ✅ Best: use a native button -->\n<button type=\"button\" onclick=\"handleAction()\">Open</button>\n```\n\n```javascript\n// ✅ When you MUST use a non-interactive element (e.g. div with role=\"button\"),\n// make it focusable AND handle keyboard activation. Do NOT add this to a native\n// <button> — Enter/Space already fire click, so you'd double-trigger.\nelement.setAttribute('role', 'button');\nelement.setAttribute('tabindex', '0');\nelement.addEventListener('click', handleAction);\nelement.addEventListener('keydown', (e) => {\n  if (e.key === 'Enter' || e.key === ' ') {\n    e.preventDefault();\n    handleAction();\n  }\n});\n```\n\n**No keyboard traps.** Users must be able to Tab into and out of every component. Use the [modal focus trap pattern](references/A11Y-PATTERNS.md#modal-focus-trap) for dialogs—the native `<dialog>` element handles this automatically.\n\n### Focus visible (2.4.7)\n\n```css\n/* ❌ Never remove focus outlines */\n*:focus { outline: none; }\n\n/* ✅ Use :focus-visible for keyboard-only focus */\n:focus {\n  outline: none;\n}\n\n:focus-visible {\n  outline: 2px solid currentColor; /* inherits text color → already contrast-checked */\n  outline-offset: 2px;\n}\n\n/* ✅ Or pick a brand color and verify ≥3:1 contrast against every background it lands on */\nbutton:focus-visible {\n  box-shadow: 0 0 0 3px rgba(0, 95, 204, 0.5);\n}\n```\n\n### Focus not obscured (2.4.11) — new in 2.2\n\nWhen an element receives keyboard focus, it must not be entirely hidden by other author-created content such as sticky headers, footers, or overlapping panels. At Level AAA (2.4.12), no part of the focused element may be hidden.\n\n```css\n/* ✅ Account for sticky headers when scrolling to focused elements */\n:target {\n  scroll-margin-top: 80px;\n}\n\n/* ✅ Ensure focused items clear fixed/sticky bars */\n:focus {\n  scroll-margin-top: 80px;\n  scroll-margin-bottom: 60px;\n}\n```\n\n### Skip links (2.4.1)\n\nProvide a skip link so keyboard users can bypass repetitive navigation. See the [skip link pattern](references/A11Y-PATTERNS.md#skip-link) for full markup and styles.\n\n### Target size (2.5.8) — new in 2.2\n\nInteractive targets must be at least **24 × 24 CSS pixels** (AA). Exceptions: inline text links, elements where the browser controls the size, and targets where a 24px circle centered on the bounding box does not overlap another target.\n\n```css\n/* ✅ Minimum target size */\nbutton,\n[role=\"button\"],\ninput[type=\"checkbox\"] + label,\ninput[type=\"radio\"] + label {\n  min-width: 24px;\n  min-height: 24px;\n}\n\n/* ✅ Comfortable target size (recommended 44×44) */\n.touch-target {\n  min-width: 44px;\n  min-height: 44px;\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n}\n```\n\n### Dragging movements (2.5.7) — new in 2.2\n\nAny action that requires dragging must have a single-pointer alternative (e.g., buttons, inputs). See the [dragging movements pattern](references/A11Y-PATTERNS.md#dragging-movements) for a sortable-list example.\n\n### Timing (2.2)\n\n```javascript\n// Allow users to extend time limits\nfunction showSessionWarning() {\n  const modal = createModal({\n    title: 'Session Expiring',\n    content: 'Your session will expire in 2 minutes.',\n    actions: [\n      { label: 'Extend session', action: extendSession },\n      { label: 'Log out', action: logout }\n    ],\n    timeout: 120000\n  });\n}\n```\n\n### Motion (2.3)\n\n```css\n/* Respect reduced motion preference */\n@media (prefers-reduced-motion: reduce) {\n  *,\n  *::before,\n  *::after {\n    animation-duration: 0.01ms !important;\n    animation-iteration-count: 1 !important;\n    transition-duration: 0.01ms !important;\n    scroll-behavior: auto !important;\n  }\n}\n```\n\n---\n\n## Understandable\n\n### Page language (3.1.1)\n\n```html\n<!-- ❌ No language specified -->\n<html>\n\n<!-- ✅ Language specified -->\n<html lang=\"en\">\n\n<!-- ✅ Language changes within page -->\n<p>The French word for hello is <span lang=\"fr\">bonjour</span>.</p>\n```\n\n### Consistent navigation (3.2.3)\n\n```html\n<!-- Navigation should be consistent across pages -->\n<nav aria-label=\"Main\">\n  <ul>\n    <li><a href=\"/\" aria-current=\"page\">Home</a></li>\n    <li><a href=\"/products\">Products</a></li>\n    <li><a href=\"/about\">About</a></li>\n  </ul>\n</nav>\n```\n\n### Consistent help (3.2.6) — new in 2.2\n\nIf a help mechanism (contact info, chat widget, FAQ link, self-help option) is repeated across multiple pages, it must appear in the **same relative order** each time. Users who rely on consistent placement shouldn't have to hunt for help on every page.\n\n### Form labels (3.3.2)\n\nEvery input needs a programmatically associated label. See the [form labels pattern](references/A11Y-PATTERNS.md#form-labels) for explicit, implicit, and instructional examples.\n\n### Error handling (3.3.1, 3.3.3)\n\nAnnounce errors to screen readers with `role=\"alert\"` or `aria-live`, set `aria-invalid=\"true\"` on invalid fields, and focus the first error on submit. See the [error handling pattern](references/A11Y-PATTERNS.md#error-handling) for full markup and JS.\n\n### Redundant entry (3.3.7) — new in 2.2\n\nDon't force users to re-enter information they already provided in the same session. Auto-populate from earlier steps, or let users select from previously entered values. Exceptions: security re-confirmation and content that has expired.\n\n```html\n<!-- ✅ Auto-fill shipping address from billing -->\n<fieldset>\n  <legend>Shipping address</legend>\n  <label>\n    <input type=\"checkbox\" id=\"same-as-billing\" checked>\n    Same as billing address\n  </label>\n  <!-- Fields auto-populated when checked -->\n</fieldset>\n```\n\n### Accessible authentication (3.3.8) — new in 2.2\n\nLogin flows must not rely on cognitive function tests (e.g., remembering a password, solving a puzzle) unless at least one of:\n- A copy-paste or autofill mechanism is available\n- An alternative method exists (e.g., passkey, SSO, email link)\n- The test uses object recognition or personal content (AA only; AAA removes this exception)\n\n```html\n<!-- ✅ Allow paste in password fields -->\n<input type=\"password\" id=\"password\" autocomplete=\"current-password\">\n\n<!-- ✅ Offer passwordless alternatives -->\n<button type=\"button\">Sign in with passkey</button>\n<button type=\"button\">Email me a login link</button>\n```\n\n---\n\n## Robust\n\n### ARIA usage (4.1.2)\n\n**Prefer native elements:**\n```html\n<!-- ❌ ARIA role on div -->\n<div role=\"button\" tabindex=\"0\">Click me</div>\n\n<!-- ✅ Native button -->\n<button>Click me</button>\n\n<!-- ❌ ARIA checkbox -->\n<div role=\"checkbox\" aria-checked=\"false\">Option</div>\n\n<!-- ✅ Native checkbox -->\n<label><input type=\"checkbox\"> Option</label>\n```\n\n**When ARIA is needed,** use the correct roles and states. See the [ARIA tabs pattern](references/A11Y-PATTERNS.md#aria-tabs) for a complete tablist example.\n\n### Live regions (4.1.3)\n\nUse `aria-live` regions to announce dynamic content changes without moving focus. See the [live regions pattern](references/A11Y-PATTERNS.md#live-regions-and-notifications) for markup and a `showNotification()` helper.\n\n---\n\n## Testing checklist\n\n### Automated testing\n\nPrefer a live Lighthouse audit that returns failing rendered nodes directly to the agent. With Chrome DevTools MCP, this is `lighthouse_audit`. Otherwise:\n\n```bash\n# Lighthouse accessibility audit\nnpx lighthouse https://example.com --only-categories=accessibility\n\n# axe-core\nnpm install @axe-core/cli -g\naxe https://example.com\n```\n\n### Manual testing\n\n- [ ] **Keyboard navigation:** Tab through entire page, use Enter/Space to activate\n- [ ] **Screen reader:** Test with VoiceOver (Mac), NVDA (Windows), or TalkBack (Android)\n- [ ] **Zoom:** Content usable at 200% zoom\n- [ ] **High contrast:** Test with Windows High Contrast Mode\n- [ ] **Reduced motion:** Test with `prefers-reduced-motion: reduce`\n- [ ] **Focus order:** Logical and follows visual order\n- [ ] **Target size:** Interactive elements meet 24×24px minimum\n\nSee the [screen reader commands reference](references/A11Y-PATTERNS.md#screen-reader-commands) for VoiceOver and NVDA shortcuts.\n\n---\n\n## Common issues by impact\n\n### Critical (fix immediately)\n1. Missing form labels\n2. Missing image alt text\n3. Insufficient color contrast\n4. Keyboard traps\n5. No focus indicators\n\n### Serious (fix before launch)\n1. Missing page language\n2. Missing heading structure\n3. Non-descriptive link text\n4. Auto-playing media\n5. Missing skip links\n\n### Moderate (fix soon)\n1. Missing ARIA labels on icons\n2. Inconsistent navigation\n3. Missing error identification\n4. Timing without controls\n5. Missing landmark regions\n\n## References\n\n- [WCAG 2.2 Quick Reference](https://www.w3.org/WAI/WCAG22/quickref/)\n- [WAI-ARIA Authoring Practices](https://www.w3.org/WAI/ARIA/apg/)\n- [Deque axe Rules](https://dequeuniversity.com/rules/axe/)\n- [Web Quality Audit](../web-quality-audit/SKILL.md)\n- [WCAG criteria reference](references/WCAG.md)\n- [Accessibility code patterns](references/A11Y-PATTERNS.md)","schemaVersion":1},"repoUrl":"https://github.com/addyosmani/web-quality-skills/tree/main/skills/accessibility","tags":["accessibility","agent-skills","claude-skills","core-web-vitals","lighthouse","skills","testing","web-performance","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"web-quality-skills","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:52:02.306Z","lockfiles":[]},"forks":247,"owner":"addyosmani","stars":2836,"topics":["accessibility","agent-skills","claude-skills","core-web-vitals","lighthouse","skills","testing","web-performance"],"license":"MIT","fullName":"addyosmani/web-quality-skills","homepage":null,"language":"Shell","pushedAt":"2026-08-24T21:07:36Z","avatarUrl":"https://avatars.githubusercontent.com/u/110953?v=4","crawledAt":"2026-09-25T11:52:00.939Z","openIssues":5,"manifestFile":"SKILL.md","manifestPath":"skills/accessibility/SKILL.md","defaultBranch":"main"},"readme":"# Accessibility (a11y)\n\nComprehensive accessibility guidelines based on WCAG 2.2 and Lighthouse accessibility audits. Goal: make content usable by everyone, including people with disabilities.\n\n## Evidence-led audit workflow\n\nWhen a rendered page is available:\n\n1. Run a live Lighthouse Accessibility audit when that capability is available; with Chrome DevTools MCP, use `lighthouse_audit`. Use mobile navigation mode for a general public page or snapshot mode when reloading would lose authenticated or user-created state.\n2. Use failed audit nodes to localize the relevant component or template instead of searching the whole repository for generic patterns.\n3. Inspect a rendered accessibility-tree snapshot for names, roles, states, landmarks, and heading structure; with Chrome DevTools MCP, use `take_snapshot`. Exercise the affected flow with the keyboard.\n4. Fix the source, then re-run the same audit and manual interaction.\n\nIf the live tools are unavailable, use Lighthouse CLI or axe for automated coverage and complete the same manual checks. Automated tools detect only a subset of accessibility barriers: a score of 100 is not WCAG conformance, and a low score does not replace issue-level evidence.\n\n## WCAG Principles: POUR\n\n| Principle | Description |\n|-----------|-------------|\n| **P**erceivable | Content can be perceived through different senses |\n| **O**perable | Interface can be operated by all users |\n| **U**nderstandable | Content and interface are understandable |\n| **R**obust | Content works with assistive technologies |\n\n## Conformance levels\n\n| Level | Requirement | Target |\n|-------|-------------|--------|\n| **A** | Minimum accessibility | Must pass |\n| **AA** | Standard compliance | Should pass (legal requirement in many jurisdictions) |\n| **AAA** | Enhanced accessibility | Nice to have |\n\n---\n\n## Perceivable\n\n### Text alternatives (1.1)\n\n**Images require alt text:**\n```html\n<!-- ❌ Missing alt -->\n<img src=\"chart.png\">\n\n<!-- ✅ Descriptive alt -->\n<img src=\"chart.png\" alt=\"Bar chart showing 40% increase in Q3 sales\">\n\n<!-- ✅ Decorative image (empty alt) -->\n<img src=\"decorative-border.png\" alt=\"\" role=\"presentation\">\n\n<!-- ✅ Complex image with longer description -->\n<figure>\n  <img src=\"infographic.png\" alt=\"2024 market trends infographic\" \n       aria-describedby=\"infographic-desc\">\n  <figcaption id=\"infographic-desc\">\n    <!-- Detailed description -->\n  </figcaption>\n</figure>\n```\n\n**Icon buttons need accessible names:**\n```html\n<!-- ❌ No accessible name -->\n<button><svg><!-- menu icon --></svg></button>\n\n<!-- ✅ Using aria-label -->\n<button aria-label=\"Open menu\">\n  <svg aria-hidden=\"true\"><!-- menu icon --></svg>\n</button>\n\n<!-- ✅ Using visually hidden text -->\n<button>\n  <svg aria-hidden=\"true\"><!-- menu icon --></svg>\n  <span class=\"visually-hidden\">Open menu</span>\n</button>\n```\n\n**Visually hidden class:**\n```css\n.visually-hidden {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  padding: 0;\n  margin: -1px;\n  overflow: hidden;\n  clip: rect(0, 0, 0, 0);\n  white-space: nowrap;\n  border: 0;\n}\n```\n\n### Color contrast (1.4.3, 1.4.6)\n\n| Text Size | AA minimum | AAA enhanced |\n|-----------|------------|--------------|\n| Normal text (< 18px / < 14px bold) | 4.5:1 | 7:1 |\n| Large text (≥ 18px / ≥ 14px bold) | 3:1 | 4.5:1 |\n| UI components & graphics | 3:1 | 3:1 |\n\n```css\n/* ❌ Low contrast (2.5:1) */\n.low-contrast {\n  color: #999;\n  background: #fff;\n}\n\n/* ✅ Sufficient contrast (7:1) */\n.high-contrast {\n  color: #333;\n  background: #fff;\n}\n\n/* ✅ Focus states need contrast too (3:1 against background, WCAG 1.4.11) */\n:focus-visible {\n  outline: 2px solid currentColor;\n  outline-offset: 2px;\n}\n```\n\n**Don't rely on color alone:**\n```html\n<!-- ❌ Only color indicates error -->\n<input class=\"error-border\">\n<style>.error-border { border-color: red; }</style>\n\n<!-- ✅ Color + icon + text -->\n<div class=\"field-error\">\n  <input aria-invalid=\"true\" aria-describedby=\"email-error\">\n  <span id=\"email-error\" class=\"error-message\">\n ","createdAt":"2026-09-25T11:52:02.328Z","updatedAt":"2026-09-25T11:52:02.328Z"},{"id":"cmugwhwrr01lzqu06fo6t51qq","slug":"addyosmani-web-quality-skills-best-practices","name":"best-practices","description":"Apply modern web development best practices for security, compatibility, and code quality. Use when asked to \"apply best practices\", \"security audit\", \"modernize code\", \"code quality review\", or \"check for vulnerabilities\".","authorId":"gh:addyosmani","authorName":"addyosmani","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":2836,"pricePerCall":0,"manifest":{"name":"best-practices","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Apply modern web development best practices for security, compatibility, and code quality. Use when asked to \"apply best practices\", \"security audit\", \"modernize code\", \"code quality review\", or \"check for vulnerabilities\".","permissions":[],"systemPrompt":"# Best practices\n\nModern web development standards based on Lighthouse best practices audits. Covers security, browser compatibility, and code quality patterns.\n\n## Evidence-led audit workflow\n\nWhen a rendered page is available:\n\n1. Run a live Lighthouse Best Practices audit when that capability is available; with Chrome DevTools MCP, use `lighthouse_audit`. Use navigation mode for a normal page load or snapshot mode when the current state must be preserved.\n2. Inspect the listed console and network failures and fetch individual details only when they support a finding.\n3. Supplement runtime evidence with dependency, header, configuration, and source inspection; Lighthouse is not a complete security assessment.\n4. Fix the implicated code, re-run the same audit, and keep security findings separate from style preferences.\n\nIf live tools are unavailable, use the Lighthouse CLI plus focused dependency and header checks. Never report a high Lighthouse score as proof that the application is secure.\n\n## Security\n\nRead [the security reference](references/SECURITY.md) when security is in scope or a live audit surfaces a related failure. It covers HTTPS/HSTS, CSP and Trusted Types, Subresource Integrity, headers, dependencies, sanitization, and cookies.\n\nAt minimum:\n\n* **Use HTTPS without mixed content.** Add HSTS only after confirming every relevant subdomain supports HTTPS.\n* **Treat a strict CSP as defense in depth.** Prefer nonces or hashes and test with report-only before enforcement.\n* **Sanitize untrusted HTML and protect DOM XSS sinks.** Prefer text APIs when markup is not required.\n* **Pin and review third-party code.** Use SRI where the delivery model supports it and keep dependencies patched.\n* **Verify response headers at runtime.** Source configuration alone does not prove what the deployed page sends.\n\n## Browser compatibility\n\n### Doctype declaration\n\n```html\n<!-- ❌ Missing or invalid doctype -->\n<HTML>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\">\n\n<!-- ✅ HTML5 doctype -->\n<!DOCTYPE html>\n<html lang=\"en\">\n```\n\n### Character encoding\n\n```html\n<!-- ❌ Missing or late charset -->\n<html>\n<head>\n  <title>Page</title>\n  <meta charset=\"UTF-8\">\n</head>\n\n<!-- ✅ Charset as first element in head -->\n<html>\n<head>\n  <meta charset=\"UTF-8\">\n  <title>Page</title>\n</head>\n```\n\n### Viewport meta tag\n\n```html\n<!-- ❌ Missing viewport -->\n<head>\n  <title>Page</title>\n</head>\n\n<!-- ✅ Responsive viewport -->\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  <title>Page</title>\n</head>\n```\n\n### Feature detection\n\n```javascript\n// ❌ Browser detection (brittle)\nif (navigator.userAgent.includes('Chrome')) {\n  // Chrome-specific code\n}\n\n// ✅ Feature detection\nif ('IntersectionObserver' in window) {\n  // Use IntersectionObserver\n} else {\n  // Fallback\n}\n\n// ✅ Using @supports in CSS\n@supports (display: grid) {\n  .container {\n    display: grid;\n  }\n}\n\n@supports not (display: grid) {\n  .container {\n    display: flex;\n  }\n}\n```\n\n### Polyfills (when needed)\n\nPrefer **bundling polyfills at build time** (Babel/SWC + `core-js`, or `@vitejs/plugin-legacy`) targeted by your supported-browsers list. This eliminates the runtime check entirely and avoids shipping polyfill bytes to modern browsers.\n\nIf you must load a polyfill at runtime, append a script element — never use `document.write` (it blocks the parser and is broken in async/deferred contexts):\n\n```html\n<script>\n  if (!('fetch' in window)) {\n    const s = document.createElement('script');\n    s.src = '/polyfills/fetch.js';\n    s.defer = true;\n    document.head.appendChild(s);\n  }\n</script>\n```\n\n**Never load polyfills from a third-party CDN you don't control.** The `polyfill.io` service was [compromised in mid-2024](https://sansec.io/research/polyfill-supply-chain-attack) in a supply-chain attack and used to serve malware to ~100k sites. Self-host, or use a vetted mirror (e.g. [Cloudflare's `cdnjs` polyfill build](https://blog.cloudflare.com/polyfill-io-now-available-on-cdnjs-reduce-your-supply-chain-risk/)) — and pin the version with [Subresource Integrity](#subresource-integrity-sri-for-third-party-scripts).\n\n---\n\n## Deprecated APIs\n\n### Avoid these\n\n```javascript\n// ❌ document.write (blocks parsing)\ndocument.write('<script src=\"...\"></script>');\n\n// ✅ Dynamic script loading\nconst script = document.createElement('script');\nscript.src = '...';\ndocument.head.appendChild(script);\n\n// ❌ Synchronous XHR (blocks main thread)\nconst xhr = new XMLHttpRequest();\nxhr.open('GET', url, false); // false = synchronous\n\n// ✅ Async fetch\nconst response = await fetch(url);\n\n// ❌ Application Cache (deprecated)\n<html manifest=\"cache.manifest\">\n\n// ✅ Service Workers\nif ('serviceWorker' in navigator) {\n  navigator.serviceWorker.register('/sw.js');\n}\n```\n\n### Event listener passive\n\n```javascript\n// ❌ Non-passive touch/wheel (may block scrolling)\nelement.addEventListener('touchstart', handler);\nelement.addEventListener('wheel', handler);\n\n// ✅ Passive listeners (allows smooth scrolling)\nelement.addEventListener('touchstart', handler, { passive: true });\nelement.addEventListener('wheel', handler, { passive: true });\n\n// ✅ If you need preventDefault, be explicit\nelement.addEventListener('touchstart', handler, { passive: false });\n```\n\n---\n\n## Console & errors\n\n### No console errors\n\n```javascript\n// ❌ Errors in production\nconsole.log('Debug info'); // Remove in production\nthrow new Error('Unhandled'); // Catch all errors\n\n// ✅ Proper error handling\ntry {\n  riskyOperation();\n} catch (error) {\n  // Log to error tracking service\n  errorTracker.captureException(error);\n  // Show user-friendly message\n  showErrorMessage('Something went wrong. Please try again.');\n}\n```\n\n### Error boundaries (React)\n\n```jsx\nclass ErrorBoundary extends React.Component {\n  state = { hasError: false };\n  \n  static getDerivedStateFromError(error) {\n    return { hasError: true };\n  }\n  \n  componentDidCatch(error, info) {\n    errorTracker.captureException(error, { extra: info });\n  }\n  \n  render() {\n    if (this.state.hasError) {\n      return <FallbackUI />;\n    }\n    return this.props.children;\n  }\n}\n\n// Usage\n<ErrorBoundary>\n  <App />\n</ErrorBoundary>\n```\n\n### Global error handler\n\n```javascript\n// Catch unhandled errors\nwindow.addEventListener('error', (event) => {\n  errorTracker.captureException(event.error);\n});\n\n// Catch unhandled promise rejections\nwindow.addEventListener('unhandledrejection', (event) => {\n  errorTracker.captureException(event.reason);\n});\n```\n\n---\n\n## Source maps\n\n### Production configuration\n\n```javascript\n// ❌ Source maps exposed in production\n// webpack.config.js\nmodule.exports = {\n  devtool: 'source-map', // Exposes source code\n};\n\n// ✅ Hidden source maps (uploaded to error tracker)\nmodule.exports = {\n  devtool: 'hidden-source-map',\n};\n\n// ✅ Or no source maps in production\nmodule.exports = {\n  devtool: process.env.NODE_ENV === 'production' ? false : 'source-map',\n};\n```\n\n**Strip `sourcesContent` from production maps** when uploading to your error tracker. By default, bundlers embed the full original source inside the `.map` file — anyone who obtains the map (including via a misconfigured upload step) gets your unminified code. Configure your bundler to omit `sourcesContent`, or use a Sentry/Bugsnag CLI flag that does so when uploading.\n\nFor Vite, prefer `sourcemap: 'hidden'` over `'true'` so the `//# sourceMappingURL=` comment isn't emitted into the bundle.\n\n---\n\n## Performance best practices\n\n### Avoid blocking patterns\n\n```javascript\n// ❌ Blocking script\n<script src=\"heavy-library.js\"></script>\n\n// ✅ Deferred script\n<script defer src=\"heavy-library.js\"></script>\n\n// ❌ Blocking CSS import\n@import url('other-styles.css');\n\n// ✅ Link tags (parallel loading)\n<link rel=\"stylesheet\" href=\"styles.css\">\n<link rel=\"stylesheet\" href=\"other-styles.css\">\n```\n\n### Efficient event handlers\n\n```javascript\n// ❌ Handler on every element\nitems.forEach(item => {\n  item.addEventListener('click', handleClick);\n});\n\n// ✅ Event delegation\ncontainer.addEventListener('click', (e) => {\n  if (e.target.matches('.item')) {\n    handleClick(e);\n  }\n});\n```\n\n### Memory management\n\n```javascript\n// ❌ Memory leak (never removed)\nconst handler = () => { /* ... */ };\nwindow.addEventListener('resize', handler);\n\n// ✅ Cleanup when done\nconst handler = () => { /* ... */ };\nwindow.addEventListener('resize', handler);\n\n// Later, when component unmounts:\nwindow.removeEventListener('resize', handler);\n\n// ✅ Using AbortController\nconst controller = new AbortController();\nwindow.addEventListener('resize', handler, { signal: controller.signal });\n\n// Cleanup:\ncontroller.abort();\n```\n\n---\n\n## Code quality\n\n### Valid HTML\n\n```html\n<!-- ❌ Invalid HTML -->\n<div id=\"header\">\n<div id=\"header\"> <!-- Duplicate ID -->\n\n<ul>\n  <div>Item</div> <!-- Invalid child -->\n</ul>\n\n<a href=\"/\"><button>Click</button></a> <!-- Invalid nesting -->\n\n<!-- ✅ Valid HTML -->\n<header id=\"site-header\">\n</header>\n\n<ul>\n  <li>Item</li>\n</ul>\n\n<a href=\"/\" class=\"button\">Click</a>\n```\n\n### Semantic HTML\n\n```html\n<!-- ❌ Non-semantic -->\n<div class=\"header\">\n  <div class=\"nav\">\n    <div class=\"nav-item\">Home</div>\n  </div>\n</div>\n<div class=\"main\">\n  <div class=\"article\">\n    <div class=\"title\">Headline</div>\n  </div>\n</div>\n\n<!-- ✅ Semantic HTML5 -->\n<header>\n  <nav>\n    <a href=\"/\">Home</a>\n  </nav>\n</header>\n<main>\n  <article>\n    <h1>Headline</h1>\n  </article>\n</main>\n```\n\n### Image aspect ratios\n\n```html\n<!-- ❌ Distorted images -->\n<img src=\"photo.jpg\" width=\"300\" height=\"100\">\n<!-- If actual ratio is 4:3, this squishes the image -->\n\n<!-- ✅ Preserve aspect ratio -->\n<img src=\"photo.jpg\" width=\"300\" height=\"225\">\n<!-- Actual 4:3 dimensions -->\n\n<!-- ✅ CSS object-fit for flexibility -->\n<img src=\"photo.jpg\" style=\"width: 300px; height: 200px; object-fit: cover;\">\n```\n\n---\n\n## Permissions & privacy\n\n### Request permissions properly\n\n```javascript\n// ❌ Request on page load (bad UX, often denied)\nnavigator.geolocation.getCurrentPosition(success, error);\n\n// ✅ Request in context, after user action\nfindNearbyButton.addEventListener('click', async () => {\n  // Explain why you need it\n  if (await showPermissionExplanation()) {\n    navigator.geolocation.getCurrentPosition(success, error);\n  }\n});\n```\n\n### Permissions policy\n\n```html\n<!-- Restrict powerful features -->\n<meta http-equiv=\"Permissions-Policy\" \n      content=\"geolocation=(), camera=(), microphone=()\">\n\n<!-- Or allow for specific origins -->\n<meta http-equiv=\"Permissions-Policy\" \n      content=\"geolocation=(self 'https://maps.example.com')\">\n```\n\n---\n\n## Audit checklist\n\n### Security (critical)\n- [ ] HTTPS enabled, no mixed content\n- [ ] No vulnerable dependencies (`npm audit`)\n- [ ] CSP headers configured (with `frame-ancestors`, `base-uri`, `form-action`)\n- [ ] `require-trusted-types-for 'script'` enforced (or report-only during rollout)\n- [ ] Third-party `<script>`/`<link rel=\"stylesheet\">` pinned with SRI hashes\n- [ ] Security headers present (HSTS, X-Content-Type-Options, Referrer-Policy)\n- [ ] No exposed source maps (and `sourcesContent` stripped from uploaded ones)\n\n### Compatibility\n- [ ] Valid HTML5 doctype\n- [ ] Charset declared first in head\n- [ ] Viewport meta tag present\n- [ ] No deprecated APIs used\n- [ ] Passive event listeners for scroll/touch\n\n### Code quality\n- [ ] No console errors\n- [ ] Valid HTML (no duplicate IDs)\n- [ ] Semantic HTML elements used\n- [ ] Proper error handling\n- [ ] Memory cleanup in components\n\n### UX\n- [ ] No intrusive interstitials\n- [ ] Permission requests in context\n- [ ] Clear error messages\n- [ ] Appropriate image aspect ratios\n\n## Tools\n\n| Tool | Purpose |\n|------|---------|\n| `npm audit` | Dependency vulnerabilities |\n| [SecurityHeaders.com](https://securityheaders.com) | Header analysis |\n| [W3C Validator](https://validator.w3.org) | HTML validation |\n| Live Lighthouse audit (Chrome DevTools MCP: `lighthouse_audit`) | Rendered Best Practices checks for agents |\n| Lighthouse CLI | Best Practices audit fallback |\n| [Observatory](https://observatory.mozilla.org) | Security scan |\n\n## References\n\n- [MDN Web Security](https://developer.mozilla.org/en-US/docs/Web/Security)\n- [OWASP Top 10](https://owasp.org/www-project-top-ten/)\n- [Web Quality Audit](../web-quality-audit/SKILL.md)","schemaVersion":1},"repoUrl":"https://github.com/addyosmani/web-quality-skills/tree/main/skills/best-practices","tags":["accessibility","agent-skills","claude-skills","core-web-vitals","lighthouse","skills","testing","web-performance","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"web-quality-skills","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:52:02.306Z","lockfiles":[]},"forks":247,"owner":"addyosmani","stars":2836,"topics":["accessibility","agent-skills","claude-skills","core-web-vitals","lighthouse","skills","testing","web-performance"],"license":"MIT","fullName":"addyosmani/web-quality-skills","homepage":null,"language":"Shell","pushedAt":"2026-08-24T21:07:36Z","avatarUrl":"https://avatars.githubusercontent.com/u/110953?v=4","crawledAt":"2026-09-25T11:52:00.939Z","openIssues":5,"manifestFile":"SKILL.md","manifestPath":"skills/best-practices/SKILL.md","defaultBranch":"main"},"readme":"# Best practices\n\nModern web development standards based on Lighthouse best practices audits. Covers security, browser compatibility, and code quality patterns.\n\n## Evidence-led audit workflow\n\nWhen a rendered page is available:\n\n1. Run a live Lighthouse Best Practices audit when that capability is available; with Chrome DevTools MCP, use `lighthouse_audit`. Use navigation mode for a normal page load or snapshot mode when the current state must be preserved.\n2. Inspect the listed console and network failures and fetch individual details only when they support a finding.\n3. Supplement runtime evidence with dependency, header, configuration, and source inspection; Lighthouse is not a complete security assessment.\n4. Fix the implicated code, re-run the same audit, and keep security findings separate from style preferences.\n\nIf live tools are unavailable, use the Lighthouse CLI plus focused dependency and header checks. Never report a high Lighthouse score as proof that the application is secure.\n\n## Security\n\nRead [the security reference](references/SECURITY.md) when security is in scope or a live audit surfaces a related failure. It covers HTTPS/HSTS, CSP and Trusted Types, Subresource Integrity, headers, dependencies, sanitization, and cookies.\n\nAt minimum:\n\n* **Use HTTPS without mixed content.** Add HSTS only after confirming every relevant subdomain supports HTTPS.\n* **Treat a strict CSP as defense in depth.** Prefer nonces or hashes and test with report-only before enforcement.\n* **Sanitize untrusted HTML and protect DOM XSS sinks.** Prefer text APIs when markup is not required.\n* **Pin and review third-party code.** Use SRI where the delivery model supports it and keep dependencies patched.\n* **Verify response headers at runtime.** Source configuration alone does not prove what the deployed page sends.\n\n## Browser compatibility\n\n### Doctype declaration\n\n```html\n<!-- ❌ Missing or invalid doctype -->\n<HTML>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\">\n\n<!-- ✅ HTML5 doctype -->\n<!DOCTYPE html>\n<html lang=\"en\">\n```\n\n### Character encoding\n\n```html\n<!-- ❌ Missing or late charset -->\n<html>\n<head>\n  <title>Page</title>\n  <meta charset=\"UTF-8\">\n</head>\n\n<!-- ✅ Charset as first element in head -->\n<html>\n<head>\n  <meta charset=\"UTF-8\">\n  <title>Page</title>\n</head>\n```\n\n### Viewport meta tag\n\n```html\n<!-- ❌ Missing viewport -->\n<head>\n  <title>Page</title>\n</head>\n\n<!-- ✅ Responsive viewport -->\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  <title>Page</title>\n</head>\n```\n\n### Feature detection\n\n```javascript\n// ❌ Browser detection (brittle)\nif (navigator.userAgent.includes('Chrome')) {\n  // Chrome-specific code\n}\n\n// ✅ Feature detection\nif ('IntersectionObserver' in window) {\n  // Use IntersectionObserver\n} else {\n  // Fallback\n}\n\n// ✅ Using @supports in CSS\n@supports (display: grid) {\n  .container {\n    display: grid;\n  }\n}\n\n@supports not (display: grid) {\n  .container {\n    display: flex;\n  }\n}\n```\n\n### Polyfills (when needed)\n\nPrefer **bundling polyfills at build time** (Babel/SWC + `core-js`, or `@vitejs/plugin-legacy`) targeted by your supported-browsers list. This eliminates the runtime check entirely and avoids shipping polyfill bytes to modern browsers.\n\nIf you must load a polyfill at runtime, append a script element — never use `document.write` (it blocks the parser and is broken in async/deferred contexts):\n\n```html\n<script>\n  if (!('fetch' in window)) {\n    const s = document.createElement('script');\n    s.src = '/polyfills/fetch.js';\n    s.defer = true;\n    document.head.appendChild(s);\n  }\n</script>\n```\n\n**Never load polyfills from a third-party CDN you don't control.** The `polyfill.io` service was [compromised in mid-2024](https://sansec.io/research/polyfill-supply-chain-attack) in a supply-chain attack and used to serve malware to ~100k sites. Self-host, or use a vetted mirror (e.g. [Cloudflare's `cdnjs` polyfill build](https://blog.cloudflare.com/pol","createdAt":"2026-09-25T11:52:02.344Z","updatedAt":"2026-09-25T11:52:02.344Z"},{"id":"cmugwhws301m5qu06ku27ebne","slug":"addyosmani-web-quality-skills-core-web-vitals","name":"core-web-vitals","description":"Optimize Core Web Vitals (LCP, INP, CLS) for better page experience using field and lab evidence. Use when asked to \"improve Core Web Vitals\", \"fix LCP\", \"reduce CLS\", \"optimize INP\", \"page experience optimization\", or \"fix layout shifts\".","authorId":"gh:addyosmani","authorName":"addyosmani","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":2836,"pricePerCall":0,"manifest":{"name":"core-web-vitals","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Optimize Core Web Vitals (LCP, INP, CLS) for better page experience using field and lab evidence. Use when asked to \"improve Core Web Vitals\", \"fix LCP\", \"reduce CLS\", \"optimize INP\", \"page experience optimization\", or \"fix layout shifts\".","permissions":[],"systemPrompt":"# Core Web Vitals optimization\n\nTargeted optimization for the three Core Web Vitals using field data to identify user impact and browser traces to diagnose causes.\n\n## Measure before optimizing\n\nWhen a runnable URL is available, read [the performance measurement workflow](../performance/references/MEASUREMENT.md). Prefer this sequence:\n\n1. Check page-level CrUX p75 data, with a clearly labeled origin fallback when page data is unavailable.\n2. Record a browser performance trace under stated conditions. With Chrome DevTools MCP, trace summaries can include CrUX alongside the observed lab metrics.\n3. Analyze only the insights associated with the failing metric, then inspect the implicated code and resources.\n4. Re-run equivalent lab measurements after the fix. Do not claim an immediate field improvement; CrUX and first-party RUM need new user visits.\n\nIf only source code is available, identify likely causes but do not claim that LCP, INP, or CLS is failing without runtime evidence.\n\n## The three metrics\n\n| Metric | Measures | Good | Needs work | Poor |\n|--------|----------|------|------------|------|\n| **LCP** | Loading | ≤ 2.5s | 2.5s – 4s | > 4s |\n| **INP** | Interactivity | ≤ 200ms | 200ms – 500ms | > 500ms |\n| **CLS** | Visual Stability | ≤ 0.1 | 0.1 – 0.25 | > 0.25 |\n\nGoogle measures at the **75th percentile** — 75% of page visits must meet \"Good\" thresholds.\n\n---\n\n## LCP: Largest Contentful Paint\n\nLCP measures when the largest visible content element renders. Usually this is:\n- Hero image or video\n- Large text block\n- Background image\n- `<svg>` element\n\n### Common LCP issues\n\n**1. Slow server response (TTFB > 800ms)**\n```\nFix: CDN, caching, optimized backend, edge rendering\n```\n\n**2. Render-blocking resources**\n```html\n<!-- ❌ Blocks rendering -->\n<link rel=\"stylesheet\" href=\"/all-styles.css\">\n\n<!-- ✅ Critical CSS inlined, rest deferred -->\n<style>/* Critical above-fold CSS */</style>\n<link rel=\"preload\" href=\"/styles.css\" as=\"style\" \n      onload=\"this.onload=null;this.rel='stylesheet'\">\n```\n\n**3. Slow resource load times**\n```html\n<!-- ❌ LCP image is discovered only after a stylesheet loads -->\n<div class=\"hero\"></div>\n\n<!-- ✅ Discoverable in initial HTML and prioritized -->\n<link rel=\"preload\" href=\"/hero.webp\" as=\"image\" fetchpriority=\"high\">\n<img src=\"/hero.webp\" alt=\"Hero\" fetchpriority=\"high\">\n```\n\nPrefer a discoverable `<img>` with `fetchpriority=\"high\"`. Add the preload only when the trace shows that the resource would otherwise be discovered late; duplicate or speculative preloads can compete for bandwidth.\n\n**4. Client-side rendering delays**\n```javascript\n// ❌ Content loads after JavaScript\nuseEffect(() => {\n  fetch('/api/hero-text').then(r => r.json()).then(setHeroText);\n}, []);\n\n// ✅ Server-side or static rendering\n// Use SSR, SSG, or streaming to send HTML with content\nexport async function getServerSideProps() {\n  const heroText = await fetchHeroText();\n  return { props: { heroText } };\n}\n```\n\n**5. Make navigations instant with the Speculation Rules API**\n\nFor sites with predictable same-origin journeys, prerendering a likely next page can make a successful subsequent navigation much faster. Treat this as a measured navigation optimization, not a substitute for fixing the current page's LCP.\n\n```html\n<script type=\"speculationrules\">\n{\n  \"prerender\": [{\n    \"where\": { \"href_matches\": \"/*\" },\n    \"eagerness\": \"moderate\"\n  }]\n}\n</script>\n```\n\nCurrent Chrome behavior is specific enough to guide the choice:\n\n| `eagerness` | Trigger |\n|-------------|---------|\n| `conservative` | Pointer or touch down |\n| `moderate` | Desktop: 200ms hover, or earlier pointer down; mobile: viewport heuristics |\n| `eager` | Chrome 143+: desktop 10ms hover; mobile 50ms after the anchor enters the viewport |\n| `immediate` | As soon as the rules are observed |\n\nStart conservatively and measure prediction hit rate, transferred bytes, server load, and navigation improvement before expanding the rules. Recheck [Chrome's maintained eagerness documentation](https://developer.chrome.com/docs/web-platform/prerender-pages#eagerness) before hardcoding timing-sensitive behavior.\n\nCaveats:\n- **Bandwidth/CPU cost.** Each prerender is roughly a full page load. Scope `where` carefully (`href_matches` patterns, exclude logout/checkout) and avoid `immediate` outside small sites.\n- **Side effects fire early.** Analytics, ads, and any code that runs on load will fire when the prerender starts, not when the user navigates. Gate side effects on the [`prerenderingchange` event](https://developer.chrome.com/docs/web-platform/prerender-pages#detect_when_a_page_is_prerendered_or_used_for_a_full_navigation) or `document.prerendering`.\n- **Chromium-only.** Safari and Firefox ignore the script — it's a progressive enhancement, never a regression.\n\n### LCP optimization checklist\n\n```markdown\n- [ ] TTFB < 800ms (use CDN, edge caching)\n- [ ] LCP resource is discoverable in initial HTML and prioritized; preload only if the trace shows late discovery\n- [ ] LCP image optimized (WebP/AVIF, correct size)\n- [ ] Critical CSS inlined (< 14KB)\n- [ ] No render-blocking JavaScript in <head>\n- [ ] Fonts don't block text rendering (font-display: swap)\n- [ ] LCP element in initial HTML (not JS-rendered)\n- [ ] Speculation Rules added for likely-next navigations (moderate eagerness)\n```\n\n### LCP element identification\n\nThis snippet diagnoses the current page session. It is not field data.\n\n```javascript\n// Find your LCP element\nnew PerformanceObserver((list) => {\n  const entries = list.getEntries();\n  const lastEntry = entries[entries.length - 1];\n  console.log('LCP element:', lastEntry.element);\n  console.log('LCP time:', lastEntry.startTime);\n}).observe({ type: 'largest-contentful-paint', buffered: true });\n```\n\n---\n\n## INP: Interaction to Next Paint\n\nINP measures responsiveness across clicks, taps, and key presses during a visit. Diagnose its input delay, processing time, and presentation delay separately; a slow interaction may involve main-thread contention before the handler, expensive application work, or delayed rendering after it.\n\nWhen field INP is poor or a trace identifies a slow interaction, read [the INP reference](references/INP.md) for trace interpretation, yielding patterns, third-party and rendering causes, a single-session observer, and first-party attribution.\n\n---\n\n## CLS: Cumulative Layout Shift\n\nCLS measures unexpected layout shifts across a page visit. Use field attribution or a trace to identify the shifted node and the trigger; do not assume the visible victim caused the shift.\n\nWhen field CLS is poor or a trace reports shifts, read [the CLS reference](references/CLS.md) for reserved-space patterns, dynamic content, font and animation fixes, a debugging observer, and a verification checklist.\n\n---\n\n## Measurement sources\n\n| Source | Use |\n|--------|-----|\n| Browser performance trace (Chrome DevTools MCP: `performance_start_trace`) | Observe one load or interaction and diagnose focused insights; use included CrUX context when available |\n| CrUX or Search Console | Prioritize aggregated real-user outcomes at p75 |\n| Lighthouse CLI or PageSpeed Insights | Controlled lab fallback when DevTools tools are unavailable |\n| First-party RUM | Segment current production experience by route, device, release, and attribution |\n| Raw `PerformanceObserver` | Inspect one page session during debugging |\n\nDo not route performance through Chrome DevTools MCP's `lighthouse_audit`; that capability intentionally covers non-performance Lighthouse categories. Do not compare a single lab value directly with a field p75 as if they were equivalent samples.\n\nWhen adding or reviewing production collection, read [the first-party RUM reference](../performance/references/RUM.md). Prefer the `web-vitals` library because raw browser APIs do not by themselves implement every Core Web Vital's lifecycle and reporting rules.\n\n---\n\n## Framework quick fixes\n\n### Next.js\n```jsx\n// LCP: Use next/image with priority\nimport Image from 'next/image';\n<Image src=\"/hero.jpg\" priority fill alt=\"Hero\" />\n\n// INP: Use dynamic imports\nconst HeavyComponent = dynamic(() => import('./Heavy'), { ssr: false });\n\n// CLS: Image component handles dimensions automatically\n```\n\n### React\n```jsx\n// LCP: Preload in head\n<link rel=\"preload\" href=\"/hero.jpg\" as=\"image\" fetchpriority=\"high\" />\n\n// INP: Memoize and useTransition\nconst [isPending, startTransition] = useTransition();\nstartTransition(() => setExpensiveState(newValue));\n\n// CLS: Always specify dimensions in img tags\n```\n\n### Vue/Nuxt\n```vue\n<!-- LCP: Use nuxt/image with preload -->\n<NuxtImg src=\"/hero.jpg\" preload loading=\"eager\" />\n\n<!-- INP: Use async components -->\n<component :is=\"() => import('./Heavy.vue')\" />\n\n<!-- CLS: Use aspect-ratio CSS -->\n<img :style=\"{ aspectRatio: '16/9' }\" />\n```\n\n## References\n\n- [Detailed LCP optimization](references/LCP.md) — read when an LCP trace points to discovery, loading, or render delay\n- [Detailed INP optimization](references/INP.md) — read when a trace or field attribution identifies a slow interaction\n- [Detailed CLS optimization](references/CLS.md) — read when a trace or field attribution identifies unexpected shifts\n- [web.dev LCP](https://web.dev/articles/lcp)\n- [web.dev INP](https://web.dev/articles/inp)\n- [web.dev CLS](https://web.dev/articles/cls)\n- [Performance skill](../performance/SKILL.md)","schemaVersion":1},"repoUrl":"https://github.com/addyosmani/web-quality-skills/tree/main/skills/core-web-vitals","tags":["accessibility","agent-skills","claude-skills","core-web-vitals","lighthouse","skills","testing","web-performance","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"web-quality-skills","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:52:02.306Z","lockfiles":[]},"forks":247,"owner":"addyosmani","stars":2836,"topics":["accessibility","agent-skills","claude-skills","core-web-vitals","lighthouse","skills","testing","web-performance"],"license":"MIT","fullName":"addyosmani/web-quality-skills","homepage":null,"language":"Shell","pushedAt":"2026-08-24T21:07:36Z","avatarUrl":"https://avatars.githubusercontent.com/u/110953?v=4","crawledAt":"2026-09-25T11:52:00.939Z","openIssues":5,"manifestFile":"SKILL.md","manifestPath":"skills/core-web-vitals/SKILL.md","defaultBranch":"main"},"readme":"# Core Web Vitals optimization\n\nTargeted optimization for the three Core Web Vitals using field data to identify user impact and browser traces to diagnose causes.\n\n## Measure before optimizing\n\nWhen a runnable URL is available, read [the performance measurement workflow](../performance/references/MEASUREMENT.md). Prefer this sequence:\n\n1. Check page-level CrUX p75 data, with a clearly labeled origin fallback when page data is unavailable.\n2. Record a browser performance trace under stated conditions. With Chrome DevTools MCP, trace summaries can include CrUX alongside the observed lab metrics.\n3. Analyze only the insights associated with the failing metric, then inspect the implicated code and resources.\n4. Re-run equivalent lab measurements after the fix. Do not claim an immediate field improvement; CrUX and first-party RUM need new user visits.\n\nIf only source code is available, identify likely causes but do not claim that LCP, INP, or CLS is failing without runtime evidence.\n\n## The three metrics\n\n| Metric | Measures | Good | Needs work | Poor |\n|--------|----------|------|------------|------|\n| **LCP** | Loading | ≤ 2.5s | 2.5s – 4s | > 4s |\n| **INP** | Interactivity | ≤ 200ms | 200ms – 500ms | > 500ms |\n| **CLS** | Visual Stability | ≤ 0.1 | 0.1 – 0.25 | > 0.25 |\n\nGoogle measures at the **75th percentile** — 75% of page visits must meet \"Good\" thresholds.\n\n---\n\n## LCP: Largest Contentful Paint\n\nLCP measures when the largest visible content element renders. Usually this is:\n- Hero image or video\n- Large text block\n- Background image\n- `<svg>` element\n\n### Common LCP issues\n\n**1. Slow server response (TTFB > 800ms)**\n```\nFix: CDN, caching, optimized backend, edge rendering\n```\n\n**2. Render-blocking resources**\n```html\n<!-- ❌ Blocks rendering -->\n<link rel=\"stylesheet\" href=\"/all-styles.css\">\n\n<!-- ✅ Critical CSS inlined, rest deferred -->\n<style>/* Critical above-fold CSS */</style>\n<link rel=\"preload\" href=\"/styles.css\" as=\"style\" \n      onload=\"this.onload=null;this.rel='stylesheet'\">\n```\n\n**3. Slow resource load times**\n```html\n<!-- ❌ LCP image is discovered only after a stylesheet loads -->\n<div class=\"hero\"></div>\n\n<!-- ✅ Discoverable in initial HTML and prioritized -->\n<link rel=\"preload\" href=\"/hero.webp\" as=\"image\" fetchpriority=\"high\">\n<img src=\"/hero.webp\" alt=\"Hero\" fetchpriority=\"high\">\n```\n\nPrefer a discoverable `<img>` with `fetchpriority=\"high\"`. Add the preload only when the trace shows that the resource would otherwise be discovered late; duplicate or speculative preloads can compete for bandwidth.\n\n**4. Client-side rendering delays**\n```javascript\n// ❌ Content loads after JavaScript\nuseEffect(() => {\n  fetch('/api/hero-text').then(r => r.json()).then(setHeroText);\n}, []);\n\n// ✅ Server-side or static rendering\n// Use SSR, SSG, or streaming to send HTML with content\nexport async function getServerSideProps() {\n  const heroText = await fetchHeroText();\n  return { props: { heroText } };\n}\n```\n\n**5. Make navigations instant with the Speculation Rules API**\n\nFor sites with predictable same-origin journeys, prerendering a likely next page can make a successful subsequent navigation much faster. Treat this as a measured navigation optimization, not a substitute for fixing the current page's LCP.\n\n```html\n<script type=\"speculationrules\">\n{\n  \"prerender\": [{\n    \"where\": { \"href_matches\": \"/*\" },\n    \"eagerness\": \"moderate\"\n  }]\n}\n</script>\n```\n\nCurrent Chrome behavior is specific enough to guide the choice:\n\n| `eagerness` | Trigger |\n|-------------|---------|\n| `conservative` | Pointer or touch down |\n| `moderate` | Desktop: 200ms hover, or earlier pointer down; mobile: viewport heuristics |\n| `eager` | Chrome 143+: desktop 10ms hover; mobile 50ms after the anchor enters the viewport |\n| `immediate` | As soon as the rules are observed |\n\nStart conservatively and measure prediction hit rate, transferred bytes, server load, and navigation improvement before expanding the rules. Recheck [Chrome's maintained eagerness","createdAt":"2026-09-25T11:52:02.355Z","updatedAt":"2026-09-25T11:52:02.355Z"},{"id":"cmugwhwso01m8qu06ncqodvuq","slug":"addyosmani-web-quality-skills-performance","name":"performance","description":"Optimize web performance for faster loading and better user experience. Use when asked to \"speed up my site\", \"optimize performance\", \"reduce load time\", \"fix slow loading\", \"improve page speed\", or \"performance audit\".","authorId":"gh:addyosmani","authorName":"addyosmani","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":2836,"pricePerCall":0,"manifest":{"name":"performance","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Optimize web performance for faster loading and better user experience. Use when asked to \"speed up my site\", \"optimize performance\", \"reduce load time\", \"fix slow loading\", \"improve page speed\", or \"performance audit\".","permissions":[],"systemPrompt":"# Performance optimization\n\nEvidence-led performance optimization using real-user signals for prioritization and browser traces for diagnosis. Focuses on loading speed, runtime responsiveness, and resource delivery.\n\n## How it works\n\n1. If a page can run, read [the measurement workflow](references/MEASUREMENT.md) and establish a field-plus-lab baseline before editing.\n2. Prioritize poor real-user Core Web Vitals. Use a DevTools performance trace and its focused insights to find the cause.\n3. Inspect and change only the code or assets connected to measured bottlenecks.\n4. Re-run equivalent lab measurements and report before/after values, conditions, and uncertainty. Field verification remains pending until enough new user data arrives.\n\nWhen no runnable page exists, perform static inspection but call findings **hypotheses**, not measured regressions. Include the command or browser workflow that can verify each high-impact hypothesis.\n\nPrefer a browser tool that records a performance trace and exposes focused insights. With Chrome DevTools MCP, use `performance_start_trace` and `performance_analyze_insight`; do not route performance through `lighthouse_audit`, which covers non-performance Lighthouse categories.\n\n## Starting performance budget\n\nBudgets must reflect the product's target devices, networks, page types, and user journeys. The values below are initial guardrails for a typical content or commerce page, not universal pass/fail criteria. Preserve an existing project budget when one is already defined.\n\n| Resource | Budget | Rationale |\n|----------|--------|-----------|\n| Total page weight | < 1.5 MB | Bounds transfer time and data cost on constrained target networks; calibrate with representative pages |\n| JavaScript (compressed) | < 300 KB | Protect parse and execution cost |\n| CSS (compressed) | < 100 KB | Limit render-blocking work |\n| Images (above-fold) | < 500 KB | Protect likely LCP resources |\n| Fonts | < 100 KB | Limit critical font transfer |\n| Third-party | < 200 KB | Bound code outside product control |\n\n## Critical rendering path\n\n### Server response\n* **TTFB < 800ms.** Time to First Byte should be fast. Use CDN, caching, and efficient backends.\n* **Enable compression.** Gzip or Brotli for text assets. Brotli preferred (15-20% smaller).\n* **HTTP/2 or HTTP/3.** Multiplexing reduces connection overhead.\n* **Edge caching.** Cache HTML at CDN edge when possible.\n* **Consider Early Hints (HTTP 103) for measured document latency.** If a trace shows slow HTML generation and stable critical subresources, send an interim `103` with `Link` headers before the normal final response from the same request. Use HTTP/2 or later. A CDN may synthesize the `103` from `Link` headers on an earlier `200`, or the origin/edge handler can emit it directly. Unsupported clients continue to the final response, but confirm current browser and infrastructure support. Limit hints to proven critical preloads or preconnects: inaccurate hints waste bandwidth. Cloudflare reported a 20–30% LCP improvement in an artificial, image-heavy test; treat that as a vendor case study, not an expected saving, and measure your result. See [MDN's 103 implementation example](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) and [the Cloudflare study](https://blog.cloudflare.com/early-hints-performance/).\n\n### Resource loading\n\n**Preconnect to required origins:**\n```html\n<link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n<link rel=\"preconnect\" href=\"https://cdn.example.com\" crossorigin>\n```\n\n**Preload critical resources:**\n\nPreload only resources whose late discovery is visible in the trace. Each preload competes for bandwidth and an unnecessary high-priority request can delay LCP.\n\n```html\n<!-- LCP image -->\n<link rel=\"preload\" href=\"/hero.webp\" as=\"image\" fetchpriority=\"high\">\n\n<!-- Critical font -->\n<link rel=\"preload\" href=\"/font.woff2\" as=\"font\" type=\"font/woff2\" crossorigin>\n```\n\n**Prerender likely-next navigations** with the [Speculation Rules API](https://developer.chrome.com/docs/web-platform/prerender-pages):\n```html\n<script type=\"speculationrules\">\n{\n  \"prerender\": [{\n    \"where\": { \"href_matches\": \"/*\" },\n    \"eagerness\": \"moderate\"\n  }]\n}\n</script>\n```\n`moderate` waits for a stronger intent signal than eager modes. Measure prediction hit rate, transferred bytes, and server cost; a wrong prerender is roughly an unused navigation. See [core-web-vitals → LCP](../core-web-vitals/SKILL.md#lcp-largest-contentful-paint) for the tradeoffs and the `prerenderingchange` gating needed for analytics.\n\n**Defer non-critical CSS:**\n```html\n<!-- Critical CSS inlined -->\n<style>/* Above-fold styles */</style>\n\n<!-- Non-critical CSS -->\n<link rel=\"preload\" href=\"/styles.css\" as=\"style\" onload=\"this.onload=null;this.rel='stylesheet'\">\n<noscript><link rel=\"stylesheet\" href=\"/styles.css\"></noscript>\n```\n\n### JavaScript optimization\n\n**Defer non-essential scripts:**\n```html\n<!-- Parser-blocking (avoid) -->\n<script src=\"/critical.js\"></script>\n\n<!-- Deferred (preferred) -->\n<script defer src=\"/app.js\"></script>\n\n<!-- Async (for independent scripts) -->\n<script async src=\"/analytics.js\"></script>\n\n<!-- Module (deferred by default) -->\n<script type=\"module\" src=\"/app.mjs\"></script>\n```\n\n**Code splitting patterns:**\n```javascript\n// Route-based splitting\nconst Dashboard = lazy(() => import('./Dashboard'));\n\n// Component-based splitting\nconst HeavyChart = lazy(() => import('./HeavyChart'));\n\n// Feature-based splitting\nif (user.isPremium) {\n  const PremiumFeatures = await import('./PremiumFeatures');\n}\n```\n\n**Tree shaking best practices:**\n```javascript\n// ❌ Imports entire library\nimport _ from 'lodash';\n_.debounce(fn, 300);\n\n// ✅ Imports only what's needed\nimport debounce from 'lodash/debounce';\ndebounce(fn, 300);\n```\n\n## Image optimization\n\n### Format selection\n| Format | Use case | Browser support |\n|--------|----------|-----------------|\n| AVIF | Photos, best compression | 92%+ |\n| WebP | Photos, good fallback | 97%+ |\n| PNG | Graphics with transparency | Universal |\n| SVG | Icons, logos, illustrations | Universal |\n\n### Responsive images\n```html\n<picture>\n  <!-- AVIF for modern browsers -->\n  <source \n    type=\"image/avif\"\n    srcset=\"hero-400.avif 400w,\n            hero-800.avif 800w,\n            hero-1200.avif 1200w\"\n    sizes=\"(max-width: 600px) 100vw, 50vw\">\n  \n  <!-- WebP fallback -->\n  <source \n    type=\"image/webp\"\n    srcset=\"hero-400.webp 400w,\n            hero-800.webp 800w,\n            hero-1200.webp 1200w\"\n    sizes=\"(max-width: 600px) 100vw, 50vw\">\n  \n  <!-- JPEG fallback -->\n  <img \n    src=\"hero-800.jpg\"\n    srcset=\"hero-400.jpg 400w,\n            hero-800.jpg 800w,\n            hero-1200.jpg 1200w\"\n    sizes=\"(max-width: 600px) 100vw, 50vw\"\n    width=\"1200\" \n    height=\"600\"\n    alt=\"Hero image\"\n    loading=\"lazy\"\n    decoding=\"async\">\n</picture>\n```\n\n### LCP image priority\n```html\n<!-- Above-fold LCP image: eager loading, high priority -->\n<img \n  src=\"hero.webp\" \n  fetchpriority=\"high\"\n  loading=\"eager\"\n  decoding=\"sync\"\n  alt=\"Hero\">\n\n<!-- Below-fold images: lazy loading -->\n<img \n  src=\"product.webp\" \n  loading=\"lazy\"\n  decoding=\"async\"\n  alt=\"Product\">\n```\n\n## Font optimization\n\n### Loading strategy\n```css\n/* System font stack as fallback */\nbody {\n  font-family: 'Custom Font', -apple-system, BlinkMacSystemFont, \n               'Segoe UI', Roboto, sans-serif;\n}\n\n/* Prevent invisible text */\n@font-face {\n  font-family: 'Custom Font';\n  src: url('/fonts/custom.woff2') format('woff2');\n  font-display: swap; /* or optional for non-critical */\n  font-weight: 400;\n  font-style: normal;\n  unicode-range: U+0000-00FF; /* Subset to Latin */\n}\n```\n\n### Preloading critical fonts\n```html\n<link rel=\"preload\" href=\"/fonts/heading.woff2\" as=\"font\" type=\"font/woff2\" crossorigin>\n```\n\n### Variable fonts\n```css\n/* One file instead of multiple weights */\n@font-face {\n  font-family: 'Inter';\n  src: url('/fonts/Inter-Variable.woff2') format('woff2-variations');\n  font-weight: 100 900;\n  font-display: swap;\n}\n```\n\n## Caching strategy\n\n### Cache-Control headers\n```\n# HTML (short or no cache)\nCache-Control: no-cache, must-revalidate\n\n# Static assets with hash (immutable)\nCache-Control: public, max-age=31536000, immutable\n\n# Static assets without hash\nCache-Control: public, max-age=86400, stale-while-revalidate=604800\n\n# API responses\nCache-Control: private, max-age=0, must-revalidate\n```\n\n### Service worker caching\n```javascript\n// Cache-first for static assets\nself.addEventListener('fetch', (event) => {\n  if (event.request.destination === 'image' ||\n      event.request.destination === 'style' ||\n      event.request.destination === 'script') {\n    event.respondWith(\n      caches.match(event.request).then((cached) => {\n        return cached || fetch(event.request).then((response) => {\n          const clone = response.clone();\n          caches.open('static-v1').then((cache) => cache.put(event.request, clone));\n          return response;\n        });\n      })\n    );\n  }\n});\n```\n\n## Runtime performance\n\n### Avoid layout thrashing\n```javascript\n// ❌ Forces multiple reflows\nelements.forEach(el => {\n  const height = el.offsetHeight; // Read\n  el.style.height = height + 10 + 'px'; // Write\n});\n\n// ✅ Batch reads, then batch writes\nconst heights = elements.map(el => el.offsetHeight); // All reads\nelements.forEach((el, i) => {\n  el.style.height = heights[i] + 10 + 'px'; // All writes\n});\n```\n\n### Debounce expensive operations\n```javascript\nfunction debounce(fn, delay) {\n  let timeout;\n  return (...args) => {\n    clearTimeout(timeout);\n    timeout = setTimeout(() => fn(...args), delay);\n  };\n}\n\n// Debounce scroll/resize handlers\nwindow.addEventListener('scroll', debounce(handleScroll, 100));\n```\n\n### Use requestAnimationFrame\n```javascript\n// ❌ May cause jank\nsetInterval(animate, 16);\n\n// ✅ Synced with display refresh\nfunction animate() {\n  // Animation logic\n  requestAnimationFrame(animate);\n}\nrequestAnimationFrame(animate);\n```\n\n### Virtualize long lists\n```javascript\n// For lists > 100 items, render only visible items\n// Use libraries like react-window, vue-virtual-scroller, or native CSS:\n.virtual-list {\n  content-visibility: auto;\n  contain-intrinsic-size: 0 50px; /* Estimated item height */\n}\n```\n\n### Smooth navigations with View Transitions\n\nThe [View Transitions API](https://developer.chrome.com/docs/web-platform/view-transitions) lets the browser cross-fade (or custom-animate) between two DOM states using a single GPU-composited snapshot — no double-render, no layout thrash, and the snapshot doesn't count toward CLS.\n\n**Same-document (SPA-style) — Baseline 2026:**\n```javascript\n// Wrap the DOM mutation that swaps the view\nfunction navigate(newView) {\n  if (!document.startViewTransition) return swapDOM(newView);\n  document.startViewTransition(() => swapDOM(newView));\n}\n```\n\n**Cross-document (MPA-style) — Chromium-stable, progressive enhancement elsewhere:**\n```css\n/* On both source and destination pages */\n@view-transition { navigation: auto; }\n```\nThat's the entire integration — same-origin navigations now fade automatically. To opt specific elements into shared-element transitions (e.g. a thumbnail expanding into a hero), give them a matching `view-transition-name`:\n```css\n.product-thumb[data-id=\"42\"], .product-hero { view-transition-name: product-42; }\n```\n\nPair this with Speculation Rules (above) for instant + animated navigations.\n\n## Third-party scripts\n\n### Load strategies\n```javascript\n// ❌ Blocks main thread\n<script src=\"https://analytics.example.com/script.js\"></script>\n\n// ✅ Async loading\n<script async src=\"https://analytics.example.com/script.js\"></script>\n\n// ✅ Delay until interaction\n<script>\ndocument.addEventListener('DOMContentLoaded', () => {\n  const observer = new IntersectionObserver((entries) => {\n    if (entries[0].isIntersecting) {\n      const script = document.createElement('script');\n      script.src = 'https://widget.example.com/embed.js';\n      document.body.appendChild(script);\n      observer.disconnect();\n    }\n  });\n  observer.observe(document.querySelector('#widget-container'));\n});\n</script>\n```\n\n### Facade pattern\n```html\n<!-- Show static placeholder until interaction -->\n<div class=\"youtube-facade\" \n     data-video-id=\"abc123\" \n     onclick=\"loadYouTube(this)\">\n  <img src=\"/thumbnails/abc123.jpg\" alt=\"Video title\">\n  <button aria-label=\"Play video\">▶</button>\n</div>\n```\n\n## Measurement\n\nUse [the measurement workflow](references/MEASUREMENT.md) whenever a URL is runnable. It defines Chrome DevTools MCP routing, CrUX and fallback sources, repeatable lab conditions, and a compact evidence format.\n\n| Metric | Kind | Interpretation |\n|--------|------|----------------|\n| LCP, INP, CLS at p75 | Field | User-outcome Core Web Vitals; use for pass/fail prioritization |\n| LCP, CLS in a trace | Lab | Reproducible diagnostic values for one navigation |\n| TBT | Lab | Main-thread blocking diagnostic and a rough INP proxy, not field INP |\n| FCP, Speed Index | Lab | Loading diagnostics, not Core Web Vitals |\n\nRaw `PerformanceObserver` snippets are useful for the current browser session but are not real-user data by themselves. When the user wants production telemetry, read [the first-party RUM reference](references/RUM.md) and prefer `web-vitals` over a hand-rolled metric implementation.\n\n## References\n\nFor Core Web Vitals specific optimizations, see [Core Web Vitals](../core-web-vitals/SKILL.md).","schemaVersion":1},"repoUrl":"https://github.com/addyosmani/web-quality-skills/tree/main/skills/performance","tags":["accessibility","agent-skills","claude-skills","core-web-vitals","lighthouse","skills","testing","web-performance","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"web-quality-skills","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:52:02.306Z","lockfiles":[]},"forks":247,"owner":"addyosmani","stars":2836,"topics":["accessibility","agent-skills","claude-skills","core-web-vitals","lighthouse","skills","testing","web-performance"],"license":"MIT","fullName":"addyosmani/web-quality-skills","homepage":null,"language":"Shell","pushedAt":"2026-08-24T21:07:36Z","avatarUrl":"https://avatars.githubusercontent.com/u/110953?v=4","crawledAt":"2026-09-25T11:52:00.939Z","openIssues":5,"manifestFile":"SKILL.md","manifestPath":"skills/performance/SKILL.md","defaultBranch":"main"},"readme":"# Performance optimization\n\nEvidence-led performance optimization using real-user signals for prioritization and browser traces for diagnosis. Focuses on loading speed, runtime responsiveness, and resource delivery.\n\n## How it works\n\n1. If a page can run, read [the measurement workflow](references/MEASUREMENT.md) and establish a field-plus-lab baseline before editing.\n2. Prioritize poor real-user Core Web Vitals. Use a DevTools performance trace and its focused insights to find the cause.\n3. Inspect and change only the code or assets connected to measured bottlenecks.\n4. Re-run equivalent lab measurements and report before/after values, conditions, and uncertainty. Field verification remains pending until enough new user data arrives.\n\nWhen no runnable page exists, perform static inspection but call findings **hypotheses**, not measured regressions. Include the command or browser workflow that can verify each high-impact hypothesis.\n\nPrefer a browser tool that records a performance trace and exposes focused insights. With Chrome DevTools MCP, use `performance_start_trace` and `performance_analyze_insight`; do not route performance through `lighthouse_audit`, which covers non-performance Lighthouse categories.\n\n## Starting performance budget\n\nBudgets must reflect the product's target devices, networks, page types, and user journeys. The values below are initial guardrails for a typical content or commerce page, not universal pass/fail criteria. Preserve an existing project budget when one is already defined.\n\n| Resource | Budget | Rationale |\n|----------|--------|-----------|\n| Total page weight | < 1.5 MB | Bounds transfer time and data cost on constrained target networks; calibrate with representative pages |\n| JavaScript (compressed) | < 300 KB | Protect parse and execution cost |\n| CSS (compressed) | < 100 KB | Limit render-blocking work |\n| Images (above-fold) | < 500 KB | Protect likely LCP resources |\n| Fonts | < 100 KB | Limit critical font transfer |\n| Third-party | < 200 KB | Bound code outside product control |\n\n## Critical rendering path\n\n### Server response\n* **TTFB < 800ms.** Time to First Byte should be fast. Use CDN, caching, and efficient backends.\n* **Enable compression.** Gzip or Brotli for text assets. Brotli preferred (15-20% smaller).\n* **HTTP/2 or HTTP/3.** Multiplexing reduces connection overhead.\n* **Edge caching.** Cache HTML at CDN edge when possible.\n* **Consider Early Hints (HTTP 103) for measured document latency.** If a trace shows slow HTML generation and stable critical subresources, send an interim `103` with `Link` headers before the normal final response from the same request. Use HTTP/2 or later. A CDN may synthesize the `103` from `Link` headers on an earlier `200`, or the origin/edge handler can emit it directly. Unsupported clients continue to the final response, but confirm current browser and infrastructure support. Limit hints to proven critical preloads or preconnects: inaccurate hints waste bandwidth. Cloudflare reported a 20–30% LCP improvement in an artificial, image-heavy test; treat that as a vendor case study, not an expected saving, and measure your result. See [MDN's 103 implementation example](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) and [the Cloudflare study](https://blog.cloudflare.com/early-hints-performance/).\n\n### Resource loading\n\n**Preconnect to required origins:**\n```html\n<link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n<link rel=\"preconnect\" href=\"https://cdn.example.com\" crossorigin>\n```\n\n**Preload critical resources:**\n\nPreload only resources whose late discovery is visible in the trace. Each preload competes for bandwidth and an unnecessary high-priority request can delay LCP.\n\n```html\n<!-- LCP image -->\n<link rel=\"preload\" href=\"/hero.webp\" as=\"image\" fetchpriority=\"high\">\n\n<!-- Critical font -->\n<link rel=\"preload\" href=\"/font.woff2\" as=\"font\" type=\"font/woff2\" crossorigin>\n```\n\n**Prerender likely-next navigations** with","createdAt":"2026-09-25T11:52:02.377Z","updatedAt":"2026-09-25T11:52:02.377Z"},{"id":"cmugwhwt101mequ068dqgfh81","slug":"addyosmani-web-quality-skills-seo","name":"seo","description":"Optimize for search engine visibility and ranking. Use when asked to \"improve SEO\", \"optimize for search\", \"fix meta tags\", \"add structured data\", \"sitemap optimization\", or \"search engine optimization\".","authorId":"gh:addyosmani","authorName":"addyosmani","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":2836,"pricePerCall":0,"manifest":{"name":"seo","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Optimize for search engine visibility and ranking. Use when asked to \"improve SEO\", \"optimize for search\", \"fix meta tags\", \"add structured data\", \"sitemap optimization\", or \"search engine optimization\".","permissions":[],"systemPrompt":"# SEO optimization\n\nSearch engine optimization based on Lighthouse SEO audits and Google Search guidelines. Focus on technical SEO, on-page optimization, and structured data.\n\n## Evidence-led audit workflow\n\nWhen a rendered page is available:\n\n1. Run live Lighthouse SEO and Agentic Browsing checks when that capability is available; with Chrome DevTools MCP, use `lighthouse_audit`. Use the results to localize rendered-page failures.\n2. Inspect signals Lighthouse cannot establish on its own: response headers, redirects, `robots.txt`, sitemap coverage, canonical consistency across page templates, structured-data eligibility, and Search Console evidence when the user provides access.\n3. Separate technical crawl/index findings from content quality and authority. Do not invent ranking-factor weights or promise ranking changes.\n4. Fix the source and re-run the same checks. For indexation or ranking outcomes, report that search-engine validation remains pending.\n\nIf live tools are unavailable, use category-specific Lighthouse CLI output plus direct source and HTTP inspection. A Lighthouse SEO score covers a useful subset of technical checks; it is not a prediction of rankings.\n\n| Area | What this skill can verify |\n|------|----------------------------|\n| Crawl and index controls | Technical configuration and consistency |\n| Rendered metadata and semantics | Presence, validity, and page-template issues |\n| Structured data | Syntax and eligibility signals, not guaranteed rich results |\n| Core Web Vitals | Link to measured field/lab evidence from the Core Web Vitals skill |\n| Content usefulness and authority | Review quality, but do not assign synthetic ranking percentages |\n\n---\n\n## Technical SEO\n\n### Crawlability\n\n**robots.txt:**\n```text\n# /robots.txt\nUser-agent: *\nAllow: /\n\n# Block admin/private areas\nDisallow: /admin/\nDisallow: /api/\nDisallow: /private/\n\n# Don't block resources needed for rendering\n# ❌ Disallow: /static/\n\nSitemap: https://example.com/sitemap.xml\n```\n\n**Meta robots:**\n```html\n<!-- Default: indexable, followable -->\n<meta name=\"robots\" content=\"index, follow\">\n\n<!-- Noindex specific pages -->\n<meta name=\"robots\" content=\"noindex, nofollow\">\n\n<!-- Indexable but don't follow links -->\n<meta name=\"robots\" content=\"index, nofollow\">\n\n<!-- Control snippets -->\n<meta name=\"robots\" content=\"max-snippet:150, max-image-preview:large\">\n```\n\n**Canonical URLs:**\n```html\n<!-- Prevent duplicate content issues -->\n<link rel=\"canonical\" href=\"https://example.com/page\">\n\n<!-- Self-referencing canonical (recommended) -->\n<link rel=\"canonical\" href=\"https://example.com/current-page\">\n\n<!-- For paginated content -->\n<link rel=\"canonical\" href=\"https://example.com/products\">\n<!-- Or use rel=\"prev\" / rel=\"next\" for explicit pagination -->\n```\n\n### XML sitemap\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n  <url>\n    <loc>https://example.com/</loc>\n    <lastmod>2024-01-15</lastmod>\n    <changefreq>daily</changefreq>\n    <priority>1.0</priority>\n  </url>\n  <url>\n    <loc>https://example.com/products</loc>\n    <lastmod>2024-01-14</lastmod>\n    <changefreq>weekly</changefreq>\n    <priority>0.8</priority>\n  </url>\n</urlset>\n```\n\n**Sitemap best practices:**\n- Maximum 50,000 URLs or 50MB per sitemap\n- Use sitemap index for larger sites\n- Include only canonical, indexable URLs\n- Update `lastmod` when content changes\n- Submit to Google Search Console\n\n### URL structure\n\n```\n✅ Good URLs:\nhttps://example.com/products/blue-widget\nhttps://example.com/blog/how-to-use-widgets\n\n❌ Poor URLs:\nhttps://example.com/p?id=12345\nhttps://example.com/products/item/category/subcategory/blue-widget-2024-sale-discount\n```\n\n**URL guidelines:**\n- Use hyphens, not underscores\n- Lowercase only\n- Keep short (< 75 characters)\n- Include target keywords naturally\n- Avoid parameters when possible\n- Use HTTPS always\n\n### HTTPS & security\n\n```html\n<!-- Ensure all resources use HTTPS -->\n<img src=\"https://example.com/image.jpg\">\n\n<!-- Not: -->\n<img src=\"http://example.com/image.jpg\">\n```\n\n**Security headers for SEO trust signals:**\n```\nStrict-Transport-Security: max-age=31536000; includeSubDomains\nX-Content-Type-Options: nosniff\nX-Frame-Options: DENY\n```\n\n---\n\n## On-page SEO\n\n### Title tags\n\n```html\n<!-- ❌ Missing or generic -->\n<title>Page</title>\n<title>Home</title>\n\n<!-- ✅ Descriptive with primary keyword -->\n<title>Blue Widgets for Sale | Premium Quality | Example Store</title>\n```\n\n**Title tag guidelines:**\n- Use 50–60 characters only as a rough linting proxy, not a pass/fail limit. Google truncates title links to fit the rendered device width, so preview width when tooling supports it.\n- Describe the page topic naturally near the beginning\n- Unique for every page\n- Add the brand when it helps users distinguish the result\n- Action-oriented when appropriate\n\nTreat title-link rewriting separately from truncation. Google may build a different title link from the visible page title, headings, anchor text, and other sources even when the `<title>` is short; investigate accuracy and consistency rather than shortening it automatically. See [Google's title-link guidance](https://developers.google.com/search/docs/appearance/title-link).\n\n### Meta descriptions\n\n```html\n<!-- ❌ Missing or duplicate -->\n<meta name=\"description\" content=\"\">\n\n<!-- ✅ Compelling and unique -->\n<meta name=\"description\" content=\"Shop premium blue widgets with free shipping. 30-day returns. Rated 4.9/5 by 10,000+ customers. Order today and save 20%.\">\n```\n\n**Meta description guidelines:**\n- Use roughly 150–160 characters only as a linting proxy. Snippets are query- and device-dependent, and Google may select page content instead of the meta description.\n- Use the page topic naturally\n- Compelling call-to-action\n- Unique for every page\n- Matches page content\n\n### Heading structure\n\n```html\n<!-- ❌ Poor structure -->\n<h2>Welcome to Our Store</h2>\n<h4>Products</h4>\n<h1>Contact Us</h1>\n\n<!-- ✅ Proper hierarchy -->\n<h1>Blue Widgets - Premium Quality</h1>\n  <h2>Product Features</h2>\n    <h3>Durability</h3>\n    <h3>Design</h3>\n  <h2>Customer Reviews</h2>\n  <h2>Pricing</h2>\n```\n\n**Heading guidelines:**\n- Make the primary page heading descriptive and the hierarchy unambiguous; do not fail a page solely because valid HTML contains more than one `<h1>`\n- Logical hierarchy (don't skip levels)\n- Include keywords naturally\n- Descriptive, not generic\n\n### Image SEO\n\n```html\n<!-- ❌ Poor image SEO -->\n<img src=\"IMG_12345.jpg\">\n\n<!-- ✅ Optimized image -->\n<img src=\"blue-widget-product-photo.webp\"\n     alt=\"Blue widget with chrome finish, side view showing control panel\"\n     width=\"800\"\n     height=\"600\"\n     loading=\"lazy\">\n```\n\n**Image guidelines:**\n- Descriptive filenames with keywords\n- Alt text describes the image content\n- Compressed and properly sized\n- WebP/AVIF with fallbacks\n- Lazy load below-fold images\n\n### Internal linking\n\n```html\n<!-- ❌ Non-descriptive -->\n<a href=\"/products\">Click here</a>\n<a href=\"/widgets\">Read more</a>\n\n<!-- ✅ Descriptive anchor text -->\n<a href=\"/products/blue-widgets\">Browse our blue widget collection</a>\n<a href=\"/guides/widget-maintenance\">Learn how to maintain your widgets</a>\n```\n\n**Linking guidelines:**\n- Descriptive anchor text with keywords\n- Link to relevant internal pages\n- Reasonable number of links per page\n- Fix broken links promptly\n- Use breadcrumbs for hierarchy\n\n---\n\n## Structured data (JSON-LD)\n\nRead [the structured data reference](references/STRUCTURED-DATA.md) when the user requests schema markup or an audit surfaces a structured-data issue. It contains Organization, Article, Product, FAQ, and Breadcrumb examples plus validation links.\n\n* **Describe visible, accurate content.** Do not add a type or claim solely to obtain a rich result.\n* **Use the most specific applicable type.** Keep identifiers and absolute URLs stable across renders.\n* **Validate rendered output.** Passing syntax does not guarantee search-engine eligibility or display.\n\n## Agentic browsing and AI discoverability\n\nKeep these concepts separate:\n\n* **Lighthouse Agentic Browsing** measures technical signals that help an assistant understand and interact with the rendered page. Current checks include the agent-facing accessibility tree, optional `llms.txt`, and WebMCP registrations, schemas, and form coverage when present.\n* **Search indexing and ranking** depend on search-engine systems and cannot be inferred from the Agentic Browsing score.\n* **AI ingestion or citation** is product-specific. A technically browsable page or valid `llms.txt` file does not prove that an AI product will ingest, rank, or cite it.\n\nPrioritize semantic HTML, descriptive labels, crawlable content, accurate metadata, and clear page structure because they benefit people, search engines, and agents. Add WebMCP tools only when the application has useful actions to expose and the user wants that integration; validate tool names, descriptions, schemas, and form annotations with Lighthouse.\n\n### Crawler controls are product-specific\n\nAudit each documented user agent separately instead of applying a blanket \"AI bot\" rule:\n\n| Control | Documented purpose | Effect of blocking |\n|---------|--------------------|--------------------|\n| `OAI-SearchBot` | ChatGPT search discovery | Prevents page content from being included in ChatGPT summaries and snippets; a link and title may still surface through third-party discovery |\n| `PerplexityBot` | Perplexity search indexing | Prevents that crawler from indexing the blocked content for search results |\n| `Claude-SearchBot` / `Claude-User` | Claude search indexing / user-directed retrieval | May reduce search visibility / prevents retrieval for user-directed requests |\n| `Google-Extended` | Controls certain Gemini training and grounding uses of content Google crawls | Does not affect Google Search inclusion or ranking |\n\nTraining controls such as `GPTBot` and `ClaudeBot` are distinct from search and user-fetch controls. `GoogleOther` is a generic crawler, not an AI-search visibility switch. Verify current names and consequences in the vendors' maintained documentation: [OpenAI](https://help.openai.com/en/articles/12627856-publishers-and-developers-faq), [Perplexity](https://docs.perplexity.ai/docs/resources/perplexity-crawlers), [Anthropic](https://privacy.anthropic.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler), and [Google](https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers).\n\n### `llms.txt` is optional\n\n`llms.txt` is an experimental proposal, not a cross-vendor discovery standard. Lighthouse can validate the availability and shape of `/llms.txt`, but that does not show that a target product reads it. Add one only when the user requests it or a documented consumer supports it; do not recommend it ahead of crawlability, semantic HTML, accurate metadata, and useful content. Never treat it as a ranking or citation factor, duplicate the sitemap, or reorganize content solely to raise this audit.\n\n---\n\n## Mobile SEO\n\n### Responsive design\n\n```html\n<!-- ❌ Not mobile-friendly -->\n<meta name=\"viewport\" content=\"width=1024\">\n\n<!-- ✅ Responsive viewport -->\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\n### Tap targets\n\n```css\n/* ❌ Too small for mobile */\n.small-link {\n  padding: 4px;\n  font-size: 12px;\n}\n\n/* ✅ Adequate tap target */\n.mobile-friendly-link {\n  padding: 12px;\n  font-size: 16px;\n  min-height: 48px;\n  min-width: 48px;\n}\n```\n\n### Font sizes\n\n```css\n/* ❌ Too small on mobile */\nbody {\n  font-size: 10px;\n}\n\n/* ✅ Readable without zooming */\nbody {\n  font-size: 16px;\n  line-height: 1.5;\n}\n```\n\n---\n\n## International SEO\n\n### Hreflang tags\n\n```html\n<!-- For multi-language sites -->\n<link rel=\"alternate\" hreflang=\"en\" href=\"https://example.com/page\">\n<link rel=\"alternate\" hreflang=\"es\" href=\"https://example.com/es/page\">\n<link rel=\"alternate\" hreflang=\"fr\" href=\"https://example.com/fr/page\">\n<link rel=\"alternate\" hreflang=\"x-default\" href=\"https://example.com/page\">\n```\n\n### Language declaration\n\n```html\n<html lang=\"en\">\n<!-- or -->\n<html lang=\"es-MX\">\n```\n\n---\n\n## SEO audit checklist\n\n### Critical\n- [ ] HTTPS enabled\n- [ ] robots.txt allows crawling\n- [ ] No `noindex` on important pages\n- [ ] Title tags present and unique\n- [ ] Primary page heading is descriptive and the hierarchy is logical\n\n### High priority\n- [ ] Meta descriptions present\n- [ ] Sitemap submitted\n- [ ] Canonical URLs set\n- [ ] Mobile-responsive\n- [ ] Core Web Vitals passing\n\n### Medium priority\n- [ ] Structured data implemented\n- [ ] Internal linking strategy\n- [ ] Image alt text\n- [ ] Descriptive URLs\n- [ ] Breadcrumb navigation\n- [ ] Agentic Browsing failures reviewed when agent access matters\n\n### Ongoing\n- [ ] Fix crawl errors in Search Console\n- [ ] Update sitemap when content changes\n- [ ] Monitor ranking changes\n- [ ] Check for broken links\n- [ ] Review Search Console insights\n\n---\n\n## Tools\n\n| Tool | Use |\n|------|-----|\n| Google Search Console | Monitor indexing, fix issues |\n| Google PageSpeed Insights | Performance + Core Web Vitals |\n| Rich Results Test | Validate structured data |\n| Live Lighthouse audit (Chrome DevTools MCP: `lighthouse_audit`) | Rendered SEO and Agentic Browsing checks for agents |\n| Lighthouse CLI | SEO audit fallback |\n| Screaming Frog | Crawl analysis |\n\n## References\n\n- [Google Search Central](https://developers.google.com/search)\n- [Schema.org](https://schema.org/)\n- [Core Web Vitals](../core-web-vitals/SKILL.md)\n- [Web Quality Audit](../web-quality-audit/SKILL.md)","schemaVersion":1},"repoUrl":"https://github.com/addyosmani/web-quality-skills/tree/main/skills/seo","tags":["accessibility","agent-skills","claude-skills","core-web-vitals","lighthouse","skills","testing","web-performance","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"web-quality-skills","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:52:02.306Z","lockfiles":[]},"forks":247,"owner":"addyosmani","stars":2836,"topics":["accessibility","agent-skills","claude-skills","core-web-vitals","lighthouse","skills","testing","web-performance"],"license":"MIT","fullName":"addyosmani/web-quality-skills","homepage":null,"language":"Shell","pushedAt":"2026-08-24T21:07:36Z","avatarUrl":"https://avatars.githubusercontent.com/u/110953?v=4","crawledAt":"2026-09-25T11:52:00.939Z","openIssues":5,"manifestFile":"SKILL.md","manifestPath":"skills/seo/SKILL.md","defaultBranch":"main"},"readme":"# SEO optimization\n\nSearch engine optimization based on Lighthouse SEO audits and Google Search guidelines. Focus on technical SEO, on-page optimization, and structured data.\n\n## Evidence-led audit workflow\n\nWhen a rendered page is available:\n\n1. Run live Lighthouse SEO and Agentic Browsing checks when that capability is available; with Chrome DevTools MCP, use `lighthouse_audit`. Use the results to localize rendered-page failures.\n2. Inspect signals Lighthouse cannot establish on its own: response headers, redirects, `robots.txt`, sitemap coverage, canonical consistency across page templates, structured-data eligibility, and Search Console evidence when the user provides access.\n3. Separate technical crawl/index findings from content quality and authority. Do not invent ranking-factor weights or promise ranking changes.\n4. Fix the source and re-run the same checks. For indexation or ranking outcomes, report that search-engine validation remains pending.\n\nIf live tools are unavailable, use category-specific Lighthouse CLI output plus direct source and HTTP inspection. A Lighthouse SEO score covers a useful subset of technical checks; it is not a prediction of rankings.\n\n| Area | What this skill can verify |\n|------|----------------------------|\n| Crawl and index controls | Technical configuration and consistency |\n| Rendered metadata and semantics | Presence, validity, and page-template issues |\n| Structured data | Syntax and eligibility signals, not guaranteed rich results |\n| Core Web Vitals | Link to measured field/lab evidence from the Core Web Vitals skill |\n| Content usefulness and authority | Review quality, but do not assign synthetic ranking percentages |\n\n---\n\n## Technical SEO\n\n### Crawlability\n\n**robots.txt:**\n```text\n# /robots.txt\nUser-agent: *\nAllow: /\n\n# Block admin/private areas\nDisallow: /admin/\nDisallow: /api/\nDisallow: /private/\n\n# Don't block resources needed for rendering\n# ❌ Disallow: /static/\n\nSitemap: https://example.com/sitemap.xml\n```\n\n**Meta robots:**\n```html\n<!-- Default: indexable, followable -->\n<meta name=\"robots\" content=\"index, follow\">\n\n<!-- Noindex specific pages -->\n<meta name=\"robots\" content=\"noindex, nofollow\">\n\n<!-- Indexable but don't follow links -->\n<meta name=\"robots\" content=\"index, nofollow\">\n\n<!-- Control snippets -->\n<meta name=\"robots\" content=\"max-snippet:150, max-image-preview:large\">\n```\n\n**Canonical URLs:**\n```html\n<!-- Prevent duplicate content issues -->\n<link rel=\"canonical\" href=\"https://example.com/page\">\n\n<!-- Self-referencing canonical (recommended) -->\n<link rel=\"canonical\" href=\"https://example.com/current-page\">\n\n<!-- For paginated content -->\n<link rel=\"canonical\" href=\"https://example.com/products\">\n<!-- Or use rel=\"prev\" / rel=\"next\" for explicit pagination -->\n```\n\n### XML sitemap\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n  <url>\n    <loc>https://example.com/</loc>\n    <lastmod>2024-01-15</lastmod>\n    <changefreq>daily</changefreq>\n    <priority>1.0</priority>\n  </url>\n  <url>\n    <loc>https://example.com/products</loc>\n    <lastmod>2024-01-14</lastmod>\n    <changefreq>weekly</changefreq>\n    <priority>0.8</priority>\n  </url>\n</urlset>\n```\n\n**Sitemap best practices:**\n- Maximum 50,000 URLs or 50MB per sitemap\n- Use sitemap index for larger sites\n- Include only canonical, indexable URLs\n- Update `lastmod` when content changes\n- Submit to Google Search Console\n\n### URL structure\n\n```\n✅ Good URLs:\nhttps://example.com/products/blue-widget\nhttps://example.com/blog/how-to-use-widgets\n\n❌ Poor URLs:\nhttps://example.com/p?id=12345\nhttps://example.com/products/item/category/subcategory/blue-widget-2024-sale-discount\n```\n\n**URL guidelines:**\n- Use hyphens, not underscores\n- Lowercase only\n- Keep short (< 75 characters)\n- Include target keywords naturally\n- Avoid parameters when possible\n- Use HTTPS always\n\n### HTTPS & security\n\n```html\n<!-- Ensure all resources use HTTPS -->\n<img src=\"https://example.com/im","createdAt":"2026-09-25T11:52:02.389Z","updatedAt":"2026-09-25T11:52:02.389Z"},{"id":"cmugwhwtk01mkqu06vlxw6fsr","slug":"addyosmani-web-quality-skills-web-quality-audit","name":"web-quality-audit","description":"Run an evidence-led web quality audit covering performance, accessibility, SEO, best practices, and agentic browsing. Use when asked to \"audit my site\", \"review web quality\", \"run lighthouse audit\", \"check page quality\", or \"optimize my website\".","authorId":"gh:addyosmani","authorName":"addyosmani","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":2836,"pricePerCall":0,"manifest":{"name":"web-quality-audit","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Run an evidence-led web quality audit covering performance, accessibility, SEO, best practices, and agentic browsing. Use when asked to \"audit my site\", \"review web quality\", \"run lighthouse audit\", \"check page quality\", or \"optimize my website\".","permissions":[],"systemPrompt":"# Web quality audit\n\nComprehensive quality review that combines live browser evidence with source inspection. Covers Performance, Accessibility, SEO, Best Practices, and Agentic Browsing without treating an aggregate score as proof of quality.\n\n> **Lighthouse 13+.** The Performance category now uses shared **Performance Insights** across Lighthouse and the DevTools Performance panel ([announcement](https://developer.chrome.com/blog/moving-lighthouse-to-insights)). Follow current insight names and evidence. Do not require removed audit IDs or automatically recreate their recommendations; some were retired because they were noisy, inactionable, or easy to over-recommend.\n\n## How it works\n\n1. Establish the audit target: representative URLs, important states and journeys, public versus authenticated access, and mobile/desktop scope.\n2. If a page can run, read [the measurement workflow](../performance/references/MEASUREMENT.md) and collect a minimal live baseline before searching the codebase broadly.\n3. Use runtime failures to localize source inspection. Keep measured findings separate from hypotheses found only in code.\n4. Categorize by user impact and confidence, then make or recommend specific fixes.\n5. Re-run equivalent automated checks and the affected manual flows. Report what is verified and what still needs field or human validation.\n\n## Tool routing\n\nUse the best capability already available; do not block the audit on optional setup.\n\n| Need | Preferred route | Fallback |\n|------|-----------------|----------|\n| Performance and Core Web Vitals | Record a browser performance trace and analyze focused insights; with Chrome DevTools MCP, use `performance_start_trace` then `performance_analyze_insight` | Lighthouse CLI or PageSpeed Insights lab data |\n| Real-user performance | CrUX values included in current DevTools trace summaries | PageSpeed Insights/CrUX Vis; direct CrUX API only when a key is already available or automation is requested |\n| Accessibility, SEO, Best Practices, Agentic Browsing | Run a live Lighthouse audit; with Chrome DevTools MCP, use `lighthouse_audit` | Category-specific Lighthouse CLI audits plus manual checks |\n| Rendered semantics and interaction | Inspect the accessibility tree and exercise the UI; with Chrome DevTools MCP, use `take_snapshot` and focused `evaluate_script` | Browser/manual testing |\n| Source smoke test | `scripts/analyze.sh <path>` | Direct source inspection |\n\nChrome DevTools MCP's `lighthouse_audit` intentionally excludes performance. Its navigation mode reloads the page; use snapshot mode when preserving the current authenticated or user-created state matters. The static analyzer is a fast smoke test, not a substitute for a rendered-page audit.\n\n## Audit categories\n\n### Performance\n\n**Core Web Vitals** — Must pass for good page experience:\n* **LCP (Largest Contentful Paint) < 2.5s.** The largest visible element must render quickly. Optimize images, fonts, and server response time.\n* **INP (Interaction to Next Paint) < 200ms.** User interactions must feel instant. Reduce JavaScript execution time and break up long tasks.\n* **CLS (Cumulative Layout Shift) < 0.1.** Content must not jump around. Set explicit dimensions on images, embeds, and ads.\n\n**Resource Optimization:**\n* **Compress images.** Use WebP/AVIF with fallbacks. Serve correctly sized images via `srcset`.\n* **Minimize JavaScript.** Remove unused code. Use code splitting. Defer non-critical scripts.\n* **Optimize CSS.** Extract critical CSS. Remove unused styles. Avoid `@import`.\n* **Efficient fonts.** Use `font-display: swap`. Preload critical fonts. Subset to needed characters.\n\n**Loading Strategy:**\n* **Preconnect to origins.** Add `<link rel=\"preconnect\">` for third-party domains.\n* **Preload critical assets.** LCP images, fonts, and above-fold CSS.\n* **Lazy load below-fold content.** Images, iframes, and heavy components.\n* **Cache effectively.** Long cache TTLs for static assets. Immutable caching for hashed files.\n\n### Accessibility\n\n**Perceivable:**\n* **Text alternatives.** Every `<img>` has meaningful `alt` text. Decorative images use `alt=\"\"`.\n* **Color contrast.** Minimum 4.5:1 for normal text, 3:1 for large text (WCAG AA).\n* **Don't rely on color alone.** Use icons, patterns, or text alongside color indicators.\n* **Captions and transcripts.** Video has captions. Audio has transcripts.\n\n**Operable:**\n* **Keyboard accessible.** All functionality available via keyboard. No keyboard traps.\n* **Focus visible.** Clear focus indicators on all interactive elements.\n* **Skip links.** Provide \"Skip to main content\" for keyboard users.\n* **Sufficient time.** Users can extend time limits. No auto-advancing content without controls.\n\n**Understandable:**\n* **Page language.** Set `lang` attribute on `<html>`.\n* **Consistent navigation.** Same navigation structure across pages.\n* **Error identification.** Form errors clearly described and associated with fields.\n* **Labels and instructions.** All form inputs have associated labels.\n\n**Robust:**\n* **Valid HTML.** No duplicate IDs. Properly nested elements.\n* **ARIA used correctly.** Prefer native elements. ARIA roles match behavior.\n* **Name, role, value.** Interactive elements have accessible names and correct roles.\n\n### SEO\n\n**Crawlability:**\n* **Valid robots.txt.** Doesn't block important resources.\n* **XML sitemap.** Lists all important pages. Submitted to Search Console.\n* **Canonical URLs.** Prevent duplicate content issues.\n* **No noindex on important pages.** Check meta robots and headers.\n\n**On-Page SEO:**\n* **Unique title tags.** Make each title descriptive and concise; display truncation varies by device and result type.\n* **Meta descriptions.** Write useful, page-specific summaries; search engines may choose a different snippet.\n* **Heading hierarchy.** The primary heading is descriptive and the structure is logical; do not fail valid HTML solely for using more than one `<h1>`.\n* **Descriptive link text.** Not \"click here\" or \"read more\".\n\n**Technical SEO:**\n* **Mobile-friendly.** Responsive design. Tap targets ≥ 48px.\n* **HTTPS.** Secure connection required.\n* **Page experience signals.** Use field Core Web Vitals as evidence, without promising a ranking change.\n* **Structured data.** JSON-LD for rich snippets (Article, Product, FAQ, etc.).\n\n### Best practices\n\n**Security:**\n* **HTTPS everywhere.** No mixed content. HSTS enabled.\n* **No vulnerable libraries.** Keep dependencies updated.\n* **CSP headers.** Content Security Policy to prevent XSS.\n* **No exposed source maps.** In production builds.\n\n**Modern Standards:**\n* **No deprecated APIs.** Replace `document.write`, synchronous XHR, etc.\n* **Valid doctype.** Use `<!DOCTYPE html>`.\n* **Charset declared.** `<meta charset=\"UTF-8\">` as first element in `<head>`.\n* **No browser errors.** Clean console. No CORS issues.\n\n**UX Patterns:**\n* **No intrusive interstitials.** Especially on mobile.\n* **Clear permission requests.** Only ask when needed, with context.\n* **No misleading buttons.** Buttons do what they say.\n\n### Agentic browsing\n\nUse the Lighthouse Agentic Browsing results as technical signals for how well assistants can understand and interact with the rendered page.\n\n* **Accessible interaction surface.** Semantic HTML, labels, names, roles, and states must expose meaningful controls in the accessibility tree.\n* **WebMCP integrations are valid when present.** Review registered tools, schemas, and form coverage; do not add WebMCP solely to raise an audit score.\n* **`llms.txt` is optional.** A valid file may help compatible tools discover curated content, but a Lighthouse pass does not prove that search or AI products will ingest, rank, or cite it.\n* **Keep this category separate from SEO claims.** Agentic browsability is not evidence of search ranking or AI visibility.\n\n## Severity levels\n\n| Level | Description | Action |\n|-------|-------------|--------|\n| **Critical** | Security vulnerabilities, complete failures | Fix immediately |\n| **High** | Core Web Vitals failures, major a11y barriers | Fix before launch |\n| **Medium** | Performance opportunities, SEO improvements | Fix within sprint |\n| **Low** | Minor optimizations, code quality | Fix when convenient |\n\n## Audit output format\n\nWhen performing an audit, structure findings as:\n\n```markdown\n## Audit results\n\n### Evidence\n| Signal | Scope/conditions | Result | Source |\n|--------|------------------|--------|--------|\n| LCP | URL, phone, p75/28 days | 3.1s (needs improvement) | CrUX |\n| Accessibility | URL, mobile navigation | 92 | Lighthouse |\n\n### Critical issues (X found)\n- **[Category]** Issue description. File: `path/to/file.js:123`\n  - **Impact:** Why this matters\n  - **Evidence:** Measured failure, runtime observation, or source hypothesis\n  - **Fix:** Specific code change or recommendation\n\n### High priority (X found)\n...\n\n### Summary\n- Performance: measured status and X findings\n- Accessibility: automated status, X findings, manual checks pending/passed\n- SEO: X findings\n- Best Practices: X findings\n- Agentic Browsing: X findings or not available\n\n### Recommended priority\n1. First fix this because...\n2. Then address...\n3. Finally optimize...\n\n### Verification\n- Re-run results under the same conditions\n- Manual checks completed\n- Field validation still pending\n```\n\n## Quick checklist\n\n### Before every deploy\n- [ ] Core Web Vitals passing\n- [ ] No accessibility errors (axe/Lighthouse)\n- [ ] No console errors\n- [ ] HTTPS working\n- [ ] Meta tags present\n\n### Weekly review\n- [ ] Check Search Console for issues\n- [ ] Review Core Web Vitals trends\n- [ ] Update dependencies\n- [ ] Test with screen reader\n\n### Monthly deep dive\n- [ ] Full Lighthouse audit\n- [ ] Performance profiling\n- [ ] Accessibility audit with real users\n- [ ] SEO keyword review\n\n## References\n\nFor detailed guidelines on specific areas:\n- [Performance Optimization](../performance/SKILL.md)\n- [Core Web Vitals](../core-web-vitals/SKILL.md)\n- [Accessibility](../accessibility/SKILL.md)\n- [SEO](../seo/SKILL.md)\n- [Best Practices](../best-practices/SKILL.md)","schemaVersion":1},"repoUrl":"https://github.com/addyosmani/web-quality-skills/tree/main/skills/web-quality-audit","tags":["accessibility","agent-skills","claude-skills","core-web-vitals","lighthouse","skills","testing","web-performance","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"web-quality-skills","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:52:02.306Z","lockfiles":[]},"forks":247,"owner":"addyosmani","stars":2836,"topics":["accessibility","agent-skills","claude-skills","core-web-vitals","lighthouse","skills","testing","web-performance"],"license":"MIT","fullName":"addyosmani/web-quality-skills","homepage":null,"language":"Shell","pushedAt":"2026-08-24T21:07:36Z","avatarUrl":"https://avatars.githubusercontent.com/u/110953?v=4","crawledAt":"2026-09-25T11:52:00.939Z","openIssues":5,"manifestFile":"SKILL.md","manifestPath":"skills/web-quality-audit/SKILL.md","defaultBranch":"main"},"readme":"# Web quality audit\n\nComprehensive quality review that combines live browser evidence with source inspection. Covers Performance, Accessibility, SEO, Best Practices, and Agentic Browsing without treating an aggregate score as proof of quality.\n\n> **Lighthouse 13+.** The Performance category now uses shared **Performance Insights** across Lighthouse and the DevTools Performance panel ([announcement](https://developer.chrome.com/blog/moving-lighthouse-to-insights)). Follow current insight names and evidence. Do not require removed audit IDs or automatically recreate their recommendations; some were retired because they were noisy, inactionable, or easy to over-recommend.\n\n## How it works\n\n1. Establish the audit target: representative URLs, important states and journeys, public versus authenticated access, and mobile/desktop scope.\n2. If a page can run, read [the measurement workflow](../performance/references/MEASUREMENT.md) and collect a minimal live baseline before searching the codebase broadly.\n3. Use runtime failures to localize source inspection. Keep measured findings separate from hypotheses found only in code.\n4. Categorize by user impact and confidence, then make or recommend specific fixes.\n5. Re-run equivalent automated checks and the affected manual flows. Report what is verified and what still needs field or human validation.\n\n## Tool routing\n\nUse the best capability already available; do not block the audit on optional setup.\n\n| Need | Preferred route | Fallback |\n|------|-----------------|----------|\n| Performance and Core Web Vitals | Record a browser performance trace and analyze focused insights; with Chrome DevTools MCP, use `performance_start_trace` then `performance_analyze_insight` | Lighthouse CLI or PageSpeed Insights lab data |\n| Real-user performance | CrUX values included in current DevTools trace summaries | PageSpeed Insights/CrUX Vis; direct CrUX API only when a key is already available or automation is requested |\n| Accessibility, SEO, Best Practices, Agentic Browsing | Run a live Lighthouse audit; with Chrome DevTools MCP, use `lighthouse_audit` | Category-specific Lighthouse CLI audits plus manual checks |\n| Rendered semantics and interaction | Inspect the accessibility tree and exercise the UI; with Chrome DevTools MCP, use `take_snapshot` and focused `evaluate_script` | Browser/manual testing |\n| Source smoke test | `scripts/analyze.sh <path>` | Direct source inspection |\n\nChrome DevTools MCP's `lighthouse_audit` intentionally excludes performance. Its navigation mode reloads the page; use snapshot mode when preserving the current authenticated or user-created state matters. The static analyzer is a fast smoke test, not a substitute for a rendered-page audit.\n\n## Audit categories\n\n### Performance\n\n**Core Web Vitals** — Must pass for good page experience:\n* **LCP (Largest Contentful Paint) < 2.5s.** The largest visible element must render quickly. Optimize images, fonts, and server response time.\n* **INP (Interaction to Next Paint) < 200ms.** User interactions must feel instant. Reduce JavaScript execution time and break up long tasks.\n* **CLS (Cumulative Layout Shift) < 0.1.** Content must not jump around. Set explicit dimensions on images, embeds, and ads.\n\n**Resource Optimization:**\n* **Compress images.** Use WebP/AVIF with fallbacks. Serve correctly sized images via `srcset`.\n* **Minimize JavaScript.** Remove unused code. Use code splitting. Defer non-critical scripts.\n* **Optimize CSS.** Extract critical CSS. Remove unused styles. Avoid `@import`.\n* **Efficient fonts.** Use `font-display: swap`. Preload critical fonts. Subset to needed characters.\n\n**Loading Strategy:**\n* **Preconnect to origins.** Add `<link rel=\"preconnect\">` for third-party domains.\n* **Preload critical assets.** LCP images, fonts, and above-fold CSS.\n* **Lazy load below-fold content.** Images, iframes, and heavy components.\n* **Cache effectively.** Long cache TTLs for static assets. Immutable caching for hashed files.\n","createdAt":"2026-09-25T11:52:02.408Z","updatedAt":"2026-09-25T11:52:02.408Z"},{"id":"cmugymuga02imqu06scfq953q","slug":"plugin87-ux-ui-agent-skills-design-review","name":"design-review","description":"Review or audit a design/UI across 6 weighted dimensions with Nielsen's 10 heuristics and a prioritized findings table. Use when the user wants a design critique, quality score, heuristic evaluation, or audit of an existing screen, page, or product before/after build.","authorId":"gh:plugin87","authorName":"plugin87","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":1463,"pricePerCall":0,"manifest":{"name":"design-review","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Review or audit a design/UI across 6 weighted dimensions with Nielsen's 10 heuristics and a prioritized findings table. Use when the user wants a design critique, quality score, heuristic evaluation, or audit of an existing screen, page, or product before/after build.","permissions":[],"systemPrompt":"# Skill: Design Review\n\nRun a structured, scored review.\n\n## Steps\n1. Read `workflows/design-review.md` (rubric, scoring guide, Nielsen heuristics, process).\n2. Gather context: the screen(s)/flow, target users, platform, constraints.\n3. Score the 6 dimensions (Visual Hierarchy 20%, Consistency 20%, Accessibility 20%, Usability 20%, Responsiveness 10%, Performance 10%); compute the weighted overall.\n4. Run the accessibility lens with `accessibility/wcag-checklist.md`; use `scripts/contrast.py` for any color-pair doubts.\n5. Check against the anti-slop tells in `taste/design-taste.md` (Banned Defaults checklist).\n6. Apply Nielsen's 10 heuristics; flag violations by number.\n\n## Output\n- The 6-dimension scored table + overall score.\n- A prioritized findings table: # · Severity (Critical → Major → Minor → Enhancement) · Finding · Recommendation.\n- Concrete, token-referenced fixes.","schemaVersion":1},"repoUrl":"https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/design-review","tags":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"ux-ui-agent-skills","audit":{"files":["package.json"],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T12:51:51.746Z","lockfiles":[]},"forks":153,"owner":"plugin87","stars":1463,"topics":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react","tailwindcss","ui","ux","wcag"],"license":"MIT","fullName":"plugin87/ux-ui-agent-skills","homepage":"https://plugin87.github.io/ux-ui-agent-skills/","language":"JavaScript","pushedAt":"2026-09-16T02:33:41Z","avatarUrl":"https://avatars.githubusercontent.com/u/5790381?v=4","crawledAt":"2026-09-25T12:51:46.935Z","openIssues":6,"manifestFile":"SKILL.md","manifestPath":".claude/skills/design-review/SKILL.md","defaultBranch":"main"},"readme":"# Skill: Design Review\n\nRun a structured, scored review.\n\n## Steps\n1. Read `workflows/design-review.md` (rubric, scoring guide, Nielsen heuristics, process).\n2. Gather context: the screen(s)/flow, target users, platform, constraints.\n3. Score the 6 dimensions (Visual Hierarchy 20%, Consistency 20%, Accessibility 20%, Usability 20%, Responsiveness 10%, Performance 10%); compute the weighted overall.\n4. Run the accessibility lens with `accessibility/wcag-checklist.md`; use `scripts/contrast.py` for any color-pair doubts.\n5. Check against the anti-slop tells in `taste/design-taste.md` (Banned Defaults checklist).\n6. Apply Nielsen's 10 heuristics; flag violations by number.\n\n## Output\n- The 6-dimension scored table + overall score.\n- A prioritized findings table: # · Severity (Critical → Major → Minor → Enhancement) · Finding · Recommendation.\n- Concrete, token-referenced fixes.","createdAt":"2026-09-25T12:51:51.850Z","updatedAt":"2026-09-25T12:51:51.850Z"},{"id":"cmugymudu02hyqu06m1rkn1p7","slug":"plugin87-ux-ui-agent-skills-a11y-audit","name":"a11y-audit","description":"Audit a UI or design against WCAG 2.2 AA/AAA and ARIA patterns, returning criterion-referenced findings with severity and specific fixes. Use when the user wants an accessibility check, contrast verification, keyboard/screen-reader review, or wants to confirm a component meets POUR.","authorId":"gh:plugin87","authorName":"plugin87","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":1463,"pricePerCall":0,"manifest":{"name":"a11y-audit","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Audit a UI or design against WCAG 2.2 AA/AAA and ARIA patterns, returning criterion-referenced findings with severity and specific fixes. Use when the user wants an accessibility check, contrast verification, keyboard/screen-reader review, or wants to confirm a component meets POUR.","permissions":[],"systemPrompt":"# Skill: Accessibility Audit\n\nEvaluate against WCAG 2.2 and the project's ARIA patterns.\n\n## Steps\n1. Read `accessibility/wcag-checklist.md` (POUR-organized, P0/P1/P2) and `accessibility/aria-patterns.md`.\n2. Check the mandatory P0 set per component: keyboard navigable, focus visible (≥3:1), screen-reader name/role/state, contrast (4.5:1 text / 3:1 UI), target size ≥24×24, no color-only signaling.\n3. Verify WCAG 2.2 additions: Focus Not Obscured (2.4.11), Target Size (2.5.8), Accessible Authentication (3.3.8).\n4. **Contrast — measure, don't eyeball.** For rendered HTML, RUN the real-render gates and report their actual output (CLAUDE.md → Verification Protocol): `node scripts/measure_render.mjs <file> [--dark]` (every text element) AND `node scripts/verify_states.mjs <file> [--dark]` (every interactive element in default/hover/focus — catches hover-state failures). For loose color pairs, `python3 scripts/contrast.py \"<fg>\" \"<bg>\"`. Never state a ratio you did not measure.\n5. Check reduced-motion handling (`taste/motion-choreography.md`).\n\n## Output\nA findings table: WCAG criterion (e.g. 1.4.3) · severity (P0/P1/P2) · what fails · specific fix. Confirm passes explicitly. Accessibility may never be traded for aesthetics.","schemaVersion":1},"repoUrl":"https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/a11y-audit","tags":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"ux-ui-agent-skills","audit":{"files":["package.json"],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T12:51:51.746Z","lockfiles":[]},"forks":153,"owner":"plugin87","stars":1463,"topics":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react","tailwindcss","ui","ux","wcag"],"license":"MIT","fullName":"plugin87/ux-ui-agent-skills","homepage":"https://plugin87.github.io/ux-ui-agent-skills/","language":"JavaScript","pushedAt":"2026-09-16T02:33:41Z","avatarUrl":"https://avatars.githubusercontent.com/u/5790381?v=4","crawledAt":"2026-09-25T12:51:46.935Z","openIssues":6,"manifestFile":"SKILL.md","manifestPath":".claude/skills/a11y-audit/SKILL.md","defaultBranch":"main"},"readme":"# Skill: Accessibility Audit\n\nEvaluate against WCAG 2.2 and the project's ARIA patterns.\n\n## Steps\n1. Read `accessibility/wcag-checklist.md` (POUR-organized, P0/P1/P2) and `accessibility/aria-patterns.md`.\n2. Check the mandatory P0 set per component: keyboard navigable, focus visible (≥3:1), screen-reader name/role/state, contrast (4.5:1 text / 3:1 UI), target size ≥24×24, no color-only signaling.\n3. Verify WCAG 2.2 additions: Focus Not Obscured (2.4.11), Target Size (2.5.8), Accessible Authentication (3.3.8).\n4. **Contrast — measure, don't eyeball.** For rendered HTML, RUN the real-render gates and report their actual output (CLAUDE.md → Verification Protocol): `node scripts/measure_render.mjs <file> [--dark]` (every text element) AND `node scripts/verify_states.mjs <file> [--dark]` (every interactive element in default/hover/focus — catches hover-state failures). For loose color pairs, `python3 scripts/contrast.py \"<fg>\" \"<bg>\"`. Never state a ratio you did not measure.\n5. Check reduced-motion handling (`taste/motion-choreography.md`).\n\n## Output\nA findings table: WCAG criterion (e.g. 1.4.3) · severity (P0/P1/P2) · what fails · specific fix. Confirm passes explicitly. Accessibility may never be traded for aesthetics.","createdAt":"2026-09-25T12:51:51.762Z","updatedAt":"2026-09-25T12:51:51.762Z"},{"id":"cmugymue102i1qu061m2poq3s","slug":"plugin87-ux-ui-agent-skills-apply-aesthetic","name":"apply-aesthetic","description":"Apply a visual direction — an archetype (high-end agency, editorial minimal, brutalist, soft-SaaS, dark-tech) or one of 138 named design systems (apple, linear-app, stripe, vercel, notion, material, shadcn, spotify, tesla…) — by resolving it into the token system. Use when the user wants a specific look/vibe/brand feel, or asks to make a design feel premium/expensive/non-generic.","authorId":"gh:plugin87","authorName":"plugin87","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":1463,"pricePerCall":0,"manifest":{"name":"apply-aesthetic","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Apply a visual direction — an archetype (high-end agency, editorial minimal, brutalist, soft-SaaS, dark-tech) or one of 138 named design systems (apple, linear-app, stripe, vercel, notion, material, shadcn, spotify, tesla…) — by resolving it into the token system. Use when the user wants a specific look/vibe/brand feel, or asks to make a design feel premium/expensive/non-generic.","permissions":[],"systemPrompt":"# Skill: Apply Aesthetic\n\nChoose and apply a design direction without breaking accessibility.\n\n## Steps\n1. **Brief Inference first (mandatory)** — before any tokens, name it: industry/domain, audience & tone, the one mood adjective the result must earn, motion depth, and the layout-family sequence (`taste/design-taste.md` → Brief Inference + Variance Mandate). Generating before deciding = slop.\n2. Pick a direction in `taste/aesthetic-systems.md`:\n   - An **archetype** (recipe mapped to our tokens), or\n   - A **named library system** — browse with `python3 scripts/design_systems.py list` (or `search <term>` / `show <name>`); specs live in `design-systems/library/<name>/DESIGN.md`.\n3. Apply the **Library Contract** (in `aesthetic-systems.md`): re-point `semantic.*` tokens to the chosen system's color roles; map typography/spacing/radius/shadow/motion to `tokens/*.json`.\n4. **Verify contrast** of every mapped color pair (`scripts/contrast.py` / `a11y-audit`). A brand value that fails must be adjusted — taste never overrides POUR.\n5. Add motion per `taste/motion-choreography.md`; run the pre-flight aesthetic check in `design-taste.md`.\n\n## Output\nUpdated/overridden semantic tokens + notes on type/space/motion, then render via `design-code`. Confirm the result passes both the aesthetic check and accessibility.","schemaVersion":1},"repoUrl":"https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/apply-aesthetic","tags":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"ux-ui-agent-skills","audit":{"files":["package.json"],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T12:51:51.746Z","lockfiles":[]},"forks":153,"owner":"plugin87","stars":1463,"topics":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react","tailwindcss","ui","ux","wcag"],"license":"MIT","fullName":"plugin87/ux-ui-agent-skills","homepage":"https://plugin87.github.io/ux-ui-agent-skills/","language":"JavaScript","pushedAt":"2026-09-16T02:33:41Z","avatarUrl":"https://avatars.githubusercontent.com/u/5790381?v=4","crawledAt":"2026-09-25T12:51:46.935Z","openIssues":6,"manifestFile":"SKILL.md","manifestPath":".claude/skills/apply-aesthetic/SKILL.md","defaultBranch":"main"},"readme":"# Skill: Apply Aesthetic\n\nChoose and apply a design direction without breaking accessibility.\n\n## Steps\n1. **Brief Inference first (mandatory)** — before any tokens, name it: industry/domain, audience & tone, the one mood adjective the result must earn, motion depth, and the layout-family sequence (`taste/design-taste.md` → Brief Inference + Variance Mandate). Generating before deciding = slop.\n2. Pick a direction in `taste/aesthetic-systems.md`:\n   - An **archetype** (recipe mapped to our tokens), or\n   - A **named library system** — browse with `python3 scripts/design_systems.py list` (or `search <term>` / `show <name>`); specs live in `design-systems/library/<name>/DESIGN.md`.\n3. Apply the **Library Contract** (in `aesthetic-systems.md`): re-point `semantic.*` tokens to the chosen system's color roles; map typography/spacing/radius/shadow/motion to `tokens/*.json`.\n4. **Verify contrast** of every mapped color pair (`scripts/contrast.py` / `a11y-audit`). A brand value that fails must be adjusted — taste never overrides POUR.\n5. Add motion per `taste/motion-choreography.md`; run the pre-flight aesthetic check in `design-taste.md`.\n\n## Output\nUpdated/overridden semantic tokens + notes on type/space/motion, then render via `design-code`. Confirm the result passes both the aesthetic check and accessibility.","createdAt":"2026-09-25T12:51:51.770Z","updatedAt":"2026-09-25T12:51:51.770Z"},{"id":"cmugymuec02i4qu06e06dcij0","slug":"plugin87-ux-ui-agent-skills-brandkit","name":"brandkit","description":"Generate a complete, accessible brand design system from a brief — primitive → semantic → component DTCG tokens (color, type, spacing, radius, shadow, motion), light + dark, plus a single theme.css — verified for WCAG. Use when the user wants a from-scratch brand/design foundation, a new palette + type system, or a themeable token kit for a product.","authorId":"gh:plugin87","authorName":"plugin87","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":1463,"pricePerCall":0,"manifest":{"name":"brandkit","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Generate a complete, accessible brand design system from a brief — primitive → semantic → component DTCG tokens (color, type, spacing, radius, shadow, motion), light + dark, plus a single theme.css — verified for WCAG. Use when the user wants a from-scratch brand/design foundation, a new palette + type system, or a themeable token kit for a product.","permissions":[],"systemPrompt":"# Skill: Brand Kit\n\nStand up the *foundation* (one token system everything renders from) before any screen. Get this right and every page stays consistent and themeable from one place.\n\n## Steps\n1. **Brief Inference (mandatory)** — name the industry, audience, the one mood adjective, and motion depth (`taste/design-taste.md` → Brief Inference). Pick an anchoring archetype from `taste/aesthetic-systems.md`.\n2. **Primitives** — generate the brand color ramp in **OKLCH** (11 shades, consistent chroma) + a neutral ramp; verify the 500 shade ≥ 4.5:1 on white (text) and 600 ≥ 3:1 (UI) per `.claude/rules/tokens-and-color.md` → Color Generation.\n3. **Semantic layer** — map roles to primitives: `action.primary`/`-hover`/`destructive`, `text.{primary,secondary,on-action,link}`, `surface.{page,card,raised}`, `border.{default,strong}`, `feedback.{success,warning,error,info}` — and the **dark** overrides (designed, not inverted).\n4. **Scales** — Major Third type scale + composite text styles, 4px spacing scale, radius tiers, elevation, and `tokens/motion.json`-style durations/easings.\n5. **Emit** the DTCG `tokens/*.json` (3-tier) + a single `theme.css` (the one shared source, `[data-theme=\"dark\"]` overrides). Optionally feed the token-build pipeline (`token-build` skill) for other platforms.\n\n## Verification (definition of done)\n- `python3 scripts/validate_tokens.py` — valid JSON, all aliases resolve.\n- `python3 scripts/validate_contrast.py` — required text/action/border pairs pass WCAG AA in **light AND dark**; `border.strong` ≥ 3:1.\n- `python3 scripts/validate_theme_refs.py` — every component `var(--…)` resolves to the theme.\n- One theme, no per-page palettes; destructive = danger token (not primary); zero hardcoded values.\n\n> Output is a verified token foundation — the measurable part is provable (run `npm run verify`). Brand \"feel\" still benefits from a human review against `taste/design-taste.md`.","schemaVersion":1},"repoUrl":"https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/brandkit","tags":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"ux-ui-agent-skills","audit":{"files":["package.json"],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T12:51:51.746Z","lockfiles":[]},"forks":153,"owner":"plugin87","stars":1463,"topics":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react","tailwindcss","ui","ux","wcag"],"license":"MIT","fullName":"plugin87/ux-ui-agent-skills","homepage":"https://plugin87.github.io/ux-ui-agent-skills/","language":"JavaScript","pushedAt":"2026-09-16T02:33:41Z","avatarUrl":"https://avatars.githubusercontent.com/u/5790381?v=4","crawledAt":"2026-09-25T12:51:46.935Z","openIssues":6,"manifestFile":"SKILL.md","manifestPath":".claude/skills/brandkit/SKILL.md","defaultBranch":"main"},"readme":"# Skill: Brand Kit\n\nStand up the *foundation* (one token system everything renders from) before any screen. Get this right and every page stays consistent and themeable from one place.\n\n## Steps\n1. **Brief Inference (mandatory)** — name the industry, audience, the one mood adjective, and motion depth (`taste/design-taste.md` → Brief Inference). Pick an anchoring archetype from `taste/aesthetic-systems.md`.\n2. **Primitives** — generate the brand color ramp in **OKLCH** (11 shades, consistent chroma) + a neutral ramp; verify the 500 shade ≥ 4.5:1 on white (text) and 600 ≥ 3:1 (UI) per `.claude/rules/tokens-and-color.md` → Color Generation.\n3. **Semantic layer** — map roles to primitives: `action.primary`/`-hover`/`destructive`, `text.{primary,secondary,on-action,link}`, `surface.{page,card,raised}`, `border.{default,strong}`, `feedback.{success,warning,error,info}` — and the **dark** overrides (designed, not inverted).\n4. **Scales** — Major Third type scale + composite text styles, 4px spacing scale, radius tiers, elevation, and `tokens/motion.json`-style durations/easings.\n5. **Emit** the DTCG `tokens/*.json` (3-tier) + a single `theme.css` (the one shared source, `[data-theme=\"dark\"]` overrides). Optionally feed the token-build pipeline (`token-build` skill) for other platforms.\n\n## Verification (definition of done)\n- `python3 scripts/validate_tokens.py` — valid JSON, all aliases resolve.\n- `python3 scripts/validate_contrast.py` — required text/action/border pairs pass WCAG AA in **light AND dark**; `border.strong` ≥ 3:1.\n- `python3 scripts/validate_theme_refs.py` — every component `var(--…)` resolves to the theme.\n- One theme, no per-page palettes; destructive = danger token (not primary); zero hardcoded values.\n\n> Output is a verified token foundation — the measurable part is provable (run `npm run verify`). Brand \"feel\" still benefits from a human review against `taste/design-taste.md`.","createdAt":"2026-09-25T12:51:51.780Z","updatedAt":"2026-09-25T12:51:51.780Z"},{"id":"cmugymueq02i7qu06pib9pt1c","slug":"plugin87-ux-ui-agent-skills-data-dashboard","name":"data-dashboard","description":"Build a dense, data-heavy screen - an analytics console or a trading terminal - with real charts drawn from tokens: candlestick, volume, depth, stacked area, waterfall, scatter, correlation matrix, donut, gauge, sparklines, heatmaps and order books. Use when the request is a dashboard, terminal, monitoring view, data console, or any screen whose job is to show many numbers at once. Covers the layout sequence, the SVG geometry, the accessibility contract per chart type, and the contrast traps that only appear in dark mode.","authorId":"gh:plugin87","authorName":"plugin87","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":1463,"pricePerCall":0,"manifest":{"name":"data-dashboard","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Build a dense, data-heavy screen - an analytics console or a trading terminal - with real charts drawn from tokens: candlestick, volume, depth, stacked area, waterfall, scatter, correlation matrix, donut, gauge, sparklines, heatmaps and order books. Use when the request is a dashboard, terminal, monitoring view, data console, or any screen whose job is to show many numbers at once. Covers the layout sequence, the SVG geometry, the accessibility contract per chart type, and the contrast traps that only appear in dark mode.","permissions":[],"systemPrompt":"# Skill: Data dashboard\n\nA dashboard is the hardest screen to keep honest: it is dense, it is mostly\nnon-text, and almost every default makes it worse. This is the recipe that\nproduced `examples/showcase/` and `examples/terminal/`, both of which pass every\ngate in both themes.\n\n## 1. Decide the brief before drawing anything\n\nAnswer these in one line each, or `/grill-me` them out of the user:\n\n- **Who reads this, and what decision do they make from it?** A revenue console\n  for an operator and a trading desk for a dealer look nothing alike.\n- **What is the one number that leads?** A dashboard without a lead is a wall.\n- **What is the update cadence?** Hourly figures get a \"last run\" line. Live\n  figures get a tape and a timestamp per row.\n- **How dense is honest?** A terminal earns 12 panels. A weekly report does not.\n\n## 2. Layout sequence, not a grid of equal cards\n\nFour equal stat cards is the single loudest tell that nobody designed this.\nCompose in bands, each a different shape:\n\n| Band | Content | Why |\n|---|---|---|\n| 1 | Hero metric at 3x body size + its own chart, spanning most of the width | The eye lands once |\n| 2 | Two or three secondary figures, stacked or narrow | Quiet by construction |\n| 3 | Three **different** chart shapes side by side (donut, ranked bars, sparklines) | Variety reads as intent |\n| 4 | A table that really sorts, plus a feed or log | Detail after summary |\n| 5 | A footer line that ends the page | A page must end on purpose |\n\nUse a 12-column grid with explicit spans (`span 8` / `span 4`), collapsing to 6\nthen 1. Never `repeat(auto-fit, …)` for the primary bands - it produces exactly\nthe equal-card wall you are avoiding.\n\n## 3. The chart inventory\n\nAll of these are plain inline SVG with `viewBox`, sized by CSS, filled from\n`--color-chart-*`. No chart library, no runtime dependency.\n\n| Chart | Geometry | Use it for |\n|---|---|---|\n| Bar / column | `<rect>` per bucket, `rx` for a soft corner | Discrete periods |\n| Candlestick | `<line>` wick + `<rect>` body per period, class by up/down | OHLC price |\n| Volume | Bars under the price chart, same x-scale, `opacity:.45` | Conviction behind a move |\n| Moving average | `<polyline>` over the candles, 2px, round joins | Trend through noise |\n| Line / sparkline | `<polyline>`, `pathLength=\"1\"` for a draw animation | Trend in a cell |\n| Area / stacked area | `<path>` per band: forward along the top, **reverse along the previous baseline**, close | Composition over time |\n| Depth | Two cumulative area paths mirrored around the mid | Book liquidity |\n| Waterfall | Floating `<rect>` per step + dashed connectors between levels | Attribution |\n| Donut | `<circle>` with `stroke-dasharray` and `rotate()` per segment | Share of a whole, 3-5 slices |\n| Radial gauge | Same trick, `stroke-linecap:round`, 270-degree sweep | One value against a limit |\n| Scatter / bubble | `<circle>`, radius = third dimension | Two measures plus weight |\n| Correlation matrix | HTML table, cell tint via `color-mix` | Pairwise relationships |\n| Heatmap | HTML table or `<rect>` grid, tint by value | Cohorts, calendars |\n| Order book | HTML table with a depth bar per row | Bids and asks |\n\n**Generate the geometry, do not hand-place it.** Write a small deterministic\nscript (a seeded walk) that emits the SVG elements, then paste the output in.\nHand-typed coordinates drift and cannot be regenerated.\n\n## 4. Domain correctness is part of craft\n\nGates cannot catch a chart that is drawn beautifully and means nothing. Check by\nhand:\n\n- A **correlation matrix is symmetric** and its diagonal is exactly 1. Random\n  values in both triangles is an instant tell to anyone who reads one for a living.\n- A **stacked area** sums to the total; bands must not cross or leave gaps. The\n  usual bug is reversing the baseline by index instead of by coordinate, which\n  shows as dark wedges between bands.\n- A **waterfall** needs connectors, and the closing bar must equal opening plus\n  the steps.\n- **Depth** rises away from the mid on both sides; it never falls.\n- A **donut** whose segments do not total the whole is a pie chart lying.\n\n## 5. Accessibility contract, per chart\n\n- Every SVG gets `role=\"img\"` plus either `aria-label` or `<title>`+`<desc>`\n  referenced by `aria-labelledby`. Say what the chart **shows**, not that it is a\n  chart: \"Range 182.06 to 200.10, closing at 187.84\" beats \"price chart\".\n- Never encode meaning in colour alone. Green with a `+` and an arrow; red with a\n  `-`. Up and down also carry a word in the table cell.\n- Tables get `<caption>` (use `.sr-only` when the panel header already says it),\n  `scope=\"col\"` / `scope=\"row\"`, and `aria-sort` only if clicking really sorts.\n- Sortable headers, range tabs and theme toggles all declare state - so they must\n  change it on a real click. `verify_interactive.mjs` clicks them and checks.\n\n## 6. The traps that only appear when you measure\n\nEvery one of these was found on a screen that looked finished. The first group a\ngate caught; the ones marked \"no gate sees it\" were caught by opening the\nscreenshot and looking, which is why that step is not optional:\n\n- **A chart palette is not a text palette.** White initials on `--color-chart-4`\n  measured **2.65:1** in dark. Chart colours are tuned for large filled shapes.\n- **Success green as text on a raised surface measured 4.43:1** - four\n  hundredths short of AA. Put the colour on the icon and the sign; keep the text\n  neutral.\n- **axe must not run mid-transition.** Disable transitions before flipping the\n  theme, or contrast is sampled while colours are still moving.\n- **Dense tables do not fit a phone.** Drop the column a phone can lose - the\n  sparkline, the derived value - in a media query, and say so in a comment. Do\n  not shrink type below the scale.\n- **Stagger comes from a token:** `calc(var(--duration-fast) * 0.6 * n)`, never a\n  typed millisecond.\n- **A grid row stretches its items.** Two fields side by side where only one has\n  a hint: the hint-less control grows to match the taller column and the two\n  inputs end up different heights. Set `align-content: start` on the field and an\n  explicit `block-size` on the control. Measure the heights in the render - the\n  difference is obvious in a screenshot and invisible in the markup.\n- **The same stretch hits whole panels, and no gate sees it.** A row is as tall as\n  its tallest panel, and the short one packs its content to the top and ends in a\n  bordered void - a heatmap panel with 130px of nothing under the caption, a right\n  column that stops two panels short of the map beside it. Every panel in a row\n  has to say which it is: one child absorbs the slack\n  (`grid-template-rows:auto minmax(0,1fr)`, and that child's own tracks go\n  `minmax(<min>,1fr)` so its rows grow too), or the rows share it out\n  (`align-content:space-between`), or the short column earns another panel.\n  Screenshot the row and look at the bottom edge of each panel; this never shows\n  up in the markup.\n- **`auto-fit` silently drops a column, and no gate sees it.** Three gauges in a\n  panel about 340px wide with `minmax(min(100%,7rem),1fr)` resolved to two tracks\n  and orphaned the third beside an empty cell. When the count is fixed and\n  meaningful, write `repeat(3,minmax(0,1fr))` and give narrow widths their own rule.\n- **A category chart needs its categories on the page, and no gate sees it.** A\n  Pareto of five defect types whose names live only in the `aria-label` is a row\n  of anonymous bars to everyone looking at it. Put the labels under the bars -\n  lay the plot out on an even pitch inside its viewBox so a matching grid of\n  labels lines up without a second coordinate system.\n- **An `.sr-only` needs a positioned ancestor.** Inside a scroller it otherwise\n  resolves against the initial containing block, lands outside the viewport, and\n  inflates the document's scroll width by hundreds of pixels.\n- **A zero-area element that only has area while it animates** reads as content\n  lost under `prefers-reduced-motion`. Give a radar sweep a wedge, not a 1px line.\n- **Never reuse a class name across layout and colour.** `.c4` as both a\n  four-column span and the fourth chart colour painted an entire panel pink.\n\n## 7. The loop\n\n```bash\nnode scripts/measure_render.mjs <file> && node scripts/measure_render.mjs --dark <file>\nnode scripts/verify_states.mjs <file>  && node scripts/axe_audit.mjs --dark <file>\nnode scripts/verify_responsive.mjs <file> --scale=1.25\nnode scripts/verify_interactive.mjs <file>\nnode scripts/slop_tells.mjs --strict <file> && node scripts/taste_audit.mjs --strict <file>\n```\n\nThen **screenshot it and look**, in both themes, at 1600 and 390 wide. The gates\nwill pass a chart that is drawn wrong. A correlation matrix that is not\nsymmetric is 16/16 green and still embarrassing.\n\nWorked references, both gate-verified: `examples/showcase/index.html` (revenue\nconsole) and `examples/terminal/index.html` (trading desk, ten chart types).","schemaVersion":1},"repoUrl":"https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/data-dashboard","tags":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"ux-ui-agent-skills","audit":{"files":["package.json"],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T12:51:51.746Z","lockfiles":[]},"forks":153,"owner":"plugin87","stars":1463,"topics":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react","tailwindcss","ui","ux","wcag"],"license":"MIT","fullName":"plugin87/ux-ui-agent-skills","homepage":"https://plugin87.github.io/ux-ui-agent-skills/","language":"JavaScript","pushedAt":"2026-09-16T02:33:41Z","avatarUrl":"https://avatars.githubusercontent.com/u/5790381?v=4","crawledAt":"2026-09-25T12:51:46.935Z","openIssues":6,"manifestFile":"SKILL.md","manifestPath":".claude/skills/data-dashboard/SKILL.md","defaultBranch":"main"},"readme":"# Skill: Data dashboard\n\nA dashboard is the hardest screen to keep honest: it is dense, it is mostly\nnon-text, and almost every default makes it worse. This is the recipe that\nproduced `examples/showcase/` and `examples/terminal/`, both of which pass every\ngate in both themes.\n\n## 1. Decide the brief before drawing anything\n\nAnswer these in one line each, or `/grill-me` them out of the user:\n\n- **Who reads this, and what decision do they make from it?** A revenue console\n  for an operator and a trading desk for a dealer look nothing alike.\n- **What is the one number that leads?** A dashboard without a lead is a wall.\n- **What is the update cadence?** Hourly figures get a \"last run\" line. Live\n  figures get a tape and a timestamp per row.\n- **How dense is honest?** A terminal earns 12 panels. A weekly report does not.\n\n## 2. Layout sequence, not a grid of equal cards\n\nFour equal stat cards is the single loudest tell that nobody designed this.\nCompose in bands, each a different shape:\n\n| Band | Content | Why |\n|---|---|---|\n| 1 | Hero metric at 3x body size + its own chart, spanning most of the width | The eye lands once |\n| 2 | Two or three secondary figures, stacked or narrow | Quiet by construction |\n| 3 | Three **different** chart shapes side by side (donut, ranked bars, sparklines) | Variety reads as intent |\n| 4 | A table that really sorts, plus a feed or log | Detail after summary |\n| 5 | A footer line that ends the page | A page must end on purpose |\n\nUse a 12-column grid with explicit spans (`span 8` / `span 4`), collapsing to 6\nthen 1. Never `repeat(auto-fit, …)` for the primary bands - it produces exactly\nthe equal-card wall you are avoiding.\n\n## 3. The chart inventory\n\nAll of these are plain inline SVG with `viewBox`, sized by CSS, filled from\n`--color-chart-*`. No chart library, no runtime dependency.\n\n| Chart | Geometry | Use it for |\n|---|---|---|\n| Bar / column | `<rect>` per bucket, `rx` for a soft corner | Discrete periods |\n| Candlestick | `<line>` wick + `<rect>` body per period, class by up/down | OHLC price |\n| Volume | Bars under the price chart, same x-scale, `opacity:.45` | Conviction behind a move |\n| Moving average | `<polyline>` over the candles, 2px, round joins | Trend through noise |\n| Line / sparkline | `<polyline>`, `pathLength=\"1\"` for a draw animation | Trend in a cell |\n| Area / stacked area | `<path>` per band: forward along the top, **reverse along the previous baseline**, close | Composition over time |\n| Depth | Two cumulative area paths mirrored around the mid | Book liquidity |\n| Waterfall | Floating `<rect>` per step + dashed connectors between levels | Attribution |\n| Donut | `<circle>` with `stroke-dasharray` and `rotate()` per segment | Share of a whole, 3-5 slices |\n| Radial gauge | Same trick, `stroke-linecap:round`, 270-degree sweep | One value against a limit |\n| Scatter / bubble | `<circle>`, radius = third dimension | Two measures plus weight |\n| Correlation matrix | HTML table, cell tint via `color-mix` | Pairwise relationships |\n| Heatmap | HTML table or `<rect>` grid, tint by value | Cohorts, calendars |\n| Order book | HTML table with a depth bar per row | Bids and asks |\n\n**Generate the geometry, do not hand-place it.** Write a small deterministic\nscript (a seeded walk) that emits the SVG elements, then paste the output in.\nHand-typed coordinates drift and cannot be regenerated.\n\n## 4. Domain correctness is part of craft\n\nGates cannot catch a chart that is drawn beautifully and means nothing. Check by\nhand:\n\n- A **correlation matrix is symmetric** and its diagonal is exactly 1. Random\n  values in both triangles is an instant tell to anyone who reads one for a living.\n- A **stacked area** sums to the total; bands must not cross or leave gaps. The\n  usual bug is reversing the baseline by index instead of by coordinate, which\n  shows as dark wedges between bands.\n- A **waterfall** needs connectors, and the closing bar must equal opening plus\n  the steps.\n- **Depth** rises away","createdAt":"2026-09-25T12:51:51.794Z","updatedAt":"2026-09-25T12:51:51.794Z"},{"id":"cmugymuf402iaqu064t87agc7","slug":"plugin87-ux-ui-agent-skills-design-code","name":"design-code","description":"Generate production-ready, accessible, token-driven component code for ANY framework — React+Tailwind, Next.js, SwiftUI, Vue, Svelte, Angular, Solid, Web Components/Lit, React Native, Flutter, Jetpack Compose, vanilla CSS, or CSS-in-JS. Use when the user wants working UI code for a component or screen in a specific stack.","authorId":"gh:plugin87","authorName":"plugin87","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":1463,"pricePerCall":0,"manifest":{"name":"design-code","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Generate production-ready, accessible, token-driven component code for ANY framework — React+Tailwind, Next.js, SwiftUI, Vue, Svelte, Angular, Solid, Web Components/Lit, React Native, Flutter, Jetpack Compose, vanilla CSS, or CSS-in-JS. Use when the user wants working UI code for a component or screen in a specific stack.","permissions":[],"systemPrompt":"# Skill: Design Code\n\nRender components into a target framework via the adapter system.\n\n## Steps\n1. Identify the **target framework** + styling method from the request (or ask).\n2. Read `frameworks/adapter-protocol.md` (the universal contract: token resolution, component contract, styling, dark mode, motion + output rules).\n3. Load the concrete adapter:\n   - Full references: `frameworks/react-tailwind.md`, `frameworks/nextjs.md`, `frameworks/swiftui.md`.\n   - Concise adapters: `frameworks/adapters/{vue,svelte,angular,solid,web-components-lit,react-native,flutter,jetpack-compose,vanilla-css,css-in-js}.md`.\n   - **No file for the target?** Generate an adapter on the fly using the protocol's \"author a new adapter\" checklist.\n4. Pull the component spec from `components/*` and the ARIA pattern from `accessibility/aria-patterns.md`.\n5. Resolve all values to tokens (`tokens/*.json`); apply aesthetic direction if requested (`apply-aesthetic` skill).\n\n## Output rules (mandatory)\nUse tokens (never hardcode) · include a11y on every interactive element · handle all applicable of the 8 states · support dark mode at the semantic layer · mobile-first · honor reduced motion · **deliver complete files, no placeholders** (`workflows/redesign-audit.md` → Output Completeness).\n\n## Verification (mandatory before declaring done)\nCode is the highest-stakes output — self-check every time:\n1. **No hardcoded values** — every color/size/radius/shadow/duration/**font** traces to a token (CSS var / theme key / asset). Run `scripts/lint_hardcodes.py` over the output; zero raw hex/px/ms AND zero raw Tailwind palette utilities (`bg-gray-500`, `text-blue-600`) — use semantic utilities/tokens (`bg-surface`, `text-primary`). Run `scripts/validate_theme_refs.py` so every `var(--…)` resolves to a defined theme token (no floating tokens). One allowed exception: 3rd-party theme-config (MUI/Mantine) mapping our tokens INTO their API.\n2. **All applicable states present** — Default, Hover, Focus(-visible ring), Active, Disabled, Loading(+`aria-busy`), Error, Selected — or justified N/A.\n3. **Accessibility wired** — correct role/ARIA per `accessibility/aria-patterns.md`, keyboard model, focus management, ≥24px target; verify contrast (`scripts/contrast.py`) for any new color pair.\n4. **Dark mode + reduced motion + responsive** — semantic tokens swap; motion has a `prefers-reduced-motion` fallback; layout is mobile-first.\n5. **Completeness** — full files, no `// ...`; if asked for N, deliver N. If any check fails, fix before returning (run `a11y-audit` if unsure).\n6. **Single-theme consistency** — consume the project's ONE shared token theme (the root CSS-var layer); never define a per-page palette or new colors. Across multiple pages/screens, the same semantic tokens must drive every surface so the whole product stays visually identical and themeable from one place (`.claude/rules/tokens-and-color.md` → Single-Theme Consistency).\n7. **One shared primitive layer** — build ONE reusable component per atom (`Button`, `Input`, `Modal`, `Badge` via `cva`/equivalent); never repeat utility-class clusters inline across files or hand-roll a div-as-modal per screen. Overlays reuse the single `Modal` primitive: focus trap, `role=\"dialog\"`, `aria-modal=\"true\"`, `aria-labelledby`, Escape, **return focus on close**, backdrop (WCAG 2.4.3 + 2.1.2). See `examples/golden/Button.tsx` + `examples/golden/Modal.tsx`.\n8. **Font loading** — NEVER `@import` web fonts in CSS (render-blocking). Use a framework loader (`next/font`) or `<link rel=\"preconnect\">` + `<link rel=\"preload\">` with `font-display: swap`; self-host when possible. Font family comes from a token (`--font-sans`), never a literal.\n9. **Semantic token BY INTENT + consistency** — the token's *meaning* must match the action: destructive (Delete/Remove) → `action.destructive` (danger), **never** `action.primary`; secondary = neutral outline/transparent with dark text (**never a colored fill** → no dark-text-on-blue). The SAME action uses the SAME variant **everywhere** (a trigger button and its confirm button must match — not red in one place and blue in another). Gates don't catch this — you must.\n10. **No emoji as icons** — use a real icon set (default **lucide**) as inline SVG with `currentColor`; never an emoji, including in JS that swaps a label (swap the `<svg>`, not a text/emoji string). Mentally run `scripts/lint_taste.py` (it flags emoji-as-icon).\n11. **Destructive confirmation UX** — irreversible actions (delete account/data, anything stated \"cannot be undone\") need real friction per WCAG 3.3.4 / 3.3.6: a confirmation dialog whose **confirm button restates the action** (\"Delete account\", not \"Delete\"/\"OK\"/\"Yes\") and, for high-stakes, a **type-to-confirm** step. See `examples/sample-app/preview.html` and `content/voice-tone.md`.\n12. **Taste pre-flight** — run the 12-point aesthetic check in `taste/design-taste.md` and, for any rendered HTML, `node scripts/taste_audit.mjs <file>` (render-based: flags timid type-scale contrast, uniform repetition, over-wide measure, palette sprawl). Taste is heuristic — treat findings as a strong signal and pair with a real screenshot review; it is NOT auto-provable like correctness.\n13. **Run the gates, then report (mandatory).** Before declaring done, RUN `node scripts/verify_states.mjs <file>` + `--dark` (every element, default/hover/focus) and `node scripts/accuracy_report.mjs`; report their actual output. Never type a contrast number or \"100%\" you didn't just measure (CLAUDE.md → Verification Protocol).","schemaVersion":1},"repoUrl":"https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/design-code","tags":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"ux-ui-agent-skills","audit":{"files":["package.json"],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T12:51:51.746Z","lockfiles":[]},"forks":153,"owner":"plugin87","stars":1463,"topics":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react","tailwindcss","ui","ux","wcag"],"license":"MIT","fullName":"plugin87/ux-ui-agent-skills","homepage":"https://plugin87.github.io/ux-ui-agent-skills/","language":"JavaScript","pushedAt":"2026-09-16T02:33:41Z","avatarUrl":"https://avatars.githubusercontent.com/u/5790381?v=4","crawledAt":"2026-09-25T12:51:46.935Z","openIssues":6,"manifestFile":"SKILL.md","manifestPath":".claude/skills/design-code/SKILL.md","defaultBranch":"main"},"readme":"# Skill: Design Code\n\nRender components into a target framework via the adapter system.\n\n## Steps\n1. Identify the **target framework** + styling method from the request (or ask).\n2. Read `frameworks/adapter-protocol.md` (the universal contract: token resolution, component contract, styling, dark mode, motion + output rules).\n3. Load the concrete adapter:\n   - Full references: `frameworks/react-tailwind.md`, `frameworks/nextjs.md`, `frameworks/swiftui.md`.\n   - Concise adapters: `frameworks/adapters/{vue,svelte,angular,solid,web-components-lit,react-native,flutter,jetpack-compose,vanilla-css,css-in-js}.md`.\n   - **No file for the target?** Generate an adapter on the fly using the protocol's \"author a new adapter\" checklist.\n4. Pull the component spec from `components/*` and the ARIA pattern from `accessibility/aria-patterns.md`.\n5. Resolve all values to tokens (`tokens/*.json`); apply aesthetic direction if requested (`apply-aesthetic` skill).\n\n## Output rules (mandatory)\nUse tokens (never hardcode) · include a11y on every interactive element · handle all applicable of the 8 states · support dark mode at the semantic layer · mobile-first · honor reduced motion · **deliver complete files, no placeholders** (`workflows/redesign-audit.md` → Output Completeness).\n\n## Verification (mandatory before declaring done)\nCode is the highest-stakes output — self-check every time:\n1. **No hardcoded values** — every color/size/radius/shadow/duration/**font** traces to a token (CSS var / theme key / asset). Run `scripts/lint_hardcodes.py` over the output; zero raw hex/px/ms AND zero raw Tailwind palette utilities (`bg-gray-500`, `text-blue-600`) — use semantic utilities/tokens (`bg-surface`, `text-primary`). Run `scripts/validate_theme_refs.py` so every `var(--…)` resolves to a defined theme token (no floating tokens). One allowed exception: 3rd-party theme-config (MUI/Mantine) mapping our tokens INTO their API.\n2. **All applicable states present** — Default, Hover, Focus(-visible ring), Active, Disabled, Loading(+`aria-busy`), Error, Selected — or justified N/A.\n3. **Accessibility wired** — correct role/ARIA per `accessibility/aria-patterns.md`, keyboard model, focus management, ≥24px target; verify contrast (`scripts/contrast.py`) for any new color pair.\n4. **Dark mode + reduced motion + responsive** — semantic tokens swap; motion has a `prefers-reduced-motion` fallback; layout is mobile-first.\n5. **Completeness** — full files, no `// ...`; if asked for N, deliver N. If any check fails, fix before returning (run `a11y-audit` if unsure).\n6. **Single-theme consistency** — consume the project's ONE shared token theme (the root CSS-var layer); never define a per-page palette or new colors. Across multiple pages/screens, the same semantic tokens must drive every surface so the whole product stays visually identical and themeable from one place (`.claude/rules/tokens-and-color.md` → Single-Theme Consistency).\n7. **One shared primitive layer** — build ONE reusable component per atom (`Button`, `Input`, `Modal`, `Badge` via `cva`/equivalent); never repeat utility-class clusters inline across files or hand-roll a div-as-modal per screen. Overlays reuse the single `Modal` primitive: focus trap, `role=\"dialog\"`, `aria-modal=\"true\"`, `aria-labelledby`, Escape, **return focus on close**, backdrop (WCAG 2.4.3 + 2.1.2). See `examples/golden/Button.tsx` + `examples/golden/Modal.tsx`.\n8. **Font loading** — NEVER `@import` web fonts in CSS (render-blocking). Use a framework loader (`next/font`) or `<link rel=\"preconnect\">` + `<link rel=\"preload\">` with `font-display: swap`; self-host when possible. Font family comes from a token (`--font-sans`), never a literal.\n9. **Semantic token BY INTENT + consistency** — the token's *meaning* must match the action: destructive (Delete/Remove) → `action.destructive` (danger), **never** `action.primary`; secondary = neutral outline/transparent with dark text (**never a colored fill** → no dark-text-on-blue). The SAME actio","createdAt":"2026-09-25T12:51:51.808Z","updatedAt":"2026-09-25T12:51:51.808Z"},{"id":"cmugymufd02idqu062zgrqjan","slug":"plugin87-ux-ui-agent-skills-design-component","name":"design-component","description":"Design a UI component spec to the house quality bar — anatomy, variants, sizes, the 8 states, token mapping, and accessibility. Use when the user wants to design or document a component (button, input, tabs, toast, combobox, date picker, modal, etc.) at the spec level before or alongside code. For generating framework code, use design-code.","authorId":"gh:plugin87","authorName":"plugin87","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":1463,"pricePerCall":0,"manifest":{"name":"design-component","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Design a UI component spec to the house quality bar — anatomy, variants, sizes, the 8 states, token mapping, and accessibility. Use when the user wants to design or document a component (button, input, tabs, toast, combobox, date picker, modal, etc.) at the spec level before or alongside code. For generating framework code, use design-code.","permissions":[],"systemPrompt":"# Skill: Design Component\n\nProduce a complete component specification matching the project format.\n\n## Steps\n1. Read `.claude/rules/components.md` → \"Component Quality Bar\" (the 8-state table) and \"Atomic Design\"; the always-on 8-state table is in `CLAUDE.md` → Non-Negotiables.\n2. Check if it already exists: `components/atoms.md`, `molecules.md`, `organisms.md`, `templates.md`, `navigation.md`, `feedback.md`, `forms-advanced.md`, `overlays.md`. Match the existing spec format.\n3. Pull the ARIA pattern from `accessibility/aria-patterns.md` and contrast/target rules from `accessibility/wcag-checklist.md`.\n4. Map every value to tokens (`tokens/*.json`) — sizes via `sizing.json`, states via `states.json`.\n5. Apply visual judgment from `taste/design-taste.md` (states, focus, no slop).\n6. Optional fast start: `python3 scripts/scaffold_component.py \"<Name>\"` to emit a stub, then fill it in.\n\n## Output\nSpec with: anatomy diagram, variants table, sizes table, all 8 applicable states, token mapping, accessibility (role/keyboard/SR), and a note to render via `frameworks/adapter-protocol.md`.\n\n## Accuracy — verify every state, don't assume (mandatory when code is produced)\nA component is only \"correct\" when **every variant × state** renders right — not just the resting default. Build a **states harness**: render the component in each applicable state (default, hover, focus, active, disabled, loading `aria-busy`, error `aria-invalid`, selected `aria-pressed`/`aria-selected`) × each variant in one HTML file (see `examples/component-states/button.html`). Then RUN the gates and report their real output (CLAUDE.md → Verification Protocol):\n- `node scripts/verify_states.mjs <harness> [--dark]` — contrast of every element in default/hover/focus\n- `node scripts/axe_audit.mjs <harness> [--dark]` — ARIA/role/name/label correctness\n- `node scripts/measure_render.mjs <harness> [--dark]` — every text element AA\n- overlays/modals also: `node scripts/verify_focustrap.mjs <harness> --open=<trigger>`\nEvery state must pass in light AND dark before the component is \"done\". Never claim a state is correct without a gate proving it.\n\n## Gates prove contrast/a11y — they do NOT prove pixels. RENDER AND LOOK.\nThe contrast/axe gates pass while the UI is still visibly broken: a checkbox that doesn't toggle, a dash sitting at the bottom of its box, a checkmark and an indeterminate dash with mismatched stroke weight, a control that's too heavy. **You must screenshot the harness and inspect it** before claiming done — for every state, and after interaction. Playwright + system Chrome:\n```js\nconst b = await chromium.launch({channel:'chrome'});\nconst p = await b.newPage({deviceScaleFactor:4});\nawait p.goto('file://'+abs); await p.addStyleTag({content:'*{transition:none!important}'});\nawait p.mouse.move(2000,2000);                 // park pointer OFF the component\nawait p.locator('.stack').first().screenshot({path:'/tmp/x.png'});\n```\nRead the PNG. Then look for, specifically:\n- **Functional**: click each interactive element and assert the state actually changed (`await loc.click(); expect(await loc.isChecked())`). A custom control whose overlay box covers the real `<input>` will not toggle unless the box has `pointer-events:none` (or an enclosing `<label>` forwards the click).\n- **Geometry**: glyphs centered, not stacked/offset. If a `display:grid` box holds an `opacity:0` sibling plus a `::after`, the pseudo lands in row 2 → use `display:none` on the hidden sibling, or one container child.\n- **Stroke consistency**: a checkmark and its indeterminate dash must use the **same** rendering method (one `<svg>`, two `<path>` toggled by state — same `stroke-width`), never an svg check vs a CSS `::after` rect (they read as different weights).\n- **Transition artifact**: screenshot WITHOUT disabling transitions and a just-clicked control looks half-faded mid-animation — that is not a bug. Always disable transitions and park the pointer before judging a state.\n\n**Consistency across files is non-negotiable.** The same component (e.g. checkbox) must use byte-identical CSS + markup in every harness/page. A checkbox that looks thin in `form-controls` and heavy (native `accent-color`) in `data-table` is a bug. Factor one pattern, reuse it verbatim.\n\n### Verified custom checkbox/radio pattern (thin, token-driven, gated + eyeballed)\nReal `<input>` underneath (keeps native a11y + keyboard); a drawn `.box` overlay with `pointer-events:none`; check + dash as two `<path>` in one `<svg>` toggled by `:checked` / `:indeterminate`; 1.5px `border-strong`, `.25rem` radius, `.62rem` glyph, `stroke-width:2` round caps. Reference: `examples/component-states/form-controls.html` and `data-table.html` (select-all uses `indeterminate`). Native `accent-color` renders too heavy — do not use it when the house look is \"thin\".\n\n## Responsive — every component, no sideways scroll (gated)\nBuild mobile-first; a fixed-px width that can't shrink is a bug. Run `node scripts/verify_responsive.mjs <file|dir>` — it loads each harness at 280/320/414px and fails on any horizontal overflow. The four recurring causes and their fixes:\n- **fixed `inline-size:Npx`** → `inline-size:100%;max-inline-size:Npx` (cap, don't pin).\n- **`<ul>`/`<ol>` default 40px inline-start padding** (a `*{margin:0}` reset does NOT clear padding) → `padding:0;margin:0` on every list. This also silently mis-aligns a list's edge vs a sibling block (looks like unequal widths) — same fix.\n- **non-wrapping flex rows** (breadcrumb, stepper, tabs) → `flex-wrap:wrap`, or for tabs `overflow-x:auto` + `.tab{flex:none}`.\n- **`grid minmax(Npx,1fr)` min larger than viewport** → `minmax(min(Npx,100%),1fr)`.\n\n## Motion — tokenized, real easing, animate the thing that moves\nTiming/easing are tokens (`--duration-fast|normal|slow`, `--ease-out|in|in-out|emphasized` in the theme; `--transition-micro` = `fast ease-out`). Never hardcode ms/curves. A component that toggles open/closed must animate its **height**, not just rotate a chevron — collapse via `hidden`/`display:none` alone reads as \"rigid, no transition\". Smooth-height pattern (no JS measuring): wrap content in an inner that clips overflow, animate the grid track:\n```css\n.panel{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--duration-normal) var(--ease-emphasized)}\n.panel.open{grid-template-rows:1fr}\n.panel > .inner{overflow:hidden;min-block-size:0}\n```\nKeep a11y: expand = remove `hidden` then add `.open` next frame; collapse = remove `.open`, set `hidden` on `transitionend`. Reference: accordion in `examples/component-states/overlays.html`. Always honor `@media(prefers-reduced-motion:reduce){…transition:none}`.\n\n## Layout — fill the space, don't ship AI-empty filler\n- **`auto-fit`, never `auto-fill`** for card grids. `auto-fill` keeps empty phantom tracks so 3 cards cluster left with a void on the right; `auto-fit` collapses empties so cards stretch to fill the row. Always `repeat(auto-fit,minmax(min(Npx,100%),1fr))`.\n- **Equal-height panels in a row**: `align-items:stretch` on the grid, AND make the shorter panel's body fill — `.panel{display:flex;flex-direction:column}` + the inner region `flex:1`. A child sized with `block-size:%` (e.g. chart bars) needs a **definite-height** ancestor (a `flex:1` box or explicit height), or the % resolves to 0 and the element collapses. Wrap the bar in a `flex:1` `.barbox` and give the bar `block-size:%` of that.\n- **A main region that's 80% whitespace reads as machine-generated.** Fill a dashboard with real, plausible content (stats row + activity list + a chart), not one lonely widget. Intentional density is the difference between \"designed\" and \"AI slop\".\n- **Trailing gap in a toolbar/header**: a flex item with `flex:1` capped by `max-inline-size` stops growing and leaves empty space *after* the last item. Push the right-hand cluster with `margin-inline-start:auto` on its first element.\n- **Mobile nav must not overlap.** Putting the sidebar and main in the same grid area makes an opened sidebar paint over content. On mobile switch the shell to `display:block` so opening the sidebar pushes main *down*. Reference: `examples/component-states/app-shell.html`.\n\n## Icons — real lucide, referenced by name (never hand-draw paths)\nHand-approximated SVG path data renders as broken glyphs (a help \"?\" became a dot; settings became a hamburger). Use **verbatim lucide** paths, referenced by name via an injected `<symbol>` sprite — `examples/component-states/icons.js` defines each icon once and `<svg class=\"ico\" aria-hidden=\"true\"><use href=\"#i-NAME\"/></svg>` uses it. No per-use path duplication, no network, offline + gate-safe. Add a new icon to `icons.js` once; never paste raw paths into markup. (Inline lucide is acceptable only if the path is copied verbatim from lucide.) `.ico{stroke:currentColor;fill:none;stroke-width:2}` — color via `currentColor`.\n\n## Graphical / icon-only controls (3:1, theme-stable)\nA no-text control (carousel dot, kebab, icon button) is held to **3:1** (WCAG 1.4.11), not 4.5 — `verify_states` applies this automatically when an element has no direct text node. Two traps it catches:\n- An empty `<button>` keeps the UA `color:buttontext` (≈black) regardless of theme → set its `color` to the actual indicator color and drive the visual via `currentColor` (e.g. dot is a `::before{background:currentColor}`), so the gate measures the real thing.\n- **Theme-flipping tokens** (`--color-chart-N`, `--color-surface-brand`) invert between light/dark; white text or a teal indicator on them passes in one mode and fails the other. Use **dark-aware** values (override in `[data-theme=\"dark\"]`) or **stable** tokens (`--color-action-primary`, `--color-text-link` which adapts) for avatars, active dots, and selected states.","schemaVersion":1},"repoUrl":"https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/design-component","tags":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"ux-ui-agent-skills","audit":{"files":["package.json"],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T12:51:51.746Z","lockfiles":[]},"forks":153,"owner":"plugin87","stars":1463,"topics":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react","tailwindcss","ui","ux","wcag"],"license":"MIT","fullName":"plugin87/ux-ui-agent-skills","homepage":"https://plugin87.github.io/ux-ui-agent-skills/","language":"JavaScript","pushedAt":"2026-09-16T02:33:41Z","avatarUrl":"https://avatars.githubusercontent.com/u/5790381?v=4","crawledAt":"2026-09-25T12:51:46.935Z","openIssues":6,"manifestFile":"SKILL.md","manifestPath":".claude/skills/design-component/SKILL.md","defaultBranch":"main"},"readme":"# Skill: Design Component\n\nProduce a complete component specification matching the project format.\n\n## Steps\n1. Read `.claude/rules/components.md` → \"Component Quality Bar\" (the 8-state table) and \"Atomic Design\"; the always-on 8-state table is in `CLAUDE.md` → Non-Negotiables.\n2. Check if it already exists: `components/atoms.md`, `molecules.md`, `organisms.md`, `templates.md`, `navigation.md`, `feedback.md`, `forms-advanced.md`, `overlays.md`. Match the existing spec format.\n3. Pull the ARIA pattern from `accessibility/aria-patterns.md` and contrast/target rules from `accessibility/wcag-checklist.md`.\n4. Map every value to tokens (`tokens/*.json`) — sizes via `sizing.json`, states via `states.json`.\n5. Apply visual judgment from `taste/design-taste.md` (states, focus, no slop).\n6. Optional fast start: `python3 scripts/scaffold_component.py \"<Name>\"` to emit a stub, then fill it in.\n\n## Output\nSpec with: anatomy diagram, variants table, sizes table, all 8 applicable states, token mapping, accessibility (role/keyboard/SR), and a note to render via `frameworks/adapter-protocol.md`.\n\n## Accuracy — verify every state, don't assume (mandatory when code is produced)\nA component is only \"correct\" when **every variant × state** renders right — not just the resting default. Build a **states harness**: render the component in each applicable state (default, hover, focus, active, disabled, loading `aria-busy`, error `aria-invalid`, selected `aria-pressed`/`aria-selected`) × each variant in one HTML file (see `examples/component-states/button.html`). Then RUN the gates and report their real output (CLAUDE.md → Verification Protocol):\n- `node scripts/verify_states.mjs <harness> [--dark]` — contrast of every element in default/hover/focus\n- `node scripts/axe_audit.mjs <harness> [--dark]` — ARIA/role/name/label correctness\n- `node scripts/measure_render.mjs <harness> [--dark]` — every text element AA\n- overlays/modals also: `node scripts/verify_focustrap.mjs <harness> --open=<trigger>`\nEvery state must pass in light AND dark before the component is \"done\". Never claim a state is correct without a gate proving it.\n\n## Gates prove contrast/a11y — they do NOT prove pixels. RENDER AND LOOK.\nThe contrast/axe gates pass while the UI is still visibly broken: a checkbox that doesn't toggle, a dash sitting at the bottom of its box, a checkmark and an indeterminate dash with mismatched stroke weight, a control that's too heavy. **You must screenshot the harness and inspect it** before claiming done — for every state, and after interaction. Playwright + system Chrome:\n```js\nconst b = await chromium.launch({channel:'chrome'});\nconst p = await b.newPage({deviceScaleFactor:4});\nawait p.goto('file://'+abs); await p.addStyleTag({content:'*{transition:none!important}'});\nawait p.mouse.move(2000,2000);                 // park pointer OFF the component\nawait p.locator('.stack').first().screenshot({path:'/tmp/x.png'});\n```\nRead the PNG. Then look for, specifically:\n- **Functional**: click each interactive element and assert the state actually changed (`await loc.click(); expect(await loc.isChecked())`). A custom control whose overlay box covers the real `<input>` will not toggle unless the box has `pointer-events:none` (or an enclosing `<label>` forwards the click).\n- **Geometry**: glyphs centered, not stacked/offset. If a `display:grid` box holds an `opacity:0` sibling plus a `::after`, the pseudo lands in row 2 → use `display:none` on the hidden sibling, or one container child.\n- **Stroke consistency**: a checkmark and its indeterminate dash must use the **same** rendering method (one `<svg>`, two `<path>` toggled by state — same `stroke-width`), never an svg check vs a CSS `::after` rect (they read as different weights).\n- **Transition artifact**: screenshot WITHOUT disabling transitions and a just-clicked control looks half-faded mid-animation — that is not a bug. Always disable transitions and park the pointer before judging a state.\n\n**Consistency across ","createdAt":"2026-09-25T12:51:51.817Z","updatedAt":"2026-09-25T12:51:51.817Z"},{"id":"cmugymufr02igqu0670il5n4j","slug":"plugin87-ux-ui-agent-skills-design-doctrine","name":"design-doctrine","description":"The house rules for ANY design or UI work - the verification protocol (run the gate, never claim a number), the absolute no-emoji rule, token by intent, one shared theme, the eight states, one thing leads, and output completeness. Load this FIRST whenever building, reviewing, or theming a screen, component, or token set. Installed as a plugin, this skill carries what CLAUDE.md carries in the repo.","authorId":"gh:plugin87","authorName":"plugin87","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":1463,"pricePerCall":0,"manifest":{"name":"design-doctrine","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"The house rules for ANY design or UI work - the verification protocol (run the gate, never claim a number), the absolute no-emoji rule, token by intent, one shared theme, the eight states, one thing leads, and output completeness. Load this FIRST whenever building, reviewing, or theming a screen, component, or token set. Installed as a plugin, this skill carries what CLAUDE.md carries in the repo.","permissions":[],"systemPrompt":"# Skill: Design Doctrine\n\nA plugin's root `CLAUDE.md` is not loaded as project context, so the always-on\nbrief travels here instead. Read this before the first line of any design work,\nthen load the rule file for the territory you are actually in.\n\n## Verification protocol - run gates, never claim\n\n1. **Never state a number you did not measure.** Any contrast ratio, \"WCAG pass\",\n   or \"100%\" must come from running a gate and reporting its real output. If you\n   have not run it, say \"not verified yet.\"\n2. **Verify every state, not just resting.** `node scripts/verify_states.mjs <file> [--dark]`\n   measures default, hover and focus - a button that passes at rest can fail on hover.\n3. **One command before reporting done:** `node scripts/accuracy_report.mjs`.\n   Report the real `N/N` line. It is all-or-nothing.\n4. **Build with the gates, not after them.** Fix and re-run until green; never\n   announce success between failures.\n5. **Render and LOOK.** Gates pass while a UI is still visibly broken. Screenshot\n   the harness in both themes, click every control, and confirm the state changed.\n6. **Responsive is gated too:** `node scripts/verify_responsive.mjs <file|dir>` -\n   no horizontal overflow at 280/320/414px.\n7. **Honest scope.** The gates prove objective correctness. They never prove taste.\n   For that, run `/critique` and look at the work yourself.\n8. **SKIPPED is not a pass.** With no browser installed a render gate prints\n   `SKIPPED` and exits 0, reporting nothing. Run single render gates behind\n   `DS_REQUIRE_BROWSER=1` so that becomes `REQUIRED, FAILING`, and fix it with\n   `npx playwright install chrome` rather than by removing the flag.\n\n> ABSOLUTE: zero emoji in any output - UI, code, JSON, copy, comments, commit\n> messages. Not as an icon, a bullet, a status dot, or \"polish\". Emoji are the\n> number-one tell of machine-generated work. Use a lucide icon (inline SVG,\n> `currentColor`) or plain words. Enforced by `scripts/check_no_emoji.py`.\n\n## The five non-negotiables\n\n1. **Token by intent.** Pick the token whose meaning matches the action.\n   Destructive actions (Delete, Remove, Revoke) wear `action.destructive` in every\n   place they appear - the trigger and the confirm dialog both. A blue Delete is a\n   bug. Measured by `scripts/lint_intent.mjs`.\n2. **One theme, one source of truth.** Every page renders from the same\n   `tokens/*.json` through one CSS-variable layer imported once at the app root.\n   No per-page palette, no hardcoded hex, px, or timing.\n3. **Every interactive element ships eight states:** default, hover, focus,\n   active, disabled, loading (if async), error (if input), and selected (if\n   selectable). The eighth is not optional when the thing can be selected.\n4. **One thing leads.** Every screen has a first place for the eye, and display\n   type is at least 2.5x the body size. Four equal cards means the eye lands\n   nowhere and the screen reads as generated.\n5. **Output completeness.** A partial output is a broken output. Deliver full\n   files, never placeholders. Asked for N components, deliver all N.\n\n## Decision framework\n\nUser needs, then accessibility, then consistency, then aesthetics, then developer\nexperience. Never sacrifice a higher tier for a lower one. Beautiful but\ninaccessible is broken; consistent but confusing is the wrong pattern.\n\n## Where the depth lives\n\n| Read it when | File |\n|---|---|\n| Tokens, palettes, theming, dark mode, any colour decision | `.claude/rules/tokens-and-color.md` |\n| Type scale, line length, the 4px spacing rhythm | `.claude/rules/typography-and-spacing.md` |\n| Building any screen or component, composition, empty states | `.claude/rules/components.md` |\n| Auditing, or finishing any interactive element | `.claude/rules/accessibility.md` |\n| Generating code for React, Next.js, SwiftUI, or any adapter | `.claude/rules/frameworks.md` |\n| Design review, prototyping, research, handoff | `.claude/rules/review-and-research.md` |\n| Aesthetic direction, motion, voice and tone, governance, QA | `.claude/rules/brand-and-operations.md` |\n\nThen pick the runnable skill for the job: `design-tokens`, `design-component`,\n`design-code`, `design-review`, `a11y-audit`, `apply-aesthetic`, `brandkit`,\n`image-to-code`, `redesign`, and the rest. Interrogate the brief first with\n`/grill-me`; prove the result with `/gate`; judge it with `/critique`.","schemaVersion":1},"repoUrl":"https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/design-doctrine","tags":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"ux-ui-agent-skills","audit":{"files":["package.json"],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T12:51:51.746Z","lockfiles":[]},"forks":153,"owner":"plugin87","stars":1463,"topics":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react","tailwindcss","ui","ux","wcag"],"license":"MIT","fullName":"plugin87/ux-ui-agent-skills","homepage":"https://plugin87.github.io/ux-ui-agent-skills/","language":"JavaScript","pushedAt":"2026-09-16T02:33:41Z","avatarUrl":"https://avatars.githubusercontent.com/u/5790381?v=4","crawledAt":"2026-09-25T12:51:46.935Z","openIssues":6,"manifestFile":"SKILL.md","manifestPath":".claude/skills/design-doctrine/SKILL.md","defaultBranch":"main"},"readme":"# Skill: Design Doctrine\n\nA plugin's root `CLAUDE.md` is not loaded as project context, so the always-on\nbrief travels here instead. Read this before the first line of any design work,\nthen load the rule file for the territory you are actually in.\n\n## Verification protocol - run gates, never claim\n\n1. **Never state a number you did not measure.** Any contrast ratio, \"WCAG pass\",\n   or \"100%\" must come from running a gate and reporting its real output. If you\n   have not run it, say \"not verified yet.\"\n2. **Verify every state, not just resting.** `node scripts/verify_states.mjs <file> [--dark]`\n   measures default, hover and focus - a button that passes at rest can fail on hover.\n3. **One command before reporting done:** `node scripts/accuracy_report.mjs`.\n   Report the real `N/N` line. It is all-or-nothing.\n4. **Build with the gates, not after them.** Fix and re-run until green; never\n   announce success between failures.\n5. **Render and LOOK.** Gates pass while a UI is still visibly broken. Screenshot\n   the harness in both themes, click every control, and confirm the state changed.\n6. **Responsive is gated too:** `node scripts/verify_responsive.mjs <file|dir>` -\n   no horizontal overflow at 280/320/414px.\n7. **Honest scope.** The gates prove objective correctness. They never prove taste.\n   For that, run `/critique` and look at the work yourself.\n8. **SKIPPED is not a pass.** With no browser installed a render gate prints\n   `SKIPPED` and exits 0, reporting nothing. Run single render gates behind\n   `DS_REQUIRE_BROWSER=1` so that becomes `REQUIRED, FAILING`, and fix it with\n   `npx playwright install chrome` rather than by removing the flag.\n\n> ABSOLUTE: zero emoji in any output - UI, code, JSON, copy, comments, commit\n> messages. Not as an icon, a bullet, a status dot, or \"polish\". Emoji are the\n> number-one tell of machine-generated work. Use a lucide icon (inline SVG,\n> `currentColor`) or plain words. Enforced by `scripts/check_no_emoji.py`.\n\n## The five non-negotiables\n\n1. **Token by intent.** Pick the token whose meaning matches the action.\n   Destructive actions (Delete, Remove, Revoke) wear `action.destructive` in every\n   place they appear - the trigger and the confirm dialog both. A blue Delete is a\n   bug. Measured by `scripts/lint_intent.mjs`.\n2. **One theme, one source of truth.** Every page renders from the same\n   `tokens/*.json` through one CSS-variable layer imported once at the app root.\n   No per-page palette, no hardcoded hex, px, or timing.\n3. **Every interactive element ships eight states:** default, hover, focus,\n   active, disabled, loading (if async), error (if input), and selected (if\n   selectable). The eighth is not optional when the thing can be selected.\n4. **One thing leads.** Every screen has a first place for the eye, and display\n   type is at least 2.5x the body size. Four equal cards means the eye lands\n   nowhere and the screen reads as generated.\n5. **Output completeness.** A partial output is a broken output. Deliver full\n   files, never placeholders. Asked for N components, deliver all N.\n\n## Decision framework\n\nUser needs, then accessibility, then consistency, then aesthetics, then developer\nexperience. Never sacrifice a higher tier for a lower one. Beautiful but\ninaccessible is broken; consistent but confusing is the wrong pattern.\n\n## Where the depth lives\n\n| Read it when | File |\n|---|---|\n| Tokens, palettes, theming, dark mode, any colour decision | `.claude/rules/tokens-and-color.md` |\n| Type scale, line length, the 4px spacing rhythm | `.claude/rules/typography-and-spacing.md` |\n| Building any screen or component, composition, empty states | `.claude/rules/components.md` |\n| Auditing, or finishing any interactive element | `.claude/rules/accessibility.md` |\n| Generating code for React, Next.js, SwiftUI, or any adapter | `.claude/rules/frameworks.md` |\n| Design review, prototyping, research, handoff | `.claude/rules/review-and-research.md` |\n| Aesthetic direction, motion, voice and","createdAt":"2026-09-25T12:51:51.831Z","updatedAt":"2026-09-25T12:51:51.831Z"},{"id":"cmugymug302ijqu06t28vj6k6","slug":"plugin87-ux-ui-agent-skills-design-qa","name":"design-qa","description":"Set up or run design QA gates — token + hardcoded-value lint, automated a11y (axe), contrast, visual regression across variants/states/themes/RTL, and the manual a11y checklist. Use when the user wants CI quality gates, to prevent design regressions, or to QA a component/screen before shipping.","authorId":"gh:plugin87","authorName":"plugin87","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":1463,"pricePerCall":0,"manifest":{"name":"design-qa","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Set up or run design QA gates — token + hardcoded-value lint, automated a11y (axe), contrast, visual regression across variants/states/themes/RTL, and the manual a11y checklist. Use when the user wants CI quality gates, to prevent design regressions, or to QA a component/screen before shipping.","permissions":[],"systemPrompt":"# Skill: Design QA\n\nStand up the automated + manual gates that stop quality from regressing.\n\n## Steps\n1. Read `workflows/design-qa.md` (the QA pyramid: token/lint gates → automated a11y → visual regression → manual a11y).\n2. Wire the **fast gates** first (every commit/PR): `python3 scripts/validate_tokens.py`, `python3 scripts/validate_contrast.py` (batch WCAG over the token pairs), and `python3 scripts/lint_hardcodes.py <src>` (no raw hex/px/timing in component code). The repo's `.github/workflows/ci.yml` runs these.\n3. Add **automated a11y** (axe-core / Pa11y) over each component's states (error/loading/disabled/expanded/selected), zero serious/critical to merge. Run the **real-render contrast gate** `node scripts/measure_render.mjs <file.html>` (and `--dark`) — it opens the page in headless Chromium, disables transitions, and measures the true computed-style + alpha-composited contrast of every text element (catches what static token checks miss).\n4. Add **visual regression** snapshots across variants × sizes × states × light/dark + key breakpoints + RTL; freeze animations + deterministic data.\n5. Sign off the **manual a11y** checklist per release (keyboard, screen reader, 400% reflow, 200% text-spacing, reduced-motion, forced-colors — `accessibility/*`).\n\n## Verification (definition of done)\n- An unreviewed PR cannot introduce an unresolved token alias, a contrast failure, a raw hex/px, or an axe violation — a gate blocks each.\n- Snapshots cover dark mode + RTL + the semantic-changing states, not just the happy path.\n- Manual a11y checklist signed off for the release.","schemaVersion":1},"repoUrl":"https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/design-qa","tags":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"ux-ui-agent-skills","audit":{"files":["package.json"],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T12:51:51.746Z","lockfiles":[]},"forks":153,"owner":"plugin87","stars":1463,"topics":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react","tailwindcss","ui","ux","wcag"],"license":"MIT","fullName":"plugin87/ux-ui-agent-skills","homepage":"https://plugin87.github.io/ux-ui-agent-skills/","language":"JavaScript","pushedAt":"2026-09-16T02:33:41Z","avatarUrl":"https://avatars.githubusercontent.com/u/5790381?v=4","crawledAt":"2026-09-25T12:51:46.935Z","openIssues":6,"manifestFile":"SKILL.md","manifestPath":".claude/skills/design-qa/SKILL.md","defaultBranch":"main"},"readme":"# Skill: Design QA\n\nStand up the automated + manual gates that stop quality from regressing.\n\n## Steps\n1. Read `workflows/design-qa.md` (the QA pyramid: token/lint gates → automated a11y → visual regression → manual a11y).\n2. Wire the **fast gates** first (every commit/PR): `python3 scripts/validate_tokens.py`, `python3 scripts/validate_contrast.py` (batch WCAG over the token pairs), and `python3 scripts/lint_hardcodes.py <src>` (no raw hex/px/timing in component code). The repo's `.github/workflows/ci.yml` runs these.\n3. Add **automated a11y** (axe-core / Pa11y) over each component's states (error/loading/disabled/expanded/selected), zero serious/critical to merge. Run the **real-render contrast gate** `node scripts/measure_render.mjs <file.html>` (and `--dark`) — it opens the page in headless Chromium, disables transitions, and measures the true computed-style + alpha-composited contrast of every text element (catches what static token checks miss).\n4. Add **visual regression** snapshots across variants × sizes × states × light/dark + key breakpoints + RTL; freeze animations + deterministic data.\n5. Sign off the **manual a11y** checklist per release (keyboard, screen reader, 400% reflow, 200% text-spacing, reduced-motion, forced-colors — `accessibility/*`).\n\n## Verification (definition of done)\n- An unreviewed PR cannot introduce an unresolved token alias, a contrast failure, a raw hex/px, or an axe violation — a gate blocks each.\n- Snapshots cover dark mode + RTL + the semantic-changing states, not just the happy path.\n- Manual a11y checklist signed off for the release.","createdAt":"2026-09-25T12:51:51.843Z","updatedAt":"2026-09-25T12:51:51.843Z"},{"id":"cmugymugk02ipqu06gtr4zlrg","slug":"plugin87-ux-ui-agent-skills-design-tokens","name":"design-tokens","description":"Generate, extend, or audit design tokens in DTCG format with the 3-tier architecture (primitive → semantic → component). Use when the user wants a color palette, type scale, spacing/shadow/radius/motion tokens, multi-brand theming, or wants to validate token files. Covers colors, typography, spacing, shadows, borders, breakpoints, motion, gradients, opacity, blur, sizing, states, theming.","authorId":"gh:plugin87","authorName":"plugin87","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":1463,"pricePerCall":0,"manifest":{"name":"design-tokens","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Generate, extend, or audit design tokens in DTCG format with the 3-tier architecture (primitive → semantic → component). Use when the user wants a color palette, type scale, spacing/shadow/radius/motion tokens, multi-brand theming, or wants to validate token files. Covers colors, typography, spacing, shadows, borders, breakpoints, motion, gradients, opacity, blur, sizing, states, theming.","permissions":[],"systemPrompt":"# Skill: Design Tokens\n\nProduce and maintain DTCG (`$type`/`$value`) tokens following the project's 3-tier system.\n\n## Steps\n1. Read `.claude/rules/tokens-and-color.md` → \"Token System\" + \"Color Guidelines\" and `.claude/rules/typography-and-spacing.md` for the rules (4px base, Major Third scale, OKLCH palette generation, dark-mode-at-semantic-layer).\n2. Read the relevant existing files in `tokens/` to match structure: `colors.json`, `typography.json`, `spacing.json`, `shadows.json`, `borders.json`, `breakpoints.json`, `motion.json`, `gradients.json`, `opacity.json`, `blur.json`, `sizing.json`, `states.json`, `theming.json`.\n3. Generate/extend tokens:\n   - Primitives = raw values (never used directly). Semantic = purpose aliases. Component = component-scoped.\n   - New palettes: generate 11 OKLCH shades; verify 500 ≥ 4.5:1 on white (text), 600 ≥ 3:1 (UI) using the `a11y-audit` skill / `scripts/contrast.py`.\n   - Multi-brand/density → `theming.json`.\n4. **Validate**: run `python3 scripts/validate_tokens.py` (JSON validity + alias resolution).\n\n## Output\nDTCG JSON. Preserve `$description` on every token. Reference, never hardcode.","schemaVersion":1},"repoUrl":"https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/design-tokens","tags":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"ux-ui-agent-skills","audit":{"files":["package.json"],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T12:51:51.746Z","lockfiles":[]},"forks":153,"owner":"plugin87","stars":1463,"topics":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react","tailwindcss","ui","ux","wcag"],"license":"MIT","fullName":"plugin87/ux-ui-agent-skills","homepage":"https://plugin87.github.io/ux-ui-agent-skills/","language":"JavaScript","pushedAt":"2026-09-16T02:33:41Z","avatarUrl":"https://avatars.githubusercontent.com/u/5790381?v=4","crawledAt":"2026-09-25T12:51:46.935Z","openIssues":6,"manifestFile":"SKILL.md","manifestPath":".claude/skills/design-tokens/SKILL.md","defaultBranch":"main"},"readme":"# Skill: Design Tokens\n\nProduce and maintain DTCG (`$type`/`$value`) tokens following the project's 3-tier system.\n\n## Steps\n1. Read `.claude/rules/tokens-and-color.md` → \"Token System\" + \"Color Guidelines\" and `.claude/rules/typography-and-spacing.md` for the rules (4px base, Major Third scale, OKLCH palette generation, dark-mode-at-semantic-layer).\n2. Read the relevant existing files in `tokens/` to match structure: `colors.json`, `typography.json`, `spacing.json`, `shadows.json`, `borders.json`, `breakpoints.json`, `motion.json`, `gradients.json`, `opacity.json`, `blur.json`, `sizing.json`, `states.json`, `theming.json`.\n3. Generate/extend tokens:\n   - Primitives = raw values (never used directly). Semantic = purpose aliases. Component = component-scoped.\n   - New palettes: generate 11 OKLCH shades; verify 500 ≥ 4.5:1 on white (text), 600 ≥ 3:1 (UI) using the `a11y-audit` skill / `scripts/contrast.py`.\n   - Multi-brand/density → `theming.json`.\n4. **Validate**: run `python3 scripts/validate_tokens.py` (JSON validity + alias resolution).\n\n## Output\nDTCG JSON. Preserve `$description` on every token. Reference, never hardcode.","createdAt":"2026-09-25T12:51:51.860Z","updatedAt":"2026-09-25T12:51:51.860Z"},{"id":"cmugymugu02isqu06nvekarcr","slug":"plugin87-ux-ui-agent-skills-figma-integration","name":"figma-integration","description":"Keep Figma and code in sync — map the 3-tier DTCG tokens to Figma Variables (collections + modes), sync in either direction, use the Figma MCP when connected, and verify component parity (variants/states). Use when the user wants to push tokens/components to Figma, pull a design into code, set up token↔Variable sync, or check design-code drift.","authorId":"gh:plugin87","authorName":"plugin87","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":1463,"pricePerCall":0,"manifest":{"name":"figma-integration","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Keep Figma and code in sync — map the 3-tier DTCG tokens to Figma Variables (collections + modes), sync in either direction, use the Figma MCP when connected, and verify component parity (variants/states). Use when the user wants to push tokens/components to Figma, pull a design into code, set up token↔Variable sync, or check design-code drift.","permissions":[],"systemPrompt":"# Skill: Figma Integration\n\nBridge design (Figma) and code (this repo) in both directions. The token JSON stays the source of truth; Figma Variables mirror it.\n\n## Steps\n1. Read `workflows/figma-integration.md` (token↔Variable mapping, sync directions, MCP usage, parity).\n2. Map the 3-tier hierarchy → three Figma collections (Primitives → Semantic → Component) with aliasing; dark/brand/density → Figma **Modes** (`tokens/theming.json`).\n3. Choose ONE authoritative sync direction (code→Figma publish, or Figma→code extract via Tokens Studio / Variables REST API). The other side is generated — never hand-edit both.\n4. **If a Figma MCP server is connected:** prefer its tools/skills (load its mandatory prerequisite skill first). Use it to read frames/variables/screenshots into code, build Variables/components from our tokens, or wire Code Connect to `components/*`.\n5. Check component parity: Figma variants/properties must cover our variants + sizes + the 8 states; flag gaps.\n\n## Verification (definition of done)\n- Every Figma Variable resolves to a token in `tokens/*.json` (no orphan hex in designs).\n- One authoritative direction; the generated side has zero hand edits.\n- Variant sets cover all 8 states; Code Connect points to the right `components/*` file.\n- After any token import: `python3 scripts/validate_tokens.py` passes.","schemaVersion":1},"repoUrl":"https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/figma-integration","tags":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"ux-ui-agent-skills","audit":{"files":["package.json"],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T12:51:51.746Z","lockfiles":[]},"forks":153,"owner":"plugin87","stars":1463,"topics":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react","tailwindcss","ui","ux","wcag"],"license":"MIT","fullName":"plugin87/ux-ui-agent-skills","homepage":"https://plugin87.github.io/ux-ui-agent-skills/","language":"JavaScript","pushedAt":"2026-09-16T02:33:41Z","avatarUrl":"https://avatars.githubusercontent.com/u/5790381?v=4","crawledAt":"2026-09-25T12:51:46.935Z","openIssues":6,"manifestFile":"SKILL.md","manifestPath":".claude/skills/figma-integration/SKILL.md","defaultBranch":"main"},"readme":"# Skill: Figma Integration\n\nBridge design (Figma) and code (this repo) in both directions. The token JSON stays the source of truth; Figma Variables mirror it.\n\n## Steps\n1. Read `workflows/figma-integration.md` (token↔Variable mapping, sync directions, MCP usage, parity).\n2. Map the 3-tier hierarchy → three Figma collections (Primitives → Semantic → Component) with aliasing; dark/brand/density → Figma **Modes** (`tokens/theming.json`).\n3. Choose ONE authoritative sync direction (code→Figma publish, or Figma→code extract via Tokens Studio / Variables REST API). The other side is generated — never hand-edit both.\n4. **If a Figma MCP server is connected:** prefer its tools/skills (load its mandatory prerequisite skill first). Use it to read frames/variables/screenshots into code, build Variables/components from our tokens, or wire Code Connect to `components/*`.\n5. Check component parity: Figma variants/properties must cover our variants + sizes + the 8 states; flag gaps.\n\n## Verification (definition of done)\n- Every Figma Variable resolves to a token in `tokens/*.json` (no orphan hex in designs).\n- One authoritative direction; the generated side has zero hand edits.\n- Variant sets cover all 8 states; Code Connect points to the right `components/*` file.\n- After any token import: `python3 scripts/validate_tokens.py` passes.","createdAt":"2026-09-25T12:51:51.870Z","updatedAt":"2026-09-25T12:51:51.870Z"},{"id":"cmugymuh202ivqu06n0a0dy5c","slug":"plugin87-ux-ui-agent-skills-governance","name":"governance","description":"Govern how the design system evolves — SemVer for tokens/components, the contribution workflow, deprecation policy, and change communication. Use when the user wants to add/promote/deprecate a component or token, decide a version bump, set up a contribution process, or keep the system from fragmenting.","authorId":"gh:plugin87","authorName":"plugin87","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":1463,"pricePerCall":0,"manifest":{"name":"governance","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Govern how the design system evolves — SemVer for tokens/components, the contribution workflow, deprecation policy, and change communication. Use when the user wants to add/promote/deprecate a component or token, decide a version bump, set up a contribution process, or keep the system from fragmenting.","permissions":[],"systemPrompt":"# Skill: Governance\n\nKeep the system consistent as it grows. Apply versioning, contribution, and deprecation rules.\n\n## Steps\n1. Read `workflows/governance.md` (SemVer table, contribution workflow, deprecation policy, change comms).\n2. Classify the change: **major** (breaking — renamed/removed token or prop, changed anatomy/default), **minor** (additive — new token/component/variant/optional prop), **patch** (fix — contrast/bug/doc/value tweak in tolerance).\n3. For a **new** component/token: confirm it serves a real, repeated need (≥ 2 places) before promoting product → candidate → core. Design it to the full quality bar (`.claude/rules/components.md` → Component Quality Bar).\n4. For a **deprecation**: mark with reason + replacement + removal version; keep working ≥ 1 minor cycle; provide a migration map (`design-systems/crosswalk.md` style); remove only in a major.\n5. Wire any new file into `CLAUDE.md` (File Reference Map + relevant table/router) and add a changelog entry.\n\n## Verification (definition of done)\n- Change has a SemVer level **and** a changelog entry.\n- Removals have a deprecation window, a replacement, and a migration table.\n- New spec meets the 8-state + a11y + token-mapping bar and is reachable via the router.\n- `python3 scripts/validate_tokens.py` passes; contrast re-checked if colors changed.","schemaVersion":1},"repoUrl":"https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/governance","tags":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"ux-ui-agent-skills","audit":{"files":["package.json"],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T12:51:51.746Z","lockfiles":[]},"forks":153,"owner":"plugin87","stars":1463,"topics":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react","tailwindcss","ui","ux","wcag"],"license":"MIT","fullName":"plugin87/ux-ui-agent-skills","homepage":"https://plugin87.github.io/ux-ui-agent-skills/","language":"JavaScript","pushedAt":"2026-09-16T02:33:41Z","avatarUrl":"https://avatars.githubusercontent.com/u/5790381?v=4","crawledAt":"2026-09-25T12:51:46.935Z","openIssues":6,"manifestFile":"SKILL.md","manifestPath":".claude/skills/governance/SKILL.md","defaultBranch":"main"},"readme":"# Skill: Governance\n\nKeep the system consistent as it grows. Apply versioning, contribution, and deprecation rules.\n\n## Steps\n1. Read `workflows/governance.md` (SemVer table, contribution workflow, deprecation policy, change comms).\n2. Classify the change: **major** (breaking — renamed/removed token or prop, changed anatomy/default), **minor** (additive — new token/component/variant/optional prop), **patch** (fix — contrast/bug/doc/value tweak in tolerance).\n3. For a **new** component/token: confirm it serves a real, repeated need (≥ 2 places) before promoting product → candidate → core. Design it to the full quality bar (`.claude/rules/components.md` → Component Quality Bar).\n4. For a **deprecation**: mark with reason + replacement + removal version; keep working ≥ 1 minor cycle; provide a migration map (`design-systems/crosswalk.md` style); remove only in a major.\n5. Wire any new file into `CLAUDE.md` (File Reference Map + relevant table/router) and add a changelog entry.\n\n## Verification (definition of done)\n- Change has a SemVer level **and** a changelog entry.\n- Removals have a deprecation window, a replacement, and a migration table.\n- New spec meets the 8-state + a11y + token-mapping bar and is reachable via the router.\n- `python3 scripts/validate_tokens.py` passes; contrast re-checked if colors changed.","createdAt":"2026-09-25T12:51:51.878Z","updatedAt":"2026-09-25T12:51:51.878Z"},{"id":"cmugymuhg02iyqu069938aio0","slug":"plugin87-ux-ui-agent-skills-image-to-code","name":"image-to-code","description":"Turn a reference image, screenshot, or mockup into token-driven, accessible code — infer the design system from the reference (palette, type scale, spacing, radius, layout archetype), map it to the 3-tier tokens, rebuild it, then verify with the kit's gates. Use when the user provides a design/screenshot and wants matching UI code.","authorId":"gh:plugin87","authorName":"plugin87","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":1463,"pricePerCall":0,"manifest":{"name":"image-to-code","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Turn a reference image, screenshot, or mockup into token-driven, accessible code — infer the design system from the reference (palette, type scale, spacing, radius, layout archetype), map it to the 3-tier tokens, rebuild it, then verify with the kit's gates. Use when the user provides a design/screenshot and wants matching UI code.","permissions":[],"systemPrompt":"# Skill: Image to Code\n\nReconstruct a design from a visual reference as a real design system, not a one-off copy. Match the *system* (color/type/spacing language), never lift copyrighted imagery or brand assets.\n\n## Steps\n1. **Read the reference like a designer.** Infer and write down:\n   - **Palette** — 1 dominant surface family, text colors, 1 primary action + at most 1 accent (sample the hues; don't guess random hex).\n   - **Type** — family feel (geometric/grotesk/serif), the scale jumps, display vs. body contrast, weights.\n   - **Spacing & density** — base unit, section rhythm, card padding; airy vs. compact.\n   - **Radius & depth** — radius language (sharp/soft/pill), shadow vs. hairline separation.\n   - **Layout archetype + sequence** — full-bleed hero / asymmetric split / bento / editorial stack (`taste/design-taste.md` → Variance Mandate).\n2. **Anchor to a known system** if it's close — browse `taste/aesthetic-systems.md` / `python3 scripts/design_systems.py search <term>` and adopt that recipe to stabilize decisions.\n3. **Build the token theme** from the inferred values → 3-tier DTCG (`design-tokens` skill); generate a single `theme.css`. Verify every color pair with `scripts/contrast.py` / `scripts/validate_contrast.py` (light + dark) — a sampled brand color that fails AA gets adjusted; taste never overrides POUR.\n4. **Rebuild layout + components** token-driven via `frameworks/adapter-protocol.md` + `components/*`: one shared primitive layer, all 8 states, a11y wired, no emoji (lucide), single theme. Apply taste (`design-taste.md`) so it doesn't regress to generic.\n5. **Verify against the reference** — render and screenshot it, compare side-by-side to the reference; run `node scripts/measure_render.mjs`, `lint_hardcodes.py`, `taste_audit.mjs`, and `npm run verify`.\n\n## Verification (definition of done)\n- `npm run verify` is 100% (tokens resolve, contrast AA light+dark, no hardcodes/emoji, real-render WCAG).\n- The rebuilt UI uses ONE inferred token theme — no per-section palettes.\n- A screenshot of the result visibly matches the reference's design language.\n\n> Honest limit: this matches the design **system**, not a pixel-perfect copy. Do not reproduce the reference's photographs, logos, or copyrighted copy — substitute your own or generic placeholders.","schemaVersion":1},"repoUrl":"https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/image-to-code","tags":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"ux-ui-agent-skills","audit":{"files":["package.json"],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T12:51:51.746Z","lockfiles":[]},"forks":153,"owner":"plugin87","stars":1463,"topics":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react","tailwindcss","ui","ux","wcag"],"license":"MIT","fullName":"plugin87/ux-ui-agent-skills","homepage":"https://plugin87.github.io/ux-ui-agent-skills/","language":"JavaScript","pushedAt":"2026-09-16T02:33:41Z","avatarUrl":"https://avatars.githubusercontent.com/u/5790381?v=4","crawledAt":"2026-09-25T12:51:46.935Z","openIssues":6,"manifestFile":"SKILL.md","manifestPath":".claude/skills/image-to-code/SKILL.md","defaultBranch":"main"},"readme":"# Skill: Image to Code\n\nReconstruct a design from a visual reference as a real design system, not a one-off copy. Match the *system* (color/type/spacing language), never lift copyrighted imagery or brand assets.\n\n## Steps\n1. **Read the reference like a designer.** Infer and write down:\n   - **Palette** — 1 dominant surface family, text colors, 1 primary action + at most 1 accent (sample the hues; don't guess random hex).\n   - **Type** — family feel (geometric/grotesk/serif), the scale jumps, display vs. body contrast, weights.\n   - **Spacing & density** — base unit, section rhythm, card padding; airy vs. compact.\n   - **Radius & depth** — radius language (sharp/soft/pill), shadow vs. hairline separation.\n   - **Layout archetype + sequence** — full-bleed hero / asymmetric split / bento / editorial stack (`taste/design-taste.md` → Variance Mandate).\n2. **Anchor to a known system** if it's close — browse `taste/aesthetic-systems.md` / `python3 scripts/design_systems.py search <term>` and adopt that recipe to stabilize decisions.\n3. **Build the token theme** from the inferred values → 3-tier DTCG (`design-tokens` skill); generate a single `theme.css`. Verify every color pair with `scripts/contrast.py` / `scripts/validate_contrast.py` (light + dark) — a sampled brand color that fails AA gets adjusted; taste never overrides POUR.\n4. **Rebuild layout + components** token-driven via `frameworks/adapter-protocol.md` + `components/*`: one shared primitive layer, all 8 states, a11y wired, no emoji (lucide), single theme. Apply taste (`design-taste.md`) so it doesn't regress to generic.\n5. **Verify against the reference** — render and screenshot it, compare side-by-side to the reference; run `node scripts/measure_render.mjs`, `lint_hardcodes.py`, `taste_audit.mjs`, and `npm run verify`.\n\n## Verification (definition of done)\n- `npm run verify` is 100% (tokens resolve, contrast AA light+dark, no hardcodes/emoji, real-render WCAG).\n- The rebuilt UI uses ONE inferred token theme — no per-section palettes.\n- A screenshot of the result visibly matches the reference's design language.\n\n> Honest limit: this matches the design **system**, not a pixel-perfect copy. Do not reproduce the reference's photographs, logos, or copyrighted copy — substitute your own or generic placeholders.","createdAt":"2026-09-25T12:51:51.892Z","updatedAt":"2026-09-25T12:51:51.892Z"},{"id":"cmugymuhq02j1qu06in4eay9b","slug":"plugin87-ux-ui-agent-skills-migrate-design-system","name":"migrate-design-system","description":"Map this token system to or from any external design system (Material Design 3, Apple HIG, Fluent, Carbon, Ant, shadcn/ui, Radix, Chakra, Mantine, Bootstrap…) — adopt their look, build on their stack, or migrate between systems. Use when the user mentions interop, migration, or a specific design-system/component-library bridge.","authorId":"gh:plugin87","authorName":"plugin87","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":1463,"pricePerCall":0,"manifest":{"name":"migrate-design-system","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Map this token system to or from any external design system (Material Design 3, Apple HIG, Fluent, Carbon, Ant, shadcn/ui, Radix, Chakra, Mantine, Bootstrap…) — adopt their look, build on their stack, or migrate between systems. Use when the user mentions interop, migration, or a specific design-system/component-library bridge.","permissions":[],"systemPrompt":"# Skill: Migrate / Interop Design System\n\nBridge to or from external design systems via a role-based crosswalk.\n\n## Steps\n1. Read `design-systems/interop-protocol.md` (Crosswalk Method, the three directions, headless-vs-styled guidance, verification).\n2. Use the curated tables in `design-systems/crosswalk.md` for Material 3 / Apple HIG / Fluent 2 / Carbon / shadcn/ui / Radix. For others, derive a mapping with the Crosswalk Method (map by role/intent across 6 axes: color roles, type scale, spacing unit, radius, elevation, motion).\n3. Choose the direction:\n   - **FROM** external → our tokens (adopt their look): re-point `semantic.*`.\n   - **TO** external stack (our components on their foundation): theme their primitives with our tokens.\n   - **Migrate**: Audit → Map → Bridge (alias layer) → Verify, screen by screen.\n4. **Verify** every mapped color pair for contrast (`scripts/contrast.py` / `a11y-audit`); confirm all 8 states + dark mode survive the mapping.\n\n## Output\nA crosswalk table (our token → their token → value note), a bridge plan if migrating, and verified token overrides. Render via `design-code`.","schemaVersion":1},"repoUrl":"https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/migrate-design-system","tags":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"ux-ui-agent-skills","audit":{"files":["package.json"],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T12:51:51.746Z","lockfiles":[]},"forks":153,"owner":"plugin87","stars":1463,"topics":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react","tailwindcss","ui","ux","wcag"],"license":"MIT","fullName":"plugin87/ux-ui-agent-skills","homepage":"https://plugin87.github.io/ux-ui-agent-skills/","language":"JavaScript","pushedAt":"2026-09-16T02:33:41Z","avatarUrl":"https://avatars.githubusercontent.com/u/5790381?v=4","crawledAt":"2026-09-25T12:51:46.935Z","openIssues":6,"manifestFile":"SKILL.md","manifestPath":".claude/skills/migrate-design-system/SKILL.md","defaultBranch":"main"},"readme":"# Skill: Migrate / Interop Design System\n\nBridge to or from external design systems via a role-based crosswalk.\n\n## Steps\n1. Read `design-systems/interop-protocol.md` (Crosswalk Method, the three directions, headless-vs-styled guidance, verification).\n2. Use the curated tables in `design-systems/crosswalk.md` for Material 3 / Apple HIG / Fluent 2 / Carbon / shadcn/ui / Radix. For others, derive a mapping with the Crosswalk Method (map by role/intent across 6 axes: color roles, type scale, spacing unit, radius, elevation, motion).\n3. Choose the direction:\n   - **FROM** external → our tokens (adopt their look): re-point `semantic.*`.\n   - **TO** external stack (our components on their foundation): theme their primitives with our tokens.\n   - **Migrate**: Audit → Map → Bridge (alias layer) → Verify, screen by screen.\n4. **Verify** every mapped color pair for contrast (`scripts/contrast.py` / `a11y-audit`); confirm all 8 states + dark mode survive the mapping.\n\n## Output\nA crosswalk table (our token → their token → value note), a bridge plan if migrating, and verified token overrides. Render via `design-code`.","createdAt":"2026-09-25T12:51:51.903Z","updatedAt":"2026-09-25T12:51:51.903Z"},{"id":"cmugymuhz02j4qu06gcrhpxns","slug":"plugin87-ux-ui-agent-skills-performance","name":"performance","description":"Optimize UI performance against Core Web Vitals — LCP, INP, CLS — with loading/code-split strategy, layout-shift prevention, and animation performance rules. Use when the user wants to improve speed, fix jank or layout shift, hit Web Vitals budgets, or make a UI feel fast on low-end devices.","authorId":"gh:plugin87","authorName":"plugin87","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":1463,"pricePerCall":0,"manifest":{"name":"performance","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Optimize UI performance against Core Web Vitals — LCP, INP, CLS — with loading/code-split strategy, layout-shift prevention, and animation performance rules. Use when the user wants to improve speed, fix jank or layout shift, hit Web Vitals budgets, or make a UI feel fast on low-end devices.","permissions":[],"systemPrompt":"# Skill: Performance\n\nMake the UI fast and stable. Treat performance as an accessibility concern — slow/janky UIs fail low-end devices first.\n\n## Steps\n1. Read `workflows/performance.md` (Core Web Vitals targets, loading strategy, layout-shift, animation perf, design-system runtime cost).\n2. Diagnose against budgets: **LCP ≤ 2.5s**, **INP ≤ 200ms**, **CLS ≤ 0.1**. Measure on a mid-tier mobile profile (throttle slow 4G + 4× CPU).\n3. Loading: render above-fold first (SSR/Server Components), code-split by route + heavy widget, lazy-load below-fold/behind-interaction (Astro islands / Qwik), preload one critical font weight, modern responsive images.\n4. Kill layout shift: size skeletons to final dimensions, reserve media space via `aspect-ratio` (`tokens/sizing.json`), never inject content above existing.\n5. Animation: only `transform`/`opacity`, `will-change` sparingly, 100–300ms (`tokens/motion.json`), honor `prefers-reduced-motion`. Prefer CSS state styling over JS for low INP; tree-shake/per-component imports.\n\n## Verification (definition of done)\n- Lighthouse / field data meets LCP ≤ 2.5s, INP ≤ 200ms, CLS ≤ 0.1 on mid-tier mobile.\n- First interaction stays responsive under slow-4G + 4× CPU throttle.\n- Skeletons + media reserve space (zero CLS on load); no non-compositor animation in loops.","schemaVersion":1},"repoUrl":"https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/performance","tags":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"ux-ui-agent-skills","audit":{"files":["package.json"],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T12:51:51.746Z","lockfiles":[]},"forks":153,"owner":"plugin87","stars":1463,"topics":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react","tailwindcss","ui","ux","wcag"],"license":"MIT","fullName":"plugin87/ux-ui-agent-skills","homepage":"https://plugin87.github.io/ux-ui-agent-skills/","language":"JavaScript","pushedAt":"2026-09-16T02:33:41Z","avatarUrl":"https://avatars.githubusercontent.com/u/5790381?v=4","crawledAt":"2026-09-25T12:51:46.935Z","openIssues":6,"manifestFile":"SKILL.md","manifestPath":".claude/skills/performance/SKILL.md","defaultBranch":"main"},"readme":"# Skill: Performance\n\nMake the UI fast and stable. Treat performance as an accessibility concern — slow/janky UIs fail low-end devices first.\n\n## Steps\n1. Read `workflows/performance.md` (Core Web Vitals targets, loading strategy, layout-shift, animation perf, design-system runtime cost).\n2. Diagnose against budgets: **LCP ≤ 2.5s**, **INP ≤ 200ms**, **CLS ≤ 0.1**. Measure on a mid-tier mobile profile (throttle slow 4G + 4× CPU).\n3. Loading: render above-fold first (SSR/Server Components), code-split by route + heavy widget, lazy-load below-fold/behind-interaction (Astro islands / Qwik), preload one critical font weight, modern responsive images.\n4. Kill layout shift: size skeletons to final dimensions, reserve media space via `aspect-ratio` (`tokens/sizing.json`), never inject content above existing.\n5. Animation: only `transform`/`opacity`, `will-change` sparingly, 100–300ms (`tokens/motion.json`), honor `prefers-reduced-motion`. Prefer CSS state styling over JS for low INP; tree-shake/per-component imports.\n\n## Verification (definition of done)\n- Lighthouse / field data meets LCP ≤ 2.5s, INP ≤ 200ms, CLS ≤ 0.1 on mid-tier mobile.\n- First interaction stays responsive under slow-4G + 4× CPU throttle.\n- Skeletons + media reserve space (zero CLS on load); no non-compositor animation in loops.","createdAt":"2026-09-25T12:51:51.911Z","updatedAt":"2026-09-25T12:51:51.911Z"},{"id":"cmugymui802j7qu06owr45v2r","slug":"plugin87-ux-ui-agent-skills-prototype","name":"prototype","description":"Move an idea up the fidelity ladder (content-first → wireframe → low-fi → high-fi → code) with a validation plan at each level, plus user-journey mapping and usability-testing scripts. Use when the user wants to prototype, wireframe, map a user flow, or plan/run usability testing.","authorId":"gh:plugin87","authorName":"plugin87","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":1463,"pricePerCall":0,"manifest":{"name":"prototype","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Move an idea up the fidelity ladder (content-first → wireframe → low-fi → high-fi → code) with a validation plan at each level, plus user-journey mapping and usability-testing scripts. Use when the user wants to prototype, wireframe, map a user flow, or plan/run usability testing.","permissions":[],"systemPrompt":"# Skill: Prototype & Research\n\nGuide work through the right fidelity level with validation.\n\n## Steps\n1. Read `workflows/prototyping.md` (5-level fidelity ladder, journey mapping template, usability-testing script, sample data).\n2. Identify the current need and pick the **lowest** fidelity that answers it — never skip levels:\n   - Content-first (info needs) → Wireframe (layout/nav) → Low-fi (task completion) → High-fi (visual/a11y) → Code (feasibility/perf).\n3. For flows: produce a user-journey map with decision points, error paths, and edge cases.\n4. For validation: define the usability test (tasks, success criteria, 5-user rule) using the script.\n5. High-fi/code steps pull tokens (`tokens/*`), components (`components/*`), taste (`taste/*`), and a11y (`accessibility/*`).\n\n## Output\nThe artifact at the chosen fidelity + an explicit \"what we validate next\" plan.\n\n## Verification (before declaring done)\n- The fidelity matches the question being answered — no level skipped.\n- Flows include decision points, **error paths, and edge cases** (empty/loading/overflow), not just the happy path.\n- A concrete validation step is named (tasks + success criteria), not \"test later\".\n- High-fi/code artifacts pass the same token + a11y bar as `design-code` (no hardcoded values, contrast, states).","schemaVersion":1},"repoUrl":"https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/prototype","tags":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"ux-ui-agent-skills","audit":{"files":["package.json"],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T12:51:51.746Z","lockfiles":[]},"forks":153,"owner":"plugin87","stars":1463,"topics":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react","tailwindcss","ui","ux","wcag"],"license":"MIT","fullName":"plugin87/ux-ui-agent-skills","homepage":"https://plugin87.github.io/ux-ui-agent-skills/","language":"JavaScript","pushedAt":"2026-09-16T02:33:41Z","avatarUrl":"https://avatars.githubusercontent.com/u/5790381?v=4","crawledAt":"2026-09-25T12:51:46.935Z","openIssues":6,"manifestFile":"SKILL.md","manifestPath":".claude/skills/prototype/SKILL.md","defaultBranch":"main"},"readme":"# Skill: Prototype & Research\n\nGuide work through the right fidelity level with validation.\n\n## Steps\n1. Read `workflows/prototyping.md` (5-level fidelity ladder, journey mapping template, usability-testing script, sample data).\n2. Identify the current need and pick the **lowest** fidelity that answers it — never skip levels:\n   - Content-first (info needs) → Wireframe (layout/nav) → Low-fi (task completion) → High-fi (visual/a11y) → Code (feasibility/perf).\n3. For flows: produce a user-journey map with decision points, error paths, and edge cases.\n4. For validation: define the usability test (tasks, success criteria, 5-user rule) using the script.\n5. High-fi/code steps pull tokens (`tokens/*`), components (`components/*`), taste (`taste/*`), and a11y (`accessibility/*`).\n\n## Output\nThe artifact at the chosen fidelity + an explicit \"what we validate next\" plan.\n\n## Verification (before declaring done)\n- The fidelity matches the question being answered — no level skipped.\n- Flows include decision points, **error paths, and edge cases** (empty/loading/overflow), not just the happy path.\n- A concrete validation step is named (tasks + success criteria), not \"test later\".\n- High-fi/code artifacts pass the same token + a11y bar as `design-code` (no hardcoded values, contrast, states).","createdAt":"2026-09-25T12:51:51.920Z","updatedAt":"2026-09-25T12:51:51.920Z"},{"id":"cmugymuip02jaqu066b8vn095","slug":"plugin87-ux-ui-agent-skills-redesign","name":"redesign","description":"Upgrade an existing website or app to premium quality without breaking functionality — audit the current design, identify generic/AI tells, then apply taste and system rules surgically. Use when the user wants to improve, modernize, polish, or \"make better\" an existing UI/codebase.","authorId":"gh:plugin87","authorName":"plugin87","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":1463,"pricePerCall":0,"manifest":{"name":"redesign","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Upgrade an existing website or app to premium quality without breaking functionality — audit the current design, identify generic/AI tells, then apply taste and system rules surgically. Use when the user wants to improve, modernize, polish, or \"make better\" an existing UI/codebase.","permissions":[],"systemPrompt":"# Skill: Redesign & Audit\n\nAudit-first redesign that preserves behavior.\n\n## Steps\n1. Read `workflows/redesign-audit.md` (the full Scan → Diagnose → Direct → Apply → Verify sequence + Output Completeness).\n2. **Scan** the codebase: framework, styling method (→ route to the matching `frameworks/` adapter), token reality, components, what must be preserved.\n3. **Diagnose** with the Banned Defaults checklist (`taste/design-taste.md`) + the review rubric (`design-review` skill). Produce a prioritized findings table.\n4. **Direct**: choose an archetype/system (`apply-aesthetic` skill) that fits the brand.\n5. **Apply** in order — tokens first, then typography/spacing, then component states, then motion — without changing routes/data/markup semantics (except a11y fixes).\n6. **Verify**: re-run `design-review` + `a11y-audit`; smoke-test every previously working flow; dark mode + responsive spot-check. Run `scripts/validate_contrast.py` on the token source and `scripts/lint_hardcodes.py` over the changed code.\n\n## Guardrails\nNever sacrifice a working feature for aesthetics. Never ship a brand color that fails contrast. Never remove existing accessibility affordances. Deliver complete files — no placeholders.\n\n## Single-theme consistency (critical for multi-page apps)\nConsolidate to ONE shared token theme and make **every page** consume it — a redesign that leaves different pages on different palettes has failed. Replace per-page/ad-hoc colors with semantic tokens; verify with `scripts/lint_hardcodes.py` that no page reintroduces off-theme values. Theme switches must come from the single token source, not page edits (`.claude/rules/tokens-and-color.md` → Single-Theme Consistency).","schemaVersion":1},"repoUrl":"https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/redesign","tags":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"ux-ui-agent-skills","audit":{"files":["package.json"],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T12:51:51.746Z","lockfiles":[]},"forks":153,"owner":"plugin87","stars":1463,"topics":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react","tailwindcss","ui","ux","wcag"],"license":"MIT","fullName":"plugin87/ux-ui-agent-skills","homepage":"https://plugin87.github.io/ux-ui-agent-skills/","language":"JavaScript","pushedAt":"2026-09-16T02:33:41Z","avatarUrl":"https://avatars.githubusercontent.com/u/5790381?v=4","crawledAt":"2026-09-25T12:51:46.935Z","openIssues":6,"manifestFile":"SKILL.md","manifestPath":".claude/skills/redesign/SKILL.md","defaultBranch":"main"},"readme":"# Skill: Redesign & Audit\n\nAudit-first redesign that preserves behavior.\n\n## Steps\n1. Read `workflows/redesign-audit.md` (the full Scan → Diagnose → Direct → Apply → Verify sequence + Output Completeness).\n2. **Scan** the codebase: framework, styling method (→ route to the matching `frameworks/` adapter), token reality, components, what must be preserved.\n3. **Diagnose** with the Banned Defaults checklist (`taste/design-taste.md`) + the review rubric (`design-review` skill). Produce a prioritized findings table.\n4. **Direct**: choose an archetype/system (`apply-aesthetic` skill) that fits the brand.\n5. **Apply** in order — tokens first, then typography/spacing, then component states, then motion — without changing routes/data/markup semantics (except a11y fixes).\n6. **Verify**: re-run `design-review` + `a11y-audit`; smoke-test every previously working flow; dark mode + responsive spot-check. Run `scripts/validate_contrast.py` on the token source and `scripts/lint_hardcodes.py` over the changed code.\n\n## Guardrails\nNever sacrifice a working feature for aesthetics. Never ship a brand color that fails contrast. Never remove existing accessibility affordances. Deliver complete files — no placeholders.\n\n## Single-theme consistency (critical for multi-page apps)\nConsolidate to ONE shared token theme and make **every page** consume it — a redesign that leaves different pages on different palettes has failed. Replace per-page/ad-hoc colors with semantic tokens; verify with `scripts/lint_hardcodes.py` that no page reintroduces off-theme values. Theme switches must come from the single token source, not page edits (`.claude/rules/tokens-and-color.md` → Single-Theme Consistency).","createdAt":"2026-09-25T12:51:51.938Z","updatedAt":"2026-09-25T12:51:51.938Z"},{"id":"cmugymuix02jdqu06jgtsw4e8","slug":"plugin87-ux-ui-agent-skills-token-build","name":"token-build","description":"Set up or run the token build pipeline — transform the DTCG tokens/*.json (source of truth) into platform artifacts (CSS variables, Tailwind @theme, JS/TS, iOS Asset Catalog, Android, Compose) with Style Dictionary / Tokens Studio / W3C DTCG export. Use when the user wants to generate platform theme files from tokens, wire token CI, or multi-platform token output.","authorId":"gh:plugin87","authorName":"plugin87","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":1463,"pricePerCall":0,"manifest":{"name":"token-build","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Set up or run the token build pipeline — transform the DTCG tokens/*.json (source of truth) into platform artifacts (CSS variables, Tailwind @theme, JS/TS, iOS Asset Catalog, Android, Compose) with Style Dictionary / Tokens Studio / W3C DTCG export. Use when the user wants to generate platform theme files from tokens, wire token CI, or multi-platform token output.","permissions":[],"systemPrompt":"# Skill: Token Build\n\nTurn the DTCG token source of truth into platform-ready outputs. Tokens are authored once; every platform output is generated.\n\n## Steps\n1. Read `workflows/token-build.md` (architecture, tool options, resolution rules, output targets, CI).\n2. Pick the tool: **Style Dictionary** (multi-platform, the default), **Tokens Studio** (Figma-owned tokens — pairs with `figma-integration`), W3C DTCG export, or a small custom script (model on `scripts/validate_tokens.py`).\n3. Honor the resolution rules: resolve aliases to final values per platform; expose semantic + component tokens (primitives stay internal); emit base + dark/brand/density overrides (`tokens/theming.json`) as deltas only; format by `$type`.\n4. Generate the requested target(s): CSS `:root` vars, Tailwind v4 `@theme`, typed JS/TS, iOS Asset Catalog + `Color.DS`/`Spacing`, Android `colors.xml`/Compose theme.\n5. Wire CI: on `tokens/*.json` change, run `scripts/validate_tokens.py`, regenerate, fail if committed artifacts are stale; gate colors with `scripts/contrast.py`.\n\n## Verification (definition of done)\n- `python3 scripts/validate_tokens.py` passes (no unresolved aliases).\n- Regenerating produces no diff vs. committed artifacts.\n- Dark/brand/density outputs contain only deltas, not full duplicates.","schemaVersion":1},"repoUrl":"https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/token-build","tags":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"ux-ui-agent-skills","audit":{"files":["package.json"],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T12:51:51.746Z","lockfiles":[]},"forks":153,"owner":"plugin87","stars":1463,"topics":["accessibility","ai-agents","claude","claude-code","claude-skills","component-library","design-system","design-to-code","design-tokens","dtcg","figma","react","tailwindcss","ui","ux","wcag"],"license":"MIT","fullName":"plugin87/ux-ui-agent-skills","homepage":"https://plugin87.github.io/ux-ui-agent-skills/","language":"JavaScript","pushedAt":"2026-09-16T02:33:41Z","avatarUrl":"https://avatars.githubusercontent.com/u/5790381?v=4","crawledAt":"2026-09-25T12:51:46.935Z","openIssues":6,"manifestFile":"SKILL.md","manifestPath":".claude/skills/token-build/SKILL.md","defaultBranch":"main"},"readme":"# Skill: Token Build\n\nTurn the DTCG token source of truth into platform-ready outputs. Tokens are authored once; every platform output is generated.\n\n## Steps\n1. Read `workflows/token-build.md` (architecture, tool options, resolution rules, output targets, CI).\n2. Pick the tool: **Style Dictionary** (multi-platform, the default), **Tokens Studio** (Figma-owned tokens — pairs with `figma-integration`), W3C DTCG export, or a small custom script (model on `scripts/validate_tokens.py`).\n3. Honor the resolution rules: resolve aliases to final values per platform; expose semantic + component tokens (primitives stay internal); emit base + dark/brand/density overrides (`tokens/theming.json`) as deltas only; format by `$type`.\n4. Generate the requested target(s): CSS `:root` vars, Tailwind v4 `@theme`, typed JS/TS, iOS Asset Catalog + `Color.DS`/`Spacing`, Android `colors.xml`/Compose theme.\n5. Wire CI: on `tokens/*.json` change, run `scripts/validate_tokens.py`, regenerate, fail if committed artifacts are stale; gate colors with `scripts/contrast.py`.\n\n## Verification (definition of done)\n- `python3 scripts/validate_tokens.py` passes (no unresolved aliases).\n- Regenerating produces no diff vs. committed artifacts.\n- Dark/brand/density outputs contain only deltas, not full duplicates.","createdAt":"2026-09-25T12:51:51.946Z","updatedAt":"2026-09-25T12:51:51.946Z"}],"total":25,"limit":24,"offset":0}