custom-agent-definitions
БесплатноБез исполняемых скриптовНе проверенWrite and configure custom agent definitions in Claude Code agents/ directory. Use when creating an agent .md file, defining a specialized agent, or…
от laurigates★ 61 звезда на GitHubОб этом скилле
Custom Agent Definitions
Expert knowledge for defining and configuring custom agents in Claude Code.
For full worked YAML examples (isolated research agent, read-only explorer, complete security auditor, plugin layout, common patterns), see REFERENCE.md.
When to Use This Skill
| Use this skill when... | Use agent-teams instead when... |
|---|---|
Authoring a new .md agent definition file in .claude/agents/ |
Spawning multiple already-defined agents that coordinate as a team |
Configuring a single agent's model, tools, or isolation |
Setting up a lead/teammate architecture with a shared task list |
| Constraining tool access for a specialised read-only or write-restricted agent | Sequencing parallel work across worktrees (see parallel-agent-dispatch) |
| Writing the system prompt that defines what one agent does | Auditing existing agent definitions for security (see meta-audit) |
Core Concepts
Custom agents let you define specialized agent types beyond the built-in
ones (Explore, Plan, Bash, etc.). Each can have its own model, tools, and
isolation settings. They are defined in .claude/agents/ or via plugin
agents/ directories, with YAML frontmatter + a markdown system prompt:
---
name: my-custom-agent
description: What this agent does
model: sonnet
effort: low
tools: Bash, Read, Grep, Glob
---
# Agent System Prompt
Instructions and context for the agent...
Key Fields
Context: isolated by default
A named agent always starts in a fresh context: its own system prompt, the
brief the caller writes, CLAUDE.md, and any preloaded skills:. It does not see
the caller's conversation history, and no agent frontmatter field changes that.
| Want | Use |
|---|---|
| A delegate that keeps verbose work out of the main context | A named agent — isolation is the default, no field needed |
| A subagent that already knows the conversation so far | subagent_type: "fork" on the Agent call (on by default in -p, the SDK, desktop and VS Code since 2.1.302; CLAUDE_CODE_FORK_SUBAGENT=0 turns it off; claude mcp serve never offers it) |
context: fork is a skill frontmatter field that runs a skill body in a
new subagent. On an agent it is not a documented field, and Claude Code ignores
it without an error. See REFERENCE.md → Isolated research agent
and .claude/rules/agent-development.md § Context Isolation.
Tool Access (tools vs disallowedTools)
| Field | Purpose | Behavior |
|---|---|---|
tools |
Whitelist of permitted tools | Agent can ONLY use these tools |
disallowedTools |
Blacklist of forbidden tools | Agent can use all tools EXCEPT these |
Use disallowedTools for read-only agents, restricting dangerous capabilities,
and sandboxing. The two combine — an explicit whitelist plus a safety blacklist.
allowed-tools is the skill spelling of the whitelist: on an agent Claude
Code ignores it without an error, so the agent keeps every tool.
See REFERENCE.md → Read-only explorer.
Agent Field for Delegation
The agent field specifies which agent type to use when delegating via the Agent
tool, letting commands and skills name a preferred agent type:
agent: security-auditor
Agent Configuration Fields Reference
| Field | Type | Description |
|---|---|---|
name |
string | Agent identifier |
description |
string | What the agent does |
model |
string | opus, sonnet, haiku, fable, inherit, or a full model ID |
effort |
string | low, medium, high, xhigh, max — overrides the session effort while this agent runs; default inherits. The cost lever for mechanical delegates |
permissionMode |
string | default, acceptEdits, dontAsk, bypassPermissions, or plan |
maxTurns |
number | Maximum agentic turns before agent stops |
background |
bool | Set true to always run as a background task |
memory |
string | Persistent memory scope: user, project, or local |
skills |
list | Skill names to preload into agent context at startup |
mcpServers |
list | MCP server names available to this agent |
tools |
list | Tools the agent can use (in agents/ dir; use allowed-tools in skills) |
disallowedTools |
list | Tools the agent cannot use |
created / modified / reviewed |
date | Lifecycle dates |
Best Practices
- Principle of least privilege — grant only the tools the agent needs.
- Rely on default isolation — a named agent never sees the caller's conversation, so exploratory work stays out of the main context without any field. Only documented agent fields take effect; an unrecognized key, such as a skill's
context:, is ignored without an error. - Combine
tools+disallowedTools— explicit whitelist with a safety blacklist. - Clear descriptions — describe what the agent
Установить custom-agent-definitions в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(cat *)ReadWriteEditGlobGrepTodoWriteВложенные файлы
FAQ
Что делает скилл custom-agent-definitions?
Write and configure custom agent definitions in Claude Code agents/ directory. Use when creating an agent .md file, defining a specialized agent, or configuring agent tools.
Как установить скилл custom-agent-definitions?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл custom-agent-definitions запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic