# Anthropic Agent Skills Anthropic Agent Skills is a comprehensive collection of skills that teach Claude how to complete specialized tasks in a repeatable way. Skills are folders containing instructions, scripts, and resources that Claude loads dynamically to improve performance on specific tasks—from creating documents with brand guidelines to analyzing data with organizational workflows, building MCP servers, or creating visual art. Each skill is self-contained in its own folder with a `SKILL.md` file containing YAML frontmatter (name, description) and markdown instructions that Claude follows when the skill is active. This repository demonstrates what's possible with Claude's skills system, ranging from creative applications (algorithmic art, canvas design, theme styling) to technical tasks (webapp testing, MCP server generation) to enterprise workflows (document creation, internal communications). The repository is organized into three main sections: `/skills` containing all skill implementations, `/spec` linking to the Agent Skills specification, and `/template` providing a starter template for creating new skills. Skills can be used via Claude Code (as plugins), Claude.ai (native support for paid plans), or the Claude API. --- ## Creating a Basic Skill A skill requires only a `SKILL.md` file with YAML frontmatter containing `name` and `description` fields, followed by markdown instructions. ```markdown --- name: my-skill-name description: A clear description of what this skill does and when to use it --- # My Skill Name [Add your instructions here that Claude will follow when this skill is active] ## Examples - Example usage 1 - Example usage 2 ## Guidelines - Guideline 1 - Guideline 2 ``` --- ## Installing Skills in Claude Code Skills can be installed as plugins from the Anthropic marketplace using Claude Code CLI commands. ```bash # Add the Anthropic skills marketplace /plugin marketplace add anthropics/skills # Install document processing skills (PDF, DOCX, XLSX, PPTX) /plugin install document-skills@anthropic-agent-skills # Install example skills (algorithmic art, MCP builder, webapp testing, etc.) /plugin install example-skills@anthropic-agent-skills # Install Claude API skill /plugin install claude-api@anthropic-agent-skills ``` --- ## PDF Processing The PDF skill enables reading, extracting, merging, splitting, rotating, watermarking, encrypting, and creating PDF files using Python libraries and command-line tools. ```python from pypdf import PdfReader, PdfWriter import pdfplumber # Read and extract text from PDF reader = PdfReader("document.pdf") print(f"Pages: {len(reader.pages)}") text = "" for page in reader.pages: text += page.extract_text() # Extract tables using pdfplumber with pdfplumber.open("document.pdf") as pdf: for page in pdf.pages: tables = page.extract_tables() for table in tables: print(table) # Merge multiple PDFs writer = PdfWriter() for pdf_file in ["doc1.pdf", "doc2.pdf", "doc3.pdf"]: reader = PdfReader(pdf_file) for page in reader.pages: writer.add_page(page) with open("merged.pdf", "wb") as output: writer.write(output) # Create new PDF with reportlab from reportlab.lib.pagesizes import letter from reportlab.pdfgen import canvas c = canvas.Canvas("hello.pdf", pagesize=letter) width, height = letter c.drawString(100, height - 100, "Hello World!") c.save() # Add password protection reader = PdfReader("input.pdf") writer = PdfWriter() for page in reader.pages: writer.add_page(page) writer.encrypt("userpassword", "ownerpassword") with open("encrypted.pdf", "wb") as output: writer.write(output) ``` --- ## Word Document (DOCX) Creation The DOCX skill creates and edits Word documents using the docx-js library with support for styles, tables, images, headers/footers, and table of contents. ```javascript const { Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell, Header, Footer, HeadingLevel, PageNumber, PageBreak, BorderStyle, WidthType, ShadingType, AlignmentType } = require('docx'); const fs = require('fs'); const doc = new Document({ styles: { default: { document: { run: { font: "Arial", size: 24 } } }, // 12pt default paragraphStyles: [ { id: "Heading1", name: "Heading 1", basedOn: "Normal", next: "Normal", run: { size: 32, bold: true, font: "Arial" }, paragraph: { spacing: { before: 240, after: 240 }, outlineLevel: 0 } }, ] }, sections: [{ properties: { page: { size: { width: 12240, height: 15840 }, // US Letter in DXA margin: { top: 1440, right: 1440, bottom: 1440, left: 1440 } // 1 inch } }, headers: { default: new Header({ children: [new Paragraph({ children: [new TextRun("Company Report")] })] }) }, footers: { default: new Footer({ children: [new Paragraph({ children: [new TextRun("Page "), new TextRun({ children: [PageNumber.CURRENT] })] })] }) }, children: [ new Paragraph({ heading: HeadingLevel.HEADING_1, children: [new TextRun("Annual Report 2024")] }), new Paragraph({ children: [new TextRun("This report summarizes our key achievements.")] }), new Table({ width: { size: 9360, type: WidthType.DXA }, columnWidths: [4680, 4680], rows: [ new TableRow({ children: [ new TableCell({ borders: { top: { style: BorderStyle.SINGLE, size: 1, color: "CCCCCC" } }, width: { size: 4680, type: WidthType.DXA }, shading: { fill: "D5E8F0", type: ShadingType.CLEAR }, children: [new Paragraph({ children: [new TextRun("Metric")] })] }), new TableCell({ width: { size: 4680, type: WidthType.DXA }, children: [new Paragraph({ children: [new TextRun("Value")] })] }) ] }) ] }), new Paragraph({ children: [new PageBreak()] }), new Paragraph({ children: [new TextRun("Page 2 content")] }) ] }] }); Packer.toBuffer(doc).then(buffer => fs.writeFileSync("report.docx", buffer)); ``` --- ## Excel Spreadsheet (XLSX) Operations The XLSX skill creates, edits, and analyzes Excel files using openpyxl with support for formulas, formatting, and LibreOffice-based recalculation. ```python import pandas as pd from openpyxl import Workbook, load_workbook from openpyxl.styles import Font, PatternFill, Alignment # Read and analyze with pandas df = pd.read_excel('data.xlsx', sheet_name=None) # All sheets print(df['Sheet1'].describe()) # Create new workbook with openpyxl wb = Workbook() sheet = wb.active sheet.title = "Financial Model" # Add headers with formatting headers = ['Year', 'Revenue', 'Expenses', 'Profit'] for col, header in enumerate(headers, 1): cell = sheet.cell(row=1, column=col, value=header) cell.font = Font(bold=True) cell.fill = PatternFill('solid', fgColor='D5E8F0') # Add data with formulas (ALWAYS use formulas, never hardcode calculations) data = [ ['2024', 1000000, 750000], ['2025', 1200000, 850000], ] for row_idx, row_data in enumerate(data, 2): sheet.cell(row=row_idx, column=1, value=row_data[0]) sheet.cell(row=row_idx, column=2, value=row_data[1]) sheet.cell(row=row_idx, column=3, value=row_data[2]) # Use Excel formula for Profit = Revenue - Expenses sheet.cell(row=row_idx, column=4, value=f'=B{row_idx}-C{row_idx}') # Add summary formulas sheet['B5'] = '=SUM(B2:B4)' sheet['C5'] = '=SUM(C2:C4)' sheet['D5'] = '=B5-C5' # Format as currency for row in range(2, 6): for col in range(2, 5): sheet.cell(row=row, column=col).number_format = '$#,##0' wb.save('financial_model.xlsx') # Recalculate formulas with LibreOffice (MANDATORY after adding formulas) # python scripts/recalc.py financial_model.xlsx ``` --- ## PowerPoint Presentation (PPTX) Creation The PPTX skill creates and edits presentations using pptxgenjs with design guidelines for professional, non-generic slides. ```bash # Read presentation content python -m markitdown presentation.pptx # Generate slide thumbnails for inspection python scripts/thumbnail.py presentation.pptx # Convert to PDF then images python scripts/office/soffice.py --headless --convert-to pdf output.pptx pdftoppm -jpeg -r 150 output.pdf slide ``` ```javascript const pptxgen = require('pptxgenjs'); let pres = new pptxgen(); pres.layout = 'LAYOUT_16x9'; // Title slide with bold color palette (not generic blue!) let slide1 = pres.addSlide(); slide1.background = { color: '1E2761' }; // Midnight navy slide1.addText('Q4 2024 Results', { x: 0.5, y: 2.5, w: '90%', fontSize: 44, bold: true, color: 'FFFFFF', fontFace: 'Georgia' }); slide1.addText('Annual Performance Review', { x: 0.5, y: 3.5, w: '90%', fontSize: 24, color: 'CADCFC', fontFace: 'Calibri' }); // Content slide with data callouts let slide2 = pres.addSlide(); slide2.background = { color: 'FFFFFF' }; slide2.addText('Key Metrics', { x: 0.5, y: 0.5, fontSize: 36, bold: true, color: '1E2761', fontFace: 'Georgia' }); // Large stat callouts (not bullet points!) slide2.addText('$2.4M', { x: 1, y: 1.5, fontSize: 60, bold: true, color: '1E2761', fontFace: 'Georgia' }); slide2.addText('Revenue Growth', { x: 1, y: 2.5, fontSize: 18, color: '666666' }); slide2.addText('+34%', { x: 5, y: 1.5, fontSize: 60, bold: true, color: '2C5F2D', fontFace: 'Georgia' }); slide2.addText('Year over Year', { x: 5, y: 2.5, fontSize: 18, color: '666666' }); pres.writeFile({ fileName: 'quarterly_results.pptx' }); ``` --- ## MCP Server Development The MCP builder skill creates high-quality Model Context Protocol servers that enable LLMs to interact with external services through well-designed tools. ```typescript // TypeScript MCP Server with Zod schema validation import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { z } from "zod"; const server = new McpServer({ name: "github-mcp", version: "1.0.0" }); // Define tool with Zod schema const CreateIssueSchema = z.object({ repo: z.string().describe("Repository in format 'owner/repo'"), title: z.string().describe("Issue title"), body: z.string().optional().describe("Issue body in markdown"), labels: z.array(z.string()).optional().describe("Labels to apply") }); server.tool( "github_create_issue", "Create a new issue in a GitHub repository", CreateIssueSchema.shape, async (params) => { const { repo, title, body, labels } = CreateIssueSchema.parse(params); const response = await fetch(`https://api.github.com/repos/${repo}/issues`, { method: 'POST', headers: { 'Authorization': `token ${process.env.GITHUB_TOKEN}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ title, body, labels }) }); if (!response.ok) { throw new Error(`GitHub API error: ${response.status}`); } const issue = await response.json(); return { content: [{ type: "text", text: `Created issue #${issue.number}: ${issue.html_url}` }] }; }, { annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false } } ); // Start server with stdio transport const transport = new StdioServerTransport(); await server.connect(transport); ``` --- ## Web Application Testing with Playwright The webapp-testing skill provides tools for testing local web applications using Playwright with server lifecycle management. ```python # Start server and run automation # bash: python scripts/with_server.py --server "npm run dev" --port 5173 -- python test.py from playwright.sync_api import sync_playwright with sync_playwright() as p: browser = p.chromium.launch(headless=True) page = browser.new_page() # Navigate and wait for JavaScript to execute page.goto('http://localhost:5173') page.wait_for_load_state('networkidle') # CRITICAL: Wait for JS # Reconnaissance: discover elements page.screenshot(path='/tmp/initial.png', full_page=True) buttons = page.locator('button').all() print(f"Found {len(buttons)} buttons") # Execute actions with discovered selectors page.locator('text=Submit').click() page.wait_for_selector('.success-message') # Capture console logs page.on('console', lambda msg: print(f"Console: {msg.text}")) # Final screenshot page.screenshot(path='/tmp/result.png') browser.close() ``` --- ## Claude API Integration The claude-api skill provides documentation and patterns for building LLM-powered applications with Claude using the official SDKs. ```python # Python SDK with Claude Opus 4.6 and adaptive thinking import anthropic client = anthropic.Anthropic() # Basic completion with adaptive thinking (recommended for Opus 4.6) response = client.messages.create( model="claude-opus-4-6", max_tokens=4096, thinking={"type": "adaptive"}, # Let Claude decide when/how much to think messages=[ {"role": "user", "content": "Analyze this code for security vulnerabilities..."} ] ) print(response.content[0].text) # Streaming for long responses (prevents timeouts) with client.messages.stream( model="claude-opus-4-6", max_tokens=16384, thinking={"type": "adaptive"}, messages=[{"role": "user", "content": "Write a comprehensive analysis..."}] ) as stream: for text in stream.text_stream: print(text, end="", flush=True) # Get final message after streaming final_message = stream.get_final_message() # Tool use with automatic loop handling from anthropic.beta import beta_tool @beta_tool def get_weather(location: str) -> str: """Get current weather for a location.""" return f"Weather in {location}: 72°F, sunny" response = client.beta.messages.create( model="claude-opus-4-6", max_tokens=1024, tools=[get_weather], messages=[{"role": "user", "content": "What's the weather in San Francisco?"}] ) ``` ```typescript // TypeScript SDK import Anthropic from '@anthropic-ai/sdk'; const client = new Anthropic(); // With effort parameter for controlling thinking depth const response = await client.messages.create({ model: "claude-opus-4-6", max_tokens: 4096, thinking: { type: "adaptive" }, output_config: { effort: "high" }, // low, medium, high, or max (Opus only) messages: [ { role: "user", content: "Explain quantum computing..." } ] }); // Structured output with Zod validation import { z } from 'zod'; const AnalysisSchema = z.object({ summary: z.string(), sentiment: z.enum(["positive", "negative", "neutral"]), confidence: z.number() }); const parsed = await client.messages.parse({ model: "claude-opus-4-6", max_tokens: 1024, output_config: { format: { type: "json_schema", json_schema: { schema: AnalysisSchema } } }, messages: [{ role: "user", content: "Analyze this customer review..." }] }); ``` --- ## Algorithmic Art Generation The algorithmic-art skill creates generative art using p5.js with seeded randomness and interactive parameter exploration. ```javascript // Self-contained HTML artifact with p5.js generative art // Seed-based randomness ensures reproducibility let params = { seed: 12345, particleCount: 1000, noiseScale: 0.003, flowStrength: 2.0, fadeRate: 10 }; let particles = []; function setup() { createCanvas(1200, 1200); randomSeed(params.seed); noiseSeed(params.seed); background(20); // Initialize particles for (let i = 0; i < params.particleCount; i++) { particles.push({ x: random(width), y: random(height), prevX: 0, prevY: 0 }); } } function draw() { // Subtle fade for trail effect fill(20, params.fadeRate); noStroke(); rect(0, 0, width, height); // Update and draw particles following flow field stroke(255, 50); strokeWeight(1); for (let p of particles) { p.prevX = p.x; p.prevY = p.y; // Flow field from Perlin noise let angle = noise(p.x * params.noiseScale, p.y * params.noiseScale) * TWO_PI * 2; p.x += cos(angle) * params.flowStrength; p.y += sin(angle) * params.flowStrength; // Wrap around edges if (p.x < 0) p.x = width; if (p.x > width) p.x = 0; if (p.y < 0) p.y = height; if (p.y > height) p.y = 0; line(p.prevX, p.prevY, p.x, p.y); } } // Regenerate with new seed function regenerate(newSeed) { params.seed = newSeed; randomSeed(params.seed); noiseSeed(params.seed); particles = []; for (let i = 0; i < params.particleCount; i++) { particles.push({ x: random(width), y: random(height), prevX: 0, prevY: 0 }); } background(20); } ``` --- ## Web Artifacts Builder The web-artifacts-builder skill creates complex, multi-component claude.ai HTML artifacts using React, Tailwind CSS, and shadcn/ui. ```bash # Initialize new React project with all dependencies bash scripts/init-artifact.sh my-dashboard cd my-dashboard # Project includes: # - React 18 + TypeScript + Vite # - Tailwind CSS 3.4.1 with shadcn/ui theming # - 40+ shadcn/ui components pre-installed # - Path aliases (@/) configured # Edit src/App.tsx to build your artifact # Bundle to single HTML file for claude.ai bash scripts/bundle-artifact.sh # Creates bundle.html - self-contained artifact with all JS/CSS inlined ``` ```tsx // Example React component using shadcn/ui import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { useState } from "react"; export default function Dashboard() { const [count, setCount] = useState(0); return (
Interactive Dashboard

