microsoft/upgrade-agent-plugins-creating-skills
> Create, validate, and iteratively improve agent skills that follow Anthropic's best practices. Use this skill whenever someone wants to create a new skill, improve an existing skill, write a SKILL.md, set up a skill directory structure, or needs guidance on skill authoring patterns. Also triggers when users mention "custom instructions", "agent skill", "skill template", or want to codify a workflow into a reusable skill. This skill enforces a create-validate-improve loop that produces production-ready skills passing code review on the first submission.
npx skills add https://github.com/microsoft/upgrade-agent-plugins --skill creating-skills
This skill guides you through producing agent skills that follow Anthropic's official best practices. It enforces an iterative loop: draft → validate → improve → re-validate, until the skill meets all quality criteria.
scripts/validate_skill.ps1 (Windows) or scripts/validate_skill.sh (Linux/macOS)Every skill goes through this cycle. Your job is to figure out where the user is and help them progress.
references/validation-rules.md).Before creating a new skill — or even before capturing intent in detail — scan for existing skills that might already cover the need.
find . -name "SKILL.md" -type f
name and description fields. Build a compact inventory: migrating-wcf-to-corewcf | Migrates WCF services from .NET Framework to CoreWCF...
managing-target-frameworks | Manages target frameworks in .NET project files...
processing-pdfs vs pdf-processing) are a warningStill run the scan — the improved skill's new description or triggers might now overlap with another skill that didn't overlap before. Check specifically for trigger phrase collisions after editing descriptions.
Skip this step only when the user explicitly says "I know there's no overlap" or when the skill name was provided by the user as a deliberate choice.
Start by understanding what the user wants. If the current conversation already contains a workflow they want to capture ("turn this into a skill"), extract answers from context first.
Gather these essentials (ask only what's missing):
Don't over-interview. If you have enough to draft, draft. You can refine later.
Read templates/SKILL-TEMPLATE.md for the starting structure.
The frontmatter includes name, description, and an optional metadata block with traits (pipe-separated technology tags) and discovery (e.g., lazy for on-demand loading). See the template for the exact format.
Conciseness is non-negotiable. Claude is already smart. Only add context Claude doesn't already have. For every paragraph, ask: "Does this justify its token cost?"
Match freedom to fragility:
Write descriptions in third person. The description is injected into a system prompt. "Processes Excel files and generates reports" — not "I can help you" or "You can use this to."
Make descriptions pushy. Skills tend to under-trigger. Include both what the skill does AND when to use it, with specific trigger phrases and contexts.
Use language-neutral terminology. Say "project file" instead of .csproj when the context applies to any .NET project type (C#, VB.NET, F#). Only use specific extensions when the context is truly language-specific.
Explain the why. Instead of rigid MUSTs in all caps, explain reasoning. Claude responds better to understanding intent than to blunt force rules.
skill-name/SKILL.md — Required. Under 500 lines.references/ — Optional. Detailed docs loaded on demand.some-domain.mdanother-domain.mdscripts/ — Optional. Executable utilities.validate.pyhelper.shtemplates/ — Optional. Output templates.assets/ — Optional. Fonts, icons, images.Format: lowercase letters, numbers, hyphens only. Max 64 chars. No reserved words ("anthropic", "claude").
Choosing a good name — lead with a gerund verb:
The name should answer "what does this skill do?" in 2-5 hyphenated words. Start with a gerund (verb ending in -ing) that describes the primary action:
| Action type | Pattern | Examples |
|-------------|---------|----------|
| Migration (A→B) | migrating-{source}-to-{target} | migrating-wcf-to-corewcf, migrating-newtonsoft-to-system-text-json |
| Migration (general) | migrating-{what} | migrating-aspnet-identity, migrating-global-asax |
| Conversion | converting-to-{target} | converting-to-sdk-style |
| Management | managing-{what} | managing-target-frameworks, managing-package-references |
| Integration | integrating-{what} | integrating-autofac-with-dotnet |
| Modification | modifying-{what} | modifying-project-properties |
Naming anti-patterns:
msmq-migration → ✅ migrating-to-msmq-messagingmigrating-aspnet-identity-migration → ✅ migrating-aspnet-identityhelper, utils, tools, data, filessystem-security-cryptography-migration → ✅ migrating-cryptography-namespacesException — scenario and system skills: Gerund naming applies to production and agent skills. Scenario skills (discovery: scenario) are multi-stage workflow orchestrators — use noun-form names that describe the workflow: dotnet-version-upgrade, not upgrading-dotnet-version. System skills (discovery: system) are infrastructure capabilities loaded by the system prompt — use noun-form names that describe the concern: state-management, plan-generation, task-execution.
> Related skill: callout in the Overview section).metadata frontmatter fields (traits, discovery) for skill routing. Preserve these when improving existing skills. Include them when creating new skills.This is where most skill authoring fails — people skip validation entirely.
Read references/validation-rules.md and run every check against the draft. Start with the automated validator to catch structural issues:
# Windows (PowerShell)
.\scripts\validate_skill.ps1 .\path\to\skill
# Linux / macOS / CI
bash scripts/validate_skill.sh ./path/to/skill
Both scripts check the same rules and produce the same scorecard. The automated checks cover structure, frontmatter, line counts, paths, and reference depth. The full validation also includes subjective checks that need human review:
Present findings to the user as a scorecard:
Skill Validation Report: [skill-name]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Structure — Frontmatter valid, 127 lines
✅ Description — Specific, third-person, trigger phrases included
⚠️ Conciseness — Lines 45-62 explain what Claude already knows
❌ Progressive disc. — References nested 2 levels deep (max 1)
✅ Terminology — Consistent throughout
⚠️ Code quality — scripts/helper.py has unexplained TIMEOUT=47
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Result: 2 issues to fix before this passes review
Testing is optional but recommended for skills with objectively verifiable outputs.
Create 2-3 realistic test prompts — things a real user would actually say. Not abstract placeholders, but concrete requests with file names, context, and detail. Share them with the user for confirmation.
For each test prompt:
If the skill has scripts, actually run them and verify they work.
Based on validation findings and test results:
After improving, go back to Step 3 (Validate) and run the checklist again. Repeat until clean.
Final checks before the skill is ready:
Present the final directory structure to the user and confirm it's ready for their repo.
Scenario skills that reference technology versions, release status, or support lifecycle dates should include a ## Current Facts section. This section provides authoritative grounding data that the agent uses instead of potentially stale training knowledge.
Convention:
## Current Facts<!-- Last updated: YYYY-MM-DD --> comment for freshness trackingExample:
## Current Facts
<!-- Last updated: 2025-11-12 -->
| Version | Status | Support Level | End of Life |
|---------|--------|---------------|-------------|
| .NET 10 | GA | LTS | 2028-11-14 |
| .NET 9 | GA | STS | 2026-11-10 |
| .NET 11 | Preview | — | 2030-11-12 (projected) |
> **Staleness check:** If the user asks about a version listed as **Preview** above,
> verify its current status using an internet search tool before answering —
> it may have shipped since this data was last updated.
The system prompt's Freshness Rule directs the agent to consult this section before answering version/lifecycle questions from training memory.
The user has been working through a problem and wants to capture the workflow. Extract from the conversation:
Draft a skill from this, then validate normally.
Copy the skill to a writable location. Read it carefully. Run validation. Present the scorecard. Fix issues iteratively. Preserve the original name.
Respect the user's time. Draft it, run a quick mental validation for the most critical rules (description quality, line count, no anti-patterns), mention any red flags, and deliver. You can always improve later.
Pay attention to the user's technical level. Some users building skills are experienced engineers; others are discovering what a terminal is for the first time.
Take microsoft/upgrade-agent-plugins-creating-skills from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.