loop-constraints — скилл для Claude Code: установка
Скилл loop-constraints загружает правила проекта до начала работы и проверяет их перед изменениями, тестами, отправкой и слиянием кода.
MIT ★ 11 819 обновлён 2026-10-29
/plugin marketplace add cobusgreyling/loop-engineering
/plugin install loop-engineering@loop-engineeringЧто делает loop-constraints
loop-constraints запускается перед триажем и другими action-скиллами. Он читает loop-constraints.md из корня проекта, загружает правила и проверяет, не активирован ли loop-pause-all. В начале запуска агент сообщает число активных ограничений.
Перед изменением файла скилл сверяет путь с denylist, перед исправлением требует перечитать правила кода и запустить тесты, а за один запуск допускает одно исправление. Перед отправкой изменений и слиянием он снова проверяет правила; слияние требует одобрения человека.
Если loop-constraints.md отсутствует, применяются базовые ограничения: нельзя менять .env, .env.*, auth/, payments/, secrets/ и credentials/, автоматически сливать изменения в main или отключать тесты. После 3 неудачных попыток исправления нужна эскалация, поэтому отсутствие файла меняет режим работы скилла.
Какие задачи решает
- загрузить правила проекта до начала работы
- заблокировать изменения в запрещённых путях
- проверить тесты перед предложением исправления
- запретить автоматическое слияние в
main - остановиться после 3 неудачных попыток
Примеры запросов агенту
- Начни работу с проектом: прочитай
loop-constraints.mdи сообщи число активных правил. - Перед изменением файла проверь его путь по правилам проекта и остановись при совпадении с denylist.
- Перед отправкой изменений перечитай раздел Push & Merge и запроси одобрение человека перед слиянием.
Как установить loop-constraints
1Через маркетплейс плагинов
/plugin marketplace add cobusgreyling/loop-engineering/plugin install loop-engineering@loop-engineeringКоманда ставит плагин loop-engineering целиком, со всеми его скиллами
2Через Skills CLI (Vercel)
npx skills add cobusgreyling/loop-engineering --skill loop-constraints -a claude-code3Вручную: положить файлы
~/.claude/skills/loop-constraints/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/loop-constraints/
1Через Skills CLI (Vercel)
npx skills add cobusgreyling/loop-engineering --skill loop-constraints -a codex2Вручную: положить файлы
.agents/skills/loop-constraints/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add cobusgreyling/loop-engineering --skill loop-constraints -a cursor2Вручную: положить файлы
.cursor/skills/loop-constraints/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install cobusgreyling/loop-engineering skills/loop-constraints2Вручную: положить файлы
.github/skills/loop-constraints/SKILL.md1Через Skills CLI (Vercel)
npx skills add cobusgreyling/loop-engineering --skill loop-constraints -a gemini-cli2Командой платформы
gemini skills install https://github.com/cobusgreyling/loop-engineering --path skills/loop-constraintsВручную: положить файлы
.devin/skills/loop-constraints/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о loop-constraints
Как установить loop-constraints в Claude Code?
Добавьте маркетплейс командой /plugin marketplace add cobusgreyling/loop-engineering, затем установите плагин командой /plugin install loop-engineering@loop-engineering.
Что делает loop-constraints?
Скилл читает loop-constraints.md перед работой, применяет его правила к каждому действию и контролирует пути, тесты, отправку и слияние изменений.
Что произойдёт, если loop-constraints.md отсутствует?
Скилл применит базовые правила безопасности: запретит менять чувствительные пути, автоматическое слияние в main и отключение тестов. После 3 неудачных попыток исправления он потребует эскалацию.
Исходный текст
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