jpskill.com
💬 コミュニケーション コミュニティ

role-creator

ユーザーが求める役割設定ファイルを作成し、必要な情報を聞き取りながら、利用可能なキーを適用して、モデルや推論の労力、開発者向け指示といった要素を適切に設定することで、カスタムエージェントの役割を構築・導入するSkill。

📜 元の英語説明(参考)

Create and install Codex custom agent roles in ~/.codex/config.toml, generate role config files, enforce supported keys, and guide users through required role inputs (model, reasoning effort, developer_instructions).

🇯🇵 日本人クリエイター向け解説

一言でいうと

ユーザーが求める役割設定ファイルを作成し、必要な情報を聞き取りながら、利用可能なキーを適用して、モデルや推論の労力、開発者向け指示といった要素を適切に設定することで、カスタムエージェントの役割を構築・導入するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o role-creator.zip https://jpskill.com/download/17153.zip && unzip -o role-creator.zip && rm role-creator.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17153.zip -OutFile "$d\role-creator.zip"; Expand-Archive "$d\role-creator.zip" -DestinationPath $d -Force; ri "$d\role-creator.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して role-creator.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → role-creator フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
5

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

ロールクリエーター

概要

このスキルは、ユーザーが [agents.<role>] とロールの config_file によって裏打ちされたカスタムサブエージェントロールを作成、更新、またはトラブルシューティングしたい場合に利用します。

このスキルは、ロールを ~/.codex/config.toml (またはユーザーが選択したプロジェクト設定) にインストールし、ロール固有の設定ファイルを書き込み、codex-rs/core/config.schema.json に対して主要なサポートを検証します。

デフォルトの動作は厳密な最小限です。ユーザーが追加のパラメータを明示的に要求しない限り、modelmodel_reasoning_effort、および developer_instructions のみ設定します。

デフォルトの場所は ~/.codex/config.toml ですが、ユーザーがプロジェクトスコープのロールを要求した場合、ロールはプロジェクトの .codex/config.toml にインストールされます。リポジトリ内のサブフォルダにもインストールできます。

交渉の余地がない入力

ステップ 1 は常にインプットの収集でなければなりません。書き込み/インストール/検証コマンドを実行する前に、以下を収集して確認してください。

  • model
  • model_reasoning_effort
  • developer_instructions
  • インストールスコープ (global または project)
  • role_name
  • description
  • role_config_file (絶対パスが推奨)

簡潔な質問をしてください。

  1. このロールはどのモデルを使用する必要がありますか? (推奨: gpt-5.3-codex)
  2. どのような推論努力を使用する必要がありますか? (推奨: medium; オプション medium|high|xhigh)
  3. ロールの開発者向け指示は何を優先すべきですか? (目標、境界、成功基準)
  4. グローバル (~/.codex/config.toml) またはプロジェクト (.codex/config.toml) にインストールしますか?
  5. サンドボックス、web_search、MCP、またはその他の制限が必要ですか?
  6. spawn_agent に表示されるロール名と説明は何にしますか?

実行ゲート:

  • 不足している必須値を推測しないでください。
  • 上記の必須入力がすべて明示的に提供されるか、ユーザーによってデフォルトとして明示的に受け入れられるまで、ステップ 2 (ファイルの書き込み) を開始しないでください。

オプションパラメータのデフォルトポリシー

  • 明示的に要求されない限り、サンドボックスフラグを設定しないでください。
  • 明示的に要求されない限り、web_search を設定しないでください。
  • 明示的に要求されない限り、MCP フラグ/エントリを設定しないでください。
  • 明示的に要求されない限り、他のオプションの config_file キーを追加しないでください。
  • ユーザーの意図が曖昧な場合は、オプションのキーを追加する前に、短い確認質問をしてください。

知識 vs アプリケーションルール

