Create an applicable skill with clear steps, metadata, and success checks.
Section 1.1 1 of 7
Overview
Focus
Create an applicable skill with clear steps, metadata, and success checks.
Your route through the lesson
1.2 Skills, prompts, and executable tools
1.3 The SKILL.md file and its metadata
1.4 Discovery, trigger descriptions, and non-trigger cases
1.5 Put it into practice
1.6 Guided comparison
1.7 A request near a skill trigger boundary
All required teaching is included here. Review selections are saved. Choose a correct answer for every question to continue; retries are unlimited. Study time and personal notes are optional.
Section 1.2 2 of 7
Skills, prompts, and executable tools
Focus
Explain how a reusable procedure differs from a prompt and an executable tool.
A skill packages instructions and supporting material for a recurring task. A prompt is the input given to a model for a particular interaction. A tool is executable functionality controlled by an implementation and its permissions. A skill can tell an agent when to inspect a repository or run a supplied checker, but it cannot itself grant permission to execute that checker or modify the repository.
Imagine a documentation skill that says to identify the audience, inspect relevant source, draft a usage example, and check that the example agrees with the implementation. The procedure can improve consistency across many requests. The file-reading tool still controls which files can be read, and the writing tool still controls which paths may be changed.
Packaging also creates maintenance obligations. A reusable procedure needs a clear applicability description, ordered steps, required inputs, failure handling, and observable success checks. “Write excellent documentation” is only an aspiration. “For each public command, show one valid invocation and its expected output, checked against the supplied implementation” defines behavior a fixture can assess.
// Quick review
Check your understanding.
Choose an answer for immediate feedback. Retry freely; a correct answer for every question unlocks the next section.
Section 1.3 3 of 7
The SKILL.md file and its metadata
Focus
Create a valid SKILL.md file with useful metadata and explicit completion criteria.
The portable Agent Skills format uses a directory containing SKILL.md. The file begins with YAML frontmatter: a small metadata block between lines containing three hyphens. Markdown instructions follow it. The required fields are name and description. The name matches the directory, uses lowercase letters, digits, and single hyphens, and is at most 64 characters. The description is nonempty, at most 1,024 characters, and explains both behavior and applicability.
A small example names a directory repository-analysis and starts with name: repository-analysis. Its description says it maps source structure and dependencies when the user requests repository architecture analysis. The body explains how to inspect entry points, trace dependencies, report uncertainty, and stop when required source is unavailable.
Optional metadata can record a version as a string. A version records which procedure produced an output; it is not evidence of correctness. The official format specification provides exact constraints and optional fields. Reading that reference needs internet access but no account; everything needed for the core lab is taught here. The lab validates only its documented frontmatter subset rather than claiming to implement every YAML feature.
// Quick review
Check your understanding.
Choose an answer for immediate feedback. Retry freely; a correct answer for every question unlocks the next section.
Section 1.4 4 of 7
Discovery, trigger descriptions, and non-trigger cases
Focus
Use positive and near-miss cases to test whether a skill should activate.
Discovery presents candidate skill names and descriptions before loading complete procedures. A trigger is the condition that makes a skill applicable. A non-trigger case resembles the task’s vocabulary but should not activate it. Testing both reduces accidental loading and missed assistance.
For repository-analysis, “Explain how this repository’s entry points connect” is positive. “Explain what a repository is” is a near miss: it asks for a general definition, not inspection of a specific codebase. For documentation, “Write a usage guide for this command” is positive, while “Read this existing guide and answer a question” need not trigger the authoring procedure. For troubleshooting, “Diagnose this traceback” is positive, while “Define the word traceback” is a near miss.
A deterministic activation fixture can encode these expected decisions, making description changes testable. It does not prove that every language model will interpret the description identically. Record false activations and missed activations separately. An always-on skill can appear to have no misses while imposing irrelevant instructions on every task, so positive-case accuracy alone is insufficient.
// Quick review
Check your understanding.
Choose an answer for immediate feedback. Retry freely; a correct answer for every question unlocks the next section.
Section 1.5 5 of 7
Put it into practice
Focus
Package three temporary skills and run their metadata and activation fixtures.
Save week11.py in your exercise folder and run python week11.py --lesson 1. The lab creates repository-analysis, documentation, and troubleshooting directories inside a temporary exercise root. Each contains a real SKILL.md. It validates metadata and tests a positive request and a near miss for each procedure. Nothing is installed into your personal assistant configuration.
pathlib is Python’s standard-library path interface. Path / "name" joins a path component; write_text writes text with an explicit encoding:
from pathlib import Path
import tempfile
with tempfile.TemporaryDirectory() as folder:
skill = Path(folder) / "repository-analysis"
skill.mkdir()
(skill / "SKILL.md").write_text("---\nname: repository-analysis\ndescription: Analyze repository architecture.\n---\nInspect entry points.\n", encoding="utf-8")
assert (skill / "SKILL.md").is_file()
The with block removes the temporary directory afterward. The full lab adds complete procedures and failure fixtures. Expect all three metadata checks and six activation decisions to pass. These checks evaluate packaging and the supplied classifier, not model behavior or permission to run arbitrary bundled code.
Choose an answer for immediate feedback. Retry freely; a correct answer for every question unlocks the next section.
Section 1.6 6 of 7
Guided comparison
Focus
Explain metadata, activation, and behavioral checks as separate evidence.
The completed repository-analysis package has matching name and directory, a specific description, and steps that identify entry points before describing dependencies. The positive request activates it, while the general-definition near miss does not. This establishes the expected boundary for the supplied discovery fixture.
The documentation package activates for authoring a command guide. Its body requires an invocation, expected output, and an implementation check. A metadata validator cannot verify those steps were followed; a behavioral fixture must inspect the produced artifact. The troubleshooting package similarly requires a reproducible symptom, a hypothesis tied to evidence, and a bounded diagnostic step.
The lab also changes a name to contain consecutive hyphens and removes a required description. Both packages fail validation before activation is considered. These failures do not mean the underlying task is impossible; they mean the portable package is malformed. Keeping failure categories separate helps maintenance: repair metadata for a format defect, refine trigger wording for a false activation, and revise the procedure or supporting assets for an incorrect output.
// Quick review
Check your understanding.
Choose an answer for immediate feedback. Retry freely; a correct answer for every question unlocks the next section.
Section 1.7 7 of 7
A request near a skill trigger boundary
Focus
Apply a trigger boundary to a request that mentions a domain without requesting its procedure.
A user asks, “Why does this troubleshooting guide use the word rollback?” The request mentions troubleshooting but asks for an explanation of language in an existing document. Activating an incident-diagnosis skill could lead the assistant to request logs, inspect services, or propose unnecessary changes.
A completed applicability decision reads the requested action: explain a term in supplied text. It answers from that context without launching diagnosis. If the user instead says, “The service fails after rollback; diagnose this traceback,” the evidence and requested action match troubleshooting. The same keyword appears in both, but their purposes differ.
This transfer case teaches discovery as task interpretation rather than simple keyword spotting. A skill description should state what work it performs and enough exclusions to distinguish close neighbors. The lab’s deterministic fixtures encode the boundary explicitly; an actual assistant’s discovery behavior must be tested with its real model and prompt configuration. A correct non-trigger is useful success, because it avoids unnecessary context loading and irrelevant operational behavior.
// Quick review
Check your understanding.
Choose an answer for immediate feedback. Retry freely; a correct answer for every question unlocks the next section.
Your personal notes
Optional, ungraded, and saved only in this browser. Export a backup from the Academy homepage to keep them.