ProofIt Design System Enforcement

VerifiedSafe

Enforces use of ProofIt design system tokens instead of hardcoded colors, keeps docs/design.md in sync with src/constants/colors.ts, and verifies contrast via WCAG.

Sby Skills Guide Bot
DevelopmentIntermediate
9/5/2026
Claude CodeCursorWindsurf
#design-system#color-tokens#theming#accessibility#react-native

Recommended for

Automated summary

Governs any UI code writing or review so that every color comes from the ProofIt design system tokens and docs/design.md stays in sync with src/constants/colors.ts.

Strengths

  • Explicitly bans literal hex and rgba values in styles and lists the allowed paths (useTheme, Palette, Gradients)
  • Requires docs/design.md to be updated on every design decision, even when the request never names the file
  • Ships an automated guard (pnpm check:contrast) that checks text/background pairs against WCAG 2.1 and forces classification of each new token
  • Tells the agent to stop and ask for the exact value instead of inventing an undocumented color

Limitations

  • Highly project-specific: paths, tokens and commands do not transfer as-is to other codebases
  • Assumes a single dark theme and discourages useColorScheme(), so it does not fit multi-theme products
  • The contrast checker needs Node 22.18+ and an import-free colors.ts, a non-negotiable tooling constraint
When to use it

Use it whenever you create, edit or review a component, screen, style or visual decision in this React Native project.

When not to use it

Do not use it on a different project or for work unrelated to ProofIt colors and design system.

Security analysis

Safe
Quality score85/100

This skill contains no executable instructions with meaningful risk: it is purely editorial guidance about using design tokens instead of hardcoded colors, keeping docs synchronized, and running a local contrast-check script via `pnpm check:contrast`. There are no shell pipelines, network calls, credential handling, obfuscated payloads, or destructive commands. The only dynamic behavior is invoking a project-local validation script, which is benign.

No concerns found

How this analysis is made

Examples

Add a warning badge
Añade un badge de warning en la tarjeta de suscripción, usando el color Rival que ya tenemos.
New card component
Create a SubscriptionCard component with a soft shadow and a muted secondary label.
Change a token value
Deepen the primary color so it reads better on the dark surface.

name: design-system description: >- Use when writing, editing, or reviewing any UI code in this project — components, screens, styles, native chrome in app.json — or whenever a message changes a visual/design decision (a color, a spacing rule, a new role like "racha" or "info"). Enforces that every color comes from the ProofIt design system instead of a hardcoded literal, and that docs/design.md is updated to match, not just src/constants/colors.ts.

Sistema de diseño de ProofIt

Dos archivos son la fuente de verdad, y tienen que decir lo mismo siempre:

  • docs/design.md — la referencia legible: qué token existe, qué valor tiene, para qué se usa, qué huecos/decisiones quedaron pendientes.
  • src/constants/colors.ts — el código que corre. Exporta Palette (valores en bruto), Colors (tokens semánticos) y Gradients (paradas de degradado).

Regla 1 — nunca un color hardcodeado

Ningún componente escribe un hex o un rgba(...) literal en backgroundColor, color, borderColor, shadowColor, etc. Siempre a través de:

  • useTheme() (o los props type/themeColor de ThemedView/ThemedText) para tokens semánticos: theme.text, theme.surface, theme.primary...
  • Palette importado de @/constants/theme solo para paradas de degradado o casos que de verdad no tienen token semántico (p. ej. un brillo puntual como Palette.powerFlash).
  • Gradients para cualquier relleno con degradado.
  • Config nativa que no puede importar TypeScript (app.json) copia el hex a mano — y ese valor tiene que coincidir con el Palette del que salió; decláralo en un comentario de design.md, no solo en el JSON.

Antes de escribir un valor de color, lee docs/design.md. Si el rol que necesitas no está documentado ahí (ni como token activo ni como hueco pendiente), no te lo inventes: para y pregunta al usuario el valor exacto. Inventar un color "razonable" es exactamente lo que este sistema existe para evitar.

Regla 2 — docs/design.md se actualiza SIEMPRE que cambie una decisión de diseño

No solo cuando se toca colors.ts. Si en la conversación se decide o se cambia cualquier cosa de diseño — un valor de color, qué token cubre qué rol, que un hueco pendiente ya se resolvió, una regla de espaciado, tipografía, radios, lo que sea — design.md se actualiza en el mismo turno, para que nunca quede desincronizado de lo que realmente se decidió. Esto aplica aunque el pedido no mencione el archivo explícitamente (p. ej. "vamos a usar Rival también para los badges de warning" implica editar design.md, no solo el código si lo hay).

Regla 3 — tras tocar colors.ts, correr el validador de contraste

pnpm check:contrast

Verifica cada par texto/fondo contra WCAG 2.1 y obliga a clasificar todo token nuevo en scripts/check-contrast.mjs (falla a propósito si no lo haces). Si falla un par:

  • Si el texto es normal (se espera que se lea bien): es un fallo real, hay que corregir el valor o preguntar al usuario cómo ajustarlo — no bajar el mínimo ni eximirlo sin más.
  • Si el token es deliberadamente de bajo contraste (p. ej. una etiqueta "bloqueada"/disabled), se puede eximir en EXEMPT, pero con un comentario que explique por qué, igual que ya está documentado para textDim y para los tokens con alfa (border, overlay, etc.).

scripts/check-contrast.mjs carga colors.ts directamente con Node, así que ese archivo no puede tener imports. Necesita Node 22.18+ (type stripping de .ts sin flag); si pnpm check:contrast falla con ERR_UNKNOWN_FILE_EXTENSION, la versión de Node instalada es más vieja de lo que pide AGENTS.md y hay que actualizarla, no añadir flags al script.

Decisión vigente: tema único, oscuro

ProofIt no tiene modo claro (Colors es un solo objeto, sin Colors.light). No reintroduzcas branching de useColorScheme() para elegir colores de la app a menos que el usuario pida explícitamente volver a un tema claro — ver docs/design.md § Decisión: tema único, oscuro.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/proofit-design-system-enforcement-mtnxbrgb/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/proofit-design-system-enforcement-mtnxbrgb' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/proofit-design-system-enforcement-mtnxbrgb/download' --output '.skill-downloads/proofit-design-system-enforcement-mtnxbrgb/SKILL.md.part' && mv '.skill-downloads/proofit-design-system-enforcement-mtnxbrgb/SKILL.md.part' '.skill-downloads/proofit-design-system-enforcement-mtnxbrgb/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/proofit-design-system-enforcement-mtnxbrgb/SKILL.md' && test -s '.skill-downloads/proofit-design-system-enforcement-mtnxbrgb/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/design-system' && cp -R '.skill-downloads/proofit-design-system-enforcement-mtnxbrgb' '.claude/skills/design-system'

Cursor
test -f '.skill-downloads/proofit-design-system-enforcement-mtnxbrgb/SKILL.md' && test -s '.skill-downloads/proofit-design-system-enforcement-mtnxbrgb/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/design-system' && cp -R '.skill-downloads/proofit-design-system-enforcement-mtnxbrgb' '.cursor/skills/design-system'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/proofit-design-system-enforcement-mtnxbrgb'

openskills read 'proofit-design-system-enforcement-mtnxbrgb'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/proofit-design-system-enforcement-mtnxbrgb/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills