Agent skill

claude-extensibility

Claude Code extensibility: agents, skills, output styles. Capabilities: create/update/delete agents and skills, YAML frontmatter, system prompts, tool/model selection, resumable agents, CLI-defined agents. Actions: create, edit, delete, optimize, test extensions. Keywords: agent, skill, output-style, SKILL.md, subagent, Task tool, progressive disclosure. Use when: creating agents/skills, editing extensions, configuring tool access, choosing models, testing activation.

Stars 10
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/samhvw8/dot-claude/tree/main/skills/claude-extensibility

SKILL.md

Claude Code Extensibility

CRUD operations for agents, skills, and output styles following Anthropic best practices.

Related Skills

IMPORTANT: When creating or editing prompts, use prompt-enhancer skill to improve quality.

Skill("prompt-enhancer")  → Enhance skill/agent prompt content

Core Principles

  • Simplicity: Direct tool calls, avoid complex abstractions
  • Focus: Single, clear responsibility per extension
  • Conciseness: Target <500 lines, use progressive disclosure
  • Efficiency: Optimize for token usage and response time

Extension Types

Type Invocation Purpose Location
Agents Task tool Specialized sub-processes .claude/agents/
Skills Model-invoked (autonomous) Domain knowledge .claude/skills/{name}/
Output Styles /output-style command Modify main agent behavior .claude/output-styles/

Agent Development

Reference: references/agent-development.md - Full YAML structure, model/tool selection, system prompt patterns, optimization techniques.

Quick Start: Agent

yaml
---
name: agent-name
description: Use this agent when [use case]. Use PROACTIVELY for [triggers].\n\nExamples:\n<example>\nContext: [situation]\nuser: [request]\nassistant: [response]\n<commentary>[reasoning]</commentary>\n</example>
tools: Grep, Glob, Read, Bash
model: haiku
permissionMode: default
skills: skill-name
---

# Agent Name

Brief mission statement.

## Core Strategy

### 1. Phase Name
Approach and techniques

<format>
Expected output structure
</format>

YAML Fields

Field Required Description
name Yes Lowercase, hyphens (e.g., code-reviewer)
description Yes Single line with \n for newlines, include examples
tools No Comma-separated; inherits all if omitted
model No haiku, sonnet, opus, inherit (default: sonnet)
permissionMode No default, acceptEdits, bypassPermissions, plan, ignore
skills No Comma-separated skill names to auto-load

Model Selection

Model Use When Target Time
haiku Fast tasks, exploration, search < 3s
sonnet Balanced, most use cases < 10s
opus Complex reasoning, architecture < 30s
inherit Match main conversation model varies

Built-in Subagents

Agent Model Tools Purpose
general-purpose Sonnet All Complex research, multi-step operations
plan Sonnet Read, Glob, Grep, Bash Research in plan mode
Explore Haiku Read-only Fast codebase search (quick/medium/very thorough)

Agent Locations

Location Scope Priority
.claude/agents/ Project Highest
~/.claude/agents/ User (all projects) Lower
Plugin agents/ Plugin-specific Varies
--agents CLI flag Session only Medium

CLI-Defined Agents

bash
claude --agents '{
  "code-reviewer": {
    "description": "Expert code reviewer. Use proactively after code changes.",
    "prompt": "You are a senior code reviewer...",
    "tools": ["Read", "Grep", "Glob", "Bash"],
    "model": "sonnet"
  }
}'

Resumable Agents

Continue previous conversations:

  • Each execution gets unique agentId
  • Transcript stored in agent-{agentId}.jsonl
  • Resume with previous agentId to continue with full context

Skill Development

Reference: references/skill-development.md - Full structure, trigger patterns, hook system.

Quick Start: Skill

yaml
---
name: skill-name
description: "[What it does]. [Technologies]. Capabilities: [list]. Actions: [verbs]. Keywords: [triggers]. Use when: [scenarios]."
allowed-tools: Read, Grep, Glob
---

# Skill Name

## Purpose
What this skill helps with

## When to Use
Specific scenarios and conditions

## Key Information
Guidance, patterns, examples

YAML Fields

Field Required Description
name Yes Lowercase, hyphens, max 64 chars
description Yes WHAT + WHEN format, max 1024 chars, quoted
allowed-tools No Restrict tool access (security)

Description Format (WHAT + WHEN)

Structure:

"[Core purpose]. [Technologies/Stack]. Capabilities: [list]. Actions: [verbs]. Keywords: [triggers]. Use when: [scenarios]."