ロールクリエーターは、完全な構成の表面領域を知っている必要がありますが、ユーザーが要求したキーのみを適用する必要があります。

  • 必須の動作:
  • 役立つ場合は、利用可能なオプションのカテゴリを説明します。
  • ユーザーが何が可能かを尋ねる場合は、具体的な例/テンプレートを提供します。
  • デフォルトでは、生成された設定を最小限に抑えます。
  • オプションのキーは、ユーザーの明示的な要求がある場合にのみ追加します。
  • ユーザーが「デフォルトを維持/継承」と言う場合は、明示的な値を設定するのではなく、オプションのキーを省略します。

ロール設定の表面領域 (カスタマイズ可能なもの)

ロールの config_file は、完全な設定レイヤーとして解析されます。キーが省略されている場合、通常は親から継承されます。

  • モデルと推論:
  • model
  • model_reasoning_effort
  • model_reasoning_summary
  • model_verbosity
  • personality
  • コアの動作:
  • developer_instructions
  • サンドボックスと権限:
  • sandbox_mode
  • [sandbox_workspace_write] フィールド (例: network_accesswritable_roots)
  • ウェブ検索:
  • web_search (disabled|cached|live)
  • 機能の切り替え:
  • [features] キー (例: memory_toolshell_tool)
  • MCP サーバー:
  • [mcp_servers.<name>] エントリ (enabledrequiredcommandargsenv_vars)
  • アプリ/コネクタ:
  • [apps.<name>] エントリ (enabled)

ユーザーが高度なロールコントロールを要求する場合は、次の具体的な例を使用してください。

  • templates/minimal-role-config.toml
  • templates/restricted-role-config.toml
  • templates/full-role-config.toml
  • templates/frontend-architecture-role.toml

サポートされているロール宣言キー

[agents.<role_name>] では、次のキーのみがサポートされています。

  • description
  • config_file

[agents.<role_name>] の下に他のものを追加しないでください。

ワークフロー

  1. 必須入力を収集して確認します (ハードゲート)。
  • モデル、推論、開発者向け指示、インストールスコープ、ロール名、説明、およびロール設定ファイルのパスを尋ねます。
  • ユーザーが明示的に同意した場合にのみ、デフォルトを使用するかどうかを確認します。
  • このステップではファイルを書き込まないでください。
  1. 環境と解決されたパスを検証します。
  • リポジトリスキーマが存在することを確認します: codex-rs/core/config.schema.json
  • スコープから設定ターゲットを解決します:
  • global -> ~/.codex/config.toml
  • project -> <project>/.codex/config.toml
  1. ロール設定ファイルを作成または更新します。
  • scripts/write_role_config.sh を使用して、必須フィールドを書き込みます。
  • ユーザーが明示的に要求した場合にのみ、オプションのコントロールを追加します。
  • スクリプトでサポートされているオプションのコントロール:
  • sandbox_mode + ワークスペース書き込み設定
  • web_search モード (disabled に設定してウェブ検索を防止)
  • MCP コントロール (mcp_clearmcp_enablemcp_disable)
  • ユーザーがスクリプトフラグを超えるオプション (たとえば、model_reasoning_summaryfeaturesapps、リッチな MCP サーバー定義) を必要とする場合は、templates/ の下のテンプレートから開始して手動で編集し、検証を実行します。
  • 出力で明確に伝えます:
  • Configured now: 書き込まれたキー
  • Available but not set: 継承するために残された関連するオプションのキー
  1. メイン設定にロールをインストールします。
  • scripts/install_role.sh を使用します。
  • これにより、以下が書き込まれる/更新されます:
  • features.multi_agent = true
  • [agents.<role_name>] description/config_file
  • 付加的な安全性:
  • インストーラーはロール関連のキーのみを変更し、config.toml の残りの部分はそのままにします。
  • インストーラーは常に、書き込み前にターゲットの config.toml のタイムスタンプ付きバックアップを作成します。
  • 既存のロール定義は、--update-existing が渡されない限り上書きされません。
  1. 成功を報告する前に検証します。
  • scripts/validate_role.sh を使用します。
  • 必要なロール設定フィールドが存在することを確認します。
  • ロール宣言キーが description/config_file のみであることを確認します。
  • トップレベルのロール設定キーがスキーマに対して有効であることを確認します。
  1. 実行可能な spawn の例を共有します。
  • 例:
    {"agent_type":"<role_name>","message":"<task>"}

