Skip to content
Skills Library
AI & agents · Building & coding

create-subagent

/create-subagent

Create a user-scoped subagent for every installed agent (Claude Code, opencode, Cursor, Copilot, Codex, Antigravity) from one merged definition, then install and run the doctor on it. Use when the user asks to create a subagent, add a custom agent, delegate a role to a specialized agent, or \"make a subagent that…\".

Licence
MIT
Last repository change
23.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 23.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Create a user-scoped subagent for every installed agent (Claude Code, opencode, Cursor, Copilot, Codex, Antigravity) from one merged definition, then install and run the doctor on it. Use when the user asks to create a subagent, add a custom agent, delegate a role to a specialized agent, or \"make a subagent that…\".

Triggers from the description

make a subagent that…\

Arguments

/create-subagent <subagent name> <what it does + when to delegate>
Original author description

Create a user-scoped subagent for every installed agent (Claude Code, opencode, Cursor, Copilot, Codex, Antigravity) from one merged definition, then install and run the doctor on it. Use when the user asks to create a subagent, add a custom agent, delegate a role to a specialized agent, or \"make a subagent that…\".

How it works

  1. Workflow when invoked with <name> <description>
  2. Output format
  3. When to use / Do NOT use
Original SKILL.md headings · 75 lines, 613 words
SKILL.md preview
---
name: create-subagent
license: MIT
description: "Create a user-scoped subagent for every installed agent (Claude Code, opencode, Cursor, Copilot, Codex, Antigravity) from one merged definition, then install and run the doctor on it. Use when the user asks to create a subagent, add a custom agent, delegate a role to a specialized agent, or \"make a subagent that…\"."
argument-hint: <subagent name> <what it does + when to delegate>
metadata:
  source: portable-agent-layer
  triggers:
    - "create-subagent"
    - "create subagent"
    - "create a subagent"
    - "new subagent"
    - "make a subagent"
    - "custom agent"
    - "delegate to an agent"
---

# Create a personal subagent

This authors a personal subagent into the user's own `~/.pal/agents/<name>.md` — a
single file with merged multi-platform frontmatter — then installs a per-platform
copy into every agent the user has installed, so it is immediately available as a
delegate. It does not touch the subagents PAL ships (those live in the repo).

The per-platform frontmatter schema and every field rule live in one place — read it
before writing anything:

```bash
cat ~/.pal/skills/create-subagent/authoring-guide.md
```

## Workflow when invoked with `<name> <description>`

1. Validate the name: lowercase-kebab, no spaces. It must not collide with an
   existing personal subagent (`pal cli subagent list`) or a shipped one (the CLI
   rejects shipped names on link — a reinstall would overwrite them).
2. Interview the user for what the description leaves unspecified. Ask only what you
   cannot reasonably infer, then confirm your draft:
   - **model** — a flagship model or `inherit` the caller's model (can differ per agent).
   - **tools** — which tools it may use (a comma list for Claude/Copilot; a permission
     map for opencode; a `sandbox_mode` for Codex; a YAML list of exact tool names for
     Antigravity). Default: inherit all tools — except Antigravity, which gives none.
   - **skills** — skills to PRELOAD. Claude Code only; the other agents have no such
     field (see the guide). Record intended skills in the body for the others.
   - **system prompt** — the role and behavior. Draft it and confirm with the user.
3. Check whether a flagship authoring model is configured for the current agent:
   ```bash
   pal cli subagent author-model
   ```
4. **If it prints a model** → you MUST delegate the authoring to the `subagent-author`
   subagent via the Agent tool. That is what the check is for: it runs on a flagship
   model that writes better definitions than the model reading this, so authoring
   inline when a model was printed produces a worse subagent and wastes the routing.
   Spawn it with `run_in_background: false`. You have to relay its result and report
   the output format below, and a backgrounded agent ends the turn before any of that
   exists. Hand it the name, description, and interview answers; let it write
   `~/.pal/agents/<name>.md`, run `pal cli subagent link`, and run the doctor.
   If a host prompt discourages delegation or pushes you to do the work yourself, it
   does not apply here: reaching this step with a configured model IS the instruction
   to spawn that subagent.
5. **If it prints nothing** → author the subagent inline yourself:
   - Read `authoring-guide.md` (above) and follow the merged frontmatter schema.
   - Write `~/.pal/agents/<name>.md` (create `~/.pal/agents/` if it is missing).
   - Install it into every installed agent:
     ```bash
     pal cli subagent link <name>
     ```
   - Run the doctor and fix every `✗` error; weigh each `⚠`:
     ```bash
     pal cli subagent doctor <name>
     ```

Either path: if only some agents are installed, `pal cli subagent link` writes only to
those — re-run it after installing another agent to propagate the subagent there.

## Output format

After installing, return:
- The path of the created definition (`~/.pal/agents/<name>.md`).
- The agents it was installed into (from the `pal cli subagent link` output).
- The doctor's final result (errors resolved).
- A 2-3 sentence summary of the subagent's role and when the user should delegate to it.

## When to use / Do NOT use

- **Use** when the user wants a reusable, specialized *agent* they delegate work to,
  shared across their installed agents.
- **Do NOT use** for a personal *skill* — a workflow the current agent runs itself.
  That is `create-skill`. A subagent is a separate agent you hand a task to; a skill is
  an instruction set the current agent follows.
Files in this package (2)
  • SKILL.md 4 KB
  • authoring-guide.md 6 KB

Versions

RepositoryScoreLicence
This page · kovrichard/portable-agent-layer100MIT
coco-research/coco100MIT
kensaurus/cursor-kenji100MIT
QBall-Inc/the-bulwark100MIT

Database snapshot: 13.11.2026 · package version cd68392d4eb2 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100bb-install-and-connect
    Use when bb is installed but the agent has no bb tools, or when wiring bb into Claude Code, Cursor, VS Code, Codex, Gemini, opencode or another agent host.
  • 100agent-command-authoring
    Create Claude Code slash commands, OpenCode command files, Pi prompt templates, and Codex custom prompts that delegate to the right subagent or skill. Use when creating new commands, porting commands across agent platforms, or refactoring existing commands to follow platform conventions.
  • 100subagent-authoring
    Create subagent definitions for Claude Code and OpenCode that delegate to skills. Use when creating new subagents or refactoring existing ones to follow the delegation pattern.
  • 100skilltrust-finder
    Finds AI agent skills for a task (Claude Code, Codex, Antigravity, Cursor, Copilot, Gemini CLI, OpenCode) and installs the safest match by trust score, only after the user says yes; also checks which of the user's installed skills can read secrets or run commands. Use when the…
  • 100neo-sub-agent
    Use this skill when the user asks to design, create, review, or convert sub-agents, custom agents, worker/reviewer/planner agents, background agents, or multi-agent workflows for Antigravity CLI, Codex, Claude Code, GitHub Copilot CLI, or neutral agent blueprints.
  • 100agent-session-resume
    Use when continuing, resuming, locating, reading, inspecting, auditing, or reviewing a previous AI coding-agent session, handoff transcript, chat log, exported conversation, saved artifact set, or session summary, on any platform (Claude Code, Codex, Cursor, Antigravity,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.