SKILL.md file — and the agent uses it reliably every time the request matches.
When to Create a Custom Skill
Build a custom Skill when:- Your agents need to call an internal or third-party API that isn’t covered by an official Skill.
- You find yourself writing the same tool instructions in multiple agent configs.
- An agent is making inconsistent API calls that a clear playbook would fix.
- You want to share a capability across your team or publish it for others to use.
scoutos/scout-skills pack already covers what you need. Custom Skills are for everything outside of that.
The SKILL.md Format
A Skill is a directory containing aSKILL.md file. The file has two parts: a YAML frontmatter block and a free-form Markdown instruction body.
Frontmatter
The frontmatter defines the Skill’s identity and — most importantly — its activation criteria:Instruction Body Sections
The body is free-form Markdown. Structure it with these sections for best results:Capabilities
A short list of what the Skill can do. Helps the agent understand the Skill’s scope.
When to Use
Explicit trigger conditions. Be precise about the user requests that should activate this Skill.
Available Tools
Each tool or endpoint with method, URL, and parameters. The agent follows this exactly.
Authentication
Required credentials and the environment variable names that hold them.
Usage Examples
Concrete user prompts and the expected agent action. Include the most common cases.
Error Handling
HTTP error codes and what the agent should do for each. Don’t leave the agent to guess.
Complete Example: Weather Skill
Here is a fullSKILL.md for a hypothetical weather API integration. Use it as a template for your own Skills.
Usage Examples
User: “What’s the weather in San Francisco right now?” Action: Callget_current_weather with location: "San Francisco".
Present temperature, conditions, and humidity in a friendly summary.
User: “Should I bring an umbrella to Seattle this week?” Action: Call
get_forecast with location: "Seattle" and days: 7.
Check for rain probability and advise accordingly.
User: “What’s the temperature in Tokyo in Fahrenheit?” Action: Call
get_current_weather with location: "Tokyo" and units: "imperial".
Error Handling
- 401 Unauthorized: The API key is missing or invalid. Ask the user to verify
that
WEATHER_API_KEYis set correctly. - 404 Not Found: The location wasn’t recognized. Ask the user to clarify or try a nearby major city.
- 429 Rate Limited: Too many requests. Wait a few seconds and retry once. Inform the user if the retry also fails.
- Network errors: Inform the user the service is temporarily unavailable and suggest trying again shortly.
${VAR_NAME} syntax anywhere in skill.json to reference environment variables at runtime:
Installing Your Skill
Once your files are ready, install the Skill so your agents can use it:Testing Your Skill
Before sharing your Skill, test it with the exact phrases real users will say. A Skill that works for “weather in London” but not “will it rain tomorrow in London?” has a trigger description problem.Run test prompts
Try at least five different phrasings of requests the Skill should handle. Confirm the agent activates the Skill for each one.
Test negative cases
Try prompts that should NOT activate the Skill. Confirm the agent doesn’t load it for unrelated requests.
Test error paths
Temporarily set an invalid API key and confirm the agent responds as your Error Handling section documents.
Best Practices
Write trigger-focused descriptions
The frontmatterdescription is how the agent decides to activate your Skill. Write it as activation criteria, not marketing copy.
Be explicit about which tool to call
Don’t make the agent guess which tool to call. Spell it out in your Usage Examples:Keep instructions actionable
Every instruction should describe an action, not a concept:| Vague | Actionable |
|---|---|
| ”This skill handles weather data." | "When the user asks about weather, extract the location, call get_current_weather, and summarize temperature and conditions." |
| "Handle errors appropriately." | "On 404, ask the user to clarify the location or try a nearby major city.” |
One Skill per domain
Resist combining unrelated capabilities into one Skill. An agent that has a “weather and CRM and billing” Skill will activate it incorrectly. Keep each Skill focused on a single domain or service.Sharing Your Skill
You can share Skills in three ways:GitHub Repository
Push your Skill directory to a public or private repo. Others install with
npx skills add org/skill-name.NPM Package
Best for versioned releases with changelogs and semver tags.
Direct Copy
Paste the Skill directory to teammates for quick sharing in a monorepo or shared workspace.
- Create a repository with your Skill files at the root.
- Add a
README.mdwith installation instructions and example prompts. - Tag releases with semantic versions (e.g.,
v1.0.0).
Troubleshooting
| Issue | What to check |
|---|---|
| Agent doesn’t activate the Skill | The description doesn’t match the user’s phrasing. Add the exact words and synonyms users say to the description frontmatter, then reinstall. |
| Agent activates but does the wrong thing | Add more prescriptive instructions to SKILL.md. Tell the agent exactly which tool to call and what to do with the response. Add an example covering the failing case. |
| Authentication errors at runtime | Run echo $YOUR_API_KEY to confirm the variable is exported. Check that the variable name in skill.json matches exactly. Restart your agent session after setting new variables. |
Skill installs but doesn’t appear in npx skills list | Confirm the name field in your frontmatter matches what you expect. The list uses the frontmatter name, not the directory name. |
| Tool calls return unexpected errors | Add an Error Handling section to SKILL.md that covers the specific HTTP status codes your API returns. The agent will follow those instructions when errors occur. |
Reference
Use the official Scout Skills repository as a model for structure and style. Thescout and scout-workflow Skills demonstrate well-written trigger descriptions, authentication setup, and concrete endpoint documentation with parameters:
- Repository: github.com/scoutos/scout-skills
Skills Overview
Learn how Skills load, route, and execute inside an agent’s context.
Available Skills
Explore the official Scout and Scout Workflow Skills as reference implementations.