write-command

Create Claude Code slash commands with YAML frontmatter and argument definitions.

16|5|Updated Dec 3, 2025
One-click install
npx skills add https://github.com/wayne930242/weihung-claude-plugin --skill write-command
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-command
Source: https://github.com/wayne930242/weihung-claude-plugin/tree/main/skills/write-command
Command: npx skills add https://github.com/wayne930242/weihung-claude-plugin --skill write-command

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Manually writing slash commands can be error-prone, inconsistent, and time-consuming, especially when adhering to best practices for YAML frontmatter and argument handling. This skill automates the scaffolding and validation of new commands.

Core Features & Use Cases

  • Guided Command Creation: Generates a structured template for new slash commands, ensuring proper YAML frontmatter and argument definitions.
  • Best Practices Enforcement: Helps users follow official guidelines for command naming, descriptions, and argument handling.
  • Use Case: Quickly scaffold a new /deploy command with required environment and optional version arguments, ensuring it's ready for immediate use and adheres to Claude Code standards.

Quick Start

Help me write a new slash command called 'deploy' that takes a required 'environment' argument and an optional 'version' argument.

Frequently Asked Questions about write-command

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a new slash command for Claude Code?

Create slash commands by defining YAML frontmatter with metadata fields, argument definitions, and a script body. This Skill generates structured templates ensuring proper formatting, naming conventions, and argument handling so commands integrate seamlessly with Claude Code tooling.

What YAML frontmatter fields are required for a slash command?

Required YAML frontmatter includes command name, description, and argument definitions specifying type and whether arguments are required or optional. This Skill enforces these fields during scaffolding to meet Claude Code standards and prevent runtime errors.

Can I define optional and required arguments in a slash command?

Yes, slash commands support both required and optional arguments defined in YAML. Specify argument type and optionality in the frontmatter; this Skill validates and generates the correct syntax for both argument classes during command creation.

How do I ensure my slash command follows best practices?

This Skill applies official Claude Code guidelines during command scaffolding, covering naming conventions, description clarity, and argument handling patterns. Generated templates enforce consistency across projects and prevent common formatting mistakes.

What's the best way to test a new slash command after writing it?

Use the init_command.py tooling included with this Skill to validate and test commands before deployment. This scaffolding tool verifies YAML syntax, argument definitions, and integration readiness with the Claude Code command system.