loop-constraints — Claude Code skill: install
The loop-constraints skill loads project constraints before work begins and checks them before edits, tests, pushes, and merges.
MIT ★ 11,819 updated 2026-10-29
/plugin marketplace add cobusgreyling/loop-engineering
/plugin install loop-engineering@loop-engineeringWhat loop-constraints does
loop-constraints runs before triage and other action skills. It reads loop-constraints.md from the project root, loads its rules, and checks whether loop-pause-all is active. Each run starts with a line reporting how many constraints are active.
Before a file edit, the skill checks the path against the denylist. Before suggesting a fix, it rereads the code rules and runs tests, with one fix allowed per run. Pushes and merges trigger another review of the Push & Merge section, and a merge requires human approval.
When loop-constraints.md is missing, the skill falls back to safety rules: sensitive paths cannot be edited, changes cannot be auto-merged into main, and tests cannot be disabled. Three failed fix attempts trigger escalation, so the fallback mode affects how the agent proceeds.
What it helps with
- load project rules before any work
- block edits to denied paths
- run tests before proposing a fix
- prevent automatic merges into
main - escalate after 3 failed attempts
Example prompts for the agent
- Start work on this project by reading
loop-constraints.mdand reporting the number of active rules. - Before editing a file, check its path against the project denylist and stop if it matches.
- Before pushing changes, reread Push & Merge and ask a human to approve the merge.
How to install loop-constraints
1Plugin marketplace
/plugin marketplace add cobusgreyling/loop-engineering/plugin install loop-engineering@loop-engineeringThis installs the whole loop-engineering plugin with all its skills
2Skills CLI (Vercel)
npx skills add cobusgreyling/loop-engineering --skill loop-constraints -a claude-code3Manually: put the files in place
~/.claude/skills/loop-constraints/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/loop-constraints/
1Skills CLI (Vercel)
npx skills add cobusgreyling/loop-engineering --skill loop-constraints -a codex2Manually: put the files in place
.agents/skills/loop-constraints/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add cobusgreyling/loop-engineering --skill loop-constraints -a cursor2Manually: put the files in place
.cursor/skills/loop-constraints/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install cobusgreyling/loop-engineering skills/loop-constraints2Manually: put the files in place
.github/skills/loop-constraints/SKILL.md1Skills CLI (Vercel)
npx skills add cobusgreyling/loop-engineering --skill loop-constraints -a gemini-cli2Platform CLI
gemini skills install https://github.com/cobusgreyling/loop-engineering --path skills/loop-constraintsManually: put the files in place
.devin/skills/loop-constraints/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about loop-constraints
How do I install loop-constraints in Claude Code?
Add the marketplace with /plugin marketplace add cobusgreyling/loop-engineering, then install the plugin with /plugin install loop-engineering@loop-engineering.
What does loop-constraints do?
It reads loop-constraints.md before work starts, applies its rules to every later action, and checks paths, tests, pushes, and merges.
What happens when loop-constraints.md is missing?
The skill uses fallback safety rules that block edits to sensitive paths, automatic merges into main, and disabled tests. It escalates after 3 failed fix attempts.
Source text
SKILL.md · MIT
--- name: loop-constraints description: > Read loop-constraints.md at the start of every run and enforce every rule. This skill runs BEFORE triage or any action skill. Constraints are binding. user_invocable: true --- # Loop Constraints Enforcer You are the guardrail. Before any other work begins, you MUST: 1. Read `loop-constraints.md` from the project root. 2. Load every rule into your working memory. 3. Check if `loop-pause-all` is active → exit immediately. 4. Apply these rules to EVERY action that follows. ## How to enforce - Before pushing: re-read the Push & Merge section. If ANY rule blocks it, stop and tell the human. - Before editing a file: re-read the Paths section. If the path matches a denylist pattern, escalate. - Before proposing a fix: re-read the Code section. Run tests. One fix per run. - Before merging: re-read the Push & Merge section. Human must approve. ## Output at start of run Always begin with a one-line confirmation. Count each individual constraint/rule in `loop-constraints.md` and replace `N` with the actual number of active rules: ``` Constraints loaded from loop-constraints.md: N rules active. ``` If no `loop-constraints.md` exists, say so and proceed with default safety rules from `docs/safety.md`. ## Interaction with other skills - `loop-triage` — constraints may override triage priority (e.g. "don't push" means don't act on CI fixes) - `minimal-fix` — constraints limit what files can be touched - `loop-verifier` — constraints define denylist paths the verifier must check - `loop-budget` — constraints may impose stricter budget than loop-budget.md ## Default constraints (when no file exists) If `loop-constraints.md` is absent, enforce these minimums: - Never edit `.env`, `.env.*`, `auth/`, `payments/`, `secrets/`, `credentials/` - Never auto-merge to main - Never disable tests - Escalate after 3 failed fix attempts
© Cobus Greyling · MIT · cobusgreyling/loop-engineering