Personal Codex skills, custom agents, and global instructions tracked in Git.
This repository is the source of truth for:
- custom skills;
- custom agents;
- global
AGENTS.md.
Clone the repository:
mkdir -p ~/workspace
git clone git@github.com:rphlmr/codex.git ~/workspace/codex
cd ~/workspace/codexMake the management scripts executable:
chmod +x sync-skills.sh sync-agents-md.sh update-config.shPreview the recommended Codex configuration, then consent to applying it:
./update-config.shThe updater uses a pinned TOML patcher through npx, preserves existing values and formatting, displays an exact diff, and changes ~/.codex/config.toml only after an interactive confirmation. If the file already exists, it also creates a timestamped backup. Run ./update-config.sh --dry-run to preview without being prompted. After applying changes, restart Codex to ensure the new settings are loaded.
Synchronize skills, custom agents, and global instructions:
./sync-skills.sh
./sync-agents-md.shThe resulting layout is:
Git repository
│
~/workspace/codex
│
┌──────────────┼──────────────┐
│ │ │
skills/ agents/ AGENTS.md
│ │ │
copy copy copy
│ │ │
▼ ▼ ▼
~/.codex/skills/* ~/.codex/agents/* ~/.codex/AGENTS.md
Important
The sol_verifier custom agent requires a permission profile named workspace-safe. Define [permissions.workspace-safe] in ~/.codex/config.toml before using $verify-implementation; custom permission profile names must have a matching table. The updater above can add missing recommendations without replacing machine-specific choices.
The example below provides the required profile plus optional companion defaults for models, agents, features, and top-level permissions.
It configures:
- GPT-5.6 Sol with medium reasoning as the primary model;
- GPT-5.6 Luna with xhigh reasoning as the default subagent;
- automatic approvals disabled;
- workspace-scoped permissions;
- protection for common secret and credential files;
- network access restricted to explicitly allowed development domains;
#:schema https://developers.openai.com/codex/config-schema.json
model = "gpt-5.6-sol"
model_reasoning_effort = "medium"
personality = "pragmatic"
approval_policy = "never"
default_permissions = "workspace-safe"
[agents]
default_subagent_model = "gpt-5.6-luna"
default_subagent_reasoning_effort = "xhigh"
[features]
network_proxy = true
js_repl = false
prevent_idle_sleep = true
[permissions.workspace-safe]
extends = ":workspace"
[permissions.workspace-safe.filesystem.":workspace_roots"]
"**/.env.p*" = "deny"
"**/.env.s*" = "deny"
"**/.env.d*" = "deny"
# Private keys / certificates
"**/*.key" = "deny"
"**/*.pem" = "deny"
"**/*.p12" = "deny"
"**/*.pfx" = "deny"
"**/*.jks" = "deny"
"**/*.keystore" = "deny"
# SSH material accidentally stored in a repo
"**/id_rsa" = "deny"
"**/id_ed25519" = "deny"
"**/id_ecdsa" = "deny"
"**/id_dsa" = "deny"
# Common secret directories
"**/.ssh/**" = "deny"
"**/certs/**" = "deny"
"**/certificates/**" = "deny"
"**/secrets/**" = "deny"
[permissions.workspace-safe.network]
enabled = true
allow_local_binding = true
[permissions.workspace-safe.network.domains]
"localhost" = "allow"
"127.0.0.1" = "allow"
# npm / Yarn / pnpm / Bun / Deno npm: imports
"**.npmjs.org" = "allow"
# Pull-request package previews
"pkg.pr.new" = "allow"
"**.pkg.pr.new" = "allow"
# Deno / JSR packages
"**.jsr.io" = "allow"
# Node distributions / tooling that downloads Node
"**.nodejs.org" = "allow"
# Bun installer / Bun binaries
"**.bun.sh" = "allow"
# Playwright browser downloads
"**.playwright.dev" = "allow"
# Chromium / browser artifacts used by some tooling
"**.googleapis.com" = "allow"
"github.com" = "allow"
"**.github.com" = "allow"
"**.githubusercontent.com" = "allow"
"gitlab.com" = "allow"
"**.gitlab.com" = "allow"
"**.gitlab.io" = "allow"
"pypi.org" = "allow"
"**.pypi.org" = "allow"
"files.pythonhosted.org" = "allow"Restart Codex after changing the configuration to ensure all new settings, including permission profiles, are loaded. With approval_policy = "never", a missing domain or filesystem permission fails immediately instead of presenting an approval prompt.
The complete example is also stored in recommended-config.toml, which is the updater's source configuration.
.
├── AGENTS.md
├── agents/
│ ├── commit-message.toml
│ ├── future-architect.toml
│ ├── luna-implementer.toml
│ ├── pr-changelog.toml
│ ├── sol-implementer.toml
│ └── sol-verifier.toml
├── skills/
│ ├── commit-message/
│ │ ├── SKILL.md
│ │ └── agents/
│ │ └── openai.yaml
│ ├── final-implementation-plan/
│ ├── future-architect-mode/
│ ├── implement-plan/
│ ├── pr-changelog/
│ ├── session-handoff/
│ └── verify-implementation/
├── scripts/
│ └── update-config.mjs
├── recommended-config.toml
├── update-config.sh
├── sync-skills.sh
├── sync-agents-md.sh
└── README.md
| Skill | Purpose | Custom agent |
|---|---|---|
commit-message |
Generate one Conventional Commit message from the staged diff. | commit_message |
final-implementation-plan |
Finalize a completed Plan mode result into a self-contained implementation handoff. | None |
future-architect-mode |
Independently review an idea, design, architecture, or implementation plan. | future_architect |
implement-plan |
Execute a complete approved plan with one implementation agent. | Routes contract-heavy work to sol_implementer; narrow mechanical work to luna_implementer |
pr-changelog |
Generate PR/MR text, review prep, release notes, or a changelog from committed branch changes. | pr_changelog |
session-handoff |
Create a self-contained prompt for continuing established work in a fresh Codex session. | None |
verify-implementation |
Independently verify completed work against the approved plan and acceptance criteria. | sol_verifier |
The repository provides these custom agents:
| Definition | Agent name | Model and reasoning | Permissions |
|---|---|---|---|
agents/commit-message.toml |
commit_message |
GPT-5.6 Luna, low | Read-only |
agents/future-architect.toml |
future_architect |
GPT-5.6 Sol, medium | Read-only |
agents/luna-implementer.toml |
luna_implementer |
GPT-5.6 Luna, xhigh | Inherits the invoking workspace permissions |
agents/pr-changelog.toml |
pr_changelog |
GPT-5.6 Luna, medium | Read-only |
agents/sol-implementer.toml |
sol_implementer |
GPT-5.6 Sol, medium | Inherits the invoking workspace permissions |
agents/sol-verifier.toml |
sol_verifier |
GPT-5.6 Sol, medium | workspace-safe |
Always edit files in this repository.
Canonical paths:
~/workspace/codex/AGENTS.md
~/workspace/codex/agents/*
~/workspace/codex/skills/*
The copies under ~/.codex are generated from this repository and should not be treated as canonical.
Repository skills live under:
./skills/
sync-skills.sh copies them into:
~/.codex/skills/
Example:
~/workspace/codex/skills/commit-message
↓ copy
~/.codex/skills/commit-message
Only skills present in this repository are replaced.
Codex-managed content such as:
~/.codex/skills/.system
is left untouched.
Custom agent definitions live under:
./agents/
sync-skills.sh also copies them into:
~/.codex/agents/
Example:
~/workspace/codex/agents/sol-verifier.toml
↓ copy
~/.codex/agents/sol-verifier.toml
The canonical global instructions live at:
./AGENTS.md
sync-agents-md.sh copies them into:
~/.codex/AGENTS.md
sync-skills.sh synchronizes both:
skills/* → ~/.codex/skills/*
agents/* → ~/.codex/agents/*
It copies files and directories rather than using symlinks.
This means Codex always works with normal local files under ~/.codex.
The script:
- resolves the repository directory;
- creates
~/.codex/skillsif necessary; - creates
~/.codex/agentsif necessary; - copies every repository skill into
~/.codex/skills; - copies every repository custom agent into
~/.codex/agents; - replaces only entries whose names exist in this repository;
- leaves unrelated Codex files untouched.
For example, if the repository contains:
skills/commit-message
skills/pr-changelog
the script may replace:
~/.codex/skills/commit-message
~/.codex/skills/pr-changelog
but it does not remove:
~/.codex/skills/.system
or other unrelated entries.
sync-agents-md.sh synchronizes:
./AGENTS.md
↓
~/.codex/AGENTS.md
The script copies only when the contents differ.
Edit the repository version:
$EDITOR skills/commit-message/SKILL.mdThen synchronize:
./sync-skills.shReview and commit:
git diff
git add skills/commit-message
git commitEdit:
$EDITOR agents/sol-verifier.tomlSynchronize:
./sync-skills.shThen commit:
git diff
git add agents/sol-verifier.toml
git commitEdit:
$EDITOR AGENTS.mdSynchronize:
./sync-agents-md.shThen commit:
git diff
git add AGENTS.md
git commitCreate a new directory under:
skills/
For example:
skills/future-architect-mode/
├── SKILL.md
└── agents/
└── openai.yaml
Then run:
./sync-skills.shThe skill is copied to:
~/.codex/skills/future-architect-mode
Commit it:
git add skills/future-architect-mode
git commitCreate:
agents/new-agent.toml
Then run:
./sync-skills.shThe agent is copied to:
~/.codex/agents/new-agent.toml
Commit it:
git add agents/new-agent.toml
git commitRecord the current revision and pull the latest changes:
cd ~/workspace/codex
previous_revision="$(git rev-parse HEAD)"
git pull --ff-onlyReview the release notes and the commits received by the pull:
cat CHANGELOG.md
git log --oneline "$previous_revision..HEAD"
git diff --stat "$previous_revision..HEAD"Then synchronize:
./sync-skills.sh
./sync-agents-md.shRun the review commands before performing another Git operation that changes
HEAD. If the pull reports that the repository is already up to date, the log
and diff are empty.
Releases are automated by
Release Please. It uses
Conventional Commits merged into main to maintain CHANGELOG.md, update
version.txt, propose the next Semantic Version, create the Git tag, and publish
the GitHub Release.
Use these commit types for user-visible changes:
fix:proposes a patch release;feat:proposes a minor release;feat!:or aBREAKING CHANGE:footer proposes a breaking release.
Before v1.0.0, breaking changes increment the minor version. Other commit types,
such as docs:, test:, and chore:, do not trigger a release by themselves.
Do not edit release entries in CHANGELOG.md or versions in version.txt
manually. Release Please owns both files.
- Merge one or more Conventional Commits into
main. - The
Release PleaseGitHub Actions workflow opens or updates a release PR. - Review the proposed version and generated changelog in that PR.
- Merge the release PR when the changes should be published.
- The workflow creates the
vX.Y.Ztag and corresponding GitHub Release.
The repository is bootstrapped at 0.0.0, so the first merged feat: change
proposes v0.1.0.
In the repository, open Settings → Actions → General. Under Workflow
permissions, enable Read and write permissions and allow GitHub Actions to
create pull requests. The workflow uses the repository-provided GITHUB_TOKEN;
no custom secret is required.
If branch or tag protection rules are enabled, they must also allow the GitHub Actions bot to create the release PR and version tag.
The installation procedure is the same as the initial setup.
Clone the repository:
mkdir -p ~/workspace
git clone git@github.com:rphlmr/codex.git ~/workspace/codex
cd ~/workspace/codexMake the scripts executable:
chmod +x sync-skills.sh sync-agents-md.sh update-config.shThen synchronize:
./sync-skills.sh
./sync-agents-md.shSynchronization is intentionally one-way:
repository
↓
~/.codex
Changes made directly under:
~/.codex/skills
~/.codex/agents
~/.codex/AGENTS.md
may be overwritten the next time the corresponding sync script runs.
If you modify something directly under ~/.codex and want to keep it, copy the change back into the repository before synchronizing again.
This repository manages:
~/.codex/AGENTS.md
~/.codex/agents/*
~/.codex/skills/*
The interactive updater can merge missing recommendations into:
~/.codex/config.toml
Existing configuration values remain authoritative, so the optional companion configuration can still be maintained independently per machine. Unlike the one-way synchronization scripts, update-config.sh previews its changes and requires consent before writing.