agent-context-guide

Design layered AGENTS.md instruction architectures for Codex repositories.

Updated Mar 27, 2026
One-click install
npx skills add https://github.com/oozoofrog/codex-skills-project --skill agent-context-guide
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-context-guide
Source: https://github.com/oozoofrog/codex-skills-project/tree/main/plugins/agent-context/skills/agent-context-guide
Command: npx skills add https://github.com/oozoofrog/codex-skills-project --skill agent-context-guide

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It provides a scalable, layered instruction architecture for Codex by organizing governance rules and domain-specific guidance into a root AGENTS.md, nested AGENTS.md files, and optional AGENTS.override.md, while keeping background knowledge in lightweight CONTEXT.md or docs.

Core Features & Use Cases

  • Structured instruction management using a root AGENTS.md and domain-level nested AGENTS.md files to encapsulate domain rules.
  • Clear separation of concerns with root, nested, and override rules and a lightweight CONTEXT.md for background knowledge.
  • Lightweight references to supporting documents in the references directory to guide verification, token optimization, and best practices.

Quick Start

Create a root AGENTS.md with core rules, add a domain-level AGENTS.md, and optionally an AGENTS.override.md for exceptions, then document a lightweight CONTEXT.md for background knowledge.

Frequently Asked Questions about agent-context-guide

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure AGENTS.md files for Codex in a large repository?

Structure Codex instructions by creating a root AGENTS.md for core rules, adding nested AGENTS.md files in subdirectories for domain-specific guidelines, and optionally using AGENTS.override.md for exceptions to ensure scalable governance across large repositories.

What is the purpose of a nested AGENTS.md file?

A nested AGENTS.md file encapsulates domain-level rules and specific guidance within subdirectories, allowing large repositories to maintain clear separation of concerns between root governance and localized Codex instructions.

How do I separate background knowledge from governance rules in Codex instructions?

Keep background knowledge in a lightweight CONTEXT.md file or docs directory, while reserving AGENTS.md files strictly for governance rules and instruction architecture, linking supporting documents via references to optimize tokens.

When should I use an AGENTS.override.md file?

Use an AGENTS.override.md file to define exceptions to the root and nested AGENTS.md governance rules, allowing specific domain contexts to bypass or modify general instructions without altering the core architecture.

Does this layered AGENTS.md approach work for small projects?

This instruction architecture specifically targets large repositories needing scalable, domain-specific Codex guidance, so small projects with minimal domain contexts may find the layered root, nested, and override structure unnecessarily complex.

How do I optimize token usage when designing Codex instruction files?

Optimize tokens by keeping AGENTS.md files focused on rules, moving background context to lightweight CONTEXT.md files, and using link references to supporting documents in the references directory instead of inlining extensive documentation.