SuperAPI AI Directory

create-agent

Agents & models

View repository

Updated 10-15 21:40

About this skill

create-agent

Scaffold a new subagent definition as .claude/agents/<category>/<name>.md and automate up to the quality check.

Usage

/create-agent quality/lint-runner     # カテゴリ指定で作成
/create-agent research/doc-fetcher    # research カテゴリに追加
/create-agent author/template-writer  # author カテゴリに追加
/create-agent                         # 引数省略時はインタラクティブに確認

For the subagent template, refer to the sample/agent.sample.md bundled with this skill.

Category and model selection guidelines

Category Path Role Recommended model
research/ .claude/agents/research/ Research, information gathering, WebFetch sonnet
author/ .claude/agents/author/ Creation, editing (using Edit/Write/Bash) sonnet
quality/ .claude/agents/quality/ Review, lint, verification (read-only) sonnet(reasoning, review) / haiku(mechanical lint only)

model Detailed criteria

Use case model
Mechanical, aggregation, lint, frontmatter verification haiku
Reading comprehension, generation, review, research sonnet
Complex design decisions, architecture opus

tools Principle of least privilege

Agent category Allowed tools
Read-only (research/, quality/) Read・Glob・Grep only
Creation, editing (author/) The above + Edit・Write・Bash

Do not include Edit・Write・Bash を in read-only Agents。

subagent fallback (for skills add installation destinations)

The subagent delegated to by this skill (agent-author・frontmatter-linter) is from the Fandhe-AI/agent-cli-skills repository .claude/agents/ is assumed to be defined.If the corresponding subagent does not exist in the installation destination repository, do not delegate; instead, main directly executes the inputs, application rules, and required items described in each Step's delegation prompt to create the same deliverables。frontmatter-linter As an alternative to , manual confirmation of the verification perspectives in Step 4 is sufficient. Apply only the application rules (dotclaude-via-temp.md etc.) that exist at the installation destination, and if they do not exist, you may create them directly in .claude/agents/ .

Flow

Step 1: Confirm the category and responsibilities

From the arguments, parse <category>/<agent-name> .

  • Category is research/・author/・quality/ Confirm that it is one of the following
  • If a category other than the above is specified, confirm with the user and select an appropriate category
  • Confirm with the user the Agent's responsibilities (scope of responsibility, situations in which it is delegated to)

Step 2: Delegate to agent-author to create the file

Delegate to **agent-author (subagent_type: agent-author)** to create the file (if it does not exist, follow the "subagent fallback" and have main create it directly).

Important: agent-author は dotclaude-via-temp.md In accordance with ,_/dotclaude/agents/<category>/<name>.md place the final file via.claude/agents/ (do not write directly to ).

Delegation prompt example:

subagent_type: agent-author
prompt: |
  目的: <category>/<agent-name> のサブエージェント定義を作成する
  入力:
    - Agent 名: <agent-name>
    - カテゴリ: <category>(research/author/quality/)
    - 役割・責務: <ユーザーから受け取った内容>
    - 雛形: 本スキル同梱の sample/agent.sample.md
    - 既存 Agent の参考: .claude/agents/ 配下の既存ファイル
  出力先: .claude/agents/<category>/<agent-name>.md
  適用ルール:
    - .claude/rules/agent-authoring.md(frontmatter・tools 最小権限・カテゴリ配置・本文骨子)
    - .claude/rules/dotclaude-via-temp.md(_/dotclaude/ 経由で作成して mv で最終配置)
  必須項目:
    - frontmatter: name(kebab-case), description(委譲される場面を具体的に記載),
                   model(選定基準に従う), tools(最小権限の原則)
    - 本文: # Agent名 → ## 役割 → ## 対象スコープ → ## 遵守する規約 → ## 手順/観点 →
            ## 完了条件 → ## 報告フォーマット
    - 読み取り専用 Agent には Edit・Write・Bash を含めない

Step 3: Confirm model selection and tools configuration

agent-author Check the creation result of and verify the following.

  • model Whether is selected appropriately for the category and use case
  • tools Whether complies with the principle of least privilege
  • quality/ even though the category is Edit・Write・Bash is not included

Step 4: Validate with frontmatter-linter

Delegate validation to **frontmatter-linter (subagent_type: frontmatter-linter)** (if it does not exist, substitute manual checking from the perspectives below).

Validation perspectives:

  • name is correctly set in kebab-case
  • model is one of the specified values (haiku/sonnet/opus)
  • tools does not include anything exceeding least privilege
  • description specifically explains the situations in which it is delegated
  • .claude/agents/<category>/ is correctly placed

If there are problems, agent-author send it back for correction.

Step 5: Guide updating the Sub-agents table in CLAUDE.md

Once the Agent addition is complete, provide the following guidance.

✅ .claude/agents/<category>/<agent-name>.md を作成しました。

Agent の frontmatter 概要:
  name: <agent-name>
  model: <model>
  tools: [<tool-list>]

CLAUDE.md の Sub-agents 表・構造ツリーを更新するには:
  /update-docs
を実行してください。

このサブエージェントを呼び出すには、スキル内で以下を使用します:
  subagent_type: <agent-name>

Validation

  1. .claude/agents/<category>/<agent-name>.md confirm that it exists at the correct path (sinceagent-author consistently executes according to dotclaude-via-temp from temporary creation in _/dotclaude/agents/ up to .claude/agents/ to mv , there is no need to separately executecreate-agent on the mv side)
  2. frontmatter の name: field is <agent-name> confirm that it matches
  3. tools confirm that the list complies with the category's least privilege policy
  4. subagent_type: <agent-name> confirm that it is in a state where it can be called with

Notes

  • dotclaude-via-temp required: agent-author は .claude/agents/ do not write directly to_/dotclaude/agents/ , but execute consistently from temporary creation in .claude/agents/ to mv up tocreate-agent . There is no need to separately execute mv on the .claude/rules/dotclaude-via-temp.md)
  • rm -rf _/dotclaude is prohibited: rmdir delete only empty directories with (shared directories with other concurrent work)
  • tools of read-only Agents: research/ と quality/ for the category Edit・Write・Bash do not include
  • name resolution: subagent_type: invocation via is resolved by the frontmatter name: field. Even if the category is moved, no change to the invocation code is needed
  • Running update-docs: After adding an Agent, always /update-docs で CLAUDE.md update to the latest