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

agent-authoring

/agent-authoring

Tworzy i konfiguruje subagenty Claude Code: pola frontmatter, ograniczenia narzędzi, wybór modelu, hooki, pamięć i preładowanie skilli według oficjalnych dobrych praktyk Anthropic.

Licencja
MIT
Ostatnia zmiana repozytorium
21.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
3
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 21.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

Tworzy i konfiguruje subagenty Claude Code: pola frontmatter, ograniczenia narzędzi, wybór modelu, hooki, pamięć i preładowanie skilli według oficjalnych dobrych praktyk Anthropic.

Wyzwalacze z opisu

create agentsubagentcustom agent.claude/agentsagent filedelegate taskisolated contextagent memory
Oryginalny opis (EN)

Creates and configures Claude Code subagents (custom agents). Covers frontmatter fields, tool restrictions, model selection, hooks, memory, skills preloading, and common patterns. Follows official Anthropic best practices. USE WHEN: user mentions "create agent", "subagent", "custom agent", ".claude/agents", "agent file", "delegate task", "isolated context", "agent memory", "agent hooks" DO NOT USE FOR: creating skills - use `skill-authoring`; creating hooks standalone - use `hook-authoring`; creating MCP servers - use `mcp-authoring`

Jak działa

  1. File Structure
  2. YAML Frontmatter — All Fields
  3. System Prompt (Body)
  4. Description — Critical for Delegation
  5. Key Design Decisions
  6. Common Patterns
  7. Memory
  8. Anti-Patterns
  9. Checklist
  10. Reference
Sekcje z nagłówków SKILL.md, w oryginale · 149 linii, 750 słów
Podgląd SKILL.md
---
name: agent-authoring
description: |
  Creates and configures Claude Code subagents (custom agents). Covers frontmatter
  fields, tool restrictions, model selection, hooks, memory, skills preloading,
  and common patterns. Follows official Anthropic best practices.

  USE WHEN: user mentions "create agent", "subagent", "custom agent", ".claude/agents",
  "agent file", "delegate task", "isolated context", "agent memory", "agent hooks"

  DO NOT USE FOR: creating skills - use `skill-authoring`;
  creating hooks standalone - use `hook-authoring`;
  creating MCP servers - use `mcp-authoring`
allowed-tools: Read, Grep, Glob, Write, Edit
---
# Agent/Subagent Authoring — Official Best Practices

## File Structure

Agents are Markdown files with YAML frontmatter. The body becomes the system prompt.

```
.claude/agents/my-agent.md     # Project-scoped (commit to VCS)
~/.claude/agents/my-agent.md   # User-scoped (all projects)
```

## YAML Frontmatter — All Fields

See [quick-ref/frontmatter-reference.md](quick-ref/frontmatter-reference.md) for detailed field docs.

```yaml
---
name: code-reviewer                # Required. Lowercase + hyphens
description: |                     # Required. When Claude should delegate
  Expert code review specialist. Use proactively after code changes.
tools: Read, Grep, Glob, Bash     # Allowlist (inherits all if omitted)
disallowedTools: Write, Edit       # Denylist (removed from inherited/allowed)
model: sonnet                      # sonnet | opus | haiku | inherit (default)
permissionMode: default            # default | acceptEdits | dontAsk | bypassPermissions | plan
maxTurns: 50                       # Max agentic turns before stopping
skills:                            # Skills preloaded into context at startup
  - api-conventions
  - error-handling
mcpServers:                        # MCP servers available to this agent
  - slack                          # Reference existing server by name
memory: user                       # user | project | local — persistent memory
background: false                  # true = always run as background task
isolation: worktree                # Run in temporary git worktree
hooks:                             # Lifecycle hooks (scoped to this agent)
  PreToolUse:
    - matcher: "Bash"
      hooks:
        - type: command
          command: "./scripts/validate.sh"
---
```

## System Prompt (Body)

The markdown body IS the system prompt. Subagents receive ONLY this + basic env details (cwd, etc.), NOT the full Claude Code system prompt.

**Effective prompt structure:**
```markdown
You are a [role] specializing in [domain].

When invoked:
1. [First action]
2. [Second action]
3. [Third action]

[Domain-specific checklist or criteria]

Provide feedback organized by:
- Critical issues (must fix)
- Warnings (should fix)
- Suggestions (consider)

Include specific examples of how to fix issues.
```

## Description — Critical for Delegation

Claude delegates based on the description. Include "Use proactively" to encourage automatic delegation.

**Good:** `"Expert code review specialist. Use proactively after code changes."`
**Bad:** `"Reviews code"` — too vague, Claude won't know when to delegate.

## Key Design Decisions

### When to use agents vs skills vs main conversation

