Agent Skills Engineering: Why More Skills Make Agents Worse, and How to Fix It
This article explains why adding more skills often fails to improve AI agent performance, and how to treat skills as verifiable capability contracts instead of long prompts. It covers the Model plus Harness architecture, the five elements of a skill contract, layered skill retrieval and context loading, managing default values, building an evaluation loop, and scaling governance with cloud infrastructure. Readers will find a practical roadmap for building reliable, retrievable, and governable agent skills.
1. The Problem: Too Many Skills, Still Poor Agent Performance
Over the past two years, agents have become a mainstream form of LLM deployment, and “skill modules” are widely seen as the key to filling capability gaps. Skill libraries, plugin marketplaces, and development frameworks keep appearing. Yet engineering practice reveals a recurring contradiction: as the number of skills grows rapidly, the user experience does not improve at the same pace. Some users even report that the agent becomes “dumber with more skills.”
The cause is usually not the model weights, but the layer of engineering code around the model. The industry is converging on a shared abstraction:
Agent = Model + Harness
The model provides the “moment of intelligence,” while the Harness connects those moments: context management, tool interface definitions, constraints, result verification, failure correction, and state persistence. A Skill is a loadable, retrievable, and verifiable capability unit within the Harness.
One observation worth noting: when model capabilities converge, swapping the surrounding engineering framework for the same model can produce performance differences on the order of tens of points in testing. There have also been cases where the model stayed unchanged, but changing only three default configuration values made the experience feel like a different product. This shows that skill and framework defaults, context strategies, and tool description styles are all “implicit parameters” whose impact is comparable to switching models.
2. What a Skill Really Is: A Verifiable Capability Contract, Not a Prompt Collection
Many teams write a skill as one long prompt. The result: the model “knows what to do” but performs inconsistently and cannot reproduce results. A more rigorous definition treats a skill as a capability contract with at least five elements:
- Trigger conditions: which intent and context should load the skill;
- Input and output schema: parameter structure, required fields, and value ranges;
- Tool and resource dependencies: which external capabilities are needed (common categories such as object storage, message queues, container platforms, logging services, and monitoring and alerting);
- Constraints and prohibitions: no privilege escalation, no repeated side effects, no leakage of sensitive fields;
- Verification and rollback: how to determine success and how to compensate for failure.
An illustrative structure (showing organization only, not a specific product interface):
skill:name: report_buildertrigger: ["generate weekly report", "aggregate metrics"]input_schema: { range: "date", metrics: "list[string]" }tools: ["metric_query", "object_storage_read"]constraints: ["read-only first", "write operations require secondary confirmation"]verify: ["field completeness check", "value range check"]rollback: "fall back to template draft on failure"
When skills have contract properties, evaluation, reuse, and governance finally share a common language.
3. Retrieval: Once the Skill Library Scales, the Real Bottleneck Is Selecting the Right One
When a skill library grows from dozens to tens of thousands of entries, the main challenge shifts from “do we have it” to “can we retrieve it accurately.” Engineering practice usually has three layers:
- Coarse retrieval: filter a candidate set based on intent classification and keywords, keeping the size in the tens;
- Fine ranking: rank by semantic similarity, historical success rate, and context relevance;
- Loading and trimming: inject the full definition of only the Top-K skills into the context, keeping summaries for the rest to avoid context bloat.
It is important to note that the skill description itself is a retrieval feature. Vague descriptions, overlapping boundaries, and similar names directly cause incorrect loading. In practice, teams can continuously clean descriptions through “description deduplication + negative sample labeling,” explicitly writing “should not be triggered” scenarios into the description.
4. Context and Constraints: Treat Default Values as First-Class Citizens
The earlier case of “changing three defaults caused a sudden shift in experience” is essentially a change in context budget and constraint strength. The following defaults should be placed under version control and canary rollout:
- Context budget allocation: how much each of system instructions, skill definitions, history summaries, and tool returns gets;
- History compression strategy: the trigger threshold and retention granularity of rolling summaries;
- Tool return truncation length: overly long returns crowd out critical instructions;
- Constraint priority: whether safety constraints always rank above task goals.
A practical principle is “minimal sufficient context”: load only information strongly related to the current subtask, and retrieve the rest on demand.
5. Evaluation: Without a Closed Loop, the Skill System Will Keep Degrading
The reliability of a skill system depends on an evaluation loop covering at least four types of metrics: retrieval accuracy, task success rate, side-effect rate (incorrect writes, repeated execution), and cost and latency. Engineering recommendations:
- Maintain a golden sample set for each skill, including positive cases, boundary cases, and adversarial cases;
- Run regression before release; any change to a skill description or default value triggers a full regression;
- Sample and review production traffic, feeding failed sessions back as new evaluation samples;
- Track safety items separately, covering privilege escalation, sensitive information leakage, prompt injection, and similar scenarios.
The value of evaluation is not a nice-looking score, but making “change one thing, understand the global impact” possible.
6. Scaled Governance: Skills Need Infrastructure
When the number of skills reaches the hundreds of thousands, it must be governed as a data and platform problem: unified metadata standards, versioning and canary rollout, permissions and auditing, dependency graphs, and a mechanism for retiring zombie skills. This can be implemented with combinations of common cloud capabilities: object storage for skill packages and sample sets, message queues for change event distribution, container platforms for evaluation and canary environments, and logging services with monitoring and alerting for observability.
7. Recommended Implementation Roadmap
- Establish contracts first: unify the five-element skill template and reject pure-prompt skills;
- Then build retrieval: coarse retrieval + fine ranking + loading and trimming, with continuous description cleanup;
- Lock down defaults: put context and constraint defaults under version control;
- Close the evaluation loop: golden samples + regression + production feedback;
- Finally, move to platform governance to support scale and compliance auditing.
8. Conclusion
More skills are not better; skills are better when they are more verifiable, retrievable, and governable. As model capabilities converge, making engineering defaults and skill contracts solid is the key to stable agent delivery. Baidu AI Cloud also emphasizes in related engineering practice that an agent’s competitiveness comes from the coordination of the model and the engineering system, rather than stacking individual points.
