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 skills add baixinghao/intent-gate --skill contract-codinggit clone --depth 1 https://github.com/baixinghao/intent-gateWrote 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.
[](https://agentmods.dev/skills/baixinghao/intent-gate/contract-coding)<a href="https://agentmods.dev/skills/baixinghao/intent-gate/contract-coding"><img src="https://agentmods.dev/badge/skills/baixinghao/intent-gate/contract-coding/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.
<a href="https://agentmods.dev/skills/baixinghao/intent-gate/contract-coding"><img src="https://agentmods.dev/badge/skills/baixinghao/intent-gate/contract-coding.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01121 |
| Opus 5.5 | $0.00000 | $0.00448 |
| Sonnet 5.5 | $0.00000 | $0.00224 |
| Haiku 4.5 | $0.00000 | $0.00112 |
Grade A, and why
contract-coding 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 4d 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.
What it actually says
Contract-Driven Coding(附加层,非编码 skill)
本 skill 是附加层,不是编码 skill。 你的项目自有编码 skill、superpowers、 CLAUDE.md/AGENTS.md 规约继续拥有"怎么写代码"(架构、风格、模式)的全部决定权。 本 skill 只管一件事:当 intent-gate 契约存在时,代码从契约生成,且绝不违背契约。 代码风格/结构上的任何冲突,以项目自有规则为准;契约保真这件事,本 skill 不让步。
契约路由(多需求并存,🔴 禁止猜)
- 人类点名了需求 → 精确匹配
.harness/requests/{需求名}/。没有同名目录 = 该需求没有契约,走第 3 条——🔴 禁止模糊匹配到别需求的契约 ("授信提交"套"提现确认"的 mermaid 是事故,不是便捷)。文件夹名即唯一标识, 文件系统保证不重名,无需另造 ID。 - 人类没点名 → 列出
.harness/requests/下的契约清单让人类选,禁止自己挑。 - 点名的需求无契约、但项目里已有其他契约(说明本工作流已启用)→
告知人类"该需求还没有契约",给两条路:先跑
requirement-alignment出契约, 或人类明确说"不要契约直接写"——后者合法,人类指令优先。 (仅当整个项目没有任何.harness/requests/时才完全静默、按原方式编码。) - 采用契约前交叉验证:任务的领域词汇(实体/动作)应命中契约的术语表; 明显对不上 → 停,向人类确认是否拿错了契约。
开工门禁(机械项,无商量)
- 路由确认契约后读 frontmatter:
status: approved才动工;pending_review/blocked→ 停下报回人类。approved 只有两条合法来源: 蓝军 PASS 或人类直接拍板——红蓝评审是可选项,人类说"不用评审,我拍板" 即合法开工,任何人不得强制走红蓝。 - 读
_review/lint-report.md:CRITICAL > 0 → 契约自身带机械错误, 禁止对着它编码,报回人类先修契约。
🔴 门禁拒绝的正确动作是停下报回人类——契约状态是人类拍板的事,
不是"再分析一遍"的事。禁止因为 status ≠ approved 或 lint 未归零就转入
requirement-alignment 重启/续跑意图对齐流程。
从契约施工
- mermaid 状态机 / 时序图 / 决策表 + DDL 就是规格。每个实现任务可回溯到锚点: 哪条边 → 哪个接口/方法;哪条 BR 规则 → 哪个校验分支;哪张表 → 哪个实体/Mapper。
- 只实现契约里有的。 图里没有的逻辑不许出现在代码里——无契约逻辑就是 意图对齐要消灭的"静默猜测"在编码期的复活。
- 术语沿用契约词汇表(wiki 对齐版),禁止新造命名。
漂移 = 停线
编码中发现契约错了/不够用(现实逼着偏离图):
- 停下,禁止顺手绕过去;
- 走
dispatch_question升级(对话框通道直接向人类提问); - 先改契约(重新对齐 + 重跑 lint),再改代码。
mermaid 与代码漂移即 bug——无论哪个方向。
完工
- 契约若有修订,重跑
lint_summary(CRITICAL 归零)。 - 说明每处改动实现了契约的哪些锚点,让评审能从代码回溯到契约。
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.
- 4d ago Changed 7f2c37c3a369
- 1mo ago First seen · 62 lines · 0 tokens per session scan A f9712fbf8c5d
contract-coding is a skill published in the GitHub repository baixinghao/intent-gate (3 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,121 tokens. 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 skills, from other repositories
build-teaql-app
Build or change a TeaQL application in Java, Rust, Go, Swift, Python, C#/.NET, or TypeScript, including Kotlin/JVM applications that consume Java-generated libraries. Mandatory order: first draft and save a complete KSML model, then verify the client and evaluate that saved model, repair it through repeated evaluation…
video-perception
Use when the user mentions a video file (.mp4, .mov, .avi, .mkv, .webm), a YouTube URL, asks to watch/analyze/review a video, or references video content in conversation.
sanity-singletons
Configure singleton documents in a Sanity Studio using the document.singletons registry. Use when a developer wants a fixed-id document (settings, navigation, footer) edited in place, hidden from the default content list, with no "create new" or "duplicate" affordances — or when migrating a userland singleton…
sanity-best-practices
Sanity development best practices for schema design, GROQ queries, TypeGen, Visual Editing, images, Portable Text, Studio structure, localization, migrations, Sanity Functions, webhooks, Blueprints, and framework integrations such as Next.js, Nuxt, Astro, Remix, SvelteKit, Angular, Hydrogen, the App SDK, and Studios…
seo-aeo-best-practices
SEO and AEO best practices for metadata, Open Graph, sitemaps, robots.txt, hreflang, JSON-LD structured data, EEAT, and content optimized for search engines and AI answer surfaces. Use this skill when implementing page SEO, technical SEO, schema markup, international SEO, AI-overview readiness, or improving content…
raindrop-mcp
Connect Raindrop.io to your AI assistant with a simple MCP server. Use it to organize, search, and manage bookmarks with natural language.