design-contract
Skill1 starsChanged 8 days agoMITView on GitHub
Resolve, validate, compare and switch MicroTech design profiles and target profiles. Use when choosing a visual language, adding a style variant, changing target capabilities, or when another design skill needs a profile/target context before planning or reviewing UI.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- alexcollins/skillstheir own version, first seen Nov 29, 2026
- justuchena/design-contracttheir own version, first seen Oct 17, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- alexcollins/skills★ 1same name
- justuchena/design-contract★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- aesthetic-reviewSkill
- app-developmentSkill
- codesizeSkill
- device-operationsSkill
- esp32Skill
- lvgl-integrationSkill
- lvgl-ui-layoutSkill
- motion-interactionSkill
- ui-reviewSkill
- ux-heuristicsSkill
- visual-designSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 5 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
Read the owning profile and target before changing a page.
- Distinctive: line 37
Resolve a context: Run:
- Very specific: line 44
If the caller did not choose a pair, run select --mode design.
- Very specific: line 54
Author a new style when needed: Follow references/switching.md, copy neutral.json, change the style axes and roles, keep the schema …
- Very specific: line 63
Record the context in the handoff: Every design or review output must name profile_id, profile_version, target_id and any downgrade …
- Very specific: line 88
Only select --mode current may select it.
- Distinctive: line 104
Do not create a profile with raw values copied from a page.
- Very specific: line 105
Do not add a new style axis outside references/profile-schema.md without updating the schema, validator, tests and all profiles.
- Very specific: line 107
Do not claim that a synthetic target is supported hardware.
- Distinctive: line 109
Do not use the current panel geometry or current palette as an implicit fallback.
- Distinctive: line 111
Do not add CMake/Kconfig gates for design profiles.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill 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
MicroTech Design Contract
The design contract separates three things that must not be conflated:
- Universal floor — contrast, touch targets, readable text, state clarity, error recovery. These apply to every style and target.
- Style profile — a named visual language: surface model, depth model, density, corner scale, type scale, decoration and motion level.
- Target profile — display, input and resource capabilities: geometry, DPI, colour mode, refresh rate, CPU/RAM class, motion and asset budgets.
A page is always resolved against (style profile, target profile).
dark_sparse is one profile in this repository, not a universal baseline.
Sources of Truth
doc/design/README.mdexplains the contract and current implementation limits.doc/design/profiles/*.jsonare style profiles.doc/design/targets/*.jsonare target capability profiles. A product manifest (products/<product>/product.cmake) binds itsMT_PRODUCT_DESIGN_TARGETto one of them; the board manifest owns the physical display facts, not the design budget.doc/design/active.jsonselects the current project pair for review only.scripts/design_profile.pyis the only supported resolver and validator.references/inspiration.mdrecords provenance and scope.
Read the owning profile and target before changing a page. Do not copy hex values or pixel values from the current theme into a page or another skill.
Workflow
Resolve a context. Run:
python3 .agents/skills/design-contract/scripts/design_profile.py resolve \ --profile <profile-id> --target <target-id> --output <context.json>If the caller did not choose a pair, run
select --mode design. This mode uses the explicit argument first, then the environment variable, thenneutral+generic_constrained; it never readsactive.json. To audit the current UI, runselect --mode current, which addsactive.jsonafter the explicit and environment choices. Itsselectionobject recordsmodeand which source won for each side.active.jsonis a review subject, not a design baseline.- Read the resolved context. It contains semantic colours, space/radius/type scales, minimum touch size, motion budget, effect permissions and any downgrade findings. Treat the resolved values as the design input.
- Author a new style when needed. Follow
references/switching.md, copyneutral.json, change the style axes and roles, keep the schema version, runvalidate, then rundiffagainst an existing profile. A new style that only changes colours is not a new style; at least three style axes must differ. - Validate before use.
validatechecks schema, role completeness, contrast pairs, monotonic scales, motion budget and all profile × target pairs (pairsin its JSON output). Expected incompatibilities such as a colour profile on a mono target are reported with their error code. - Record the context in the handoff. Every design or review output must
name
profile_id,profile_version,target_idand any downgrade findings.
Commands
python3 .agents/skills/design-contract/scripts/design_profile.py validate
python3 .agents/skills/design-contract/scripts/design_profile.py resolve \
--profile paper_light --target panel_240x320_touch_30hz --output .cache/design-context.json
python3 .agents/skills/design-contract/scripts/design_profile.py select --mode design
python3 .agents/skills/design-contract/scripts/design_profile.py select --mode current
python3 .agents/skills/design-contract/scripts/design_profile.py diff paper_light soft_playful
python3 .agents/skills/design-contract/scripts/design_profile.py check-currentcheck-current compares dark_sparse with the C headers that own the current
colours and metrics. A mismatch is drift, not a style choice.
Switching Rules
- Explicit
--profile/--targetwins over everything. - Environment variables are the second choice for CI or temporary sessions.
select --mode designnever readsactive.json; with no explicit or environment pair it falls back toneutral+generic_constrained.active.jsonis the current UI review subject, not a design baseline. Onlyselect --mode currentmay select it.- In
currentmode,active.jsonversion pins must match the loaded profile/target; a mismatch isVERSION_MISMATCH, not a silent upgrade. - Unknown or missing profile/target must fail with
UNKNOWN_PROFILEorUNKNOWN_TARGET; do not guess and do not reuse the previous context. - A style profile may declare
requires.color_modesandrequires.min_refresh_hz. If the target cannot satisfy them, stop and reportCOLOR_MODE_UNSUPPORTEDorREFRESH_TOO_LOW. - Motion is resolved as
min(style.motion_level, target.max_motion_level). RecordMOTION_DOWNGRADEDwhen the target caps the style. - Shadow, blur and gradient permissions are the intersection of style rules
and target capabilities. Record
EFFECT_DOWNGRADEDwhen the target removes an effect.
Prohibited
- Do not create a profile with raw values copied from a page.
- Do not add a new style axis outside
references/profile-schema.mdwithout updating the schema, validator, tests and all profiles. - Do not claim that a synthetic target is supported hardware.
supportedmust remain false for fixtures. - Do not use the current panel geometry or current palette as an implicit fallback.
- Do not add CMake/Kconfig gates for design profiles; this is a skill and test contract, not a build gate.
Handoff
Report the resolved pair, the scale values in semantic terms, any capability downgrade, and the remaining implementation limits (for example, a type scale that cannot be mapped to the current font roles).
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.

