How to Write Agent Skill Descriptions: A Practical Guide to Avoiding Common Failure Points

    Agent skill descriptions act as the interface contract between an agent and its tools, yet vague wording is a frequent cause of unstable tool calling in production. This article explains how models consume skill descriptions during routing, breaks down six common failure patterns such as blurry trigger boundaries, missing timing cues, and constraints left outside the schema, and presents a reusable five-slot writing framework. It also covers parameter-level constraint design, a three-part evaluation set for regression testing, and engineering practices for hosting, rollout, and observability. Readers will get a concrete, measurable method for turning skill invocation reliability from luck into engineering.

    How to Write Agent Skill Descriptions: A Practical Guide to Avoiding Common Failure Points

    In agent engineering, one problem keeps recurring: the model’s reasoning is strong enough, the tool implementations are sound, yet production behavior stays unstable. The agent answers directly when it should have called a skill, triggers skills when it should not have, and fills in wrong parameters, omits required fields, or produces malformed output. Most teams respond by switching to a stronger model or lengthening the system prompt, but the higher-leverage fix usually sits one layer earlier: the skill description.

    A skill description is the interface contract between the agent and its tools. It is not a comment written for humans; it is the main basis on which the model makes routing decisions within a limited context window. A vague description forces the model to guess. A precise one lets it hit the right skill consistently. Starting from the failure symptoms, this article abstracts a practical writing method and a validation workflow.

    1. How the Model Actually Reads Skill Descriptions

    Before writing better descriptions, understand how they are consumed. In a typical tool-calling setup, the runtime serializes the name, description, and parameter schema of every available skill and injects them into the context. The model then does two things: pick which skill to use, and decide how to fill its parameters.

    Three consequences follow directly:

    1. Descriptions are competing text. All skill descriptions appear in the context at once, competing for attention. An overly broad description will “eat” requests that belong to other skills.
    2. Descriptions are compressed priors. The model cannot see your business tables, historical tickets, or internal conventions. The description is its only source of prior knowledge. Any constraint not written into the description effectively does not exist.
    3. Descriptions are static; input is dynamic. Real user phrasing is full of ellipsis, references, and colloquialisms. A description must cover that variation, not just the ideal sentence.

    2. Six Common Failure Points and Their Root Causes

    Failure Point 1: Blurry trigger boundaries, skills competing for traffic

    Typical wording looks like “handles data-related tasks” or “helps users query information.” Such descriptions cover too much semantic space, so several skills score high confidence at the same time. The result is random drift: the same request hits three different skills across three retries.

    The root cause is the absence of exclusionary statements. The fix is to state explicitly what the skill is responsible for and what it is not, and to spell out the boundary with adjacent skills.

    Failure Point 2: Capability without timing

    Descriptions pile up feature nouns but never say when the skill should be used. Models are good at semantic matching and bad at inferring business timing. “Generate a report” is a capability; “use when the user needs to compare metric trends by week or month and export the result” is timing.

    Failure Point 3: Constraints externalized, description disconnected from the schema

    Authors put required fields, enum values, and format rules in external documentation while the skill description stays a single sentence. When filling parameters, the model relies mainly on the parameter schema and the description text. Documentation that is not in the context imposes no constraint. Every hard constraint should be expressed twice at the parameter level: through type, enum, and format, and through descriptive text.

    Failure Point 4: No failure or fallback behavior

    The description promises only the success path and says nothing about unmet preconditions, insufficient permissions, or empty data. The model then tends to fabricate a result instead of declaring failure, which is extremely costly in high-risk scenarios.

    Failure Point 5: Examples treated as the specification

    A few examples can significantly raise hit rate, but examples without rules make the model overfit to their surface form. One rephrasing from the user and it breaks. The right approach is rules first, examples second, with examples anchoring format and granularity.

    Failure Point 6: Description bloat and uncontrolled iteration

    As requirements grow, descriptions accumulate patches until nobody can read them to the end. Context budget gets squeezed and key constraints get diluted. Descriptions need refactoring like code: merge duplicates, delete what is obsolete, and split long prose into structured fields.

    3. A Reusable Writing Framework

    Split each skill description into five fixed slots to form a stable structure:

    1. Skill name: verb + object (avoid ambiguous words like "handle" or "manage")
    2. When to use: trigger scenario + user intent signals + typical phrasings
    3. When not to use: adjacent skill boundaries + explicit exclusions
    4. Preconditions: required data / permissions / state
    5. Output and failure: success return shape + how failure is expressed

    A filled-in example (illustrative):

    1. Skill name: Query order fulfillment status
    2. When to use: the user asks which fulfillment stage an order is in, or whether
    3. it has shipped or been delivered; common phrasings include "where is my
    4. order" and "has this order shipped".
    5. When not to use: use the corresponding skills for return and refund policy,
    6. invoicing, or product specifications; not for changing the delivery
    7. address or canceling an order.
    8. Preconditions: requires an order ID, or the last four digits of the recipient's
    9. phone number that uniquely identifies the order.
    10. Output and failure: return the current stage, the timestamp of the latest status
    11. change, and the estimated completion time; if the order ID is missing,
    12. ask once; if nothing is found, state clearly that no such order was
    13. found and do not speculate.

    The benefit of slots is not only readability but also validatability: each slot can be reviewed individually for completeness.

    4. The Parameter Layer: Put Constraints Where the Model Must Read Them

    Follow three principles in parameter design:

    • Use enums instead of free text wherever possible. Finite values such as status, channel, and granularity should all be enums, which reduces the space for hallucination.
    • Derive instead of requiring input. Fields that can be derived from context should be optional, with the derivation rule stated in the description.
    • Make units and formats explicit. For time, state the timezone and format; for amounts, state the currency and smallest unit.
    1. {
    2. "name": "query_order_status",
    3. "parameters": {
    4. "type": "object",
    5. "properties": {
    6. "order_id": { "type": "string", "description": "Order ID, a 12-digit number; confirm with the user first if missing" },
    7. "granularity": { "type": "string", "enum": ["day", "week", "month"], "default": "day" },
    8. "at_timezone": { "type": "string", "description": "IANA timezone identifier; defaults to the user's account setting" }
    9. },
    10. "required": ["order_id"]
    11. }
    12. }

    5. Evaluation and Iteration: Replace Intuition with Data

    Optimizing descriptions must be a measurable engineering activity, not copy polishing. Build a three-layer evaluation set:

    1. Positive set: phrasings that should hit the skill, including colloquial, elliptical, and typo variants.
    2. Negative set: look-alike phrasings that should hit other skills, used to test exclusion.
    3. Boundary set: scenarios with insufficient information, out-of-scope requests, or no results, used to test clarifying questions and failure expressions.

    Core metrics include routing accuracy, parameter completeness, format compliance, false trigger rate, and average number of clarifying questions. Run a regression pass after every description change to avoid fixing one scenario and breaking three others. When changes are frequent, put descriptions under version control and record the reason for each change along with the corresponding evaluation diff, forming a traceable iteration loop.

    6. Engineering Recommendations

    • Central hosting, unified rendering: store skill descriptions and parameter schemas centrally and inject them at runtime, avoiding drift from hardcoding in multiple places.
    • Canary rollout and observability: release new descriptions to a small traffic share first, watch hit rate and failure distribution through logging and monitoring with alerting, then roll out fully.
    • Permissions and auditing up front: skills that perform write operations should explicitly declare their scope of impact and any second confirmation requirement, and invocation audit records should be retained.
    • Cost and latency awareness: description length directly affects context overhead, so structured compression beats blind appending.
    • Rely on mature infrastructure: skill registration and invocation can run on a general-purpose container platform, with configuration and secrets managed by a general configuration management capability, and trace data flowing into the logging and monitoring stack for horizontal scaling and easier debugging. For batch skill evaluation jobs, decouple them asynchronously with a message queue and object storage.

    Conclusion

    The essence of a skill description is translating business constraints into priors the model can act on. The failure points look varied, but the root causes are highly concentrated: unclear boundaries, unspecified timing, missing constraints, no failure fallback, examples overstepping rules, and uncontrolled structure. Rebuild the structure with fixed slots, push hard constraints down to the parameter layer, and keep regressing with positive, negative, and boundary evaluation sets. Skill invocation stability then shifts from relying on luck to relying on engineering. The same method applies to agent practice on platforms such as Baidu AI Cloud: write the contract clearly first, then talk about model capability.