skills/common-constraints/SKILL.md
Universal behavioral rules that prevent catastrophic agent failures — rationalization loops, unchecked claims, scope creep, and convention violations. These constraints are always active during any agent work. Consult this skill whenever you're about to declare work complete, when you've failed at the same approach multiple times, or when modifying code. If you catch yourself saying "it should work" without evidence, this skill applies.
npx skillsauth add maestria-co/ai-playbook common-constraintsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
These constraints exist because agents — like humans — have predictable failure modes. We claim success without checking. We try the same failing approach five times. We modify code we haven't fully read. We add scope nobody asked for. Each constraint below targets a specific failure pattern that, left unchecked, leads to broken builds, wasted time, or lost trust.
This skill extends what skills/_shared/conventions.md covers (tone, format, simplicity)
with behavioral guardrails that prevent the worst outcomes.
Why this matters: Users lose trust fast when an agent says "done" and the feature is broken. Showing proof before claiming success is the single highest-impact habit for maintaining credibility.
Never claim success without proof. Proof means:
BAD: "I've updated the config file. The server should now start correctly."
GOOD: "I've updated the config file. Running `npm start` produces: 'Server listening on port 3000'."
BAD: "Tests are passing."
GOOD: "Running `npm test` — 47 tests passed, 0 failed. Output: [paste]"
Before reporting a task as complete, show at least one piece of concrete evidence that the acceptance criteria are met.
Why this matters: Agents can get stuck in loops — trying the same fix repeatedly, each time believing "this time it will work." Without an explicit limit, this burns through context and time while making zero progress. Setting a threshold of 3 breaks the loop early enough to be useful.
The counter resets when you try a fundamentally different approach — not a tweak of the same approach. Changing a parameter is not a new approach. Switching from "fix the config" to "replace the dependency" is.
Why this matters: The most common source of bugs introduced by agents is modifying code without understanding the surrounding context. A function that looks safe to change might have callers relying on its exact behavior. Reading first costs minutes; fixing blind changes costs hours.
.context/standards.md for project-specific patterns.context/ for any documented configuration patternsBAD: Adding a new function to a file without reading the existing functions
GOOD: Reading the file first, noticing the existing patterns, then adding
a function that follows the same patterns
BAD: Changing a build config without reading what it currently does
GOOD: Reading the config, understanding each section, then making targeted changes
Why this matters: Inconsistent code is harder to read, review, and maintain. When every file follows different patterns, the next person (human or agent) has to re-learn the codebase each time. Following established conventions keeps the cognitive load low.
.context/standards.md — formatting, structure, imports.context/standards.md — how things are named.context/standards.md — how errors are handledIf you notice a conflict between documented conventions and actual code:
Why this matters: It's tempting to report work as done the moment the last line is written. But a quick self-review catches 80% of the issues a code reviewer would find — saving a round trip that can take hours or days.
Before reporting a task as done, run through these questions:
If any answer is "no" or "I'm not sure," fix it before reporting completion.
Why this matters: Gold-plating and "while I'm here" refactors are how small tasks become large PRs that are hard to review and risky to merge. Staying focused on what was asked makes work predictable and trustworthy.
You may expand scope when:
Why this matters: Shell commands can silently work around failures — swallowing errors with
|| true, hiding stderr, or constructing commands dynamically in ways that are hard to audit.
Running such commands without inspection makes failures invisible and erodes trust in the output.
Before executing any shell command:
|| true or || : — suppresses failure exit codes2>/dev/null without an explicit reason — hides error output${var@P}, ${!var}, eval, or chained variable assignments building commands — blocked entirelyBAD: Silently running `rm -rf "$dir" 2>/dev/null || true` without comment
GOOD: Flagging that the command swallows all errors, asking if that's intentional before running
| Constraint | One-liner | | ----------------- | ------------------------------------- | | Evidence | Show proof, not claims | | Escalation | 3 strikes → stop and report | | Read-first | Understand before changing | | Conventions | Follow project patterns | | Self-review | Check your own work | | Scope | Do what was asked, no more | | Shell self-check | Inspect commands before running them |
development
Writes and runs a test suite for a piece of code, covering happy path, edge cases, error cases, and security cases. Use when: implementation is complete and needs test coverage, a bug needs a reproduction test and fix validation, or code needs coverage before a refactor. Do not use when: the code under test is not yet implemented, or the spec is still unclear.
testing
Use when creating a new skill, editing an existing skill, or helping a user author a skill for this system. Covers structure, discoverability, quality, and discipline hardening.
development
Evidence-based verification process to run before marking any task complete. Use this skill every time you're about to report that work is done — for features, bug fixes, refactoring, or any code change. This catches the most common failure mode: declaring "done" without proof. If you're finishing up and about to tell the user the task is complete, run this checklist first.
development
Teaches agents how to discover, select, and invoke skills from the skill library. Use this skill whenever you're uncertain which skill applies to a task, when composing multiple skills for complex work, or when you need to understand what skills are available. This is your go-to when facing an ambiguous task and need to figure out the right approach before diving into implementation.