rules
Helps your agent understand and explain Codex rules. It provides information on behavior, configuration, and rule file locations.
What it does
This tool helps the AI follow specific project rules. It ensures the AI understands and applies important instructions you define.
When to use it
- ✓When you want the AI to follow specific project instructions.
- ✓To configure how the AI should behave in certain situations.
- ✓When managing rules the AI must obey.
Example of what to ask your AI
“How should the AI behave with project rules?”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The tool inserts instructions at the start of each conversation and after the AI applies changes. It can also use rules from specific files to guide the AI.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add code-yeongyu/oh-my-openagent --skill rulesOr download just the file:
curl -L https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/dev/packages/omo-codex/plugin/components/rules/skills/rules/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Codex Rules
Codex Rules is automatic once the plugin is enabled. It injects:
- static project instructions on
SessionStartandUserPromptSubmit - matching file-specific rules after Codex
apply_patchby 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=1CODEX_RULES_MODE=both|static|dynamic|offCODEX_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.
FAQ
Where can I put the rules for the AI?
You can place rules in files like CONTEXT.md, or in folders like .omo/rules/, .claude/rules/, .cursor/rules/, .github/instructions/.
How do I disable this tool?
You can disable it by setting the environment variable CODEX_RULES_DISABLED=1.
Can I control which rules the AI uses?
Yes, you can use the environment variable CODEX_RULES_ENABLED_SOURCES to specify which rule files or folders should be used.
Details
Original description by the author
Use when the user asks about Codex Rules behavior, injected project rules, supported rule file locations, matching, or environment configuration.
Popularity
- GitHub stars
- 70k
- Ranking position
- #1719
- License
- NOASSERTION
- Updated
- 10/16/2026
Comments
- …
More skills from this repository
comment-checker
Helps your agent understand and respond to feedback from automatic comment checkers. It's useful when the agent needs to process information from tools that automatically review code or content.
code-yeongyu/oh-my-openagent
lcx-contribute-bug-fix
Helps your agent contribute bug fixes for LazyCodex-related projects. It creates issues or pull requests to ensure code quality.
code-yeongyu/oh-my-openagent
lcx-doctor
Lets your agent check the health of LazyCodex and Codex CLI installations. It's useful when the system behaves oddly after updates or changes.
code-yeongyu/oh-my-openagent
lcx-report-bug
Helps your agent report bugs in detail for LazyCodex projects. It creates issues with useful information for developers to fix the problem.
code-yeongyu/oh-my-openagent
Similar skills
architecture-decision-records
Has your agent record important project structure decisions. It helps to understand the reasoning behind choices and maintain a clear history of changes.
affaan-m/ECC
code-tour
Lets your agent create step-by-step code walkthroughs with exact file and line anchors. It's useful for project introductions, code explanations, or change reviews. Helps understand how a system works.
affaan-m/ECC
codebase-onboarding
Helps your agent analyze unfamiliar code and create an onboarding guide. It includes an architecture map, entry points, and conventions. Ideal for starting on a new project.
affaan-m/ECC