constraint-driven-development

constraint-driven-development is a skill for Claude Code from vinvcn/addyosmani-agent-skills-zh. It costs 232 tokens per session (5,754 once invoked), scanned A, original, MIT.

A development method for writing a project's quality standards as a lasting, checkable contract. It can cover areas such as test coverage, security, performance, accessibility, and architecture.

In plain words
What is it for?
It helps create or maintain CONSTRAINTS.md, choose thresholds, add the tools that enforce them, and detect quality regressions in code changes.
Why use it?
It keeps an agent from quietly weakening the project's quality bar by skipping tests, lowering thresholds, adding suppressions, or leaving unfinished code. The standards remain documented after the conversation ends.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions AGENTS.md; mentions Codex.

Part of the agent-skills plugin — 26 skills, 10 commands, 4 agents, 1 hook shipped together

Good fit It helps create or maintain CONSTRAINTS.md, choose thresholds, add the tools that enforce them, and detect quality regressions in code changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vinvcn/addyosmani-agent-skills-zh/constraint-driven-development
Install

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.

Any agent
npx skills add vinvcn/addyosmani-agent-skills-zh --skill constraint-driven-development
Clone the repo
git clone --depth 1 https://github.com/vinvcn/addyosmani-agent-skills-zh

Made for: Claude Code.

Or install agent-skills, the plugin that ships this one along with the rest of its 26 skills, 10 commands, 4 agents, 1 hook.

Wrote 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.

agentmods badge for constraint-driven-development

