跪拜 Guibai
← All articles
GitHub · Architecture · JavaScript

Agent Skills Are Not Fancy Prompts — They Are a Routing Protocol and a Compiler for Context

By 胡萝卜术 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

As agent frameworks mature, the bottleneck shifts from "can the model do X" to "can the model do X the same way every time, on demand, without burning a 16k-token context window." Skills provide the packaging, routing, and evaluation infrastructure to make that repeatable, which is the difference between a chat demo and a production agent that a team can actually maintain.

Summary

A Skill is a reusable capability package that bundles a professional's process for a complex task into a standardized folder. Its SKILL.md file uses YAML frontmatter for routing — the description field is a gateway matching condition, not ad copy — and a body that defines the workflow, output template, failure paths, and resource pointers. This structure enables progressive disclosure: metadata is always visible, the body loads on trigger, and bundled scripts or references load on demand, cutting token costs by up to 8x compared to stuffing everything into a system prompt.

Building a Skill follows an engineering lifecycle from intent capture through drafting, trial runs with real samples, and codifying hard logic into scripts, to designing eval sets and running with-skill vs. baseline comparisons. Evaluation spans five layers: trigger accuracy, process adherence, output assertions, cost, and regression. Trigger engineering specifically tackles undertrigger (the skill is not loaded when it should be) and overtrigger (it loads when it shouldn't) by tuning the description with synonyms, colloquial triggers, and precise intent verbs.

Governance treats Skills as version-controlled code assets with a production checklist covering single responsibility, routing clarity, executable workflows, failure handling, and automated assertions. Quality metrics like trigger precision/recall, human rewrite rate, and assertion pass rate feed a dashboard. The anti-pattern catalog warns against prompt relocation, universal skills, missing failure paths, and overfitting to three demo samples. The end state is a capability tree where Skills Engineering sits alongside LLM, Memory, Tool, RAG, and MCP as a first-class Agent element.

Takeaways
A Skill is a folder containing a SKILL.md file, optional scripts, references, assets, and evals — it is the smallest engineering unit for reusable agent capability.
The description field in SKILL.md frontmatter is a routing rule, not a summary; it determines whether the skill enters the context window and must include what the skill does and when to invoke it.
Progressive disclosure loads metadata always, the body on trigger, and bundled resources on demand, reducing token consumption by up to 8x versus loading all skills into the system prompt.
Trigger engineering fixes undertrigger by adding synonyms and colloquial trigger phrases to the description, and fixes overtrigger by specifying precise input forms and intent verbs.
Evaluation spans five layers: trigger accuracy, process adherence, output assertions, token/time cost, and regression against old use cases.
Skills should be governed like code: version-controlled, with a production checklist, quality dashboard metrics, and a catalog of anti-patterns such as prompt relocation, universal skills, and missing failure paths.
The skill-creator tool itself is a Skill, demonstrating that capability production can be hierarchical — skills can be used to build better skills.
Conclusions

Framing the description as a routing rule rather than documentation is a genuinely useful mental model shift: it forces the author to think about matching conditions, synonyms, and false-positive triggers the way an API gateway designer would.

The 8x token savings claim from progressive disclosure is concrete and measurable, but the real leverage is that it makes Skills composable — you can have dozens of them without degrading the agent's performance on unrelated tasks.

Treating Skills as code assets with a governance checklist and quality dashboard is where most agent projects will stall. The anti-pattern catalog is effectively a pre-mortem for teams that treat Skills as glorified prompt libraries.

The five-layer evaluation framework (trigger, process, result, cost, regression) mirrors mature software testing pyramids and suggests that agent reliability engineering will become its own sub-discipline.

Positioning Skills as the element that turns an LLM from a generalist into a 'virtual job employee' clarifies why Tool, RAG, and Memory alone are insufficient — they provide capability but not professional judgment about how to combine them.

Concepts & terms
Progressive Disclosure
A three-level loading strategy for Skills: Level 1 metadata (name, description) is always in context; Level 2 body loads when the skill is triggered; Level 3 bundled resources (scripts, references) load on demand. This keeps token costs low while making many specialized skills available.
Trigger Engineering
The practice of tuning a Skill's description field to maximize trigger precision and recall. Undertrigger means the skill fails to load when needed; overtrigger means it loads when irrelevant. Fixes include adding synonyms, colloquial trigger phrases, and precise intent verbs.
SKILL.md
The required file inside a Skill folder that defines the capability. It contains YAML frontmatter for routing (name, description) and a Markdown body specifying the workflow, output template, boundaries, failure handling, examples, and resource pointers.
OPC (One-Person Company)
A framing used in the article where each Skill corresponds to a virtual job role (e.g., meeting secretary, industry intelligence officer) within a one-person operation, turning the agent into a dispatchable team of specialists.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