All skills
microsoft avatar

/skill-authoring

@70c03ac official

Guidelines for writing Agent Skills that comply with the agentskills.io specification. WHEN: "create a skill", "new skill", "write a skill", "skill template", "skill structure", "review skill", "skill PR", "skill compliance", "SKILL.md format", "skill frontmatter", "skill best practices".

Use this Skill: https://skilld.dev/gh/microsoft/github-copilot-for-azure/skill-authoring

This session only. Nothing lands on disk.

referencesREFERENCE-LOADING.md

≈986 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Reference Loading Behavior

This document explains how Agent Skills load reference files and best practices for structuring them efficiently.

How References Load

Just-In-Time (JIT) Loading

Reference files (references/, scripts/, assets/) are NOT loaded when a skill activates. They load only when explicitly referenced via a markdown link or file path in the skill instructions.

<!-- This triggers a load -->
See [the guide](references/guide.md) for details.

<!-- This does NOT trigger a load -->
Documentation is available in the references folder.

<!-- This does NOT work - folder links don't load content -->
See [recipes](references/recipes/) for options.

Link to Files, Not Folders

Critical: Always link to actual files, never directories. Folder references don't trigger content loading.

❌ Won't Load ✅ Will Load
[Recipes](references/recipes/) [Recipes](references/recipes/README.md)
[AZD](references/recipes/azd) [AZD](references/recipes/azd/README.md)
[Services](references/services) [Services](references/services/README.md)

Use README.md as the entry point for folder-organized content.

No Caching Between Requests

Per agentskills Issue #97:

Reference files should be fully loaded each time they are referenced, regardless of whether they were previously read.

Implications:

  • Don't assume the agent remembers previous file contents
  • Write each reference as a self-contained unit
  • Include necessary context within each file

Whole File Loading

When a reference is loaded, the entire file loads - not just a section:

Link What Loads
[guide](references/guide.md) Entire guide.md
[guide](references/guide.md#section-2) Entire guide.md (anchor is hint only)

This means:

  • Split large topics into separate files
  • Keep each file < 1,000 tokens
  • Don't create monolithic reference documents

Token Efficiency Patterns

Selective Loading with Recipes

<!-- In SKILL.md - user picks ONE option -->
## Deployment Method

Choose your approach:
- [AZD](references/recipes/azd/README.md) - Quick start
- [Bicep](references/recipes/bicep/README.md) - IaC-first
- [Terraform](references/recipes/terraform/README.md) - Multi-cloud

<!-- Result: Only chosen recipe loads (~300 tokens) -->
<!-- Not all recipes (~900 tokens) -->

Self-Contained Reference Example

# AZD Deployment Errors

Quick reference for Azure Developer CLI deployment issues.

## Common Errors

| Error | Cause | Fix |
|-------|-------|-----|
| `CONTAINER_REGISTRY_UNAUTHORIZED` | ACR login expired | `az acr login --name <registry>` |
| `QUOTA_EXCEEDED` | Resource limits | Request increase or change region |

## Troubleshooting Steps

1. Check deployment logs: `azd deploy --debug`
2. Verify authentication: `az account show`
3. Check resource status: `azd show`

## Related

- [AZD Commands](README.md)
- [Verification](verify.md)

Note: This file works standalone without requiring other files to be loaded first.

Skill Visibility Limits

From GitHub Copilot CLI Issue #1130:

  • With many skills installed, not all appear in available skills list
  • Only ~31 of 49 skills visible in one example due to token limits
  • Hidden skills can still be invoked but aren't discoverable

Best practices:

  • Keep description concise but keyword-rich
  • Front-load trigger phrases for discoverability
  • Don't rely on users seeing all skills

Summary

Behavior Implication
JIT loading Only explicitly linked files load
No caching Write self-contained references
Whole file loads Split large content into small files
Token limits Structure for selective loading

Source: SKILL.md on GitHub

No alerts15d5 checks · Risk SAFE
  • Gen Agent Trust Hub15d

    This skill is a comprehensive documentation and validation guide for authoring agent skills. It follows security best practices and contains no identified threats.

  • Socket15d

    No alerts

  • Snyk15d

    Risk: LOW · No issues

  • Runlayer7mo

    14 files scanned · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 70c03ac. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 6 months ago
metadata
{
  "author": "Microsoft",
  "version": "1.0.1"
}
  • Documentation
  • skill-authoring
  • specification
  • agentskills
  • guidelines
  • frontmatter
  • validation

README badge

README badge for microsoft/github-copilot-for-azure/skill-authoring

Provides guidelines for authoring Agent Skills that comply with the agentskills.io specification, including frontmatter structure, token budgets, progressive disclosure patterns, and validation procedures. Use this when creating a new skill, reviewing a skill PR for compliance, or checking if a skill follows best practices.

Generated from the current SKILL.md.

What are the token limits for a skill?
SKILL.md must stay under 5000 tokens (soft limit ~500), and each reference file under 1000 tokens. References load only when explicitly linked, not on activation.
What should the description field contain?
The description must explain WHAT the skill does and WHEN to use it, be ≤60 words, and include a WHEN: clause with quoted trigger phrases.
How do references get loaded?
References are just-in-time loaded only when explicitly linked via [text](references/file.md) in the SKILL.md. Link to files, not folders, and each file loads in full.
What structure should a skill have?
A skill requires SKILL.md with frontmatter (name, description) and instructions. References and scripts directories are optional for detailed docs and executable code.
How do I validate my skill before submission?
Run npm run references to check for broken links and npm run tokens -- check to verify token limits. Use the checklist in references/CHECKLIST.md before submitting.

Generated from the current SKILL.md. These answers refresh after source changes.