| Use Case | Mechanism |
|----------|-----------|
| Verbose output you don't need in main context | Agent |
| Enforce tool restrictions | Agent |
| Self-contained work returning a summary | Agent |
| Reusable knowledge/instructions inline | Skill |
| Frequent back-and-forth needed | Main conversation |
| Quick, targeted changes | Main conversation |

### Model selection

| Model | Use for |
|-------|---------|
| `haiku` | Fast exploration, simple search, low-cost |
| `sonnet` | Balanced — code review, analysis, most tasks |
| `opus` | Complex reasoning, architecture decisions |
| `inherit` | Same as main conversation (default) |

### Tool restrictions

- Read-only agent: `tools: Read, Grep, Glob, Bash`
- Full capabilities: omit `tools` (inherits all)
- Block specific tools: `disallowedTools: Write, Edit`
- Restrict spawning: `tools: Agent(worker, researcher), Read`

## Common Patterns

See [quick-ref/patterns.md](quick-ref/patterns.md) for detailed examples.

**Code reviewer** — Read-only, focused on quality
**Debugger** — Can edit, diagnosis-to-fix workflow
**Domain expert** — Specialized knowledge (data science, security)
**Parallel research** — Multiple agents exploring independently
**Chain** — Sequential agents, each building on previous results

## Memory

When `memory` is set, the agent gets a persistent directory across sessions.

| Scope | Location | Use when |
|-------|----------|----------|
| `user` | `~/.claude/agent-memory/<name>/` | Learnings across all projects |
| `project` | `.claude/agent-memory/<name>/` | Project-specific, shareable via VCS |
| `local` | `.claude/agent-memory-local/<name>/` | Project-specific, not committed |

The agent automatically gets Read/Write/Edit tools + instructions for managing MEMORY.md.

**Tip:** Include in prompt: "Update your agent memory as you discover patterns, codepaths, and architectural decisions."

## Anti-Patterns

| Anti-Pattern | Fix |
|--------------|-----|
| Too many responsibilities | One agent, one job. Create separate agents for different tasks |
| No description or vague description | Detailed description with "use proactively" |
| Overly permissive tools | Grant only what's needed |
| Expecting subagents to spawn subagents | Not supported. Use chains from main conversation |
| Forgetting subagents lose parent context | They start fresh. Preload skills or provide full instructions |

## Checklist

- [ ] `name` and `description` set (both required)
- [ ] Description explains WHEN to delegate, not just what
- [ ] Tools restricted to minimum necessary
- [ ] Model chosen based on task complexity
- [ ] System prompt has clear workflow steps
- [ ] Tested with real scenarios
- [ ] Committed to `.claude/agents/` (project) or `~/.claude/agents/` (user)

## Reference
- [All frontmatter fields](quick-ref/frontmatter-reference.md)
- [Common agent patterns](quick-ref/patterns.md)
Pliki w paczce (3)
  • SKILL.md 6 KB
  • quick-ref/frontmatter-reference.md 4 KB
  • quick-ref/patterns.md 4 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · claude-dev-suite/claude-dev-suite100MIT
fabiensalles/claude-marketplace95MIT

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

Pobrania w ostatnich 30 dniach: 0 · ranking

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

Podobne skille

  • 100skill-authoring
    Tworzy i ulepsza skille Claude Code (pliki SKILL.md): frontmatter, opisy, progresywne ujawnianie, dołączone zasoby i wytyczne treści, zgodnie z oficjalnymi dobrymi praktykami Anthropic.
  • 100plugin-authoring
    Tworzy wtyczki Claude Code pakujące skille, agentów, hooki i serwery MCP w dystrybuowalne paczki: manifest plugin.json, struktura katalogów, przestrzenie nazw i dystrybucja.
  • 100creating-skills
    Prowadzi przez tworzenie skilli Claude Code według oficjalnych dobrych praktyk Anthropic: struktura, pola frontmattera, nazewnictwo oraz dynamiczny kontekst i wykonanie w subagencie.
  • 100claude-agents
    Prowadzi przez tworzenie własnych agentów (subagentów) Claude Code: pliki agents/*.md, frontmatter (tools, model, skills, permissionMode, maxTurns), lista dozwolonych narzędzi i diagnozowanie wywołań.
  • 100subagent-best-practices
    Opisuje, jak poprawnie definiować subagenty Claude Code w plikach agents/*.md: frontmatter, dobór narzędzi i przekazywanie kontekstu.
  • 100create-agent-skills
    Doradza przy tworzeniu, pisaniu i poprawianiu skilli Claude Code oraz plików SKILL.md, w tym ich struktury i dobrych praktyk.

Uwagi i zgłoszenia

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