medium severityclaude-code

    Claude Code SKILL.md Frontmatter Error — Fix Unrecognized Skills & Slash Commands

    Symptom: Your custom skill under .claude/skills/ never appears in Claude Code's skill list or auto-triggers.

    Direct-Answer Fix Summary

    Every Claude Code skill must live at .claude/skills/<skill-name>/SKILL.md (exact uppercase SKILL.md) with valid YAML frontmatter containing both name: (lowercase kebab-case) and description: (explaining when to invoke the skill). Unquoted colons in description:, wrong filename casing (skill.md), or leftover {{PLACEHOLDER}} tokens prevent registration.

    Broken vs. Fixed Configuration

    Broken: Wrong path + unquoted colon in YAML description
    # .claude/skills/deploy.md (wrong path!)
    ---
    name: Deploy Prod
    description: Deploy: release app to staging or production
    ---
    Fixed: .claude/skills/deploy/SKILL.md with valid YAML
    # .claude/skills/deploy/SKILL.md
    ---
    name: deploy
    description: "Run pre-release checks and deploy to staging. Use when asked to ship or verify a release; not for local dev."
    ---
    1. Run pnpm test && pnpm build.
    2. Verify clean git status before tagging.

    Why This Happens

    YAML fails silently when description: contains an unquoted colon (e.g. description: Deploy: push to staging), or developers place the file at .claude/skills/deploy.md instead of .claude/skills/deploy/SKILL.md.

    Step-by-Step Fix

    1. 01
      Use the directory structure .claude/skills/<slug>/SKILL.md

      Each skill needs its own folder with an uppercase SKILL.md entrypoint.

    2. 02
      Quote YAML strings containing colons or special characters

      Ensure name: is lowercase kebab-case and description: is double-quoted if it includes colons.

    3. 03
      Write concrete trigger conditions in description:

      Describe exact user intents and when NOT to trigger so Claude routes reliably.

    Automated AgentLint Checks That Catch This

    Frequently Asked Questions

    What is the difference between .claude/commands/ and .claude/skills/?

    Slash commands are explicit user-invoked prompts, whereas skills include YAML name/description metadata so Claude Code can also auto-select them when relevant.

    Can a skill bundle helper scripts alongside SKILL.md?

    Yes. Placing scripts inside .claude/skills/<name>/scripts/ keeps helper logic modular without bloating CLAUDE.md.

    Related Troubleshooting Guides