본문으로 건너뛰기
cccskills
무료GitHub에 공개

custom-agent

[AI & Tools] Use when creating, verifying, or enhancing Claude Code custom agent files.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md11.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Quick Summary

Goal: Create new custom agents, audit existing agent quality, or enhance agent definitions so each agent is valid, least-privilege, structurally complete, and ready for safe delegation.

Summary: Produce valid agents through the selected mode: Create — clarify → check existing → scaffold → write → validate; Audit — discover → read/parse → validate → report → fix confirmed Errors; Enhance — read → analyze → recommend → apply confirmed changes. Validate frontmatter, tools, structure, and quality score.

Workflow: Detect mode (Create/Audit/Enhance) from $ARGUMENTS → Execute → Validate

Key Rules:

  • Agent files: .claude/agents/{name}.md with YAML frontmatter + markdown body as system prompt
  • Agent does NOT inherit Claude Code system prompt — write complete instructions
  • Minimize tools to only what the agent needs
  • System prompt structure: ## Role → ## Workflow → ## Key Rules → ## Output
  • Analyze scope and use TaskCreate for small tasks/subtasks before starting, including final review. Keep task depth proportional to the work.

Be skeptical. Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence percentages (Idea should be more than 80%).

Contents

Modes

ModeTriggerAction
Create$ARGUMENTS describes a new agentCreate agent file
Auditmentions verify, audit, review, check, qualityAudit existing agents
Enhancementions refactor, enhance, improve, optimizeImprove existing agent

