Skip to content
Back to skills

Design Gates

ASecurity

Objective, runnable quality gates for UI work: WCAG contrast ratios, design-token validation, hardcoded-value linting, theme-reference checks and accessibility audits. Every gate prints a real measured number and exits non-zero on failure. Invoke after writing or changing any UI surface — component, stylesheet, token file, screen — to prove the result is correct instead of asserting that it is. Also invoke when asked whether a colour pair passes AA/AAA, whether a design system's tokens are va...

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
ai-agentspython

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned September 27, 2026

npx -y skills add alvaroofernaandez/dotfiles --skill design-gates --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Design Gates?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Design Gates
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alvaroofernaandez-design-gates/badge)](https://www.skillsdirectory.com/skills/alvaroofernaandez-design-gates)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: design-gates
description: >
  Objective, runnable quality gates for UI work: WCAG contrast ratios, design-token
  validation, hardcoded-value linting, theme-reference checks and accessibility
  audits. Every gate prints a real measured number and exits non-zero on failure.
  Invoke after writing or changing any UI surface — component, stylesheet, token
  file, screen — to prove the result is correct instead of asserting that it is.
  Also invoke when asked whether a colour pair passes AA/AAA, whether a design
  system's tokens are valid, or whether a component hardcodes values it should
  be reading from tokens.
---

# Design gates

Vendored from plugin87/ux-ui-agent-skills at the commit in `P87_PIN`. Regenerate
with `scripts/p87-sync.sh` — **never edit `scripts/`, `skills/` or this file by
hand**, the next sync overwrites them.

## The rule these gates exist to enforce

> Never state a number you did not measure. Any contrast ratio, "WCAG pass", or
> "100%" must come from running a gate and reporting its real output.

The pipeline these replace was five advisory skills that asked the model to
grade its own work, and a self-report cannot fail — which is how `impeccable`
silently aborted on every project for months without anyone noticing. A gate
that exits non-zero cannot be talked around.

## Static gates — no browser, no dependencies

Pure Python stdlib. Run from anywhere; paths are absolute.

| Gate | What it measures |
| ---- | ---------------- |
| `contrast.py` | WCAG 2.2 ratio for a colour pair; AA/AAA for normal, large, UI |
| `validate_tokens.py` | DTCG token files parse and resolve |
| `validate_contrast.py` | every foreground/background pair in a token set |
| `lint_hardcodes.py` | literal colours/sizes that should be token references |
| `validate_theme_refs.py` | theme keys pointing at nothing |
| `validate_component_spec.py` | a component definition is complete |
| `check_no_emoji.py` | emoji used as UI iconography |

```
python3 ~/.claude/skills/design-gates/scripts/contrast.py "#767676" "#ffffff"
```

Exit 0 passes, non-zero fails. Report the **printed number**, not your reading
of it.

## Render gates — need Playwright, opt-in

Sixteen further gates measure a rendered page (`verify_states`,
`verify_keyboard`, `verify_focustrap`, `verify_target_size`,
`verify_reduced_motion`, `verify_rtl`, `verify_responsive`, `verify_overflow`,
`axe_audit`, `measure_render`…). They are **not vendored** — they need
Playwright and its ~300MB browser.

To use them, install upstream separately (`npx ux-ui-agent-skills`) and say so
in the audit. Never claim a render gate ran when only the static ones did.

## Reference

`accessibility/wcag-checklist.md` and `accessibility/aria-patterns.md` are
vendored alongside. `skills/<name>/SKILL.md` holds upstream's procedure for each
of `design-doctrine`, `design-review`, `design-qa`, `a11y-audit`,
`design-tokens`. Read the one matching the task, not all five.

## Reporting

```
[design-audit]
contrast     #1d1d1f on #ffffff → 17.4:1  AA PASS  AAA PASS
hardcodes    src/Button.tsx → 0 findings
tokens       tokens/core.json → valid, 48 resolved
render gates not run (Playwright not installed)
```

A gate you did not run is reported as not run. Never as a pass.

Files in this skill

  • SKILL.md3.2 KB
  • accessibility/aria-patterns.md17.1 KB
  • accessibility/cognitive.md3.1 KB
  • accessibility/i18n-rtl.md3.2 KB
  • accessibility/vision.md3.2 KB
  • accessibility/wcag-aaa.md3.3 KB
  • accessibility/wcag-checklist.md12.9 KB
  • reference/design-systems/crosswalk.md9 KB
  • reference/design-systems/interop-protocol.md4.1 KB
  • reference/design-systems/shadcn/DESIGN.md2.9 KB
  • reference/frameworks/adapter-protocol.md4.1 KB
  • reference/frameworks/react-tailwind.md12.5 KB
  • reference/taste/aesthetic-systems.md27.5 KB
  • reference/taste/design-taste.md11.9 KB
  • reference/workflows/redesign-audit.md3.3 KB
  • scripts/axe_audit.mjs3.7 KB
  • scripts/check_no_emoji.py4.1 KB
  • scripts/contrast.py1.7 KB
  • scripts/lint_hardcodes.py10.6 KB
  • scripts/lint_intent.mjs9.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.