一键导入
behavioral-contracts-guidelines
Behavioral guidelines to reduce common LLM coding mistakes before writing any code
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Behavioral guidelines to reduce common LLM coding mistakes before writing any code
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Review existing Architecture Decision Records. Flag ADRs whose aging signals may have triggered given current state. Categorizes each as valid / aged / superseded and suggests follow-up actions.
Author an Architecture Decision Record (ADR). Captures decisions with implications beyond the current change — lasts months, affects multiple files, hard to reverse. Records context, alternatives considered, consequences, and aging signals so the decision can be revisited when conditions change.
4-phase loop-detection and recovery protocol. Fires when an agent detects it is stuck or repeating the same tool call with no progress — before tool-loop-detection circuit-breaks at 30 calls.
Socratic exploration of requirements before implementation. Refines spec through targeted questions. Use when user asks to 'explore options', 'refine requirements', or mentions 'unclear requirements'.
Generate structured changelog from git history. Groups commits by type, filters noise, produces Keep a Changelog format. Single source of truth — no /commands wrapper.
Generate pipe-delimited commits: Tipo|IdTarea|YYYYMMDD|Descripción. Single source of truth — no /commands wrapper.
| name | behavioral-contracts-guidelines |
| description | Behavioral guidelines to reduce common LLM coding mistakes before writing any code |
| allowed-tools | ["Read","Grep","Glob"] |
| license | MIT |
| load_when | ["writing_code","reviewing_code","refactoring_code"] |
| inputs | [{"name":"task_description","type":"string","required":true},{"name":"existing_code","type":"code","required":false}] |
| outputs | [{"name":"implementation_plan","type":"numbered_steps","format":"[Step] → verify: [observable_check]"}] |
| constraints | ["think_before_coding_required",{"max_lines_before_simplify_check":50},"touch_only_what_task_requires","define_success_criteria_before_starting"] |
Behavioral guidelines to reduce common LLM coding mistakes when writing, reviewing, or refactoring code.
Tradeoff: These guidelines bias toward caution over speed. For trivial tasks, use judgment.
Deep-dive note. Las 4 reglas canónicas son siempre-on y viven en
.claude/contracts/behavioral-contracts.md(inyectadas vía CLAUDE.md y subagent-context.py). Este archivo es el material de referencia con ejemplos — no necesitás invocarlo como skill, ya estás operando bajo el contrato.
Don't assume. Don't hide confusion. Surface tradeoffs.
Before implementing:
Minimum code that solves the problem. Nothing speculative.
Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
Touch only what you must. Clean up only your own mess.
When editing existing code:
When your changes create orphans:
The test: Every changed line should trace directly to the user's request.
Define success criteria. Loop until verified.
Transform tasks into verifiable goals:
For multi-step tasks, state a brief plan:
1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]
Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.