Count: {count}

); } ``` --- ## Skill Creator Workflow The skill-creator skill helps create new skills and iteratively improve them through evaluation and refinement. ```json // evals/evals.json - Test case structure { "skill_name": "document-generator", "evals": [ { "id": 1, "prompt": "Create a quarterly report for Q4 2024 with revenue of $2.4M and 34% growth", "expected_output": "Professional DOCX with formatted tables, charts, executive summary", "files": [], "assertions": [ {"name": "has_executive_summary", "type": "contains", "value": "Executive Summary"}, {"name": "has_revenue_table", "type": "regex", "value": "\\$2\\.4M|\\$2,400,000"}, {"name": "file_created", "type": "file_exists", "value": "quarterly_report.docx"} ] } ] } ``` ```bash # Run skill evaluation python -m scripts.run_eval \ --eval-set evals/evals.json \ --skill-path ./my-skill \ --model claude-opus-4-6 # Aggregate benchmark results python -m scripts.aggregate_benchmark workspace/iteration-1 --skill-name my-skill # Launch interactive reviewer python eval-viewer/generate_review.py workspace/iteration-1 \ --skill-name "my-skill" \ --benchmark workspace/iteration-1/benchmark.json # Optimize skill description for better triggering python -m scripts.run_loop \ --eval-set trigger-eval.json \ --skill-path ./my-skill \ --model claude-opus-4-6 \ --max-iterations 5 ``` --- ## Summary Anthropic Agent Skills provides a powerful framework for extending Claude's capabilities through modular, reusable skill definitions. The document skills (PDF, DOCX, XLSX, PPTX) enable professional document creation and manipulation with full formatting control. The technical skills (MCP builder, webapp testing, Claude API) support developers building integrations and automated testing workflows. The creative skills (algorithmic art, canvas design, web artifacts) enable sophisticated visual content generation. The skill system follows a consistent pattern: each skill contains a `SKILL.md` file with metadata and instructions, optional scripts for deterministic operations, and reference documentation for complex tasks. Skills can be combined—for example, using the webapp-testing skill to verify output from the web-artifacts-builder, or using the skill-creator to iteratively improve any skill through evaluation. The system is designed for both consumption (using existing skills) and creation (building custom skills for specific organizational needs), making it adaptable to a wide range of automation and content generation use cases.