init-codex-config
Skill1 starsChanged 5 months agoMITView on GitHub
Scaffold or migrate a project to use agent-harness from Codex. Use when applying agent-harness in Codex, converting Claude Code setup to AGENTS.md/.codex/.agents, or making a project ready for Codex skills and hooks without changing the original Claude setup.
In this repository42 other files it gives its agents.
- codex/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- new-hookSkill
- new-ruleSkill
- new-skillSkill
- publishSkill
- agent-config-adapterSkill
- agent-update-watcherSkill
- autopilotSkill
- autoresearch-toolfinderSkill
- claude-desktop-sessionsSkill
- code-verifierSkill
- doc-writingSkill
- end-of-turn-markerSkill
- figma-authoring-constraintsSkill
- figma-design-fetchSkill
- autopilotSkill
- autoresearch-toolfinderSkill
- code-verifierSkill
- linux-freeze-triageSkill
- long-running-tasksSkill
- preview-templateSkill
- privacy-redactSkill
- research-criticSkill
- agent-harness-generalSkill
- system-cleanupSkill
- verify-templateSkill
- verify-visualSkill
- long-running-tasksSkill
- memory-flywheelSkill
- preview-templateSkill
- privacy-redactSkill
- prompt-librarySkill
- research-criticSkill
- system-cleanupSkill
- task-orchestratorSkill
- feature-audit-templateSkill
- workflow-fix-templateSkill
- task-relationship-analysisSkill
- tui-installerSkill
- verify-templateSkill
- verify-visualSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Do not edit .claude/ or CLAUDE.md unless the user explicitly asks for Claude Code changes too.
- Distinctive: line 39
If the user has not already provided answers, gather these decisions.
- Very specific: line 53
When the user says autorun, choose conservative defaults and continue unless a file overwrite, dependency install, network call, or …
- Very specific: line 64
If project hooks are selected, create .codex/hooks.json from this repository's root hooks.json, then rewrite every command to a stable …
- Very specific: line 66
If repo skills are selected, copy the relevant top-level Codex wrapper skill directories from this repository into .agents/skills/.
- Distinctive: line 68
If a template is selected, use the corresponding template directory as a source, but translate Claude-specific files:
- Distinctive: line 73
Add a short README note only when the project already has a README and the user wants provenance recorded.
- Distinctive: line 78
Run checks proportional to the files written:
- Distinctive: line 86
Do not claim that hooks or skills are active in the current Codex task until they have been installed in a discovered location and a real …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
init-codex-config
Apply agent-harness to a project for Codex. This is the Codex counterpart to
setup/init-agent-config/SKILL.md; read that source skill before adapting a
project, then translate only the selected pieces into Codex surfaces.
Preflight
- Locate this repository. Prefer the current plugin root; otherwise check
~/.claude/agent-harness. - Read:
../../docs/CODEX_ADAPTATION_PLAN.md../../INVENTORY.md../../rules/README.md../../setup/init-agent-config/SKILL.md
- Inspect the target project for existing
AGENTS.md,.codex/,.agents/skills,.claude/,CLAUDE.md, package manifests, and Git status. - Do not edit
.claude/orCLAUDE.mdunless the user explicitly asks for Claude Code changes too.
Decide the Codex surfaces
- Durable project guidance goes in
AGENTS.md, notCLAUDE.md. - Codex project hooks go in
.codex/hooks.json. - Repo-scoped Codex skills go in
.agents/skills/<skill-name>/SKILL.md. - User-wide Codex skills go in
~/.agents/skills. - Reusable distribution goes through
.codex-plugin/plugin.jsonand a marketplace entry. - MCP or app integrations belong in Codex MCP/app config, not in AGENTS.md.
Questions
If the user has not already provided answers, gather these decisions. In plan mode, use the available user-input tool. Outside plan mode, ask only the questions that affect file writes.
- Project type: Python research, static site, frontend app, or custom.
- Language policy: English, Chinese, bilingual, or leave unchanged.
- Context tags:
always,research-pkg,ui-project,static-site,ml-research,web-perf,image-or-video-work,docs-site,electron-or-desktop. - Which personal rules to include: output brevity, tool proactivity, no reread, writing style, human-readable output, autorun mode.
- Skill scope: repo
.agents/skillsor user~/.agents/skills. - Hook scope: project
.codex/hooks.json, user~/.codex/hooks.json, or no hooks. The tested local activation uses user hooks; do not also declare plugin hooks or the same command can run twice.
When the user says autorun, choose conservative defaults and continue unless
a file overwrite, dependency install, network call, or destructive operation
needs approval.
Compose for Codex
- Preserve any existing
AGENTS.md; merge additively or createAGENTS.md.bak.<date>before replacing. - Generate
AGENTS.mdwith concise instructions. Do not paste the full rule library. Include references to selected source rule files, for example:Rules source: ~/.claude/agent-harness/rules/phased-planning/RULE.md. - If project hooks are selected, create
.codex/hooks.jsonfrom this repository's roothooks.json, then rewrite every command to a stable absolute or git-root-based path. The root file is a source template, not an automatically discovered plugin hook. - If repo skills are selected, copy the relevant top-level Codex wrapper
skill directories from this repository into
.agents/skills/. - If a template is selected, use the corresponding template directory as a
source, but translate Claude-specific files:
CLAUDE.template.md-> summarizedAGENTS.md.claude/settings.template.json->.codex/hooks.json.claude/skills->.agents/skills
- Add a short README note only when the project already has a README and the user wants provenance recorded.
Verification
Run checks proportional to the files written:
jq emptyon every JSON file created or changed.python3 -c 'import tomllib; ...'for TOML files if present.rg -n "CLAUDE|\\.claude" AGENTS.md .codex .agentsto ensure Codex files do not accidentally claim to be Claude configuration, except in provenance text.git status --shortto report changed files.
Do not claim that hooks or skills are active in the current Codex task until they have been installed in a discovered location and a real lifecycle event or explicit invocation proves that task picked them up. Trusting a hook definition does not prove an already-running task rebuilt its lifecycle registry.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

