Przejdź do treści
Biblioteka skilli
AI i agenci · Budowanie i kod

custom-agent-definitions

/custom-agent-definitions

Pomaga pisać i konfigurować definicje własnych agentów w katalogu agents/ w Claude Code, w tym ich narzędzia.

Repozytorium
claude-plugins ↗
Licencja
MIT
Ostatnia zmiana repozytorium
24.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
3
Przestarzałość

Brak sygnałów. Repozytorium zmienione 24.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Pomaga pisać i konfigurować definicje własnych agentów w katalogu agents/ w Claude Code, w tym ich narzędzia.

Oryginalny opis (EN)

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.

Jak działa

  1. When to Use This Skill
  2. Core Concepts
  3. Key Fields
  4. Agent Configuration Fields Reference
  5. Best Practices
  6. Quick Reference
  7. Related
Sekcje z nagłówków SKILL.md, w oryginale · 161 linii, 1 192 słów
Podgląd SKILL.md
---
name: custom-agent-definitions
description: 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.
user-invocable: false
allowed-tools: Bash(cat *), Read, Write, Edit, Glob, Grep, TodoWrite
created: 2026-01-20
modified: 2026-10-22
compatibility: claude-code
reviewed: 2026-09-23
---

# 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](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:

```yaml
---
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](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](REFERENCE.md#read-only-explorer-disallowedtools).

### 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:

```yaml
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

1. **Principle of least privilege** — grant only the tools the agent needs.
2. **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.
3. **Combine `tools` + `disallowedTools`** — explicit whitelist with a safety blacklist.
4. **Clear descriptions** — describe what the agent does and its boundaries.
5. **Model and effort** — pick the model by task shape. `opus` is the default
   for judgement work (review, debugging, multi-file edits, untrusted input).
   `fable` is for the hardest delegated reasoning. `sonnet` with an explicit
   `effort:` fits bounded work whose done check fits in one sentence and whose
   wrong answer is cheap to catch. `haiku` fits a lean read-only reader whose
   output a stronger stage checks. An agent's output re-enters the main loop,
   so a weaker model's output needs that check; escalate a miss to `opus`
   rather than retrying on the same model. `scripts/check-agent-model.sh`
   enforces the shape for plugin agents. See `.claude/rules/agent-development.md`
   § "Model Selection for Agents".
6. **Report failures loudly** — a dispatched agent that hits a wall must say so
   in its final message, never a one-word summary like `Terminal.` / `Done.` /
   `Stopped.` On a blocker it should commit and push its in-progress work, open a
   draft PR, and state exactly what stopped it and which tools were denied. A
   one-word surrender is indistinguishable from success to the orchestrator, so
   the work is silently cleaned up and lost (issue
   [#1422](https://github.com/laurigates/claude-plugins/issues/1422)). See
   `parallel-agent-dispatch` → "Loud-failure contract" for the dispatch-prompt
   form every brief should carry.

7. **Prefer a Skill-less agentType for read-only fan-out** — an agent that
   only reads files and emits structured output should NOT carry the `Skill`
   tool. Every `Skill`-bearing agent pays a ~25k-token `skill_listing` +
   `deferred_tools_delta` context tax before its first tool call, which can push
   read-heavy fan-out subagents over their context window. Use a lean read-only
   agent (e.g. `agents-plugin:review`) instead. See
   `parallel-agent-dispatch` → "Skill-less agentType for Read-Only Fan-Out"
   (issues
   [#1549](https://github.com/laurigates/claude-plugins/issues/1549) /
   [#1550](https://github.com/laurigates/claude-plugins/issues/1550)).

Worked YAML for each practice is in [REFERENCE.md → Best-practice snippets](REFERENCE.md#best-practice-snippets).

## Quick Reference

### Context Inheritance

| Dispatch | Sees the caller's conversation | Use Case |
|----------|--------------------------------|----------|
| Named agent (`subagent_type: "<name>"`) | No — brief only | Research, review, tool-bounded work |
| `subagent_type: "fork"` | Yes — the whole conversation | Side task that needs the prior context |

### Tool Restriction Patterns

| Pattern | Fields |
|---------|--------|
| Whitelist only | `tools: Tool1, Tool2` |
| Blacklist only | `disallowedTools: Tool1, Tool2` |
| Combined | Both fields specified |

## Related

- [REFERENCE.md](REFERENCE.md) — full worked YAML examples and snippets
- `agent-teams` — multi-agent coordination via the implicit team
- `parallel-agent-dispatch` — worktree preflight, scope budgets, loud-failure contract
- `meta-audit` — auditing existing agent definitions for security/completeness
- `.claude/rules/agent-development.md` — agent lifecycle and field semantics
Pliki w paczce (2)
  • REFERENCE.md 4 KB
  • SKILL.md 8 KB

Wersje

W bazie nie ma innych skilli o nazwie custom-agent-definitions.

Migawka bazy z 28.10.2026 · wersja paczki 3ed9a1317d7f (skrót SHA-256 całej paczki)

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100custom-agent
    Tworzy, weryfikuje i ulepsza pliki własnych agentów Claude Code.
  • 100custom-agent
    Tworzy, weryfikuje i ulepsza pliki własnych agentów Claude Code.
  • 95writing-for-agents
    Pomaga pisać skille, definicje agentów, AGENTS.md, CLAUDE.md i dokumenty referencyjne przeznaczone dla agentów.
  • 96meta-agent-config
    Pomaga tworzyć i konfigurować agentów Claude Code wraz z ich frontmatterem.
  • 100create-custom-agent
    Tworzy pliki .agent.md z własnymi agentami VS Code: persony z narzędziami, instrukcjami i przekazaniami między agentami.
  • 100creating-custom-agents
    Tworzy niestandardowych agentów GitHub Copilot (.agent.md) dla VS Code: rola, minimalny zestaw narzędzi, odwołania do skilli i gotowe przykłady z regułami współpracy.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.