celestial-skills / design-tokens-to-code-engineering
AGENTS.md1 starsChanged 18 days agoApache-2.0View on GitHub
Generate platform code from one token source, build components that only read tokens and guard them with visual regression, so a brand change ships in one commit. Generated from the Celestial engineering practice “Design tokens to code”.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository182 other files it gives its agents.
- skills/accessibility-audit-engineering/AGENTS.mdAGENTS.md
- skills/angular-app-engineering/AGENTS.mdAGENTS.md
- skills/aspnet-core-api-engineering/AGENTS.mdAGENTS.md
- skills/chrome-extension-engineering/AGENTS.mdAGENTS.md
- skills/ci-cd-pipelines-engineering/AGENTS.mdAGENTS.md
- skills/code-review-engineering/AGENTS.mdAGENTS.md
- skills/compose-android-app-engineering/AGENTS.mdAGENTS.md
- skills/context-engineering-engineering/AGENTS.mdAGENTS.md
- skills/database-migrations-engineering/AGENTS.mdAGENTS.md
- skills/dbt-analytics-engineering/AGENTS.mdAGENTS.md
- skills/dependency-supply-chain-engineering/AGENTS.mdAGENTS.md
- skills/deprecation-and-removal-engineering/AGENTS.mdAGENTS.md
- skills/django-app-engineering/AGENTS.mdAGENTS.md
- skills/end-to-end-testing-engineering/AGENTS.mdAGENTS.md
- skills/expo-react-native-app-engineering/AGENTS.mdAGENTS.md
- skills/fastapi-service-engineering/AGENTS.mdAGENTS.md
- skills/fastify-api-engineering/AGENTS.mdAGENTS.md
- skills/feature-flags-engineering/AGENTS.mdAGENTS.md
- skills/flutter-app-engineering/AGENTS.mdAGENTS.md
- skills/framework-upgrades-engineering/AGENTS.mdAGENTS.md
- skills/git-workflow-engineering/AGENTS.mdAGENTS.md
- skills/go-http-service-engineering/AGENTS.mdAGENTS.md
- skills/graphql-api-engineering/AGENTS.mdAGENTS.md
- skills/incident-response-engineering/AGENTS.mdAGENTS.md
- skills/incremental-implementation-engineering/AGENTS.mdAGENTS.md
- skills/internationalisation-engineering/AGENTS.mdAGENTS.md
- skills/kubernetes-helm-engineering/AGENTS.mdAGENTS.md
- skills/laravel-app-engineering/AGENTS.mdAGENTS.md
- skills/launch-readiness-engineering/AGENTS.mdAGENTS.md
- skills/llm-features-and-evals-engineering/AGENTS.mdAGENTS.md
- skills/marketing-site-engineering/AGENTS.mdAGENTS.md
- skills/nestjs-service-engineering/AGENTS.mdAGENTS.md
- skills/nextjs-app-engineering/AGENTS.mdAGENTS.md
- skills/nuxt-app-engineering/AGENTS.mdAGENTS.md
- skills/observability-engineering/AGENTS.mdAGENTS.md
- skills/privacy-by-design-engineering/AGENTS.mdAGENTS.md
- skills/python-ml-service-engineering/AGENTS.mdAGENTS.md
- skills/rails-app-engineering/AGENTS.mdAGENTS.md
- skills/react-web-app-engineering/AGENTS.mdAGENTS.md
- skills/release-and-versioning-engineering/AGENTS.mdAGENTS.md
- skills/requirements-interview-engineering/AGENTS.mdAGENTS.md
- skills/rest-api-design-engineering/AGENTS.mdAGENTS.md
- skills/rust-axum-service-engineering/AGENTS.mdAGENTS.md
- skills/rust-cli-tool-engineering/AGENTS.mdAGENTS.md
- skills/safe-refactoring-engineering/AGENTS.mdAGENTS.md
- skills/secure-code-review-engineering/AGENTS.mdAGENTS.md
- skills/source-grounded-development-engineering/AGENTS.mdAGENTS.md
- skills/spec-before-code-engineering/AGENTS.mdAGENTS.md
- skills/spec-driven-development-engineering/AGENTS.mdAGENTS.md
- skills/spring-boot-service-engineering/AGENTS.mdAGENTS.md
- skills/sveltekit-app-engineering/AGENTS.mdAGENTS.md
- skills/swiftui-ios-app-engineering/AGENTS.mdAGENTS.md
- skills/systematic-debugging-engineering/AGENTS.mdAGENTS.md
- skills/task-breakdown-engineering/AGENTS.mdAGENTS.md
- skills/tauri-desktop-app-engineering/AGENTS.mdAGENTS.md
- skills/technical-documentation-engineering/AGENTS.mdAGENTS.md
- skills/terraform-infrastructure-engineering/AGENTS.mdAGENTS.md
- skills/test-first-development-engineering/AGENTS.mdAGENTS.md
- skills/threat-modelling-engineering/AGENTS.mdAGENTS.md
- skills/typescript-library-engineering/AGENTS.mdAGENTS.md
- The first 60 shown.
The file
We split this AGENTS.md into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
Every semantic text and background pairing is contrast-checked in each theme as part of the token build.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md — Design tokens to code
Generate platform code from one token source, build components that only read tokens and guard them with visual regression, so a brand change ships in one commit.
How to do it
- Collect tokens into one source — Put colour, type, spacing, radius, shadow, motion and breakpoint values in a single version-controlled JSON source (the design skill or a tokens file in the W3C draft format). Each token has a name, value, type and description.
- Layer primitives and semantic tokens — Keep raw primitives (blue-600, space-4) separate from semantic tokens that describe purpose (color-action-primary, color-text-muted, space-inset-md). Components use only semantic tokens; themes remap semantic tokens to different primitives.
- Generate platform outputs — Use a token build tool such as Style Dictionary to emit CSS custom properties, a Tailwind theme, SwiftUI or Compose constants from the same source. Generated files are build output with a do-not-edit header; never hand-edit them.
- Build components that read tokens — Write each component against semantic tokens only, with every state (default, hover, focus, active, disabled, error, loading) defined. Expose variants as props, not as style overrides.
- Wire themes — Implement light and dark (and any brand themes) by swapping the semantic layer, for example with a data-theme attribute or a platform colour scheme. Check contrast for every text and UI pair in every theme.
- Document components with stories — Write a story or preview for every component state and theme in a component workshop such as Storybook, so design can review the real code.
- Add visual regression tests — Snapshot every story in each theme at fixed viewport sizes and compare on each pull request. Review diffs as part of code review and approve intentional changes explicitly.
- Block raw values — Add lint rules that fail on raw hex colours, pixel sizes and font names in component code, with an allow-list for the generated token files.
Checklist (before a pull request)
- All tokens come from one versioned source file
- Generated outputs are rebuilt in CI and not edited by hand
- Components reference semantic tokens only
- Every component state has a story in each theme
- Light and dark themes pass contrast checks for every text pair
- Visual regression runs on every pull request with no unapproved diffs
- Lint rejects raw colour, size and font values in components
Rules
- Components read semantic tokens; primitives are referenced only by the theme layer. (Themes can then change without touching any component.)
- Token names describe purpose, not appearance (color-feedback-danger, not red). (Appearance names become lies the first time the brand changes.)
- Generated token files are build output; change the source and regenerate. (Hand edits are overwritten and leave design and code disagreeing.)
- Every semantic text and background pairing is contrast-checked in each theme as part of the token build. (A token swap can silently break contrast across hundreds of screens.)
- Ship tokens as CSS custom properties or compile-time constants, not runtime JavaScript lookups. (Runtime theming in script adds work to every render.)
Checks
| Gate | Tool | Threshold | When |
| Visual regression | Snapshot comparison of component stories (for example Playwright screenshots or a Storybook test runner) | No unapproved pixel diffs in any theme | Every pull request touching tokens or components |
| No raw style values | Stylelint or ESLint rule for hex, px and font-family literals | 0 violations outside generated token files | Every pull request |
Generated from the Celestial engineering practice “Design tokens to code”.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

