Skip to content

Expert guide for writing Claude Code slash commands with XML structure, YAML frontmatter, and argument handling.

CCM score
60 of 100
skills.sh installs
169
GitHub stars
2K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers command file locations, naming, and invocation as /command-name, for both project and personal scopes
  • Includes required XML tags (<objective>, <process>, <success_criteria>) plus conditional tags for context, verification, testing, and output
  • Explains YAML frontmatter fields such as description, argument-hint, and allowed-tools, with $ARGUMENTS and positional $1/$2 patterns
  • Designed for authors creating reusable team or personal prompt commands that load dynamic state with bash and file references

Install

$ npx -y skills add glittercowboy/taches-cc-resources --skill create-slash-commands -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Create effective slash commands for Claude Code that enable users to trigger reusable prompts with `/command-name` syntax. Slash commands expand as prompts in the current conversation, allowing teams to standardize workflows and operations. This skill teaches you to structure commands with XML tags, YAML frontmatter, dynamic context loading, and intelligent argument handling.

<quick_start>

1. Create `.claude/commands/` directory (project) or use `~/.claude/commands/` (personal) 2. Create `command-name.md` file 3. Add YAML frontmatter (at minimum: `description`) 4. Write command prompt 5. Test with `/command-name [args]` **File**: `.claude/commands/optimize.md`
---
description: Analyze this code for performance issues and suggest optimizations
---

Analyze the performance of this code and suggest three specific optimizations:

Usage: /optimize

Claude receives the expanded prompt and analyzes the code in context. </quick_start>

<xml_structure> All generated slash commands should use XML tags in the body (after YAML frontmatter) for clarity and consistency.

<required_tags>

Details

Repository
github.com/glittercowboy/taches-cc-resources
Categories
Skill & Plugin Building, Technical Documentation
First seen
Jun 3, 2026

Questions

What does the create-slash-commands skill do?

The create-slash-commands skill gives expert guidance for building Claude Code slash commands, the reusable prompts triggered with /command-name syntax. It teaches the XML tag structure, YAML frontmatter, dynamic context loading and argument handling a command needs.

How do I install the create-slash-commands skill?

Run npx -y skills add glittercowboy/taches-cc-resources --skill create-slash-commands -y in a project. Once installed, the agent can help you write new slash commands that follow the recommended structure.

Which skills lead the Skill & Plugin Building category?

create-slash-commands sits in the Skill & Plugin Building category, alongside find-skills, writing-for-agents, lark-skill-maker, skill-creator and discover-azure-skills. This skill focuses narrowly on command structure, so it suits projects that need custom slash commands rather than general skill authoring.

Where do slash commands created with this skill get saved?

Project commands go in .claude/commands/ and are shared with the team through version control. Personal commands go in ~/.claude/commands/ and are available across all your projects.

More from glittercowboy/taches-cc-resources

All 6

Similar to Create Slash Commands

More Skill & Plugin Building