role-creator — Claude Code skill: what it does, how to install
Builds and updates Codex subagent definitions as standalone TOML files. Useful when you need isolated role configs with explicit model settings and developer instructions.
npx skills add am-will/codex-skills --skill role-creator -a claude-codeWhat role-creator does
This skill writes and manages custom agent configs for Codex without manual TOML editing. Each agent lives in its own file: either globally at ~/.codex/agents/<agent-name>.toml or per-project at <project>/.codex/agents/<agent-name>.toml. The main ~/.codex/config.toml file remains untouched, since it handles global runtime limits rather than individual role registries.
Before writing any files, the skill insists on explicit confirmation for the role name, description, developer instructions, model choice, and reasoning effort. It refuses to guess missing parameters on its own. This strict policy stops broken or half-configured agent definitions before they reach disk. It also supports optional display nicknames, sandbox modes, and web search flags via write_role_config.sh.
Once generated, the TOML file is verified using tomlq to prevent syntax bugs. If Codex subsequently reports an unknown agent_type error, the first thing to inspect is whether the file ended up in the project folder or the global agents directory.
What it helps with
- generate standalone TOML configs for custom Codex subagents
- configure developer instructions and model parameters per role
- set up project-scoped agents inside the local .codex directory
- validate custom agent TOML syntax before running tasks
Example prompts for the agent
- Create a global Codex reviewer agent with gpt-5.4 and high reasoning effort
- Set up a project-scoped security auditor agent in .codex/agents
- Update my custom agent to include display nicknames and disable web search
How to install role-creator
1Skills CLI (Vercel)
npx skills add am-will/codex-skills --skill role-creator -a claude-code2Manually: put the files in place
~/.claude/skills/role-creator/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/role-creator/
1Skills CLI (Vercel)
npx skills add am-will/codex-skills --skill role-creator -a codex2Manually: put the files in place
.agents/skills/role-creator/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add am-will/codex-skills --skill role-creator -a cursor2Manually: put the files in place
.cursor/skills/role-creator/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install am-will/codex-skills role-creator2Manually: put the files in place
.github/skills/role-creator/SKILL.md1Skills CLI (Vercel)
npx skills add am-will/codex-skills --skill role-creator -a gemini-cli2Platform CLI
gemini skills install https://github.com/am-will/codex-skills --path skills/role-creatorManually: put the files in place
.devin/skills/role-creator/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add am-will/codex-skills --skill role-creator -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about role-creator
How to install role-creator in Claude Code?
Run npx skills add am-will/codex-skills --skill role-creator -a claude-code. The skill file is placed in ~/.claude/skills/role-creator/SKILL.md.
What does role-creator do?
It creates, edits, and checks standalone TOML role definitions for Codex agents. It collects confirmed parameters, formats the configuration, and outputs a ready JSON payload to run the agent.
Where does role-creator place custom agent files?
Files are saved to ~/.codex/agents/<agent-name>.toml for global roles, or to <project>/.codex/agents/<agent-name>.toml when configured for a specific project.