Mode 1: Create Agent

  1. Clarify — ask user question tool: purpose, read-only vs read-write, model preference, memory needs
  2. Check Existing — Glob .claude/agents/*.md for similar agents. Avoid duplication.
  3. Scaffold — Create .claude/agents/{name}.md using frontmatter template below
  4. Write System Prompt — Structure: ## Role → ## Workflow → ## Key Rules → ## Output
  5. Validate — Run audit checklist below

Mode 2: Audit Agents

  1. Discover — Glob .claude/agents/*.md
  2. Read and parse — Read each complete frontmatter and body before checking or scoring it. A header preview is discovery only; follow multiline YAML through its closing delimiter.
  3. Validate — Apply the Audit Checklist and quality score; consult Agent Frontmatter Schema for field definitions and Tool Restriction Patterns for tool scope.
  4. Report — Issues grouped by severity (Error > Warning > Info), include quality scores
  5. Fix — If user confirms, fix Error-level issues automatically

Mode 3: Enhance Agent

  1. Read — Load specified agent file
  2. Analyze — Check against best practices and audit checklist
  3. Recommend — List improvements with rationale
  4. Apply — If user confirms, apply enhancements

Agent Frontmatter Schema

---
# REQUIRED
name: my-agent # Lowercase + hyphens only
description: >- # Claude uses this to decide when to delegate
    Use this agent when [specific trigger scenarios].

# OPTIONAL — Tools
tools: Read, Grep, Glob, Bash # Allowlist (omit both → inherits all)
disallowedTools: Write, Edit # Denylist (removes from inherited set)
# Task(agent1, agent2) restricts spawnable subagents

# OPTIONAL — Model
model: inherit # inherit | sonnet | opus | haiku

# OPTIONAL — Permissions
permissionMode: default # default | acceptEdits | dontAsk | bypassPermissions | plan

# OPTIONAL — Skills (content injected at startup)
skills:
    - skill-name

# OPTIONAL — MCP Servers
mcpServers:
    - server-name

# OPTIONAL — Hooks (scoped to this agent)
hooks:
    PreToolUse:
        - matcher: 'Bash'
          hooks:
              - type: command
                command: './scripts/validate.sh'

# OPTIONAL — Memory (MEMORY.md auto-injected, Read/Write/Edit auto-added)
memory: project # user (~/.claude/agent-memory/) | project (.claude/agent-memory/) | local (.claude/agent-memory-local/); .claude/.gitignore ignores both project folders

# OPTIONAL — Execution
background: false # true = always background task
isolation: worktree # Run in temporary git worktree
---

Tool Restriction Patterns

Agent TypeRecommended tools
Explorer / /investigateRead, Grep, Glob, Bash
Reviewer (read-only)Read, Grep, Glob
Writer/ImplementerRead, Write, Edit, Grep, Glob, Bash
ResearcherRead, Grep, Glob, WebFetch, WebSearch
OrchestratorRead, Grep, Glob, Task(sub1, sub2)

Available tools: Read, Write, Edit, MultiEdit, Glob, Grep, Bash, WebFetch, WebSearch, Task, NotebookRead, NotebookEdit, TaskCreate, TaskUpdate, ask user question tool, + MCP tools.

Model Selection

These are routing heuristics, not measured quality rankings or compatibility evidence. Preserve an explicit user choice; otherwise prefer inherit. Record representative model/runtime tests separately, with unavailable comparisons marked NOT RUN.

ModelBest For
haikuFast read-only: scanning, search, file listing
sonnetBalanced: code review, debugging, analysis
opusCandidate for high-stakes architecture or complex implementation; verify suitability on representative tasks
inheritDefault — match parent's model

Description Best Practices

# BAD — too vague, Claude won't auto-delegate
description: Reviews code

# GOOD — specific trigger conditions
description: >-
  Use this agent for comprehensive code review after implementing features,
  before merging PRs, or when assessing code quality and technical debt.
  • Include "Use this agent when..." phrasing with concrete scenarios
  • Add "use proactively" to encourage auto-invocation

Common Anti-Patterns

Anti-PatternFix
No tool restrictionsAdd tools allowlist
Vague descriptionWrite specific trigger conditions
Giant system promptKeep concise, use skills for detail
Recursive subagentsRestrict Task in tools
Windows long prompts (>8191 chars)Use file-based agents, not --agents CLI

Context Passing

  • Agent receives ONLY its system prompt + task prompt — NOT parent conversation
  • Parent receives ONLY agent's final result — NOT intermediate tool calls
  • This isolation is the primary context management benefit

Audit Checklist

#CheckRuleSeverity
1Frontmatter existsMust have --- delimitersError
2Name present & validLowercase + hyphens onlyError
3Description presentNon-empty, >20 charsError
4No duplicate namesUnique across all agent filesError
5Description qualitySpecific trigger scenariosWarning
6Tools minimalOnly what agent needsWarning
7Prompt structureHas ## Role + ## WorkflowWarning
8Model setWhen task differs from defaultInfo

Quality Score: Valid frontmatter (20) + Description >50 chars (20) + Tools restricted (15) + Role section (15) + Workflow section (10) + Model set (10) = 90. Rating: 80+ Excellent, 60-79 Good, 40-59 Needs Work, <40 Poor.

File Priority (highest first)

  1. --agents CLI flag (session only)
  2. .claude/agents/*.md (project)
  3. ~/.claude/agents/*.md (user)
  4. Plugin agents/ directory

Same name across levels: higher-priority wins. Use claude agents CLI to list all.

Requirements

<user-prompt>$ARGUMENTS</user-prompt>


<!-- PROTOCOL-GUIDES:START -->

Protocol guides — Apply each protocol only when its read-when condition holds. If a protocol's text is not in your context, read its file below before you act on it.

  • review-decision-autonomy — Choose supported review decisions and ask before extending the round budget; running any review or audit skill or mode → .claude/skills/shared/protocols/review-decision-autonomy.md
<!-- PROTOCOL-GUIDES:END --> <!-- SYNC:review-decision-autonomy:reminder -->

MUST ATTENTION Decide supported review choices and recommendations, record the rationale, and finish without routine user questions. Keep round-limit extension, indispensable facts and actual action authority; preserve source coverage, validation, tests, read-only boundaries and budgets. Review decisions do not accept open risks or make a failed gate pass.

<!-- /SYNC:review-decision-autonomy:reminder -->

Closing Reminders

IMPORTANT MUST ATTENTION Goal: Create new custom agents, audit existing agent quality, or enhance agent definitions so each agent is valid, least-privilege, structurally complete, and ready for safe delegation.

IMPORTANT MUST ATTENTION follow the mode-specific path: detect mode → Create: clarify, check existing agents, scaffold, write the system prompt, validate; Audit: discover, parse, validate, report, and fix only after confirmation; Enhance: read, analyze, recommend, apply only after confirmation; then run the final audit checklist and quality-score validation.

Protocols in force (concise digest of the SYNC/shared blocks this skill carries):

  • AI Mistakes: holistic-first debug, fix at responsible layer, surgical diff, verify ALL outputs.

  • Use TaskCreate before starting, including final review; keep task depth proportional to the work.

  • Search 3+ similar patterns before creating code; cite file:line for every claim, with confidence >80% to act.

EvasionRequired action
"Header preview is enough"Read complete frontmatter and body before checking or scoring
"Audit found Errors, fix now"Report first; fix Error-level issues only after user confirmation

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

[Documentation] Use when generating, smart-merging or refactoring the root AI context (CLAUDE.md, AGENTS.md) and its Claude/Codex projections. Config file only: project-config.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

duc01226/EasyPlatform122026년 10월 18일 업데이트

[Code Quality] Use when a workflow step or the user asks for AI code or plan review: LLM calls, prompts, agents, RAG, evals and guardrails. --mode={code|plan}; --report-only is read-only.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

duc01226/EasyPlatform122026년 10월 18일 업데이트

[Architecture] Use when a workflow step or the user asks for architecture design, compliance review, scalability grading or whole-project audit via --mode={design|review|scalability|full}.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

duc01226/EasyPlatform122026년 10월 18일 업데이트

[Content] Use when a workflow step or the user asks for product/feature ideation with ranked opportunities and validation tests. --mode={roadmap|scope}.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

duc01226/EasyPlatform122026년 10월 18일 업데이트

[Content] Use when a workflow step or the user asks for business viability: Business Model Canvas, financials, risks and go-to-market recommendation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

duc01226/EasyPlatform122026년 10월 18일 업데이트

[Code Quality] Use when a workflow step or the user asks for a focused code-change review: staged, unstaged, branch diff or simple pull request. --fix-loop fixes and re-reviews. Complex pull request: workflow-review-changes; rationale: why-review.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

duc01226/EasyPlatform122026년 10월 18일 업데이트

duc01226의 스킬 모두 보기

이 스킬의 문제 신고