コマンド


# 1) ロール設定ファイルを書き込む (必須フィールドのみ; デフォルト

(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Role Creator

Overview

Use this skill when the user wants to create, update, or troubleshoot custom subagent roles backed by [agents.<role>] and a role config_file.

This skill installs the role into ~/.codex/config.toml (or a user-selected project config), writes the role-specific config file, and validates key support against codex-rs/core/config.schema.json.

Default behavior is strict-minimal: configure only model, model_reasoning_effort, and developer_instructions unless the user explicitly asks for additional parameters.

Default location is ~/.codex/config.toml however, if the user asks for a project scoped role, the role will be installed in the project's .codex/config.toml. Can also be installed to subfolders in a repo.

Non-Negotiable Inputs

Step 1 must always be input collection. Before running any write/install/validate command, collect and confirm:

  • model
  • model_reasoning_effort
  • developer_instructions
  • install scope (global or project)
  • role_name
  • description
  • role_config_file (absolute path preferred)

Ask concise questions:

  1. Which model should this role use? (recommend: gpt-5.3-codex)
  2. What reasoning effort should it use? (recommend: medium; options medium|high|xhigh)
  3. What should the role's developer instructions prioritize? (goal, boundaries, success criteria)
  4. Do you want this installed globally (~/.codex/config.toml) or in a project (.codex/config.toml)?
  5. Do you want any sandboxing, web_search, MCP, or other restrictions?
  6. What role name and description should be shown in spawn_agent?

Execution gate:

  • Do not infer missing required values.
  • Do not start Step 2 (writing files) until all required inputs above are explicitly provided or explicitly accepted as defaults by the user.

Default Policy For Optional Parameters

  • Do not set sandbox flags unless explicitly requested.
  • Do not set web_search unless explicitly requested.
  • Do not set MCP flags/entries unless explicitly requested.
  • Do not add any other optional config_file keys unless explicitly requested.
  • If user intent is ambiguous, ask a short clarification question before adding optional keys.

Knowledge vs Application Rule

The role creator must know the full configuration surface area, but must only apply keys the user asked for.

  • Required behavior:
  • Explain available optional categories when helpful.
  • Provide specific examples/templates when user asks what is possible.
  • Keep generated config minimal by default.
  • Add optional keys only with explicit user request.
  • If user says "keep defaults/inherit", omit optional keys rather than setting explicit values.

Role Config Surface Area (What Can Be Customized)

Role config_file is parsed as a full config layer. If a key is omitted, it generally inherits from the parent.

  • Model and reasoning:
  • model
  • model_reasoning_effort
  • model_reasoning_summary
  • model_verbosity
  • personality
  • Core behavior:
  • developer_instructions
  • Sandboxing and permissions:
  • sandbox_mode
  • [sandbox_workspace_write] fields like network_access, writable_roots
  • Web search:
  • web_search (disabled|cached|live)
  • Feature toggles:
  • [features] keys such as memory_tool, shell_tool
  • MCP servers:
  • [mcp_servers.<name>] entries (enabled, required, command, args, env_vars)
  • Apps/connectors:
  • [apps.<name>] entries (enabled)

When user asks for advanced role controls, use concrete examples from:

  • templates/minimal-role-config.toml
  • templates/restricted-role-config.toml
  • templates/full-role-config.toml
  • templates/frontend-architecture-role.toml

Supported Role Declaration Keys

For [agents.<role_name>], only these keys are supported:

  • description
  • config_file

Do not add anything else under [agents.<role_name>].

Workflow

  1. Collect and confirm required inputs (hard gate).
  • Ask for model, reasoning, developer instructions, install scope, role name, description, and role config file path.
  • Confirm whether to use defaults only if user explicitly agrees.
  • Do not write files in this step.
  1. Validate environment and resolved paths.
  • Ensure repo schema exists: codex-rs/core/config.schema.json
  • Resolve config target from scope:
  • global -> ~/.codex/config.toml
  • project -> <project>/.codex/config.toml
  1. Create or update role config file.
  • Use scripts/write_role_config.sh to write required fields.
  • Add optional controls only if the user explicitly requested them.
  • Optional controls supported by script:
  • sandbox_mode + workspace-write settings
  • web_search mode (set to disabled to prevent web search)
  • MCP controls (mcp_clear, mcp_enable, mcp_disable)
  • If user wants options beyond script flags (for example model_reasoning_summary, features, apps, rich MCP server definitions), start from a template under templates/ and edit manually, then run validation.
  • Communicate clearly in output:
  • Configured now: keys that were written
  • Available but not set: relevant optional keys left to inherit
  1. Install role in main config.
  • Use scripts/install_role.sh.
  • This writes/updates:
  • features.multi_agent = true
  • [agents.<role_name>] description/config_file
  • Additive safety:
  • Installer only mutates role-related keys and keeps the rest of config.toml intact.
  • Installer always creates a timestamped backup of the target config.toml before writing.
  • Existing role definitions are not overwritten unless --update-existing is passed.
  1. Validate before reporting success.
  • Use scripts/validate_role.sh.
  • Confirm required role-config fields are present.
  • Confirm role declaration keys are only description/config_file.
  • Confirm top-level role config keys are valid against schema.
  1. Share runnable spawn example.
  • Example:
    {"agent_type":"<role_name>","message":"<task>"}

Commands

# 1) Write role config file (required fields only; default behavior)
.codex/skills/role-creator/scripts/write_role_config.sh \
  --output ~/.codex/agents/researcher.toml \
  --role-name researcher \
  --model gpt-5.3-codex \
  --reasoning medium \
  --developer-instructions "Research code and docs only; no edits; return file:line evidence."

# 1b) Optional controls (only when explicitly requested)
.codex/skills/role-creator/scripts/write_role_config.sh \
  --output ~/.codex/agents/researcher.toml \
  --role-name researcher \
  --model gpt-5.3-codex \
  --reasoning medium \
  --developer-instructions "Research code and docs only; no edits; return file:line evidence." \
  --sandbox-mode workspace-write \
  --network-access false \
  --writable-roots "/home/willr/Applications/codex1" \
  --web-search disabled

# 2) Register role in ~/.codex/config.toml
.codex/skills/role-creator/scripts/install_role.sh \
  --role-name researcher \
  --description "Read-only codebase research specialist" \
  --role-config-file ~/.codex/agents/researcher.toml

# 2b) Intentionally update an existing role definition
.codex/skills/role-creator/scripts/install_role.sh \
  --role-name researcher \
  --description "Updated role description" \
  --role-config-file ~/.codex/agents/researcher.toml \
  --update-existing

# 3) Validate role config and declaration keys
.codex/skills/role-creator/scripts/validate_role.sh \
  --role-name researcher \
  --config ~/.codex/config.toml \
  --role-config ~/.codex/agents/researcher.toml \
  --schema /home/willr/Applications/codex1/codex-rs/core/config.schema.json

Guardrails

  • If runtime returns unknown agent_type, verify role exists in active config and config_file path exists/readable.
  • If runtime returns agent type is currently not available, inspect role file TOML validity and unsupported keys.
  • Keep instructions role-specific and operational (scope, do/don't, deliverable format).
  • Do not claim success without running validation.

References

  • Role key matrix and runtime behavior: references/role-config-reference.md
  • Reusable templates: templates/

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。