Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
am-will avatar

Role Creator

  • 1.2k installs
  • 1k repo stars
  • Updated July 14, 2026
  • am-will/codex-skills

Role Creator is a CLI skill that enables developers to author, validate, and deploy custom Codex agents as standalone TOML configuration files with required behavior definitions and optional runtime settings.

About

Role Creator enables developers to define and update custom Codex agents through standalone TOML files stored globally (~/.codex/agents/<name>.toml) or per-project (<project>/.codex/agents/<name>.toml). The skill enforces a strict input-collection workflow: confirm name, description, developer_instructions, model, reasoning_effort, scope, and output path before writing. Generated files contain required keys (name, description, developer_instructions) plus optional fields (nickname_candidates, model, sandbox_mode, web_search, mcp_servers). Validation occurs post-write; ready-to-run JSON payloads are returned for immediate agent spawning.

  • Standalone TOML files serve as agent source of truth; no separate registration required
  • Mandatory input confirmation prevents inference errors and ensures explicit developer intent
  • Minimal default policy - optional keys omitted unless explicitly requested
  • Author and maintain custom Codex agents via standalone TOML configuration files
  • Author and maintain custom Codex agents via standalone TOML configuration files

Role Creator by the numbers

  • 1,152 all-time installs (skills.sh)
  • Ranked #938 of 16,556 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 3, 2026 (Skillselion catalog sync)
At a glance

role-creator capabilities & compatibility

Capabilities
agent scaffolding · toml generation · configuration validation · role definition
Use cases
code review · orchestration
Runs
Runs locally
Pricing
Free
npx skills add https://github.com/am-will/codex-skills --skill role-creator

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1.2k
repo stars1k
Security audit2 / 3 scanners passed
Last updatedJuly 14, 2026
Repositoryam-will/codex-skills

What it does

Author and maintain custom Codex agents via standalone TOML configuration files

Who is it for?

Developers building reusable Codex agents with narrowly scoped instructions and custom models; teams managing per-project or global agent libraries.

Skip if: Rapid ad-hoc agent testing; modifying core Codex runtime behavior; managing ~/.codex/config.toml global settings (threads, limits).

When should I use this skill?

Creating a new custom agent, updating agent behavior/instructions, validating agent TOML syntax, or deploying agents across global or project scopes.

What you get

A valid, scope-appropriate TOML agent file ready for immediate spawning via agent_type identifier.

  • Validated TOML agent configuration file
  • Ready-to-run JSON spawn payload (agent_type + message)
  • Syntax validation report

By the numbers

  • Three required keys: name, description, developer_instructions
  • Nickname_candidates must be non-empty list with unique ASCII-safe values when present
  • Two scopes supported: global (~/.codex/agents/) and project (<project>/.codex/agents/)

Files

SKILL.mdMarkdownGitHub ↗

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/

Related skills

How it compares

Pick role-creator over generic agent-prompt skills when you need schema-valid Codex TOML role wiring rather than ad-hoc system prompts.

FAQ

What inputs must I confirm before writing an agent file?

You must explicitly confirm: name (role identifier), description (human-readable purpose), developer_instructions, model (recommend gpt-5.3-codex), model_reasoning_effort (none|minimal|low|medium|high|xhigh), role scope (global or project), output TOML path, and whether to includ

Where are custom agent files stored?

Global agents: ~/.codex/agents/<agent-name>.toml. Project agents: <project>/.codex/agents/<agent-name>.toml. The agent TOML file is the sole source of truth; ~/.codex/config.toml is reserved for runtime settings only (e.g., thread limits).

What happens if the agent file is not found at runtime?

The runtime returns 'unknown agent_type'. Verify the active scope (global vs. project), confirm the file exists at the expected path, and check TOML syntax with tomlq or tomlq -C.

Is Role Creator safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

AI & Agent Buildingagentsautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.