Top Agent Skills

Agent Skills

Modular capability packages that extend Claude's functionality. Learn how to develop, deploy, and optimize Agent Skills to achieve advanced features like code execution, document processing, and data analysis.

Working Process

Extended: Claude Agent Workflow Deep Dive

This section uses a combination of graphics and text to show how Claude transforms a vague user instruction into precise code execution through a "progressive disclosure" architecture.

Core Flow Diagram (The Loop)

1
Perceive
Scan Skill metadata to identify matching functionality

User inputs instruction -> Claude scans metadata of all installed Skills (Name & Description only)

2
Decide
Semantic understanding matching to trigger skill loading

Claude discovers Skill description match during reasoning -> decides to [activate] the Skill

3
Load
Inject complete skill instructions into context

System reads the Skill's SKILL.md -> injects complete instructions into current context

4
Plan
Generate step-by-step execution plan

Claude reads the [instruction manual] in SKILL.md -> generates step-by-step execution plan

5
Act
Call tools and run scripts

Call tools (like reading files), run scripts (like Python data processing), call MCP (like sending Slack messages)

6
Verify
Check output and automatically retry

Claude checks output results -> if error occurs, automatically retry according to error handling guidelines in Skill

Real-World Example: Automated Expense Approval Agent

We'll demonstrate the workflow using a concrete corporate expense reimbursement scenario

Scenario Setup

User Instruction:

"Help me process the travel expenses in travel_expenses.csv, submit compliant ones to the finance system, and email me for any non-compliant ones."

Installed Skill:

expense-manager (Expense Management Expert)

Process employee reimbursement data, execute compliance checks and auto-submit

Detailed Step-by-Step Breakdown

Step 1: Scan & Activate
Claude Thinks:

Claude thinks: User mentioned [process reimbursement] and [CSV], scans expense-manager description: *[process employee reimbursement data, execute compliance checks and auto-submit]*.

Action:

Claude decides to load expense-manager/SKILL.md.

Context adds detailed rules for this Skill, e.g., *[meal limit $75/person],[must mask credit card numbers]*.

Step 2: Data Cleaning & Compliance
Claude Thinks:

Claude plans: According to SKILL.md instructions, can't directly send CSV to finance, must clean data first.

Action:

Calls Python tool to run expense-manager/scripts/clean_pii.py.

*Script function:* Automatically identifies and masks credit card numbers in CSV (PII Redaction).

Step 3: Logic Judgment
Claude Thinks:

Action (Logic Judgment): Claude reads cleaned data, compares line by line with policy rules in SKILL.md.

Action:

*Anomaly found:* A $120 dinner expense exceeds the $75 limit.

System identifies non-compliant items and marks for manual handling.

Step 4A: Branch Processing (Compliant)
Claude Thinks:

Branch A (Compliant data):

Action:

Action (MCP call): Through SQL MCP Server, insert compliant data into company database INSERT INTO finance_db ...

Policy-compliant data automatically enters financial workflow.

Step 4B: Branch Processing (Non-compliant)
Claude Thinks:

Branch B (Non-compliant data):

Action:

Action (Tool call): Generate explanation email based on template templates/rejection_email.txt in SKILL.md.

Action (MCP call): Send email to user through Gmail MCP interface.

Step 5: Result Verification
Claude Thinks:

Claude self-reflection: [Did database insert succeed? Was email sent?]

Action:

Action: Check status code returned by MCP. If Success, reply to user with final report.

Provide complete processing results and next step recommendations.

Technical Details Under the Hood

Include a "Developer Note" section explaining why this workflow is efficient

Decision Making Within Transformer
Claude doesn't select Skills through [keyword matching] or [If/Else] code. It uses LLM's semantic understanding. This means even if Skill description says [process invoices], user says [I have a meal receipt to reimburse], Claude can still accurately associate them.
Safety Sandbox
When Claude runs clean_pii.py, it operates in an isolated Docker container or restricted environment. Skills define permission boundaries (e.g., only allow reading CSV, disallow downloading exe from internet), ensuring Agents don't become virus spreaders.
Deterministic vs Probabilistic
LLM (Probabilistic): Responsible for understanding intent, generating email content (leveraging creativity). Python Script (Deterministic): Responsible for calculating totals, cleaning data (leveraging precision). *The essence of Skills is perfectly combining these two approaches.*
Complete Autonomous Execution Workflow
From vague instructions to precise execution, Agent Skills provide comprehensive end-to-end automation capabilities

Intelligent Recognition

Semantic understanding automatically matches the most suitable skills

Progressive Loading

On-demand loading optimizes context usage efficiency

Automatic Verification

Self-correction ensures execution result accuracy