Skip to content
Skill Authoring
Skill

/role-creator

Create and update Codex custom agents using standalone custom-agent TOML files.

From plugin
codex-skills
1k22 skills

Claude Code

$ npx -y skills add am-will/codex-skills --skill role-creator --agent claude-code

SKILL.md

role-creator.SKILL.md
name: role-creator
description: Create and update Codex custom agents using standalone custom-agent TOML files.

Role Creator

Overview

Use this skill to author, update, or troubleshoot custom Codex agents as standalone TOML files.

Current behavior:

  • Each custom agent is defined by one file:
  • Global: `~/.codex/agents/<agent-name>.toml`
  • Project: `<project>/.codex/agents/<agent-name>.toml`
  • The agent file is the role source of truth.
  • `~/.codex/config.toml` is only for global/runtime settings (for example `[agents]` thread limits), not per-role registration.

Non-Negotiable Inputs

Step 1 is required before writing files:

  • `name` (role identifier used by `agent_type`)
  • `description` (short, human-readable purpose)
  • `developer_instructions`
  • `model` (recommend `gpt-5.3-codex` unless requested)
  • `model_reasoning_effort` (`none|minimal|low|medium|high|xhigh`)
  • role scope (`global` or `project`)
  • output TOML path (canonical absolute path preferred)
  • whether to include `nickname_candidates` and exact values

Execution rule:

  • Do not infer required values.
  • Do not write until required inputs are explicitly confirmed.

Role file contract (current)

From Codex custom agent docs (`/codex/subagents`):

  • Required keys: `name`, `description`, `developer_instructions`.
  • Optional keys: `nickname_candidates`, `model`, `model_reasoning_effort`, `sandbox_mode`, `web_search`, `mcp_servers`, `skills.config`, etc.
  • `name` is the spawn identifier and source of truth.
  • `description` + `developer_instructions` define behavior and usage boundaries.
  • `nickname_candidates` is optional and used only for display.

`nickname_candidates` requirements:

  • Must be a non-empty list of unique values when present.
  • Allowed characters: ASCII letters, digits, spaces, hyphens, underscores.

Default policy for optional settings

  • Do not add sandboxing/MCP/web-search/model extras unless requested.
  • Keep generated files minimal by default.
  • If the user says "inherit defaults", omit optional keys instead of setting explicit values.

Workflow

1. Collect and confirm required inputs. 2. Resolve output path:

  • `global` → `~/.codex/agents/<name>.toml`
  • `project` → `<project>/.codex/agents/<name>.toml`

3. Create or update the file directly with required keys. 4. Validate TOML parse and required keys. 5. Return a ready-to-run example call:

{"agent_type":"<name>","message":"<task>"}

Commands

# 1) Write a standalone custom-agent file
/home/willr/Applications/skills/skills/role-creator/scripts/write_role_config.sh \
  --output ~/.codex/agents/reviewer.toml \
  --role-name reviewer \
  --description "PR reviewer focused on correctness, security, and risk." \
  --model gpt-5.4 \
  --reasoning high \
  --developer-instructions "Review code like an owner. Lead with concrete findings and residual risks."

# Optional: include nickname candidates for display
/home/willr/Applications/skills/skills/role-creator/scripts/write_role_config.sh \
  --output ~/.codex/agents/reviewer.toml \
  --role-name reviewer \
  --description "PR reviewer focused on correctness, security, and risk." \
  --model gpt-5.4 \
  --reasoning high \
  --developer-instructions "Review code like an owner. Lead with concrete findings and residual risks." \
  --nickname-candidates "Atlas,Delta,Echo" \
  --sandbox-mode read-only \
  --web-search disabled

Guardrails

  • If runtime returns `unknown agent_type`, verify the active scope and confirm the file exists at the expected path.
  • Check syntax first with `tomlq` or `tomlq -C`.
  • Keep role instructions operational and narrowly scoped to avoid drift.

References

  • Codex subagents docs: `https://developers.openai.com/codex/subagents`
  • Display nicknames: `https://developers.openai.com/codex/subagents#display-nicknames`
  • Reusable templates: `templates/`
Read more
@am-will
Ships withcodex-skills

A collection of Codex/agent skills for planning, documentation access, frontend development, and browser automation.

Stars on GitHub

Momentum

stars in total
1.0k
Star history of am-will/codex-skills on GitHub, a chart by star-history.com

Other skills on codex-skills.

agent-browser

agent-browser

A fast Rust-based headless browser automation CLI with Node.js fallback that enables AI agents to navigate, click, type, and…

create-hook

create-hook

Create or update Codex hooks for global or project scope by asking for scope and hook type when ambiguous, then writing the hook…

frontend-design

frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web…

gemini-computer-use

gemini-computer-use

Build and run Gemini 2.5 Computer Use browser-control agents with Playwright. Use when a user wants to automate web browser tasks…

More skills from other plugins.

gstack-openclaw-ceo-review

gstack-openclaw-ceo-re…

Use when asked to review a plan, challenge a proposal, run a CEO review, poke holes in an approach, think bigger about scope, or…

gstack3w138k
@garrytan@garrytanInstall Skill
book-to-skill

book-to-skill

Converts books and documents (PDF, EPUB, DOCX, HTML, Markdown, plain text, RTF, MOBI/AZW with Calibre) into structured agent…

@virgiliojr94@virgiliojr94Install Skill
distilly

distilly

Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…

@titanwings@titanwingsInstall Skill

Questions about role-creator.

Which coding agents can use role-creator?
role-creator installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.