rules
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.
Skill link
https://github.com/code-yeongyu/oh-my-openagent/blob/dev/packages/omo-codex/plugin/components/rules/skills/rules/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“How should the AI behave with project rules?”
5 new skills a week. 1 minute to read.
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.
Technical 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
- #3114
- License
- NOASSERTION
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
comment-checker
70kHelps your agent understand and respond to feedback from automatic comment checkers. Useful for processing results from automated code or content reviews.
lcx-contribute-bug-fix
70kHelps your agent contribute bug fixes for LazyCodex-related projects. It creates issues or pull requests to ensure code quality.
lcx-doctor
70kLets your agent check the health of LazyCodex and Codex CLI installations. It's useful when the system behaves oddly after updates or changes.
lcx-report-bug
70kHelps your agent report bugs in detail for LazyCodex projects. It creates issues with useful information for developers to fix the problem.
Similar skills
technical-documentation
394kHelps your agent write and review clear technical docs and agent instruction files, so people and AI tools can follow them easily.
architecture-decision-records
280kHas your agent record important project structure decisions. It helps to understand the reasoning behind choices and maintain a clear history of changes.
code-tour
280kLets your agent create step-by-step code walkthroughs with exact file and line references. Useful for intros, explanations, and reviews.