Skip to content
Skillpedia
Documentation70k · #3114

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.md

Copy 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

Use this skill to help me: https://github.com/code-yeongyu/oh-my-openagent/blob/dev/packages/omo-codex/plugin/components/rules/skills/rules/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

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 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.

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.

repo: code-yeongyu/oh-my-openagent

Popularity

GitHub stars
70k
Ranking position
#3114
License
NOASSERTION
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills