Command Palette

Search for a command to run...

Назад к скиллам
скилл № 59193

pan-subagent-creator

Create custom Claude Code subagents with isolated context windows, specific tool permissions, and specialized prompts. Use when users want to create a new…

БесплатноЗапускает вложенные скрипты
eltmonот eltmon★ 36 звёзд на GitHub

Установить pan-subagent-creator в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Subagent Creator

Create specialized subagents that handle specific tasks with their own context windows, system prompts, and tool permissions.

What Are Subagents?

Subagents are mini-agents with:

  • Independent context window - Keep exploration out of main conversation
  • Custom system prompt - Specialized behavior and expertise
  • Scoped tool permissions - Least-privilege access
  • Model selection - Cost optimization (Haiku for read-only, Sonnet for complex)

Claude delegates to subagents via the Task tool based on matching descriptions.

Subagent Anatomy

Subagents are Markdown files with YAML frontmatter:

---
name: code-reviewer
description: Expert code review. Use proactively after code changes.
tools: Read, Grep, Glob, Bash
model: sonnet
---

You are a senior code reviewer focusing on quality, security, and best practices.

[Instructions for the subagent...]

Frontmatter Fields

Field Required Description
name Yes Unique identifier (lowercase, hyphens allowed)
description Yes When Claude should delegate - this is how Claude decides
tools No Allowed tools (inherits all if omitted)
disallowedTools No Tools to explicitly deny
model No haiku, sonnet, opus, or inherit (default: sonnet)
permissionMode No default, acceptEdits, dontAsk, bypassPermissions, plan
skills No Skills to load at startup
hooks No Lifecycle hooks for validation

Storage Locations

Location Scope Use Case
.claude/agents/ Current project Team-shared subagents
~/.claude/agents/ All projects Personal, reusable subagents
CLI --agents flag Current session Quick testing

Model Selection for Cost

Model Cost Best For
Haiku Lowest Read-only exploration, simple validation
Sonnet Medium Most tasks, good balance
Opus Highest Complex reasoning, critical decisions
inherit Parent's Match main conversation

Permission Modes

permissionMode: default        # Normal permission prompts
permissionMode: acceptEdits    # Auto-accept file edits
permissionMode: dontAsk        # Auto-deny all prompts
permissionMode: bypassPermissions  # Skip all checks (dangerous)
permissionMode: plan           # Read-only exploration mode

Common Tool Sets

Read-only agents:

tools: Read, Grep, Glob

Code review agents:

tools: Read, Grep, Glob, Bash

Full development agents:

tools: Read, Write, Edit, Bash, Grep, Glob

Restricted bash (specific commands only):

tools: Read, Grep, Glob, Bash(git status:*), Bash(git diff:*)

Creation Process

Step 1: Define Purpose

  • What specific task does this agent handle?
  • What expertise should it have?
  • What tools does it need (minimum necessary)?

Step 2: Write Description

The description is how Claude decides when to delegate. Make it specific:

Good: "Expert database query optimizer. Analyzes SQL queries for performance issues, suggests indexes, and rewrites slow queries."

Bad: "Helps with database stuff."

Step 3: Create Agent File

# Project-level (shared with team)
mkdir -p .claude/agents
touch .claude/agents/my-agent.md

# User-level (personal)
mkdir -p ~/.claude/agents
touch ~/.claude/agents/my-agent.md

Step 4: Write Instructions

Use imperative voice. Be specific about:

  • What the agent should do when invoked
  • How to structure output
  • What to avoid
  • Error handling

Step 5: Test Delegation

Try prompts that should and shouldn't trigger the agent. Refine description if needed.

Example: Code Reviewer

---
name: code-reviewer
description: Expert code review specialist. Reviews code for quality, security, and maintainability. Use proactively after code changes or when user asks for review.
tools: Read, Grep, Glob, Bash
model: inherit
---

You are a senior code reviewer ensuring high standards.

When invoked:
1. Run `git diff` to see recent changes
2. Focus on modified files
3. Begin review immediately

Review checklist:
- Code is clear and readable
- Functions and variables are well-named
- No duplicated code
- Proper error handling
- No exposed secrets or API keys
- Input validation present
- Good test coverage
- Performance considered

Provide feedback by priority:
- **Critical** (must fix)
- **Warning** (should fix)
- **Suggestion** (consider)

Include specific examples of how to fix issues.

Example: Database Read-Only Agent with Hooks

---
name: db-reader
description: Execute read-only database queries. Use when user needs data analysis without modification risk.
tools: Bash
model: haiku
hooks:
  PreToolUse:
    - matcher: "Bash"
      hooks:
        - type: command
          command: "./scripts/validate-readonly.sh"
---

You are a
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • assets/validate-readonly-query.sh
  • references/example-agents.md
  • scripts/init_agent.py

FAQ

Что делает скилл pan-subagent-creator?

Create custom Claude Code subagents with isolated context windows, specific tool permissions, and specialized prompts. Use when users want to create a new subagent, configure agent delegation, set up task-specific agents, or define specialized assistants. Triggers on "create a subagent", "make a custom agent", "define an agent", "agent configuration", or "Task tool agent".

Как установить скилл pan-subagent-creator?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл pan-subagent-creator запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить pan-subagent-creator с