constraints

constraints is a command for Claude Code from nota-america/forgecat-agent-profiles. It costs 0 tokens per session (575 once invoked), scanned A, a copy of constraints, Apache-2.0.

A setup command for repository quality rules. It examines the project and writes a CONSTRAINTS.md file describing required checks, measurements, exceptions, and the tools needed to enforce them.

In plain words
What is it for?
It helps teams set coverage or other quality targets, decide whether failures block work, record current measurements, and configure the repository accordingly.
Why use it?
It replaces informal quality expectations with documented rules and checks for areas such as tests, security, performance, accessibility, and code structure.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions CLAUDE.md.

Good fit It helps teams set coverage or other quality targets, decide whether failures block work, record current measurements, and configure the repository accordingly.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/nota-america/forgecat-agent-profiles/constraints
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.

Clone the repo
git clone --depth 1 https://github.com/nota-america/forgecat-agent-profiles

Made for: Claude Code.

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 constraints

README.md
[![agentmods](https://agentmods.dev/badge/commands/nota-america/forgecat-agent-profiles/constraints/github.svg)](https://agentmods.dev/commands/nota-america/forgecat-agent-profiles/constraints)
Your own site
<a href="https://agentmods.dev/commands/nota-america/forgecat-agent-profiles/constraints"><img src="https://agentmods.dev/badge/commands/nota-america/forgecat-agent-profiles/constraints/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 constraints

Your own site · 80×15
<a href="https://agentmods.dev/commands/nota-america/forgecat-agent-profiles/constraints"><img src="https://agentmods.dev/badge/commands/nota-america/forgecat-agent-profiles/constraints.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 575 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 97% copy Near-identical to another mod 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.00000 $0.00575
Opus 5.5 $0.00000 $0.00230
Sonnet 5.5 $0.00000 $0.00115
Haiku 4.5 $0.00000 $0.00057

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

Security

Grade A, and why

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

Origin

This is a copy

97% identical to constraints — 5 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

profiles/addyosmani/agent-skills/for-claude/.claude/commands/constraints.md · 28 lines

What it actually says

Invoke the agent-skills:constraint-driven-development skill.

$ARGUMENTS

Default behaviour with no arguments: set up constraints for this repository.

  1. Detect first. Read package.json / pyproject.toml / go.mod, the test runner, existing lint configs, current coverage output, CI workflows, and the agent harness in use. Report what you found in two lines. Never ask for anything you can read.

  2. Interview, at most four questions. One at a time, each with your best guess and a usable default so "I don't know" still produces a working config:

    • Which dimensions beyond the floor (coverage, security, performance, accessibility, architecture)
    • Block or warn when a check fails mid-task
    • Target numbers, or measure today's values and hold them
    • Slowest check tolerated before handing work back
  3. Write CONSTRAINTS.md at the repo root with a Floor section, enforced numbers, measured-only metrics with today's values, and an exceptions table with owners and expiry dates. Every number needs a stated reason.

  4. Install what each picked dimension needs. A dimension with a number and no tool behind it is an aspiration. Use the de facto tool so existing config keeps working: Semgrep for code scanning, gitleaks (always --redact) for secrets, osv-scanner for dependencies, axe-core for accessibility, Lighthouse for web vitals, size-limit for bundles, dependency-cruiser for boundaries, Stryker for assertion quality. Record the exact command next to each rule in CONSTRAINTS.md. Accessibility and performance need a running URL; if the project has none, say so and drop the dimension rather than inventing a check. Add the commands to package.json as check:fast / check:task / check:full.

  5. Place each check by cost. Types, lint and secrets in the edit loop (seconds). Related tests and changed-line coverage at task end (under 90s). Everything else at review or in CI. Scope checks to the diff, not the whole repo.

  6. Point the agent at it. Add a line to CLAUDE.md telling agents to read CONSTRAINTS.md and never weaken it to make a change pass.

  7. Verify. Run the constraints against the current branch. If anything fails that the user disagrees with, fix the constraint now rather than leaving a gate people will learn to ignore.

Sub-commands:

  • /constraints check — run the current constraints against this branch and report
  • /constraints guard — inspect the diff for a weakened bar: lowered thresholds, skipped or deleted tests, new suppression comments, unfinished stubs, new exceptions
  • /constraints ratchet — record today's measured values as the floor that must not fall
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 · 28 lines · 0 tokens per session scan A bdc368d82c64

Subscribe to this mod's changes

constraints is a command published in the GitHub repository nota-america/forgecat-agent-profiles (93 stars, last pushed 1mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 575 tokens. A static security scan graded it A with 0 findings. It is 97% identical to constraints, differing in 5 lines, and is treated as a copy.