Agent Skills Are Not Fancy Prompts — They Are a Routing Protocol and a Compiler for Context
Deep Refactoring: Agent Skills — From Prompt Engineering to Capability Engineering
When Skills enter the six elements of an Agent, using AI truly evolves from "retraining an intern every time" to "dispatching a virtual expert panel at any time."
What you will gain from reading this:
- A definition: Skill is not a Prompt, it is "capability distillation"
- A protocol: the engineering secrets of SKILL.md (description as routing)
- A closed loop: the complete lifecycle from intent capture to evaluation and governance
- An interview framework: concept differentiation + mechanism deep-dive + scenario design + oral golden sentences
1. Definition: What is a Skill?
1.1 One-Sentence Definition
Skill is a reusable capability package that distills the way a professional handles a certain type of complex task into a folder and standardizes its expression with SKILL.md.
1.2 What It Is Not (Comparison Matrix)
| Easily Confused Concept | Core Problem | Lifecycle | Skill's Boundary |
|---|---|---|---|
| Ad-hoc Prompt | How to say it this time | Single session | Skill is a reusable long-term asset |
| System Prompt | Who you are, global rules | Globally effective | Skill is a specialized job SOP, not a personality setting |
| Tool / MCP | Can you do this atomic action | Long-term available | Skill orchestrates multiple Tools to solve "how to do it professionally" |
| RAG | Where is private knowledge, how to find it | Long-term retrieval | Skill can call RAG, but is not equivalent to the knowledge itself |
| Subagent | Whether to delegate to another execution body | Task-level delegation | Skill is a capability description that can be loaded and executed by a Subagent |
💡 Interview Golden Sentence: Skill is the productized encapsulation of capability, not the file-based preservation of a Prompt.
2. Positioning: The Coordinates of Skills within the Six Elements of an Agent
Returning to the v033 Agent formula:
Agent = LLM + Memory + Tool + RAG + MCP + Skills
One-sentence division of labor:
- LLM: Reasoning and generation (the brain)
- Memory: Remembering who you are and where you left off across sessions (badge and log)
- Tool / MCP: Executing atomic actions, unified tool interface (hands, feet, and sockets)
- RAG: Retrieving private knowledge on demand (manual library)
- Skills: Orchestrating all of the above according to professional standards to complete complex tasks (the craftsmanship of a veteran)
2.1 An Analogy: Skills are "Job Description + Workflow Engine"
- Tool = Screwdriver
- MCP = Unified tool socket standard
- RAG = Manual library
- Memory = Badge and work log
- Skill = A veteran teaching you "which screwdriver to use when, in what order to assemble, and what the acceptance criteria are"
Without Skills, the model is a chatbot that "knows a little about everything but is professional at nothing"; with Skills, it becomes a virtual job employee that "asks professional questions and delivers professional results."
3. Protocol: The Engineering Secrets of SKILL.md
3.1 The Smallest Unit: A Folder
meeting-minutes/
├── SKILL.md # Required: Metadata + Main Process
├── scripts/ # Optional: Deterministic steps codified
├── references/ # Optional: Long documents loaded on demand
├── assets/ # Optional: Templates, styles, samples
└── evals/ # Optional: Evaluation sets
A folder is a capability unit—this embodies the modular thinking of software engineering.
3.2 Header: YAML Frontmatter (Routing Layer)
---
name: "meeting-minutes"
description: "Generates structured meeting minutes from a transcript. Invoke when the user provides meeting text and asks to organize, summarize, or produce meeting minutes."
---
Description is the primary productive force. The Agent first scans the metadata of all Skills, then decides which to load. Writing a description is like writing gateway matching conditions:
- ✅ Strong:
Invoke when user asks for AI news, daily AI briefing, or says '甜甜AI日报' - ❌ Weak:
Helps process meeting-related content
Interview Golden Sentence: Description is not a summary copy, but a routing rule.
3.3 Body: The Craftsmanship Layer (Workflow + Boundaries + Templates)
A high-quality SKILL.md body includes:
- Goal: What is ultimately delivered
- Workflow: Step-by-step, imperative, executable
- Boundaries and Counter-examples: What not to do, what to do when uncertain
- Output Template: Fixed Schema, reducing degrees of freedom
- Examples: Input → Output, calibrating expectations
- Failure Handling: Degradation strategies when tools fail or information is insufficient
- Resource Pointers: When to read
references/or runscripts/
3.4 Core Mechanism: Progressive Disclosure
| Level | Content | When Loaded | Token Cost |
|---|---|---|---|
| Level 1 | Metadata (name + description) | Always visible | ~100 words |
| Level 2 | SKILL.md Body | Loaded upon trigger | <500 lines |
| Level 3 | Bundled Resources | Loaded on demand | Unlimited |
Engineering essence: Context is compiled on demand, not stacked mindlessly.
Suppose you have 20 Skills, each 800 tokens: loading them all into the System Prompt = 16000 tokens; progressive loading = ~2000 tokens. An 8x difference.
4. Closed Loop: The Engineering Lifecycle from Intent to Evaluation
4.1 Standard Process for Creating a Skill
Capture Intent → Write Description → Draft Body → Add Counter-examples/Failure Paths
→ Trial Run with 2~3 Real Samples → Solidify Hard Logic → Add scripts/references as Needed
→ Design Eval Set → Compare with-skill vs baseline → Iterate and Optimize
4.2 Evaluation Layers
| Layer | What to Test | Method |
|---|---|---|
| Trigger Layer | Whether this Skill should be loaded | should_trigger set |
| Process Layer | Whether the workflow was followed | Transcript check |
| Result Layer | Whether the output meets standards | Assertions / Human review |
| Cost Layer | Whether Token / Time cost is acceptable | Timing monitoring |
| Regression Layer | Whether changes break old use cases | Iteration Benchmark |
4.3 What a Good Assertion Looks Like (Meeting Minutes Example)
- ✅ Contains an "Action Items" table
- ✅ Does not contain responsible person names not present in the transcript
- ✅ Uncertain times marked as "To be confirmed"
- ✅ Output includes a "Meeting Objective" section
- ❌ Do not write subjective descriptions that cannot be objectively judged (e.g., "smooth writing style")
4.4 Trigger Engineering: Undertrigger vs Overtrigger
| Problem | Manifestation | Fix |
|---|---|---|
| Undertrigger | Should be used but isn't; model makes do with general capability | Add synonyms, colloquialisms, Chinese/English trigger words to description |
| Overtrigger | Loaded when it shouldn't be | Clarify input form and intent verbs in description |
Minimum Trigger Evaluation Set:
| Query | Should Trigger |
|---|---|
| "Organize this meeting transcript into minutes" | ✅ True |
| "Extract action items and responsible persons from the recording draft" | ✅ True |
| "What are the best practices for a standup meeting?" | ❌ False |
| "How to improve meeting efficiency?" | ❌ False |
5. Practical Application: Comparative Anatomy of Two Skills
| Dimension | Meeting Minutes Skill | AI Daily Briefing Skill |
|---|---|---|
| Input | User provides ASR transcript (colloquial/noisy) | Agent actively retrieves news from the last 24h |
| Core Difficulty | Noise filtering + Factual boundaries (no fabrication) | Timeliness + Deduplication + Information density |
| Tool Dependency | Primarily reading files | WebSearch + WebFetch |
| Key Design | Action item judgment rules (only list if clear execution intent) | Number of items included (5-8), summary writing style, tag system |
| Failure Handling | Write "To be confirmed" when uncertain, do not guess | Inform user if all fail, do not pad with old news |
| Output | Fixed Markdown template | Single-file visual HTML + Source list |
| OPC Role | Meeting Secretary | Industry Intelligence Officer |
6. Governance: Skills are Code Assets, Not Chat Preferences
6.1 Production-Grade Checklist (Before Going Live)
Positioning:
- Single responsibility, can be described in one sentence
- No significant overlap with existing Skills
- Confirmed it is a Skill, not something a Tool/RAG can solve alone
Routing:
- name is stable and semantically clear
- description includes what + when
- Has should-trigger / should-not-trigger examples
Body:
- Workflow is executable (step-by-step)
- Has an output template or Schema
- Has uncertainty/failure handling
- Has at least one real example
- Explains the why behind key rules
Evaluation and Governance:
- At least 2~3 Eval Prompts
- Objective outputs have Assertions
- Compared against Baseline
- Git trackable, has a maintainer
- Permissions and "No Surprises Principle" reviewed
6.2 Quality Metrics (Dashboard Ready)
| Metric | Meaning |
|---|---|
| Trigger Precision / Recall | Trigger accuracy and coverage |
| Human Rewrite Rate | How much output still needs modification |
| Assertion Pass Rate | Automated acceptance pass rate |
| p50/p95 Latency | Time consumption |
| Tokens / Task | Cost |
| Reuse Count | Number of reuses (is it truly an asset) |
6.3 Anti-Pattern Compendium
| Anti-Pattern | Manifestation | Fix |
|---|---|---|
| Prompt Relocation | Pasting chat logs directly into SKILL.md | Rewrite as steps + templates |
| Universal Skill | One Skill handles all office tasks | Split by job role |
| Writing what, not when | description reads like ad copy | Add Invoke when |
| Writing when, not how | Can trigger but can't execute | Add workflow and examples |
| No Failure Path | Still forcefully generates when tools fail | Write degradation strategy |
| No Evaluation | Iterating by gut feeling | Build Evals |
| Overfitting to Three Samples | Only works for the Demo | Diversify tests |
| Competing with Tool | Using natural language to replace scriptable steps | Codify what can be codified |
| Secret Skill | Hoarding key processes | Share at project/org level |
| Surprising Skill | Performing out-of-scope actions | No Surprises Principle + Permission review |
7. Interview Question Bank and Answering Framework
7.1 Basic Concepts
Q: What is an Agent Skill? How is it different from a Prompt?
A Skill encapsulates the processing flow, quality standards, and output contract for a certain type of professional task into a capability package that can be automatically triggered by an Agent. A Prompt is a one-time instruction; a Skill is a reusable, versionable, and evaluable module. A Prompt solves "how to say it this time," a Skill solves "how this type of thing is done by default."
Q: What is the difference between a Skill and a Tool / MCP?
Tool/MCP provides atomic capability; Skill provides the SOP on how to combine these capabilities to complete a job-level task. Without Tools, a Skill might "know how to talk but not do"; without Skills, a Tool might "be able to do but not professionally."
Q: How do Skill and System Prompt divide the work?
System Prompt manages global identity and baseline rules; Skill manages specialized task craftsmanship. The global is stable, the specialized is pluggable.
7.2 Mechanism Deep-Dive
Q: Why is the description so important?
Under progressive disclosure, metadata is seen before the body. The description is the routing layer, deciding whether a skill enters the context. Poor writing leads to undertrigger or overtrigger.
Q: What is Progressive Disclosure?
Three-level loading: metadata is always resident, body is loaded upon trigger, resources are loaded on demand. The goal is to assemble professional capability within a limited context while controlling tokens and interference.
Q: What problem does skill-creator solve?
It turns writing skills from a manual workshop into standard engineering: intent capture, drafting, eval, baseline comparison, feedback iteration, description optimization. It is itself a skill, demonstrating that capabilities can be produced hierarchically.
7.3 Scenario Design Questions
Q: Design an outline for a "Frontend Landing Page Generation" Skill.
Key points for answering:
- description: When to create a landing page, which sections to include
- Process: Information architecture → Copy hierarchy → Component structure → Responsive design → Deliver files
- Template: Sectioned output (Hero/Pain Points/Solution/Social Proof/CTA)
- Boundaries: Placeholder strategy when brand assets are missing
- evals: 3 prompts from different industries
Q: You find online that a skill's output is often heavily modified by users. How do you troubleshoot?
- Check if the correct skill was triggered (trigger layer)
- Check if the body rules are outdated (process layer)
- Check if examples cover new business (result layer)
- Check if steps that should be scripted still rely on the model's free generation (cost layer)
- Distill high-frequency manual modifications back into SKILL.md
- Add regression tests to prevent fixing A and breaking B
7.4 One-Minute Oral Version (For Final Interviews)
Skill is the job capability package for an Agent. Tool enables it to act, RAG gives it knowledge, Memory lets it remember you, and Skill lets it complete tasks stably according to a professional process. The description in SKILL.md handles routing, the body handles craftsmanship, references/scripts handle details and determinism, and evals handle regression. A good Skills system is an on-demand compiler for context, and the key infrastructure for OPC to turn personal experience into replicable assets.
8. Seven Sentences to Take Away the Whole Text
- Skill is capability distillation, not Prompt backup.
- Folder + SKILL.md is the smallest engineering unit.
- description handles routing, body handles craftsmanship, resources handle details.
- Progressive disclosure allows professional capability and token cost to be achieved simultaneously.
- Trigger engineering is just as important as body quality.
- skill-creator + evals make skills producible, regressible, and evolvable.
- Governance and security determine whether Skills are organizational assets or personal toys.
9. Capability Tree Update
AI Native Developer / FDE Capability Stack (New in v042)
Capability Layer: Skills Engineering
├─ SKILL.md Protocol (YAML Frontmatter + Body Specification)
├─ Progressive Disclosure (Three-Level Loading)
├─ Trigger Engineering (Undertrigger / Overtrigger / Precision / Recall)
├─ skill-creator Evaluation Loop (Evals + Baseline + Regression)
└─ Production Governance (Versioning, Permissions, Security, Sharing, Quality Dashboard)
From the perspective of using AI: Dictionary look-up → Writing prompts → Encapsulating skills → Managing capability assets.
The first group of people re-explains "who I am, what I need to do" every day; The second group distills explanations into Skills, delegates memory to Memory, actions to Tools/MCP, knowledge to RAG—and then gets straight to work.
The next time you find yourself repeatedly pasting the same "Please follow this format..." block, don't just save the chat log—make it into a Skill, and give it a few evals.
At that moment, you are truly "training" your AI team, not just "chatting."