Good example:

yaml
description: "Extract text and tables from PDF files, fill forms, merge documents. Formats: .pdf. Tools: pypdf, pdfplumber. Capabilities: text extraction, form filling, document merging. Actions: extract, fill, merge PDFs. Keywords: PDF, form, document, pypdf, pdfplumber. Use when: working with PDF files, extracting data from documents, filling PDF forms."

Bad examples:

yaml
description: Helps with documents  # Too vague
description: PDF skill  # Missing WHEN triggers

Tool Access Control

Restrict Claude's tools with allowed-tools:

yaml
---
name: safe-reader
description: "Read-only file access. Use when viewing code without modifications."
allowed-tools: Read, Grep, Glob
---

Skill Locations

Location Scope
.claude/skills/{name}/SKILL.md Project (shared via git)
~/.claude/skills/{name}/SKILL.md User (all projects)
Plugin skills/ Plugin-bundled

Skill Structure

my-skill/
├── SKILL.md (required)
├── references/ (optional - detailed docs)
├── scripts/ (optional - utilities)
└── templates/ (optional - templates)

Output Styles

Modify Claude Code's main agent behavior.

Quick Start: Output Style

markdown
---
name: My Custom Style
description: Brief description of behavior
keep-coding-instructions: true
---

# Custom Style Instructions

You are an interactive CLI tool that helps users...

## Specific Behaviors
[Define assistant behavior...]

YAML Fields

Field Purpose Default
name Display name Filename
description UI description None
keep-coding-instructions Retain coding instructions false

Built-in Styles

  • Default: Standard software engineering
  • Explanatory: Educational insights between tasks
  • Learning: Collaborative with TODO(human) markers

Output Style Locations

  • User: ~/.claude/output-styles/
  • Project: .claude/output-styles/

Usage

bash
/output-style              # Access menu
/output-style explanatory  # Switch directly

Testing

Key Question: Does it activate when expected?

Agent Testing:

bash
Task(
  subagent_type="agent-name",
  description="Test task",
  prompt="Detailed test prompt"
)

Skill Testing:

  • Test prompts that SHOULD trigger
  • Test prompts that should NOT trigger
  • Debug with: claude --debug

Common Workflows

Create Agent

  1. Create .claude/agents/{name}.md
  2. Write YAML frontmatter (name, description, tools, model)
  3. Write system prompt (<500 lines)
  4. Test with Task tool
  5. Optimize based on performance

Create Skill

  1. Create .claude/skills/{name}/SKILL.md
  2. Write YAML frontmatter with WHAT + WHEN description
  3. Write content (<500 lines)
  4. Use Skill("prompt-enhancer") to improve prompt
  5. Add reference files for detailed content
  6. Test: Does it activate when expected?

Optimize Extension

  1. Measure baseline (lines, token usage, response time)
  2. Move details to reference files
  3. Use Skill("prompt-enhancer") to improve prompts
  4. Remove second-person voice
  5. Use code blocks over prose
  6. Add XML structure
  7. Test and verify improvements

Best Practices

Anthropic Guidelines

500-line rule: Keep SKILL.md and agent prompts under 500 lines ✅ Progressive disclosure: Use reference files for detailed content ✅ Proactive language: Include "use PROACTIVELY" in descriptions ✅ WHAT + WHEN descriptions: Both capability and triggers ✅ Test first: Build 3+ evaluations before extensive documentation ✅ Least privilege: Limit tools to necessary set

Anti-Patterns

❌ Vague descriptions without triggers ❌ Over 500 lines without references ❌ Second-person voice ("you should...") ❌ All tools when subset suffices ❌ No examples in agent descriptions

Quick Reference

Agent Model Selection:

  • Haiku: Fast, simple tasks (< 3s)
  • Sonnet: Balanced, most use cases (< 10s)
  • Opus: Complex reasoning (< 30s)
  • Inherit: Match main conversation