README.md
[![agentmods](https://agentmods.dev/badge/skills/vinvcn/addyosmani-agent-skills-zh/constraint-driven-development/github.svg)](https://agentmods.dev/skills/vinvcn/addyosmani-agent-skills-zh/constraint-driven-development)
Your own site
<a href="https://agentmods.dev/skills/vinvcn/addyosmani-agent-skills-zh/constraint-driven-development"><img src="https://agentmods.dev/badge/skills/vinvcn/addyosmani-agent-skills-zh/constraint-driven-development/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.

agentmods 80×15 button for constraint-driven-development

Your own site · 80×15
<a href="https://agentmods.dev/skills/vinvcn/addyosmani-agent-skills-zh/constraint-driven-development"><img src="https://agentmods.dev/badge/skills/vinvcn/addyosmani-agent-skills-zh/constraint-driven-development.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 232 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,754 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00232 $0.05754
Opus 5.5 $0.00093 $0.02302
Sonnet 5.5 $0.00046 $0.01151
Haiku 4.5 $0.00023 $0.00575

Measured 1mo ago against content hash f2f99812d73f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

constraint-driven-development 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 1mo 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.

skills/constraint-driven-development/SKILL.md · 312 lines

How it starts

The opening of the file, as written. The whole thing — 312 lines — stays where its author put it; the contents beside it link to each section on GitHub.

约束驱动开发

概览

本技能包里的其他 skill 描述的是“好”长什么样。code-review-and-quality 给你五个轴。test-driven-development 给你一个循环。security-and-hardening 给你一份威胁清单。所有这些都活在文字里,agent 读了可能照做也可能不照做,而且没有一个能活过会话结束。

这个 skill 产出的是别的东西:本项目质量线的书面记录,带数字,能活过对话,并且可以被机械地检查。

背后的原因很重要。当你亲手写代码时,读代码就能告诉你它好不好。一个 agent 一个下午写下的代码超出你一周能读完的量,于是判断就从你的脑子里挪到了围绕循环运行的检查里。这些检查需要存在,需要用到你真正选过的数字,而且需要离工作足够近,让 agent 能修好自己的产出。

Spec-driven development 说清楚要构建什么。Test-driven development 证明它能工作。Constraint-driven development 定义“好到可以发布”意味着什么——在任何人在 pull request 里为此争吵之前。

何时使用

在以下情况应用这个 skill:

  • 启动一个项目或一个重要功能,而没有任何质量线被写下来
  • 用户要求 "set up constraints"、"add quality gates"、"define our standards" 或 "stop the agent shipping junk"
  • Agent 在产出没人逐行阅读的体量
  • CI 有检查,但没人说得清哪些会阻塞合并、哪些只是摆设
  • 覆盖率、性能或无障碍性的数字在每个 PR 上被争论,而不是被一次性决定
  • 你正准备运行 /build auto 或任何自主循环,而它和 main 之间唯一的屏障是一套 agent 自己写的测试

何时不要使用:

  • 项目已经有 CONSTRAINTS.md 而用户并不想改它——去读它并遵循它
  • 一次性脚本、spike、用完即弃的原型
  • 用户现在就要 code review(code-review-and-quality)或要搭 CI pipeline(ci-cd-and-automation)
  • product-market fit 之前的代码,预期寿命两周——下面的 floor 仍然值得,其余的不值得

加载约束

这场访谈需要一个活的用户。不要在非交互上下文中运行它(CI、/loop、自主运行)。如果你在其中之一里且约束缺失,套用下面的 Floor,注明你这样做了,并把剩下的标记出来交给人来处理。

流程

Step 1: 先检测,再提问

能读到的东西绝不要问。在第一个问题之前,先收集:

看什么 去哪看
语言与技术栈 package.json、pyproject.toml、go.mod、Cargo.toml
测试 runner dev 依赖、test script、已有的测试文件
已有的 linter eslint.config.*、biome.json、.ruff.toml
当前覆盖率 coverage/ 输出,或把套件跑一遍
CI .github/workflows/、.gitlab-ci.yml
Agent harness .claude/、.codex/、AGENTS.md

用两行汇报你发现的东西,然后只问剩下的。

Step 2: 四个问题,每个都带默认值

遵循 interview-me 的一次一问纪律,只有一个变化:这里的每个问题都有默认值,所以 "I don't know" 也是一个完整的答案,并且仍能产出可用的配置。

Q1: Beyond the floor, which of these do you want enforced?
    (a) Test coverage on new code
    (b) Security scanning
    (c) Performance budgets
    (d) Accessibility
    (e) Architecture boundaries
GUESS: (a) and (b) — you have a test runner already and you're handling user input.
DEFAULT if unsure: (a) and (b).
Say what each pick costs: (c) and (d) need a running URL, (e) needs a rules file written.

Read the full file on GitHub · 312 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 1mo ago First seen · 312 lines · 232 tokens per session scan A f2f99812d73f

Subscribe to this mod's changes

constraint-driven-development is a skill published in the GitHub repository vinvcn/addyosmani-agent-skills-zh (40 stars, last pushed 1mo ago), licensed MIT. It adds 232 tokens to every session and 5,754 once invoked, about $0.0009 per session on Opus 5.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-09-16.

Related

Other skills, from other repositories

test-driven-development

Drives development with tests via Red-Green-Refactor and the Prove-It pattern, with hard rules against weakening assertions or faking green suites. Use when implementing any logic, fixing any bug, or changing any behavior. Triggers on "add a feature", "fix this bug", "write tests", or any task where done must be…

borhen68/SkillEngine · 79 tokens

spec-driven-development

Creates specs before coding, with hard rules against silently filled assumptions and untestable success criteria. Use when starting a new project, feature, or significant change and no specification exists yet. Triggers on "build me", "create a", "add a feature", or any requirement vague enough to need interpretation.

borhen68/SkillEngine · 66 tokens

test-driven-development

Drives development with tests using the red-green-refactor loop. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality. Use when asked to add tests to a function, fix a bug…

addyosmani/agent-skills · 92 tokens

tdd

Test-driven development, from unit to end-to-end tests. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration or end-to-end tests (Playwright, Cypress). Don't use to backfill tests on existing code (/refactor) or diagnose an unknown bug (/debug).

helderberto/agent-skills · 71 tokens

chaos-engineering

Guides systematic fault injection and resilience testing. Use when designing for high availability, verifying disaster recovery, testing failure modes, or building fault-tolerant systems. Use when you need to prove your system survives infrastructure failures, network partitions, dependency outages, or cascading…

borhen68/SkillEngine · 59 tokens

test-driven-development

Red-green-refactor cycle with meaningful coverage. Tests are written before implementation. Coverage is a side effect of good tests, not the goal.

DevelopersGlobal/ai-agent-skills · 32 tokens