constraints

constraints is a command for Claude Code from GuillemRoca/agent-skills-android. It costs 0 tokens per session (976 once invoked), scanned A, original, MIT.

A guided setup command for defining a project's quality rules in a CONSTRAINTS.md file. It first inspects the repository and then asks a small number of questions before choosing usable defaults.

In plain words
What is it for?
Use it to inspect an Android project, define quality thresholds, and record the commands that enforce them.
Why use it?
It turns informal expectations about tests, coverage, security, and other checks into written rules that can be applied consistently. This reduces repeated arguments about what counts as ready.

Command for Claude Code

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

Part of the agent-skills-android plugin — 30 skills, 8 commands, 3 agents shipped together

Good fit Use it to inspect an Android project, define quality thresholds, and record the commands that enforce them.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/guillemroca/agent-skills-android/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/GuillemRoca/agent-skills-android

Made for: Claude Code.

Or install agent-skills-android, the plugin that ships this one along with the rest of its 30 skills, 8 commands, 3 agents.

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/guillemroca/agent-skills-android/constraints/github.svg)](https://agentmods.dev/commands/guillemroca/agent-skills-android/constraints)
Your own site
<a href="https://agentmods.dev/commands/guillemroca/agent-skills-android/constraints"><img src="https://agentmods.dev/badge/commands/guillemroca/agent-skills-android/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/guillemroca/agent-skills-android/constraints"><img src="https://agentmods.dev/badge/commands/guillemroca/agent-skills-android/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 976 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.00000 $0.00976
Opus 5.5 $0.00000 $0.00390
Sonnet 5.5 $0.00000 $0.00195
Haiku 4.5 $0.00000 $0.00098

Measured 22d ago against content hash acd43c2932f3, 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 22d 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.

.claude/commands/constraints.md · 38 lines

How it starts

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

/constraints — Constraint-Driven Development

Define and enforce this project's quality bar: detect, interview, sane defaults, CONSTRAINTS.md.

Instructions

Load and follow these skills:

  • constraint-driven-development from skills/constraint-driven-development/SKILL.md
  • interview-me from skills/interview-me/SKILL.md (question discipline for the intake)

$ARGUMENTS

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

  1. Detect first. Read settings.gradle.kts, module build.gradle.kts files, gradle/libs.versions.toml, minSdk/targetSdk, the test stack (JUnit4/5, MockK, Turbine, Robolectric, Compose UI test), lint.xml / lint-baseline.xml, detekt.yml and its baseline, .editorconfig (ktlint), Kover or JaCoCo config, .github/workflows/, and AGENTS.md / CLAUDE.md. 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, static analysis, security, performance, accessibility, module boundaries)
    • 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: Floor, Enforced with numbers (each row names its Gradle task or command and where it runs), Measured not yet enforced (today's value + direction), Exceptions (owner + expiry). Every number needs a stated reason.

  4. Install what each picked dimension needs. Use the de facto tool so existing config keeps working: Android Lint (abortOnError, warningsAsErrors) and detekt for static analysis, ktlint via Spotless for formatting, Kover (koverVerify rules) or JaCoCo for coverage, Konsist or dependency-analysis-gradle-plugin for module boundaries, gitleaks (always --redact) for secrets, Gradle dependency verification + osv-scanner or OWASP dependency-check for dependencies, Macrobenchmark + Baseline Profiles and an APK size diff for performance, AccessibilityChecks.enable() / Compose semantics tests for accessibility, Pitest for mutation testing on JVM modules. Macrobenchmark and instrumented accessibility checks need a device; with no emulator in CI, keep them measured-only and say so. Register checkFast / checkTask / checkFull Gradle tasks that mirror CONSTRAINTS.md.

Read the full file on GitHub · 38 lines

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. 22d ago First seen · 38 lines · 0 tokens per session scan A acd43c2932f3

Subscribe to this mod's changes

constraints is a command published in the GitHub repository GuillemRoca/agent-skills-android (4 stars, last pushed 23d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 976 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-10-04.