Creating skills

From dotnet/dotnet · View interactive version

Creating skills is an AI agent skill from the GitHub repository dotnet/dotnet. Create custom agent capabilities when discovering novel tools, receiving task-agnostic tips from reviewers, or after researching specialized workflows not covered in existing instructions. Teaches structure, YAML optimization for LLM discoverability, and token efficiency.

How to use this skill

Skill file

Creating GitHub Copilot Agent Skills

This skill teaches you how to create effective GitHub Copilot Agent Skills for this repository.

Pre-Check: Avoid Duplication

STOP and check before creating a new skill:

  1. Does it exist already?
  1. Should an existing skill be expanded?
  1. Should existing skill content change?

Only create new skill if:

Skill Structure

Directory Placement

Skills should be placed in .github/skills/ directory:

Each skill must have its own subdirectory with a lowercase, hyphenated name that matches the name field in the frontmatter.

File Requirements

Every skill directory must contain a SKILL.md file (case-sensitive) with:

  1. YAML Frontmatter (required):
  1. Markdown Body with clear instructions, examples, procedures, guidelines, and references

Additional Resources

Skills can include:

YAML Frontmatter Best Practices

The frontmatter is critical for skill discoverability and token efficiency:

Required Fields

Optional Fields

Description Guidelines

The description is crucial for skill discoverability. Think of it like SEO for LLMs:

✅ Good descriptions (specific, actionable, keyword-rich):

❌ Poor descriptions (vague, generic):

Token Efficiency

Skills should be concise to avoid wasting context tokens:

Skill Content Best Practices

Structure

  1. Title and Overview: Brief introduction
  2. When to Use: Clear triggering conditions
  3. Prerequisites: Required tools, setup, or knowledge
  4. Step-by-Step Instructions: Numbered procedures
  5. Examples: Concrete use cases
  6. Troubleshooting: Common issues
  7. References: Links to related documentation

Writing Style

Examples

Always include concrete examples:

Testing Your Skill

After creating a skill:

  1. Verify the file structure:

```bash

ls -la .github/skills/your-skill-name/

# Should show SKILL.md and any additional resources

```

  1. Validate YAML frontmatter:
  1. Test skill invocation:
  1. Iterate based on usage:

Examples from This Repository

See existing skills in .github/skills/ for reference:

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.