# role-creator

Builds and updates Codex subagent definitions as standalone TOML files. Useful when you need isolated role configs with explicit model settings and developer instructions.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1200 installs · ★ 1039
- Author: am-will
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/am-will/codex-skills/tree/HEAD/skills/role-creator/SKILL.md
- Updated: 2026-07-14
- HTML: https://affpapa.org/en/nevibecode/skills/role-creator

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add am-will/codex-skills --skill role-creator -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/role-creator/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/role-creator/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add am-will/codex-skills --skill role-creator -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/role-creator/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add am-will/codex-skills --skill role-creator -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/role-creator/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install am-will/codex-skills role-creator
```

2. **Manually: put the files in place**
- File: `.github/skills/role-creator/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add am-will/codex-skills --skill role-creator -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/am-will/codex-skills --path skills/role-creator
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/role-creator/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add am-will/codex-skills --skill role-creator -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/am-will/codex-skills/tree/HEAD/skills/role-creator/SKILL.md

## When to use it
- 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
- 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

## Similar
- [bmad-customize](https://affpapa.org/en/nevibecode/skills/bmad-customize.md) — skill · 11200 installs
- [azure-role-selector](https://affpapa.org/en/nevibecode/skills/azure-role-selector.md) — skill · 9399 installs
- [Post-Implementation Audit Agent Role](https://affpapa.org/en/nevibecode/prompts/post-implementation-audit-agent-role.md) — prompt · ★ 174597
- [skill-creator](https://affpapa.org/en/nevibecode/skills/starchild-ai-agent-skill-creator.md) — skill · 7800 installs
- [semgrep-rule-variant-creator](https://affpapa.org/en/nevibecode/skills/semgrep-rule-variant-creator.md) — skill · 5300 installs
- [prd-creator](https://affpapa.org/en/nevibecode/skills/prd-creator.md) — skill · 5100 installs

From the same set: [am-will/codex-skills](https://affpapa.org/en/nevibecode/by/am-will/codex-skills.md) — 13 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
