agentleFS
Fay1YeeFay1Yee/design-agent-skills/skills/design-system-contract-lock/SKILL.md

design-system-contract-lock

Skill1 starsChanged 3 months agoMITView on GitHub

Create a read-only design-system contract that freezes approved sources, invariants, tokens, component responsibilities, exceptions, responsive behavior, and acceptance criteria before implementation or Figma mutation. Use when feedback or source materials are still ambiguous; when a team says “lock the spec”, “freeze the rules”, “规范锁定”, or “先把设计系统定下来”; before design-system migration, component-library work, responsive recomposition, HTML-to-Figma transfer, or engineering handoff. Produce a traceable contract and stop before editing code, Figma files, shared libraries, or production assets. / 生成只读的设计系统规范锁定文档,用于实现、Figma 写入或交付前确认事实源、不可变规则、Token、组件责任、例外、多端行为与验收标准。

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 9 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create one auditable contract before anyone changes the design or implementation.

    line 8
  2. Distinctive:

    Read contract-package-schema.md when the contract covers more than one rule family, source conflict, component group, or target device.

    line 14
  3. Distinctive:

    Read the supplied documents, screenshots, design files, code, and tokens only as evidence.

    line 20
  4. Distinctive:

    Do not edit code, Figma nodes, variables, components, shared libraries, or production assets.

    line 21
  5. Distinctive:

    Do not invent missing values, brand rules, component states, breakpoints, or approvals.

    line 22
  6. Distinctive:

    Do not include confidential names, private file keys, node IDs, local paths, unpublished assets, or access credentials in a reusable …

    line 23
  7. Very specific:

    When two authoritative sources disagree, record the conflict and the decision owner.

    line 56
  8. Distinctive:

    test surface and viewport.

    line 89
  9. Distinctive:

    Avoid aesthetic-only checks such as “feels premium”.

    line 95
  10. Distinctive:

    Do not mark the contract ready when any of these remain:

    line 101
  11. Very specific:

    After approval, route implementation to the appropriate environment capability.

    line 128

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Design System Contract Lock / 设计系统规范锁定

Create one auditable contract before anyone changes the design or implementation. Keep the work read-only.

在任何设计或实现修改前建立一份可追溯的规范合约,全程保持只读。

Load the contract schema / 加载合约结构

Read contract-package-schema.md when the contract covers more than one rule family, source conflict, component group, or target device. Use it as the canonical source, rule, exception, and acceptance ledger; keep this entry file focused on routing, boundaries, and gates.

当合约涉及多个规则族、事实源冲突、组件组或目标端时,读取该结构模板,统一记录来源、规则、例外和验收证据。

Operating boundary / 执行边界

  • Read the supplied documents, screenshots, design files, code, and tokens only as evidence.
  • Do not edit code, Figma nodes, variables, components, shared libraries, or production assets.
  • Do not invent missing values, brand rules, component states, breakpoints, or approvals.
  • Do not include confidential names, private file keys, node IDs, local paths, unpublished assets, or access credentials in a reusable contract.
  • Mark unresolved conflicts as Open; never silently select the most convenient source.
  • 仅将文档、截图、设计文件、代码和 Token 作为证据读取。
  • 不修改代码、Figma 节点、变量、组件、共享库或生产素材。
  • 不虚构缺失数值、品牌规则、组件状态、断点或审批结论。
  • 可复用合约中不得出现保密名称、真实文件 Key、节点 ID、本地路径、未发布素材或访问凭证。

Workflow / 工作流程

1. Frame the contract / 定义合约范围

Record:

  • requested surface, product area, and delivery stage;
  • target platforms and viewports;
  • approved source owners;
  • decisions that must remain unchanged;
  • decisions still open;
  • operations explicitly excluded from this pass.

记录页面或产品面、当前成熟度、目标端口与视口、事实源责任人、不可改动项、待决策项和本轮禁止操作。

2. Establish source precedence / 建立事实源优先级

List every relevant source with owner, location, version or date, scope, and authority. Use this default precedence only when the user has not supplied another order:

  1. approved product or legal requirements;
  2. approved design-system variables, styles, and components;
  3. accepted design references and interaction specifications;
  4. current production implementation;
  5. screenshots, prototypes, and exploratory artifacts.

When two authoritative sources disagree, record the conflict and the decision owner. Keep the affected rule Open until resolved.

为每个来源记录所有者、位置、版本或日期、适用范围和权威级别。权威源冲突时,保留冲突和决策人,相关规则维持 Open。

3. Build the contract matrix / 建立规范矩阵

Cover only categories supported by evidence:

  • foundations: color, typography, spacing, grid, radius, elevation, iconography, and motion;
  • component contract: responsibility, anatomy, variants, states, content slots, and prohibited use;
  • layout contract: hierarchy, container behavior, alignment, density, and overflow;
  • responsive contract: shared facts, device-specific recomposition, touch, focus, and fallback behavior;
  • content and asset contract: approved copy, provenance, rights, localization, and missing states;
  • accessibility contract: semantics, keyboard path, focus, contrast, reduced motion, and readable scaling;
  • delivery contract: naming, handoff evidence, versioning, ownership, and acceptance checks.

仅覆盖有证据支撑的基础规则、组件职责、布局、多端重组、内容素材、可访问性与交付要求。

Classify every row as:

  • Locked: approved and mandatory;
  • Open: requires a named decision;
  • Exception: approved deviation with scope and reason;
  • Prohibited: explicitly disallowed;
  • Out of scope: intentionally deferred.

每条规则必须标记为 Locked、Open、Exception、Prohibited 或 Out of scope。

4. Write measurable acceptance criteria / 编写可验收标准

For every Locked rule, provide:

  • observable evidence;
  • test surface and viewport;
  • expected result;
  • failure condition;
  • owner;
  • verification method.

Avoid aesthetic-only checks such as “feels premium”. Translate them into observable hierarchy, density, typography, asset, interaction, or consistency conditions.

每个 Locked 项都要有可观察证据、测试对象与视口、预期结果、失败条件、责任人和验证方法。

5. Run the release gates / 执行交付门禁

Do not mark the contract ready when any of these remain:

  • an invariant has no authoritative source;
  • a component or token conflict has no owner;
  • responsive behavior is represented only by proportional scaling;
  • a required interaction state or fallback is missing;
  • private identifiers or unapproved assets appear in the reusable document;
  • acceptance criteria cannot distinguish pass from fail.

不可变项缺少事实源、冲突无责任人、多端只做等比缩放、关键状态缺失、文档含私密标识或验收无法判定时,不得标记为已就绪。

Required output / 必须输出

Return:

  1. contract scope and maturity;
  2. source-precedence ledger;
  3. locked/open/exception/prohibited matrix;
  4. component and responsive contracts where applicable;
  5. acceptance matrix;
  6. unresolved decisions with owners;
  7. handoff boundary stating that no design, code, or Figma mutation occurred.

输出合约范围、事实源台账、规则状态矩阵、组件与多端合约、验收矩阵、待决策项及只读交接边界。

Handoff / 交接

After approval, route implementation to the appropriate environment capability. For Figma work, reference the installed Figma integration and its figma-use, figma-generate-library, or figma-generate-design skills. Follow their own license and usage terms; do not copy or redistribute their materials through this skill.

合约批准后再交给实现工具。Figma 任务仅引用已安装的官方集成及其 Skill,遵守对应授权和使用条款,不在本 Skill 中复制或再发布官方材料。

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.