Audit the project's real recurring workflows before recommending skills. Prefer evidence from memory, rollout summaries, existing skill folders, and current repo conventions over generic brainstorming.
Recommend updates before new skills when an existing project skill is already close to the needed behavior.
Map the current project surface.
Identify the repo root and read the most relevant project guidance first, such as AGENTS.md, README.md, roadmap/ledger files, and local docs that define workflows or validation expectations.
Build the memory/session path first.
Resolve the memory base as $CODEX_HOME when set, otherwise default to ~/.codex.
Use these locations:
$CODEX_HOME/memories/MEMORY.md or ~/.codex/memories/MEMORY.md
$CODEX_HOME/memories/rollout_summaries/
$CODEX_HOME/sessions/ or ~/.codex/sessions/
Read project past sessions in this order.
If the runtime prompt already includes a memory summary, start there.
Then search MEMORY.md for:
cwd
Scan existing project-local skills before suggesting anything new. Check these locations relative to the current repo root:
.agents/skills
.codex/skills
skills
Read both SKILL.md and agents/openai.yaml when present.Compare project-local skills against recurring work. Look for repeated patterns in past sessions:
Separate new skill from update existing skill.
Recommend an update when an existing skill is already the right bucket but has stale triggers, missing guardrails, outdated paths, weak validation instructions, or incomplete scope.
Recommend a new skill only when the workflow is distinct enough that stretching an existing skill would make it vague or confusing.
Check for overlap with global skills only after reviewing project-local skills.
Use $CODEX_HOME/skills and $CODEX_HOME/skills/public to avoid proposing project-local skills for workflows already solved well by a generic shared skill.
Do not reject a project-local skill just because a global skill exists; project-specific guardrails can still justify a local specialization.
MEMORY.md with rg using the repo name, basename, and cwd.memories/rollout_summaries/.cwd, or keywords match the current project.sessions/ JSONL files if rollout summaries are missing a concrete detail.cwd
new skill should correspond to a repeated workflow, not just a repeated topic.skill update should correspond to a workflow already covered by a local skill whose triggers, guardrails, or validation instructions no longer match the recorded sessions.Recommend a new skill when:
Recommend an update when:
SKILL.md and agents/openai.yaml drift from each otherDo not recommend a skill when:
Past sessions and memory:
$CODEX_HOME/memories/MEMORY.md or ~/.codex/memories/MEMORY.md
$CODEX_HOME/sessions or ~/.codex/sessions JSONL files only if summaries are insufficientProject-local skill surface:
./.agents/skills/*/SKILL.md
./.agents/skills/*/agents/openai.yaml
./.codex/skills/*/SKILL.md
./skills/*/SKILL.md
Project conventions:
AGENTS.md
README.md
Return a compact audit with:
Existing skills
List the project-local skills found and the main workflow each one covers.
Suggested updates
For each update candidate, include:
Suggested new skills
For each new skill, include:
Priority order
Rank the top recommendations by expected value.
If the user asks to actually create or update one of the recommended skills, switch to $skill-creator and implement the chosen skill rather than continuing the audit.