Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/punkadillo/figma-code-composer/manifest-contractgit clone --depth 1 https://github.com/punkadillo/figma-code-composerWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01198 | $0.01198 |
| Opus 5 | $0.00599 | $0.00599 |
| Sonnet 5 | $0.00240 | $0.00240 |
| Haiku 4.5 | $0.00120 | $0.00120 |
Grade A, and why
manifest-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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rules 2 – 5 — The manifest is the contract
Rule 2 — Single source of truth
figma-fetcher is the only writer of /tmp/figma-<runId>/manifest.json. Every downstream agent (token-builder, component-builder, icon-generator, story-author, test-author) treats it as read-only input.
If you are not acting as figma-fetcher and you find yourself wanting to edit the manifest → STOP. Either re-spawn the fetcher with a corrective note, or escalate to the user.
Rule 3 — Variable names are preserved, never resolved
styledProperties[].figmaVariable always holds the raw Figma variable path (e.g. color/surface/brand-primary). Resolving it to a hex / rem / px value inside the manifest is a contract violation.
The tokens dict at the top of the manifest is the only place values appear — consumers map by name from styledProperties into tokens.
Rule 4 — Unbound values are flags, not invitations
When a Figma style has no variable binding, the fetcher records:
{ "property": "paddingX", "figmaVariable": null, "unbound": true, "rawValue": "14px" }
unbound: true REQUIRES a non-null rawValue. Builders (token-builder, component-builder, icon-generator) MUST stop-and-flag any unbound entry — never invent a token, never inline the raw value. Add the entry to your final-report's flags[] so the coordinator surfaces it to the user.
Rule 5 — Blocking ambiguities gate the run
When manifest.ambiguities[] contains any entry with blocking: true, the coordinator stops and asks the user one focused question before any build agent runs. Build agents that find a blocking ambiguity in their slice MUST refuse to proceed and report — never guess.
Schema invariants (always)
manifestVersion == "1.0"— pinned. Mismatch is a hard validation failure.- Required top-level keys:
runId,intent,scope,source,configSnapshot,icons,components,tokens,ambiguities,injectionObservations. configSnapshotis frozen at fetch time — mid-run edits to.figma-pipeline/config.jsondo not affect an in-flight run.existsOnDisk: true→ patch the file atdiskPath. Never blind-overwrite.components[].layeris advisory — the coordinator's think-once pass (Step 8.5) sets the authoritativeresolvedLayer(see § buildPlan).components[].layerConfidenceishigh|medium|low.
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.
- 2d ago First seen · 80 lines · 1,198 tokens per session scan A ca53254be1a2
manifest-contract is a cursor rule published in the GitHub repository punkadillo/figma-code-composer (3 stars, last pushed 14d ago), licensed MIT. It adds 1,198 tokens to every session, about $0.0060 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-31.
Other cursor rules, from other repositories
testing
Testing rules for vitest suite.
development-phase
开发阶段:以新代码清晰合理为先,兼容仅在零代价时顺带.
cursorrules
Cursor rule "cursorrules" from evolution-foundation/evo-ai, covering evo ai - project rules and structure, main technologies, project structure, code standards and language requirements.
git-commits
description: "Reference and apply the git commits skill for Conventional Commit formatting and pre-push checks." alwaysApply: true.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.