Building High-Quality Agent Skills from Scratch: A Practical Guide

    Agent skills are not plug-and-play plugins: their value comes from clear boundaries, progressive disclosure, and diagnosable failures. This guide explains how to structure a skill package, write metadata and instructions, evaluate routing and output quality, review third-party skills, and build a first skill from a small recurring task.

    Many people treat agent skills as “download-and-use” plugins: click once in a conversation, drop in a request, and expect stable output, controllable style, and a reproducible process. This is like the spreadsheet era, when someone could open a workbook built by someone else but could not modify fields, build filters, or add validation. The work may get done, but the capability cannot be transferred, troubleshot, or judged for reliability. The value of a skill is not in how many files it contains. It lies in clear boundaries, on-demand loading, and failures that can be diagnosed.

    What Agent Skills Actually Solve

    Large models are good at improvised reasoning, but they are not good at maintaining the same operational discipline over time. When the same type of task appears repeatedly—summarizing meeting notes, revising copy according to a fixed standard, reviewing code against a checklist, or breaking a requirement into executable steps—putting the rules, examples, prohibitions, and tool usage back into the conversation every time wastes context and makes it easy to miss steps. A skill captures “when to use it, what order to follow, what information to ask for first, and what the output should look like” as version-manageable instructions and supporting materials. The model reads the necessary parts only after matching the scenario.

    A skill is not another chat persona, and it is not a whole knowledge base poured into context at once. A good skill answers three questions: Are the trigger conditions clear? Is the execution path inspectable? Are irrelevant materials left unloaded by default?

    Anatomy of a Complete Skill Package

    A common industry practice is to make a skill a directory rather than a single prompt. The minimum usable form needs only one instruction document. For complex tasks, scripts, references, templates, and evaluation materials can be added as needed. The directory responsibilities can be understood as follows:

    • Core instruction document: Required. It begins with metadata, followed by operational instructions. During discovery, the model mainly looks at the name and description, and reads the body only after confirming relevance.
    • Script directory: Optional. Contains repeatable checks, transformations, and formatting logic. The instruction document should state only when to call a script, the input/output contract, and how to handle failures. Do not paste large implementations into the instructions.
    • References directory: Optional. Contains style libraries, field dictionaries, API contract summaries, and long examples. The body references them by stating under what conditions to read which file, avoiding an inflated instruction document.
    • Assets directory: Optional. Contains templates, sample inputs and outputs, and checklists. Templates should allow variables to be replaced and should indicate which fields are required.
    • Evaluation and auxiliary materials: Optional. Contains scoring criteria, counterexamples, and edge cases. These are for the author’s self-testing and do not need to be fully loaded during every user task.

    The directory can be extended further, but every new file type must have its trigger condition written in the core instructions. A file without a trigger condition permanently occupies the author’s attention while not necessarily entering the model’s context.

    Metadata: The Always-Visible Signpost

    When skills are scanned, usually only a very short header is loaded consistently: the name and description. The name should be short, stable, and distinguishable. Avoid piling up synonyms. The description should answer both “what problem does this solve?” and “when should it be invoked?”, and it should point out nearby scenarios where it should not be invoked. For example, a copy-polishing skill should describe itself as being for polishing finished drafts, unifying tone, and compressing structure. If the user wants to create a technical proposal from scratch or modify business code, the skill should not match.

    A description that reads like an advertising slogan causes false triggers. A description that reads like internal jargon causes the skill not to be selected when it should be. A practical approach is one or two sentences defining the capability boundary, two or three typical trigger phrases, and one explicit exclusion. The name and description repeatedly enter the selection stage, so they must be short, precise, and decidable.

    Instructions: Workflow, Rationale, and Read Strategy

    The instruction body should stay within a length the model can reliably read in one pass. In practice, a few hundred lines are easier to follow. Beyond that, split detailed rules, long examples, and style libraries into references, and keep only pointers in the body. The body should follow an order like the one below rather than piling up techniques:

    1. Goal and definition of done: What kind of output counts as complete, and in what situations must the model stop and ask follow-up questions?
    2. Input checks: How to ask when the topic, audience, constraints, or source material is missing. Avoid filling gaps with speculation.
    3. Execution order: What to read first, what to call next, and how to self-check at the end. Each step should include a brief rationale so the model can judge whether it can skip the step in a variant scenario.
    4. On-demand reads: State the conditions under which a particular reference or script should be opened. For example, read the corresponding style guide only when the user specifies a style, rather than preloading the entire style library.
    5. Output contract: Structure, length, facts that must be preserved, and content that must not be fabricated.
    6. Failure and fallback: How to explain and stop when a tool is unavailable, a reference is missing, or the user’s goal conflicts with the skill boundary, rather than forcing the task through.

    The model makes scenario judgments. If you write the “why” clearly, it is more likely to trim steps correctly in similar tasks. If you provide only slogans, it will omit key reads based on impression.

    A schematic core instruction document can look like this. It is only a structural example, not a format specific to any product:

    1. name: copy-polish
    2. description: Polish an existing draft by unifying tone, reducing redundancy, and preserving facts. Use when the user asks for polishing, style rewriting, or adjustment to a specified style. Do not use for creating a technical proposal from scratch or modifying program code.
    3. steps:
    4. 1. Confirm the draft, audience, prohibited words, and whether a style is specified. If the draft is missing, ask for it first.
    5. 2. Only when the user names a style, read the corresponding single style guide under references.
    6. 3. List the key changes first, then provide the revised draft, and mark sentences that may change the original meaning.
    7. 4. Do not call code execution unless the user explicitly requests batch file processing.

    Progressive Disclosure: Fast and Efficient, but Not Guaranteed to Hit Every Time

    When invoking skills, the entire directory should not be read into context. A reasonable process is: first look at the names and descriptions of the skills to route; after a match, read the core instructions; open the references, scripts, and templates pointed to by the instructions only when the current step needs them. When optimizing copy, if a “write code” skill appears and its description does not match, stop going deeper. Only when a copywriting skill appears and its description matches should you continue. If the user wants only one style, read only that style entry.

    The benefits are direct: faster responses, fewer tokens, and more context left for user materials and intermediate results. The cost is that routing and the judgment of whether another file is necessary depend on the model, so calls are occasionally missed. The mitigation is not to write every file into the system prompt. Instead, make descriptions decidable, hard-code key read points in steps, and use an evaluation set to cover both types of errors: “should have read but did not” and “should not have read but did.” For steps that depend heavily on external files, use explicit conditional statements in the instructions instead of vague phrases such as “you may refer to related materials,” which cannot be executed.

    How to Tell a Good Skill from a Bad One

    Use a task set rather than subjective preference for scoring. Prepare several real inputs: typical requests, boundary requests, nearby requests that should be rejected, and requests with insufficient information. Check four things for each item.

    • Routing: Is the skill selected when it should be, and does it avoid selection when it should not be? Skills with vague descriptions often fail here.
    • Fidelity: Does it follow the order, read references only under the specified conditions, and avoid expanding the scope without authorization?
    • Output: Does it meet the definition of done? Have facts been altered during polishing? Are uncertain points marked?
    • Cost: On average, how much irrelevant material is read? A skill that stuffs everything into context may look knowledgeable in the short term, but over time it crowds out the information that actually matters for the task.

    Good skills have narrow boundaries, checkable steps, examples that cover counterexamples, and the ability to stop when something fails. Bad skills have universal descriptions, bodies containing only stylistic adjectives, long documents pasted in full, and no “when not to use” section. When using a skill themselves, authors should keep at least one fixed set of test cases and rerun it whenever the description or read conditions change, so that changing one sentence does not silently change the trigger scope.

    What to Check When Reusing Someone Else’s Skill

    When downloading or copying an existing skill, the first step is not to enable it directly but to review it. Check whether the core instructions clearly state triggers and exclusions. Check whether scripts do only what the instructions promise, and whether they perform unexpected file reads/writes or network behavior. Check whether references are consistent with the body citations and whether any paths are broken. Check whether examples include failure cases. Do not enable scripts you do not understand. For versioning, keep provenance notes and a change log so behavior changes can be compared later.

    When adapting a skill for your own use, prioritize changing the description and definition of done, then delete unused references, and only then add new scripts. Many people do the opposite: they pile up assets first, and the skill is already routed incorrectly at the selection stage. Do not put private workflows, accounts, or internal standards into shareable directories. When external capabilities are needed, state the prerequisites and human confirmation points clearly in the instructions.

    Building Your First Skill from Scratch

    Choose a small task you do every week with relatively stable rules, such as turning meeting highlights into fixed sections. First handwrite three satisfactory outputs and two unsatisfactory outputs, and infer the definition of done from them. Then write the name, description, and steps of no more than one page, and test it in a real conversation. If it fails because “it was not selected,” change the description. If “steps were skipped,” hard-code the conditions. If “output drifts,” add an output contract and counterexamples. Once it is stable, split overly long detailed rules into references and add an evaluation: read a detailed rule only when that rule is named. Put scripts last—if instructions and templates can solve the problem, do not write code first.

    At that point, you are no longer just a consumer of skills. You can explain why it was called, why a certain reference should not be loaded, and which sentence affects behavior. This is closer to a real workplace capability than collecting a pile of directories: rules are reusable, judgment is testable, and context is reserved only for the information the current task truly needs.