rules

star 62.5k

Use when the user asks about Codex Rules behavior, injected project rules, supported rule file locations, matching, or environment configuration.

code-yeongyu By code-yeongyu schedule Updated 6/3/2026

name: rules description: Use when the user asks about Codex Rules behavior, injected project rules, supported rule file locations, matching, or environment configuration.

Codex Rules

Codex Rules is automatic once the plugin is enabled. It injects:

  • static project instructions on SessionStart and UserPromptSubmit
  • matching file-specific rules after Codex apply_patch by default

Dynamic PostToolUse output is injected as additional context and is deduplicated per plugin data session. Codex Rules does not rewrite tool output.

Supported project sources:

  • CONTEXT.md
  • .omo/rules/**/*.md
  • .claude/rules/**/*.md
  • .cursor/rules/**/*.md
  • .github/instructions/**/*.md
  • .github/copilot-instructions.md

Supported environment knobs:

  • CODEX_RULES_DISABLED=1
  • CODEX_RULES_MODE=both|static|dynamic|off
  • CODEX_RULES_MAX_RULE_CHARS=<number>
  • CODEX_RULES_MAX_RESULT_CHARS=<number>
  • CODEX_RULES_ENABLED_SOURCES=CONTEXT.md,.omo/rules

The legacy PI_RULES_* variables are accepted as fallbacks for users migrating from pi-rules.

Install via CLI
npx skills add https://github.com/code-yeongyu/oh-my-openagent --skill rules
Repository Details
star Stars 62,464
call_split Forks 5,059
navigation Branch main
article Path SKILL.md
More from Creator
code-yeongyu
code-yeongyu Explore all skills →