Skip to content
Skillpedia
Documentation70k · #1719

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

https://github.com/code-yeongyu/oh-my-openagent/blob/dev/packages/omo-codex/plugin/components/rules/skills/rules/SKILL.md

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

Or 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.md
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
#1719
License
NOASSERTION
Updated
10/16/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills