--- id: ai-anthropic-skills-patterns title: Anthropic Skills β€” modular agent capability category: Coding status: draft source_trust_level: B verification_status: conceptual created_at: 2026-05-09 updated_at: 2026-05-09 tags: [ai, anthropic, agents, vibe-coding] tech_stack: { language: "TS / Markdown", applicable_to: ["AI"] } applied_in: [] aliases: [Anthropic Skills, agent skills, modular capability, prompt module, sub-agent, Claude skills] --- # Anthropic Skills > Claude / agent 의 modular capability. **Markdown skill files + structured tools**. Re-usable + composable. ## πŸ“– 핡심 κ°œλ… - λ§€ skill = self-contained doc + tool. - Loaded on-demand. - Modular (mix and match). - LLM κ°€ 자체 invoke. ## πŸ’» μ½”λ“œ νŒ¨ν„΄ ### Skill structure ``` skills/ β”œβ”€β”€ pdf-processor/ β”‚ β”œβ”€β”€ SKILL.md # 의 description + μ‚¬μš©λ²• β”‚ β”œβ”€β”€ helpers.ts # tool implementation β”‚ └── examples/ # sample input β”œβ”€β”€ data-analyst/ β”‚ └── SKILL.md └── code-reviewer/ └── SKILL.md ``` ### SKILL.md ```markdown --- name: PDF Processor description: Extract text and structure from PDF files --- # PDF Processor When user asks about PDF processing: 1. Use `extract_text(path)` to get raw text. 2. Use `extract_tables(path)` for tables. 3. Use `summarize(text)` for long docs. ## Tool examples To extract: extract_text('/path/to/doc.pdf') To find tables: extract_tables(path, page=2) ``` β†’ LLM κ°€ SKILL.md 읽음 + 자체 use. ### Discovery ``` Agent loop: 1. User query. 2. List available skills. 3. LLM κ°€ relevant skill 선택. 4. Skill description + tools κ°€ context 에. 5. Use. ``` β†’ Lazy load (token μ ˆμ•½). ### Skill 의 ingredient ``` - Description: μ–Έμ œ use. - Examples: input β†’ output. - Tools: 호좜 κ°€λŠ₯. - Constraints: μ•ˆ do. - Workflow: step-by-step. ``` ### Multi-skill ``` User: "Analyze this PDF and write a summary email". LLM κ°€: 1. PDF Processor skill (extract). 2. Data Analyst skill (analyze). 3. Email Writer skill (write). β†’ Compose multiple. ``` ### vs MCP server ``` MCP: standardized protocol (Anthropic). Skills: skill 의 unit (markdown + tool). β†’ Skills κ°€ MCP μœ„μ— μ‚¬μš© κ°€λŠ₯. ``` β†’ [[AI_MCP_Server_Building]]. ### Code skill 예 ```markdown --- name: Code Reviewer description: Review code for bugs, style, performance --- # Code Reviewer For each file: 1. Check for common bugs (null check, off-by-one). 2. Verify style (lint, format). 3. Suggest performance improvement. 4. Output JSON: { issues: [...], suggestions: [...] } ## Don't - Don't rewrite entire file. - Don't suggest opinion-based changes (subjective style). ``` ### Versioning ``` skills/ β”œβ”€β”€ pdf-processor/ β”‚ └── v2/ β”‚ β”œβ”€β”€ SKILL.md β”‚ └── ... ``` β†’ Multiple version, A/B test. ### Sharing ``` Internal company skills: - Marketing Copywriter. - Customer Support Triage. - Code Reviewer. - Data Analyst. β†’ Library κ°€ λ§€ team κ°€ share. ``` ### Public skill marketplace ``` 2026 의 κ°€λŠ₯μ„±: - "Skills marketplace" (Hugging Face 식). - λ§€ skill κ°€ review / rating. - λ§€ use case 의 best skill. ``` ### Custom Claude ``` Claude Pro / Team: - Custom instruction (system prompt). - Memory (persistent). - Skills (loaded on demand). β†’ Specialized assistant. ``` ### Anthropic Computer Use + Skills ``` Skill: 'Search the web for X and summarize'. - Computer Use tool. - Browser navigation. - Reading + summary. β†’ Modular agent. ``` ### Skill μž‘μ„± κ°€μ΄λ“œ ``` 1. Description κ°€ specific (μ• λ§€ X). 2. Examples (input β†’ expected output). 3. Constraints (μ•ˆ do). 4. Tool κ°€ λͺ…ν™•. 5. Output format (JSON λ“±). 6. Eval (test cases). ``` ### Iterative improve ``` 1. Initial skill. 2. Test cases. 3. Fail case 뢄석. 4. Skill update. 5. Re-test. β†’ "Skill engineering" 의 process. ``` ### vs prompt template ``` Prompt template: 1 prompt + variable. Skill: doc + tool + workflow. β†’ Skill κ°€ 더 큰 unit. ``` ### Production ``` - Code review bot (PR 맀번). - Data analyst (Slack bot). - Customer support (1-line). - Personal assistant. β†’ λ§€ task = own skill. ``` ### Skills + RAG ``` Skill κ°€ own knowledge base: - Doc κ°€ vector DB. - Skill κ°€ retrieve. - LLM κ°€ answer. β†’ Skill κ°€ expert in domain. ``` ### Skills + sub-agent ``` Main agent: orchestrator. Skill A β†’ sub-agent A. Skill B β†’ sub-agent B. β†’ Multi-agent coordination. ``` β†’ [[AI_Multi_Agent_Coordination]]. ### Anthropic 의 official format ``` 2026 μ‹œμ  evolving. - Markdown + frontmatter. - Tool definitions. - Examples. - Constraints. ``` ### Implementation 예 (TS) ```ts class SkillManager { skills = new Map(); register(skill: Skill) { this.skills.set(skill.name, skill); } list(): SkillSummary[] { return [...this.skills.values()].map(s => ({ name: s.name, description: s.description, })); } async load(name: string): Promise { const skill = this.skills.get(name); return skill ? skill.fullContent : ''; } } // LLM 의 system prompt 에 skill list. // LLM κ°€ 'load_skill(name)' tool 호좜. // Loaded skill content κ°€ context 에 μΆ”κ°€. ``` ### 함정 ``` - Skill λ„ˆλ¬΄ 많음 = LLM κ°€ ν—·κ°ˆλ¦Ό. - Description κ°€ vague. - Tool overlap. - No eval. - Version 관리 X. - Cross-skill state share. ``` ### Best practice ``` 1. Specific name + description. 2. Self-contained (depend X). 3. Test case (10+). 4. Versioning (skill v1, v2). 5. Composable (λ‹€λ₯Έ skill 와 stack). 6. Idempotent (re-run OK). ``` ## πŸ€” μ˜μ‚¬κ²°μ • κΈ°μ€€ | μž‘μ—… | μΆ”μ²œ | |---|---| | Specific task | Skill | | 일반 prompt | System prompt | | External integration | MCP | | Multi-step | Skill + sub-agent | | Re-usable across team | Skill library | ## ❌ μ•ˆν‹°νŒ¨ν„΄ - **Skill λ„ˆλ¬΄ 많음**: LLM ν—·κ°ˆλ¦Ό. - **Vague description**: μ•ˆ invoke. - **No example**: bad output. - **Tool overlap**: confusion. - **No eval**: silent regression. ## πŸ€– LLM ν™œμš© 힌트 - Skills = modular capability. - Markdown + tool κ°€ unit. - MCP μœ„ κ°€λŠ₯. - Specific name + description κ°€ 핡심. ## πŸ”— κ΄€λ ¨ λ¬Έμ„œ - [[AI_Skills_Patterns]] - [[AI_MCP_Integration_Patterns]] - [[AI_Multi_Agent_Coordination]]