design-contract

design-contract is a skill for Claude Code, Codex from rexleimo/aios. It costs 74 tokens per session (1,635 once invoked), scanned A, original, MIT.

A tool for measuring a project's existing interface code and creating or checking DESIGN.md and MOTION.md files. These files record visual and animation rules for the project.

In plain words
What is it for?
Use it before a user-interface task when the project lacks a design or motion contract, or when the existing contract may no longer match the code.
Why use it?
It prevents teams from writing design rules based on guesses or outdated code. It also shows which rules are backed by executable checks rather than only written down.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex; mentions OpenCode.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node scripts/design.mjs facts --root . --json.

Good fit Use it before a user-interface task when the project lacks a design or motion contract, or when the existing contract may no longer match the code.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/rexleimo/aios
agentmods
npx agentmods add skills/rexleimo/aios/design-contract

Made for: Claude Code, Codex.

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-contract

README.md
[![agentmods](https://agentmods.dev/badge/skills/rexleimo/aios/design-contract/github.svg)](https://agentmods.dev/skills/rexleimo/aios/design-contract)
Your own site
<a href="https://agentmods.dev/skills/rexleimo/aios/design-contract"><img src="https://agentmods.dev/badge/skills/rexleimo/aios/design-contract/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-contract

Your own site · 80×15
<a href="https://agentmods.dev/skills/rexleimo/aios/design-contract"><img src="https://agentmods.dev/badge/skills/rexleimo/aios/design-contract.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,635 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.00074 $0.01635
Opus 5.5 $0.00030 $0.00654
Sonnet 5.5 $0.00015 $0.00327
Haiku 4.5 $0.00007 $0.00163

Measured 27d ago against content hash 4f899ad6da2d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

design-contract 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 27d 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.

skill-sources/design-contract/SKILL.md · 144 lines

How it starts

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

A design contract that nobody generated is a document copied from someone else's project. This skill replaces that with two commands: one measures the project, the other refuses to accept a contract that still contains an unanswered decision.

When to use it

  • A UI task is starting and the project has no MOTION.md (or has one that predates the current code).
  • You suspect a contract drifted: rules deleted, rules reworded, a scope naming directories that no longer exist.
  • You need to know which of the rules are actually enforced by something executable, rather than stated in prose.

The loop

1. Measure before writing.

node scripts/design.mjs facts --root . --json

This reports what exists: the UI source files, the framework, the durations and easings already in use, and which files animate without a prefers-reduced-motion block. Read the unknown array first. If it is not empty, the project has not been measured — files may exist but never have been git added, or there may be no UI sources at all. Do not write a contract from an unmeasured project, and do not report "0 surfaces" as a finding: it means nothing was looked at.

2. Generate the skeleton.

node scripts/design.mjs init --root .              # writes MOTION.md and DESIGN.md
node scripts/design.mjs init --root . --only design # only the visual contract
node scripts/design.mjs init --root . --force      # discards the existing decisions

Both contracts come from one measurement, so they cannot disagree about which files are in scope. The result is complete as a structure and deliberately incomplete as a decision: it carries TODO(decision) markers. That is the contract's honest state, not a bug. Read the generated 适用范围 section — it lists files the generator actually saw, so a wrong scope there is a measurement problem, not a prose problem.

DESIGN.md additionally reports contradictions between the evidence and the rules the project appears to follow: tokens that colours bypass, one motion curve spread over eight durations, files with motion but no reduced-motion block. Those are findings, not formatting. Each one is either fixed in the code or removed from the rules — a rule the evidence disproves teaches readers to ignore the document.

Read the full file on GitHub · 144 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. 27d ago First seen · 144 lines · 74 tokens per session scan A 4f899ad6da2d

Subscribe to this mod's changes

design-contract is a skill published in the GitHub repository rexleimo/aios (62 stars, last pushed 6d ago), licensed MIT. It adds 74 tokens to every session and 1,635 once invoked, about $0.0003 per session on Opus 5.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-11-03.

Related

design-contract compared with skills from other repositories

design-contract next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
design-contractrexleimo/aiosSkill626d agoMITA74Claude Code, Codex
landing-cro-reviewAtomicBot-ai/atomic-agentSkill3.6ktodayMITA28Claude Code, Codex
motion-craftericrisco/rsc-harnessSkill6824d agoMITA67Claude Code, Codex
kirby-panel-and-blueprintsbnomei/kirby-mcpSkill74todayMITA43Claude Code, Codex
hipson-visual-experience-directorHipson47/HipsonSkill46d agoApache-2.0A38Claude Code, Codex
hipson-premium-ui-uxHipson47/HipsonSkill46d agoApache-2.0A45Claude Code, Codex
hipson-creative-frontend-motion-architectHipson47/HipsonSkill46d agoApache-2.0A48Claude Code, Codex