原始内容
Codex CLI Setup (Skills Repo)
This repository contains ready‑to‑use skills for the Codex CLI.
Clone this repository, copy the skills into ~/.codex/skills, and Codex will automatically discover and use them in any project.
Currently, the main focus is the subagents skill, which teaches Codex how to spawn another Codex process (codex exec) as a nested “subagent”.
Demo
What’s in this repo
README.md– Main documentation for this setup (copy this file there).subagents/SKILL.md– Skill that:- Runs Codex as a non‑interactive subagent using
codex exec. - Reuses the current project and
AGENTS.mdinstructions. - Suppresses streaming logs by default (stderr →
/dev/null) and only shows the final message. - Turns logs back on when you need to debug a run.
- Uses a long
Runtool timeout (20 minutes) for subagent shell commands.
- Runs Codex as a non‑interactive subagent using
More skills can be added later in their own folders (for example, pdf-processing, project-review, etc.).
Prerequisites
- Codex CLI installed and available in your shell:
codex --version - A Git repository where you want to use Codex.
Installation
IMPORTANT!
The Skills feature is not in production yet (as of Dec 11, 2025); it is currently in alpha. To use it, follow these steps:
- Install the latest alpha version of the Codex CLI (e.g.,
0.70.0-alpha.2). - Enable the skills feature in your
~/.codex/config.toml:
[features]
web_search_request = true
skills = true
- Download the repository and place
subagents/SKILL.mdinto~/.codex/skills/:
git clone git@github.com:timurkhakhalev/codex-cli-setup.git
cd codex-cli-setup
mkdir -p ~/.codex/skills/subagents
cp subagents/SKILL.md ~/.codex/skills/subagents/SKILL.md
Run
codex, enter the/skillscommand, and you will see your new skill.Currently (as of Dec 11, 2025), the Codex CLI cannot run itself on macOS due to permission issues. Therefore, you must run the main Codex CLI agent with the
--yoloflag. On other operating systems, add the following to yourconfig.toml:
[sandbox_workspace_write]
writeable_roots = ["~/YOUR_USERNAME/.codex"]
sandbox_mode = "workspace-write"
Also, ensure you have write permissions for the ~/.codex directory:
sudo chown -R $(whoami) /Users/YOUR_USERNAME/.codex
Using the subagents skill
With the skill installed, Codex (the agent) can choose to call subagents when it wants to spin up a helper process. That helper:
- Runs via
codex execin non‑interactive mode (no command or edit approvals). - Uses
read-onlysandbox by default unless the flags say otherwise. - Appends
2>/dev/nullto hide streaming logs and only surface the final message, unless debugging. - Uses a
Runtool timeout of at least 20 minutes for thecodex execcommand.
Typical commands this skill is designed around:
# Automated refactor in the current project
codex exec --full-auto "Update all README links to HTTPS" 2>/dev/null
# Run in a specific project directory
codex exec --cd /path/to/project "Fix failing tests" 2>/dev/null
Extending this setup
If you add more skills:
- Create a new folder per skill (for example,
my-skill/SKILL.md). - Keep the skill prompts written as instructions to Codex, not to the end user.
- Optionally document each skill briefly here so people can see what this repo offers.
Once you’re happy with the set of skills, you can publish this repository to GitHub as your recommended Codex CLI setup.
Author
Timur Khakhalev
- Telegram channel: Тимур Хахалев про AI Coding
- X: @timurkhakhalev