File Locations:

  • Agents: .claude/agents/*.md
  • Skills: .claude/skills/{name}/SKILL.md
  • Output Styles: .claude/output-styles/*.md

Management Commands:

  • /agents - Interactive agent management
  • /output-style - Switch output styles

Status: Production Ready | Lines: ~200 | Progressive Disclosure: ✅

Expand your agent's capabilities with these related and highly-rated skills.

samhvw8/dot-claude

debugging

Systematic debugging methodology with root cause analysis. Phases: investigate, hypothesize, validate, verify. Capabilities: backward call stack tracing, multi-layer validation, verification protocols, symptom analysis, regression prevention. Actions: debug, investigate, trace, analyze, validate, verify bugs. Keywords: debugging, root cause, bug fix, stack trace, error investigation, test failure, exception handling, breakpoint, logging, reproduce, isolate, regression, call stack, symptom vs cause, hypothesis testing, validation, verification protocol. Use when: encountering bugs, analyzing test failures, tracing unexpected behavior, investigating performance issues, preventing regressions, validating fixes before completion claims.

10 0
Explore
samhvw8/dot-claude

prompt-enhancer

Prompt engineering and optimization for AI/LLMs. Capabilities: transform unclear prompts, reduce token usage, improve structure, add constraints, optimize for specific models, backward-compatible rewrites. Actions: improve, enhance, optimize, refactor, compress prompts. Keywords: prompt engineering, prompt optimization, token efficiency, LLM prompt, AI prompt, clarity, structure, system prompt, user prompt, few-shot, chain-of-thought, instruction tuning, prompt compression, token reduction, prompt rewrite, semantic preservation. Use when: improving unclear prompts, reducing token consumption, optimizing LLM outputs, restructuring verbose requests, creating system prompts, enhancing prompt clarity.

10 0
Explore
samhvw8/dot-claude

refactoring-expert

Systematic code refactoring following Martin Fowler's catalog. Methodologies: characterization tests, Red-Green-Refactor, incremental transformation. Capabilities: SOLID compliance, DRY cleanup, code smell detection, complexity reduction, legacy modernization, design patterns, functional programming patterns. Actions: refactor, extract, inline, rename, move, simplify code. Keywords: refactor, SOLID, DRY, code smell, complexity, extract method, inline, rename, move, clean code, technical debt, legacy code, design pattern, characterization test, Red-Green-Refactor, functional programming, higher-order function, immutability, pure function, composition, currying, side effects. Use when: improving code quality, reducing technical debt, applying SOLID principles, fixing DRY violations, removing code smells, modernizing legacy code, applying design patterns.

10 0
Explore
samhvw8/dot-claude

infra-engineer

Comprehensive infrastructure engineering covering DevOps, cloud platforms, FinOps, and DevSecOps. Platforms: AWS (EC2, Lambda, S3, ECS, EKS, RDS, CloudFormation), Azure basics, Cloudflare (Workers, R2, D1, Pages), GCP (GKE, Cloud Run, Cloud Storage), Docker, Kubernetes. Capabilities: CI/CD pipelines (GitHub Actions, GitLab CI, Jenkins), GitOps, infrastructure as code (Terraform, CloudFormation), container orchestration, cost optimization, security scanning, vulnerability management, secrets management, compliance (SOC2, HIPAA). Actions: deploy, configure, manage, scale, monitor, secure, optimize cloud infrastructure. Keywords: AWS, EC2, Lambda, S3, ECS, EKS, RDS, CloudFormation, Azure, Kubernetes, k8s, Docker, Terraform, CI/CD, GitHub Actions, GitLab CI, Jenkins, ArgoCD, Flux, cost optimization, FinOps, reserved instances, spot instances, security scanning, SAST, DAST, vulnerability management, secrets management, Vault, compliance, monitoring, observability. Use when: deploying to AWS/Azure/GCP/Cloudflare, setting up CI/CD pipelines, implementing GitOps workflows, managing Kubernetes clusters, optimizing cloud costs, implementing security best practices, managing infrastructure as code, container orchestration, compliance requirements, cost analysis and optimization.

10 0
Explore
samhvw8/dot-claude

aesthetic

Visual design intelligence and UI aesthetics. Integrates: chrome-devtools, ai-multimodal, media-processing. Capabilities: design analysis, visual hierarchy, color theory, typography, micro-interactions, animation, design systems, accessibility. Actions: analyze, design, create, capture, evaluate, implement UI aesthetics. Keywords: Dribbble, Behance, Mobbin, design inspiration, visual hierarchy, color palette, typography, spacing, animation, micro-interaction, design system, style guide, accessibility, WCAG, contrast ratio, golden ratio, whitespace, visual rhythm. Use when: building beautiful UIs, analyzing design inspiration, implementing visual hierarchy, adding animations/micro-interactions, creating design systems, evaluating aesthetic quality, capturing design screenshots.

10 0
Explore
samhvw8/dot-claude

ui-ux-design

UI/UX design reference database. 50+ styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.

10 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results