criterio: Command for Claude Code

.claude/commands/design-init.md

design-init is a command for Claude Code from Carlos-Dominguez-faber/criterio. It costs 32 tokens per session (1,141 once invoked), scanned A, original, MIT.

A guided design interview that turns a project's visual and writing decisions into files such as brand.json, voice.json, motion.json, brand.css, and COMPONENTRULES.md.

In plain words
What is it for?
Use it to start a project's design contract by answering eight questions and writing the results to disk. It also checks whether an existing contract should be updated, audited, or left unchanged.
Why use it?
It removes the need to make design choices informally or leave them scattered across the project. The interview records the decisions so the project has a shared design reference.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

This is Carlos-Dominguez-faber/criterio's own configuration. It tells Claude Code how to work on criterio itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything criterio configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Carlos-Dominguez-faber/criterio. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Carlos-Dominguez-faber/criterio/main/.claude/commands/design-init.md
Clone the repo
git clone --depth 1 https://github.com/Carlos-Dominguez-faber/criterio

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for design-init

README.md
[![agentmods](https://agentmods.dev/badge/commands/carlos-dominguez-faber/criterio/design-init/github.svg)](https://agentmods.dev/commands/carlos-dominguez-faber/criterio/design-init)
Your own site
<a href="https://agentmods.dev/commands/carlos-dominguez-faber/criterio/design-init"><img src="https://agentmods.dev/badge/commands/carlos-dominguez-faber/criterio/design-init/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for design-init

Your own site · 80×15
<a href="https://agentmods.dev/commands/carlos-dominguez-faber/criterio/design-init"><img src="https://agentmods.dev/badge/commands/carlos-dominguez-faber/criterio/design-init.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,141 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.01141
Opus 5 $0.00016 $0.00571
Sonnet 5 $0.00006 $0.00228
Haiku 4.5 $0.00003 $0.00114

Measured 11d ago against content hash b478207d1fdd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

design-init scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/design-init.md · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/design-init — crear el contrato de diseño

Argumento recibido (puede venir vacío): $ARGUMENTS

Tu trabajo es dejar al usuario con un contrato de diseño escrito en disco, y que entienda qué acaba de generar. No es solo correr un script: es acompañar la entrevista y traducir el resultado.


Paso 1 — Ubica el script

Busca scripts/init.mjs. Rutas probables, en orden:

  • .criterio/scripts/init.mjs (instalación normal, vía npx degit)
  • scripts/init.mjs (si están trabajando dentro del propio repo de criterio)

Si no lo encuentras en ninguna, detente y dile al usuario:

No encuentro scripts/init.mjs. Trae criterio a este proyecto con: npx degit Carlos-Dominguez-faber/criterio .criterio

Paso 2 — Revisa si ya hay contrato

Busca un brand.json existente en la raíz del proyecto.

Si ya existe, no lo sobrescribas sin preguntar. Dile al usuario qué encontró (nombre del producto y el preset o los seis ejes, en una línea) y pregunta si quiere:

  • actualizarlo — corren la entrevista de nuevo y se reemplaza
  • auditarlo — mejor usar /design-check
  • cancelar

Paso 3 — Corre la entrevista

node <ruta>/scripts/init.mjs

Si el usuario pasó un preset en $ARGUMENTS, menciónalo antes de correr: la entrevista lo va a proponer como punto de partida y el usuario puede ajustar los ejes desde ahí.

Son 8 preguntas. No las contestes tú. Estas decisiones son del usuario — ese es el punto entero de la herramienta. Si el script pide input y el usuario duda, ayúdalo a decidir explicándole qué consecuencia tiene cada opción, pero deja que él elija.

Requisito: Node 18+. Si el script falla por versión, dilo con el número exacto que tiene instalado.

Paso 4 — Traduce lo que se generó

Aquí está el valor de este comando. Después de que el script termine, no digas "listo". Lee los archivos generados y explica en una tabla corta:

Archivo Qué contiene Quién lo lee
design.md El contrato en prosa Tú, tu cliente, cualquier agente
brand.json Tokens, component_rules, anti_slop, validation Claude Code y el gate
voice.json Dialecto, ejes de tono, avoid_words[] El agente cuando escribe copy
motion.json Duraciones, easings, safe_props / unsafe_props El agente cuando anima
brand.css Tokens en 3 niveles: primitivos → semánticos → componente El navegador
COMPONENT_RULES.md Las reglas que el agente relee antes de cada componente El agente, cada sesión

Read the full file on GitHub · 110 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 110 lines · 32 tokens per session scan A b478207d1fdd

Subscribe to this mod's changes

design-init is a command published in the GitHub repository Carlos-Dominguez-faber/criterio (55 stars, last pushed 1mo ago), licensed MIT. It adds 32 tokens to every session and 1,141 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.