[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79NFKXKD58JV2KYFSAEY7FA":3,"skill-same:01M79NFKXKD58JV2KYFSAEY7FA":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":13,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M79NFKXKD58JV2KYFSAEY7FA","rule-development",null,"Creates and validates .Codex\u002Frules\u002F behavioral guardrail files using contrastive Incorrect\u002FCorrect examples. Use when a mistake recurs across agent sessions, when the user identifies a behavioral gap, or when standardizing code conventions or adding path-scoped constraints for specific file types.","AndreHahm\u002Fandres-cc-marketplace","AndreHahm","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F80748019?v=4","01M79N2VZJT9MAJ7K695C9VXQ4","01M79N2W06PFX8BSCQ592M8K8K",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FAndreHahm\u002Fandres-cc-marketplace\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frule-development\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: rule-development\ndescription: >-\n  Creates and validates .Codex\u002Frules\u002F behavioral guardrail files using contrastive\n  Incorrect\u002FCorrect examples. Use when a mistake recurs across agent sessions, when the user\n  identifies a behavioral gap, or when standardizing code conventions or adding path-scoped\n  constraints for specific file types.\nallowed-tools: Read Write Edit Glob Grep Skill\n---\n\n# Create Rule\n\nGuide for creating effective `.Codex\u002Frules` files with contrastive examples that improve agent accuracy.\n\n## Quick Start\n\n1. **State the behavioral gap** — \"Agent does X, should do Y\" (concrete observation, not vague)\n2. **Determine scope** — global (all files), path-scoped (`paths:` frontmatter), or user-level (`~\u002F.Codex\u002Frules\u002F`)\n3. **Write Incorrect example first** — the exact plausible mistake the agent produces\n4. **Write Correct example** — minimal fix of the same scenario\n5. **Write description** — 1-2 sentences: WHAT the rule enforces + WHY it matters, imperative form\n6. **Assemble rule file** — use the template in Rule Structure below; run Rule Creation Checklist\n7. **Validate** — run `\u002Frules-review` to confirm it fires on real violations with no false positives\n\n## When to Use\n\n- A behavior must apply to ALL agent sessions\n- Agents repeatedly make the same mistake despite corrections\n- A convention has clear right\u002Fwrong patterns (contrastive examples are possible)\n- Path-specific guidance is needed for certain file types\n\n## When NOT to Use\n\n- Task-specific workflows → use a skill instead\n- One-time instructions → put in the prompt\n- Broad project context → put in AGENTS.md\n- Multi-step procedures → use a skill\n\n## Core Principle\n\nEffective rules use **contrastive examples** (Incorrect vs Correct) to eliminate ambiguity. Rules are\nbehavioral guardrails that load into every session — they are \"standing orders\" that every agent\ninherits automatically. If guidance is task-specific, create a skill instead.\n\nA rule states *what* must or must not happen; a skill teaches *how* to perform multi-step work.\nRule files must not contain procedural content — numbered steps or multi-step code blocks belong\nin a skill, not a rule.\n\n## Rules vs Skills vs AGENTS.md\n\n| Aspect | Rules (`.Codex\u002Frules\u002F`) | Skills | AGENTS.md |\n|--------|--------------------------|--------|-----------|\n| **Loading** | Every session (or path-scoped) | On-demand | Every session |\n| **Purpose** | Behavioral constraints | Procedural knowledge | Project overview |\n| **Size** | ~50 lines body (50-200 words for the description) | 200-2000 words | Medium |\n| **Format** | Contrastive examples | Step-by-step | Bullets |\n\n## Rule Structure\n\nEvery rule MUST follow the Description-Incorrect-Correct template. See [rule-file-skeleton.md](references\u002Frule-file-skeleton.md) for the bare template and [examples.md](references\u002Fexamples.md) for complete worked examples.\n\n`paths` is the only field with official platform meaning; `title` and `impact` are internal\nplugin-devkit conventions for organizing rules, not required by the platform.\n\n## Rule Types\n\n### Global Rules (no `paths` frontmatter)\n\nLoad every session. Use for universal constraints.\n\n### Path-Scoped Rules (`paths` frontmatter)\n\nRules without `paths` load unconditionally, every session; rules with `paths` load only when Codex works with a matching file. See `references\u002Frules-specification.md`'s \"Path-Specific Rules\" section for the full explanation, the pattern-assessment table, and multi-pattern\u002Fbrace-expansion detail.\n\n**Use `paths` whenever it can be defined** — reduces context noise for unrelated work. Avoid overly broad patterns like `**\u002F*` or `*`.\n\n### User-Level Rules (`~\u002F.Codex\u002Frules\u002F`)\n\nApply across all projects for personal preferences. See `references\u002Frules-specification.md` for setup details.\n\n## Writing Effective Rules\n\n**Description principles:**\n- Be specific: `\"Functions must not exceed 50 lines\"` not `\"Keep functions short\"`\n- State the WHY: `\"Use early returns — deeply nested code increases cognitive load\"`\n- Use imperative language — `MUST`, `NEVER` — not passive voice, \"try to,\" or \"consider\"\n\n**Compactness budget:** Keep the rule body under ~50 lines; the 50-200 word range applies to the\ncore description, not the whole file (excluding code examples). One rule per file.\n\n**Session-start budget (recommended, not a hard limit):** Keep the combined size of AGENTS.md and\nall `.Codex\u002Frules\u002F` files under ~300 lines — every rule loads at session start (or on file match)\nand adds to context cost.\n\n**Incorrect examples** must show patterns agents **plausibly produce** — the most common mistake,\nnot contrived bad code. **Correct examples** must show the minimal fix for the same scenario.\n\nFor extended guidance on what makes effective examples, see `references\u002Fexamples.md`.\n\n**`.examples.md` companion files:** For rules with nuanced edge cases, create a sibling file\n`\u003Crule-name>.examples.md` in the same directory. The compliance reviewer (`\u002Frules-review`) loads\nit automatically alongside the rule file. Use it for additional Good\u002FBad contrasts, edge cases,\nand anti-patterns that would push the main rule file past the 200-word budget.\n\n### Enforcement Limits\n\nRules alone achieve roughly 70% compliance — they are instructions, not code. A hard directive\n(`MUST NEVER` around a destructive or irreversible action) must be backed by a deterministic\nenforcement mechanism — a hook or permission rule — not the rule text alone.\n\n## Additional Process Guidance\n\n### Security Self-Check (after assembling the rule file)\n\nAfter writing examples, scan the rule file for sensitive information that may have been copied\nfrom real code:\n\n1. Grep for long hex strings: `[0-9a-fA-F]{20,}`\n2. Grep for base64-like strings: `[A-Za-z0-9+\u002F=]{40,}`\n3. Grep for keyword-adjacent literals: `(key|token|secret|password|credential)\\s*[:=]\\s*[\"'][^\"']+`\n4. Grep for internal URLs: `(internal|staging|localhost:[0-9]+)`\n\nIf found, replace with placeholders (`API_KEY_REDACTED`, `https:\u002F\u002Fexample.com`, etc.) before saving.\n\n### Iterate and Refine\n\nOptionally treat rule creation as TDD: observe the behavior gap first (RED), write the rule\n(GREEN), validate with `\u002Frules-review` (REFACTOR).\n\nApply Decompose → Filter → Reweight cycle before finalizing.\n\n**7.1 Decompose** — \"Is this rule trying to cover more than one concept?\"\n- If YES → split into multiple focused rules, one concept each\n\n**7.2 Misalignment Filter** — \"Could this rule penalize acceptable variations?\"\n- If YES → narrow scope or rewrite contrastive examples\n- Verify: would an agent actually produce the Incorrect pattern? If not, rule is contrived\n\n**7.3 Redundancy Filter** — Check existing rules for overlap:\n```\nGlob .Codex\u002Frules\u002F**\u002F*.md\nGrep \"relevant-keyword\" in .Codex\u002Frules\u002F\n```\nIf overlap found → update existing rule, delete the duplicate you just created.\n\nAlso check for **cross-format duplicates**: a project-specific pattern in a `.local.md` file may\nalready be captured as a Principle in the corresponding `.md` file under a different name. Use\nsemantic equivalence (synonyms, case-insensitive), not just exact string match. If the new rule's\nintent matches an existing Principle, skip creating a new file and reference the existing one.\n\n**7.4 Impact Reweight** — Assign `impact` frontmatter:\n- **CRITICAL**: Data loss, security vulnerabilities, system failures\n- **HIGH**: Broken functionality, incorrect behavior, hard-to-debug issues\n- **MEDIUM**: Degrades quality, readability, or maintainability\n- **LOW**: Minor style or convention issue\n\n**7.5 User Feedback Loop** — Share the rule with the user.\n- If approved → done\n- If not → update to close gaps, iterate until approved\n\n**7.6 Staleness Watch** — Rules that reference project-specific symbols (function names, types,\nhook signatures) can become stale when the codebase evolves. After any major refactor or\ndependency upgrade, verify that inline code signatures in rule examples still exist:\n```\nGrep \"`symbolName`\" in .Codex\u002Frules\u002F**\u002F*.md\n```\nIf a symbol no longer exists, update the example or remove the rule if the pattern is obsolete.\nDo NOT auto-delete — flag for user review.\n\n## Directory Structure\n\n```\n.Codex\u002F\n├── AGENTS.md\n└── rules\u002F\n    ├── code-style.md            # Global\n    ├── error-handling.md        # Global\n    ├── security.md              # Global\n    └── frontend\u002F\n        ├── components.md        # Path-scoped\n        └── state-management.md  # Path-scoped\n```\n\nNaming: lowercase with hyphens, named by concern (`error-handling.md` not `try-catch-patterns.md`).\n\n**Canonical categories** — when rules apply to a specific language, framework, or integration\nlibrary, place them in the appropriate subdirectory so they can participate in org-wide rule\nsharing (`\u002Frules-extract`, `\u002Frules-merge`, `\u002Frules-apply`):\n\n```\n.Codex\u002F\n└── rules\u002F\n    ├── project.md               # Project-wide domain rules (no paths: — applies to all files)\n    ├── languages\u002F\n    │   ├── typescript.md        # Portable principles for this language\n    │   └── typescript.local.md  # Project-specific patterns (not portable)\n    ├── frameworks\u002F\n    │   ├── react.md\n    │   └── rails-controllers.md # Layer-specific: \u003Cframework>-\u003Clayer> naming\n    └── integrations\u002F\n        └── rails-pundit.md      # Integration libraries: \u003Cframework>-\u003Cintegration>\n```\n\n`project.md` is inherently project-specific — do not design it for portability across projects.\n`languages\u002F`, `frameworks\u002F`, and `integrations\u002F` subdirectories follow the rules-extract\u002Frules-merge\nconvention and can be shared via `\u002Frules-merge` and `\u002Frules-apply`.\n\n## Rule Creation Checklist\n\n- [ ] Behavioral gap: \"does X, should do Y\"\n- [ ] Rule type determined: global, path-scoped, or user-level\n- [ ] Incorrect example shows plausible agent mistake\n- [ ] Correct example shows minimal fix of the same scenario\n- [ ] Description states WHAT and WHY, in imperative form\n- [ ] Frontmatter: `title` and `impact` present (internal convention; `paths` is the only officially platform-recognized field)\n- [ ] Body under ~50 lines; description 50-200 words (excluding code examples)\n- [ ] One topic per file\n- [ ] No overlap with AGENTS.md or other rules\n- [ ] Path scoping uses correct glob patterns (if applicable)\n- [ ] File placed in `.Codex\u002Frules\u002F` with descriptive hyphenated name\n- [ ] No sensitive information in examples (secrets, tokens, internal URLs)\n- [ ] Compliance verified: `\u002Frules-review` fires on intended violations, no false positives\n\n## Updating Existing Rules\n\nWhen a rule needs a new pattern added (without overwriting existing content):\n\n1. Read the existing rule file before editing.\n2. Append to the appropriate section — do not replace existing Incorrect\u002FCorrect examples.\n3. **Preserve manual edits**: treat existing content as authoritative.\n4. Re-run the redundancy filter (see Iterate and Refine → 7.3) — the new addition may now overlap with another rule.\n5. Re-run the security self-check on the updated file.\n6. Re-run `\u002Frules-review` to confirm the updated rule still fires correctly.\n\nWhen existing rules under `languages\u002F` or `frameworks\u002F` are updated, check whether the same\npattern applies across other projects — if it does, promote it to a Principle (portable, no\nproject-specific implementation details) rather than keeping it as a project-specific pattern.\n\n## Rule-Doc Drift\n\nA rule can become stale when the codebase intentionally adopts a different pattern. In this case\nthe violation is in the **rule**, not the code. Signs of rule-doc drift:\n\n- The same \"non-compliant\" pattern appears in 3+ locations in the codebase, all consistent.\n- The rule's text cites a numeric threshold or API behavior that the project has intentionally changed.\n- A major dependency upgrade changed the recommended approach.\n\n**Do not fix the code.** Update or remove the stale rule instead:\n1. Confirm the pattern change was intentional (not an oversight).\n2. Rewrite the rule's description and examples to match current conventions.\n3. If the pattern no longer has a wrong\u002Fright distinction, delete the rule.\n4. Run `\u002Frules-extract --update` to capture the new convention if it wasn't previously documented.\n\n## Periodic Maintenance\n\nPeriodically audit AGENTS.md, nested AGENTS.md files, and all `.Codex\u002Frules\u002F` files together for\nconflicting, duplicated, or drifted instructions — instructions written at different times can\nsilently contradict each other, and Codex may resolve the conflict arbitrarily.\n\n## Reference Guide\n\n| Resource | Purpose |\n|---|---|\n| `references\u002Fexamples.md` | Complete worked examples, anti-patterns, extended writing guidance |\n| `references\u002Frules-specification.md` | Official Codex rules documentation (path scoping, symlinks, user-level rules) |\n| `plugin-rulebook` | Plugin-level rules — invoke before finalizing any rule file to check naming, language, formatting, and external-reference compliance |\n| `plugin-rulebook\u002Freferences\u002Fsize-rules.md` — R18 section | Before extracting an oversized inline example (e.g. a full rule-file skeleton) into `examples\u002F`, check its \"Before extracting, check whether extraction actually removes the violation\" guidance first — a naive extraction can just re-wrap the same content in another oversized fence inside the new file. `examples\u002Fglobal-rule-example.md` and `examples\u002Fpath-scoped-rule-example.md` in this skill are worked examples of extracting correctly (standalone files, independent non-nested fences) |\n","# Create Rule\n\nGuide for creating effective `.Codex\u002Frules` files with contrastive examples that improve agent accuracy.\n\n## Quick Start\n\n1. **State the behavioral gap** — \"Agent does X, should do Y\" (concrete observation, not vague)\n2. **Determine scope** — global (all files), path-scoped (`paths:` frontmatter), or user-level (`~\u002F.Codex\u002Frules\u002F`)\n3. **Write Incorrect example first** — the exact plausible mistake the agent produces\n4. **Write Correct example** — minimal fix of the same scenario\n5. **Write description** — 1-2 sentences: WHAT the rule enforces + WHY it matters, imperative form\n6. **Assemble rule file** — use the template in Rule Structure below; run Rule Creation Checklist\n7. **Validate** — run `\u002Frules-review` to confirm it fires on real violations with no false positives\n\n## When to Use\n\n- A behavior must apply to ALL agent sessions\n- Agents repeatedly make the same mistake despite corrections\n- A convention has clear right\u002Fwrong patterns (contrastive examples are possible)\n- Path-specific guidance is needed for certain file types\n\n## When NOT to Use\n\n- Task-specific workflows → use a skill instead\n- One-time instructions → put in the prompt\n- Broad project context → put in AGENTS.md\n- Multi-step procedures → use a skill\n\n## Core Principle\n\nEffective rules use **contrastive examples** (Incorrect vs Correct) to eliminate ambiguity. Rules are\nbehavioral guardrails that load into every session — they are \"standing orders\" that every agent\ninherits automatically. If guidance is task-specific, create a skill instead.\n\nA rule states *what* must or must not happen; a skill teaches *how* to perform multi-step work.\nRule files must not contain procedural content — numbered steps or multi-step code blocks belong\nin a skill, not a rule.\n\n## Rules vs Skills vs AGENTS.md\n\n| Aspect | Rules (`.Codex\u002Frules\u002F`) | Skills | AGENTS.md |\n|--------|--------------------------|--------|-----------|\n| **Loading** | Every session (or path-scoped) | On-demand | Every session |\n| **Purpose** | Behavioral constraints | Procedural knowledge | Project overview |\n| **Size** | ~50 lines body (50-200 words for the description) | 200-2000 words | Medium |\n| **Format** | Contrastive examples | Step-by-step | Bullets |\n\n## Rule Structure\n\nEvery rule MUST follow the Description-Incorrect-Correct template. See [rule-file-skeleton.md](references\u002Frule-file-skeleton.md) for the bare template and [examples.md](references\u002Fexamples.md) for complete worked examples.\n\n`paths` is the only field with official platform meaning; `title` and `impact` are internal\nplugin-devkit conventions for organizing rules, not required by the platform.\n\n## Rule Types\n\n### Global Rules (no `paths` frontmatter)\n\nLoad every session. Use for universal constraints.\n\n### Path-Scoped Rules (`paths` frontmatter)\n\nRules without `paths` load unconditionally, every session; rules with `paths` load only when Codex works with a matching file. See `references\u002Frules-specification.md`'s \"Path-Specific Rules\" section for the full explanation, the pattern-assessment table, and multi-pattern\u002Fbrace-expansion detail.\n\n**Use `paths` whenever it can be defined** — reduces context noise for unrelated work. Avoid overly broad patterns like `**\u002F*` or `*`.\n\n### User-Level Rules (`~\u002F.Codex\u002Frules\u002F`)\n\nApply across all projects for personal preferences. See `references\u002Frules-specification.md` for setup details.\n\n## Writing Effective Rules\n\n**Description principles:**\n- Be specific: `\"Functions must not exceed 50 lines\"` not `\"Keep functions short\"`\n- State the WHY: `\"Use early returns — deeply nested code increases cognitive load\"`\n- Use imperative language — `MUST`, `NEVER` — not passive voice, \"try to,\" or \"consider\"\n\n**Compactness budget:** Keep the rule body under ~50 lines; the 50-200 word range applies to the\ncore description, not the whole file (excluding code examples). One rule per file.\n\n**Session-start budget (recommended, not a hard limit):** Keep the combined size of AGENTS.md and\nall `.Codex\u002Frules\u002F` files under ~300 lines — every rule loads at session start (or on file match)\nand adds to context cost.\n\n**Incorrect examples** must show patterns agents **plausibly produce** — the most common mistake,\nnot contrived bad code. **Correct examples** must show the minimal fix for the same scenario.\n\nFor extended guidance on what makes effective examples, see `references\u002Fexamples.md`.\n\n**`.examples.md` companion files:** For rules with nuanced edge cases, create a sibling file\n`\u003Crule-name>.examples.md` in the same directory. The compliance reviewer (`\u002Frules-review`) loads\nit automatically alongside the rule file. Use it for additional Good\u002FBad contrasts, edge cases,\nand anti-patterns that would push the main rule file past the 200-word budget.\n\n### Enforcement Limits\n\nRules alone achieve roughly 70% compliance — they are instructions, not code. A hard directive\n(`MUST NEVER` around a destructive or irreversible action) must be backed by a deterministic\nenforcement mechanism — a hook or permission rule — not the rule text alone.\n\n## Additional Process Guidance\n\n### Security Self-Check (after assembling the rule file)\n\nAfter writing examples, scan the rule file for sensitive information that may have been copied\nfrom real code:\n\n1. Grep for long hex strings: `[0-9a-fA-F]{20,}`\n2. Grep for base64-like strings: `[A-Za-z0-9+\u002F=]{40,}`\n3. Grep for keyword-adjacent literals: `(key|token|secret|password|credential)\\s*[:=]\\s*[\"'][^\"']+`\n4. Grep for internal URLs: `(internal|staging|localhost:[0-9]+)`\n\nIf found, replace with placeholders (`API_KEY_REDACTED`, `https:\u002F\u002Fexample.com`, etc.) before saving.\n\n### Iterate and Refine\n\nOptionally treat rule creation as TDD: observe the behavior gap first (RED), write the rule\n(GREEN), validate with `\u002Frules-review` (REFACTOR).\n\nApply Decompose → Filter → Reweight cycle before finalizing.\n\n**7.1 Decompose** — \"Is this rule trying to cover more than one concept?\"\n- If YES → split into multiple focused rules, one concept each\n\n**7.2 Misalignment Filter** — \"Could this rule penalize acceptable variations?\"\n- If YES → narrow scope or rewrite contrastive examples\n- Verify: would an agent actually produce the Incorrect pattern? If not, rule is contrived\n\n**7.3 Redundancy Filter** — Check existing rules for overlap:\n```\nGlob .Codex\u002Frules\u002F**\u002F*.md\nGrep \"relevant-keyword\" in .Codex\u002Frules\u002F\n```\nIf overlap found → update existing rule, delete the duplicate you just created.\n\nAlso check for **cross-format duplicates**: a project-specific pattern in a `.local.md` file may\nalready be captured as a Principle in the corresponding `.md` file under a different name. Use\nsemantic equivalence (synonyms, case-insensitive), not just exact string match. If the new rule's\nintent matches an existing Principle, skip creating a new file and reference the existing one.\n\n**7.4 Impact Reweight** — Assign `impact` frontmatter:\n- **CRITICAL**: Data loss, security vulnerabilities, system failures\n- **HIGH**: Broken functionality, incorrect behavior, hard-to-debug issues\n- **MEDIUM**: Degrades quality, readability, or maintainability\n- **LOW**: Minor style or convention issue\n\n**7.5 User Feedback Loop** — Share the rule with the user.\n- If approved → done\n- If not → update to close gaps, iterate until approved\n\n**7.6 Staleness Watch** — Rules that reference project-specific symbols (function names, types,\nhook signatures) can become stale when the codebase evolves. After any major refactor or\ndependency upgrade, verify that inline code signatures in rule examples still exist:\n```\nGrep \"`symbolName`\" in .Codex\u002Frules\u002F**\u002F*.md\n```\nIf a symbol no longer exists, update the example or remove the rule if the pattern is obsolete.\nDo NOT auto-delete — flag for user review.\n\n## Directory Structure\n\n```\n.Codex\u002F\n├── AGENTS.md\n└── rules\u002F\n    ├── code-style.md            # Global\n    ├── error-handling.md        # Global\n    ├── security.md              # Global\n    └── frontend\u002F\n        ├── components.md        # Path-scoped\n        └── state-management.md  # Path-scoped\n```\n\nNaming: lowercase with hyphens, named by concern (`error-handling.md` not `try-catch-patterns.md`).\n\n**Canonical categories** — when rules apply to a specific language, framework, or integration\nlibrary, place them in the appropriate subdirectory so they can participate in org-wide rule\nsharing (`\u002Frules-extract`, `\u002Frules-merge`, `\u002Frules-apply`):\n\n```\n.Codex\u002F\n└── rules\u002F\n    ├── project.md               # Project-wide domain rules (no paths: — applies to all files)\n    ├── languages\u002F\n    │   ├── typescript.md        # Portable principles for this language\n    │   └── typescript.local.md  # Project-specific patterns (not portable)\n    ├── frameworks\u002F\n    │   ├── react.md\n    │   └── rails-controllers.md # Layer-specific: \u003Cframework>-\u003Clayer> naming\n    └── integrations\u002F\n        └── rails-pundit.md      # Integration libraries: \u003Cframework>-\u003Cintegration>\n```\n\n`project.md` is inherently project-specific — do not design it for portability across projects.\n`languages\u002F`, `frameworks\u002F`, and `integrations\u002F` subdirectories follow the rules-extract\u002Frules-merge\nconvention and can be shared via `\u002Frules-merge` and `\u002Frules-apply`.\n\n## Rule Creation Checklist\n\n- [ ] Behavioral gap: \"does X, should do Y\"\n- [ ] Rule type determined: global, path-scoped, or user-level\n- [ ] Incorrect example shows plausible agent mistake\n- [ ] Correct example shows minimal fix of the same scenario\n- [ ] Description states WHAT and WHY, in imperative form\n- [ ] Frontmatter: `title` and `impact` present (internal convention; `paths` is the only officially platform-recognized field)\n- [ ] Body under ~50 lines; description 50-200 words (excluding code examples)\n- [ ] One topic per file\n- [ ] No overlap with AGENTS.md or other rules\n- [ ] Path scoping uses correct glob patterns (if applicable)\n- [ ] File placed in `.Codex\u002Frules\u002F` with descriptive hyphenated name\n- [ ] No sensitive information in examples (secrets, tokens, internal URLs)\n- [ ] Compliance verified: `\u002Frules-review` fires on intended violations, no false positives\n\n## Updating Existing Rules\n\nWhen a rule needs a new pattern added (without overwriting existing content):\n\n1. Read the existing rule file before editing.\n2. Append to the appropriate section — do not replace existing Incorrect\u002FCorrect examples.\n3. **Preserve manual edits**: treat existing content as authoritative.\n4. Re-run the redundancy filter (see Iterate and Refine → 7.3) — the new addition may now overlap with another rule.\n5. Re-run the security self-check on the updated file.\n6. Re-run `\u002Frules-review` to confirm the updated rule still fires correctly.\n\nWhen existing rules under `languages\u002F` or `frameworks\u002F` are updated, check whether the same\npattern applies across other projects — if it does, promote it to a Principle (portable, no\nproject-specific implementation details) rather than keeping it as a project-specific pattern.\n\n## Rule-Doc Drift\n\nA rule can become stale when the codebase intentionally adopts a different pattern. In this case\nthe violation is in the **rule**, not the code. Signs of rule-doc drift:\n\n- The same \"non-compliant\" pattern appears in 3+ locations in the codebase, all consistent.\n- The rule's text cites a numeric threshold or API behavior that the project has intentionally changed.\n- A major dependency upgrade changed the recommended approach.\n\n**Do not fix the code.** Update or remove the stale rule instead:\n1. Confirm the pattern change was intentional (not an oversight).\n2. Rewrite the rule's description and examples to match current conventions.\n3. If the pattern no longer has a wrong\u002Fright distinction, delete the rule.\n4. Run `\u002Frules-extract --update` to capture the new convention if it wasn't previously documented.\n\n## Periodic Maintenance\n\nPeriodically audit AGENTS.md, nested AGENTS.md files, and all `.Codex\u002Frules\u002F` files together for\nconflicting, duplicated, or drifted instructions — instructions written at different times can\nsilently contradict each other, and Codex may resolve the conflict arbitrarily.\n\n## Reference Guide\n\n| Resource | Purpose |\n|---|---|\n| `references\u002Fexamples.md` | Complete worked examples, anti-patterns, extended writing guidance |\n| `references\u002Frules-specification.md` | Official Codex rules documentation (path scoping, symlinks, user-level rules) |\n| `plugin-rulebook` | Plugin-level rules — invoke before finalizing any rule file to check naming, language, formatting, and external-reference compliance |\n| `plugin-rulebook\u002Freferences\u002Fsize-rules.md` — R18 section | Before extracting an oversized inline example (e.g. a full rule-file skeleton) into `examples\u002F`, check its \"Before extracting, check whether extraction actually removes the violation\" guidance first — a naive extraction can just re-wrap the same content in another oversized fence inside the new file. `examples\u002Fglobal-rule-example.md` and `examples\u002Fpath-scoped-rule-example.md` in this skill are worked examples of extracting correctly (standalone files, independent non-nested fences) |\n",{"name":5,"description":7,"allowed-tools":23},"Read Write Edit Glob Grep Skill","main","1bf12900cac6f28e346abd2912bdb78d306de723",".agents\u002Fskills\u002Frule-development","https:\u002F\u002Fgithub.com\u002FAndreHahm\u002Fandres-cc-marketplace","https:\u002F\u002Fgithub.com\u002FAndreHahm","2026-11-15 04:26:16",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add AndreHahm\u002Fandres-cc-marketplace --skill rule-development",{"tool":36,"command":37},"bunx","bunx skills add AndreHahm\u002Fandres-cc-marketplace --skill rule-development",{"tool":39,"command":40},"pnpm","pnpm dlx skills add AndreHahm\u002Fandres-cc-marketplace --skill rule-development","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAndreHahm\u002Fandres-cc-marketplace\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frule-development\u002FSKILL.md",true,[44,50,54,58,62],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"examples\u002Fglobal-rule-example.md","REFERENCE","参考文档",1594,"https:\u002F\u002Fgithub.com\u002FAndreHahm\u002Fandres-cc-marketplace\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frule-development\u002Fexamples\u002Fglobal-rule-example.md",{"path":51,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":52,"sourceHtmlUrl":53},"examples\u002Fpath-scoped-rule-example.md",1387,"https:\u002F\u002Fgithub.com\u002FAndreHahm\u002Fandres-cc-marketplace\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frule-development\u002Fexamples\u002Fpath-scoped-rule-example.md",{"path":55,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fexamples.md",4225,"https:\u002F\u002Fgithub.com\u002FAndreHahm\u002Fandres-cc-marketplace\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frule-development\u002Freferences\u002Fexamples.md",{"path":59,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Frule-file-skeleton.md",1005,"https:\u002F\u002Fgithub.com\u002FAndreHahm\u002Fandres-cc-marketplace\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frule-development\u002Freferences\u002Frule-file-skeleton.md",{"path":63,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Frules-specification.md",4329,"https:\u002F\u002Fgithub.com\u002FAndreHahm\u002Fandres-cc-marketplace\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frule-development\u002Freferences\u002Frules-specification.md",[67,74,81,88,95,102],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M79R0K918Z0XDM74R0EY5H3P","demo","Fixture skill used by scripts.marketplace_ci sync tests.","https:\u002F\u002Fgithub.com\u002FAndreHahm\u002Fandres-cc-marketplace\u002Fblob\u002Fmain\u002Ftests\u002Fmarketplace_ci\u002Ffixtures\u002Fplugins\u002Fsample-kit\u002Fskills\u002Fdemo\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M79R08VMDJA2FPJKH3ZM309K","export-demo","Fixture skill used by scripts.marketplace_ci export tests.","https:\u002F\u002Fgithub.com\u002FAndreHahm\u002Fandres-cc-marketplace\u002Fblob\u002Fmain\u002Ftests\u002Fmarketplace_ci\u002Ffixtures\u002Fclaude\u002Fskills\u002Fexport-demo\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M79R042FS581DS2JNW5AZ1MK","work-to-development","Validate an accepted Linear Issue's readiness for implementation (criteria, dependencies, duplicate\u002Fexisting artifacts) and request governed branch\u002Fworktree creation through git-kit:starting-work — recording work-started Git\u002FGitHub evidence and a deliberate Linear Started transition only after Git identity is read back and verified. Use when asked to start work on a Linear issue, begin development for an accepted issue, or prepare an accepted issue for implementation. Never creates a branch directly — always delegates to git-kit.","https:\u002F\u002Fgithub.com\u002FAndreHahm\u002Fandres-cc-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fworkmanagement-kit\u002Fskills\u002Fwork-to-development\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M79QZZD4EHB82P72P4N92BKT","work-linking","Create and maintain stable cross-system links and authority labels between Notion and Linear records, and detect\u002Frepair drift between them. Use when asked to link a Notion record to a Linear record, check for drift between Notion and Linear, or repair a broken\u002Fstale link. Repairs only the bounded non-authoritative copy or link — never chooses by newest timestamp, and never creates a reverse-write loop against either system's own authority.","https:\u002F\u002Fgithub.com\u002FAndreHahm\u002Fandres-cc-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fworkmanagement-kit\u002Fskills\u002Fwork-linking\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":18},"01M79QZVFA3GTVNZMJ51NESVSP","status-and-learning","Produce a dated, explicitly non-live Linear-to-Notion progress summary, or capture an outcome\u002Flearning after work completes. Use when asked to summarize progress to Notion, report portfolio status, or capture what was learned from a completed piece of work — not to disposition open follow-up items (see open-item-management for that). Never runs automatically or continuously — every summary is a deliberate, approved snapshot, not a live sync.","https:\u002F\u002Fgithub.com\u002FAndreHahm\u002Fandres-cc-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fworkmanagement-kit\u002Fskills\u002Fstatus-and-learning\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":18},"01M79QZNSKSABK7X2PT93X8QT5","repository-gates","Discover, delegate, record, and invalidate this repository's actual Git\u002FGitHub lifecycle gates (pre-commit, pre-push, PR required checks, Codex delta review, review requirements, merge rights) and the repository-policy provider profile that maps governed operations to git-kit. Use when asked what gates apply to this repository, to discover repository policy before starting Wave 2 work, or to check whether prior gate evidence is still valid after new commits. Discovery and delegation only — never executes a gate's own internal logic, and never invents a gate the repository doesn't actually define (in particular, never assumes a \"Review Changes\" gate exists).","https:\u002F\u002Fgithub.com\u002FAndreHahm\u002Fandres-cc-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fworkmanagement-kit\u002Fskills\u002Frepository-gates\u002FSKILL.md",[],[]]