xiaohongshu
xiaohongshu
building-commands
Expert at creating and modifying Claude Code slash commands. Auto-invokes when the user wants to create, update, modify, enhance, validate, or standardize slash commands, or when modifying command YAML frontmatter fields (especially 'model', 'allowed-tools', 'description'), needs help designing c...
Full skill instructions
You are an expert at creating Claude Code slash commands. Slash commands are user-triggered workflows that provide parameterized, action-oriented functionality.
Use a COMMAND when:
Use a SKILL instead when:
Use an AGENT instead when:
.claude/commands/command-name.md~/.claude/commands/command-name.mdplugin-dir/commands/command-name.md.claude/commands/git/commit.md → /project:git:commitSingle Markdown file with YAML frontmatter and Markdown body.
---
description: Brief description of what the command does
---
---
description: Brief description of what the command does
allowed-tools: Read, Grep, Glob, Bash
argument-hint: [parameter-description]
---
---
description: Brief description of command functionality # Required
allowed-tools: Read, Write, Edit, Grep, Glob, Bash # Optional: Pre-approved tools
argument-hint: [filename] [options] # Optional: Parameter guide for users
model: claude-3-5-haiku-20241022 # Optional: Specific model (see warning below)
disable-model-invocation: false # Optional: Prevent auto-invocation
---
Commands support VERSION ALIASES or FULL IDs (but NOT short aliases):
---
description: Fast operation
model: claude-haiku-4-5 # ✅ Recommended - version alias (auto-updates)
---
---
description: Stable operation
model: claude-haiku-4-5-20251001 # ✅ Also valid - full ID (locked version)
---
DO NOT use SHORT ALIASES in commands (they cause API 404 errors):
model: haiku # ❌ WRONG - causes "model not found" error
model: sonnet # ❌ WRONG - causes "model not found" error
model: opus # ❌ WRONG - causes "model not found" error
Best Practice: Omit model field to inherit from conversation:
---
description: Inherits conversation model automatically
# No model field - will use whatever model the conversation uses
---
Model Format Options:
Short Aliases (❌ DON'T WORK in commands):
haiku, sonnet, opus - Only work in agentsVersion Aliases (✅ RECOMMENDED for commands):
claude-haiku-4-5 - Auto-updates to latest snapshotclaude-sonnet-4-5 - Auto-updates to latest snapshotclaude-opus-4-1 - Auto-updates to latest snapshotFull IDs with Dates (✅ STABLE for commands):
claude-haiku-4-5-20251001 - Locked to specific snapshotclaude-sonnet-4-5-20250929 - Locked to specific snapshotclaude-opus-4-1-20250805 - Locked to specific snapshotWhy the Difference?
haiku → claude-haiku-4-5-20251001)claude-* format)When to Specify Model:
Recommendation:
claude-haiku-4-5 (version alias)Finding Current Model IDs: Check Anthropic's model documentation for current versions.
The disable-model-invocation field prevents Claude from autonomously triggering the command via the SlashCommand tool.
---
description: Delete all test data from database
disable-model-invocation: true # ✅ Prevents accidental invocation by Claude
allowed-tools: Bash
---
When to Use:
Effect: Command still appears in /help and can be manually invoked by users, but Claude won't suggest or execute it automatically.
review-pr, run-tests, deploy-app)git/commit, test/run)The Markdown body contains instructions for Claude to execute when the command is invoked.
Commands support special variables for arguments:
$1, $2, $3, etc.: Positional arguments$ARGUMENTS: All arguments as a single string---
description: One-line description of what this command does
allowed-tools: Read, Grep, Bash
argument-hint: [arg1] [arg2]
---
# Command Name
[Brief description of the command's purpose]
## Arguments
- `$1`: Description of first argument
- `$2`: Description of second argument
- Or use `$ARGUMENTS` for all arguments
## Workflow
When this command is invoked:
1. **Step 1**: Action to perform
2. **Step 2**: Action to perform
3. **Step 3**: Action to perform
## Examples
### Example Usage: /command-name value1 value2
Expected behavior:
1. [What happens]
2. [What happens]
3. [Result]
## Important Notes
- Note about usage or constraints
- Note about required context or setup
Ask the user:
.claude/commands/ directory/command-name arg1 arg2This skill includes a validation script:
Python script for validating command files.
Usage:
python3 {baseDir}/scripts/validate-command.py <command-file.md>
What It Checks:
Returns:
Example:
python3 validate-command.py .claude/commands/run-tests.md
✅ Command validation passed
Name: run-tests
Description: Runs test suite and reports results
Allowed tools: Read, Grep, Bash
Model: claude-haiku-4-5 (valid version alias)
argument-hint: [filename]
Body:
Process the file: $1
Usage: /process-file data.csv
argument-hint: [source] [destination]
Body:
Copy from $1 to $2
Usage: /copy-file src.txt dest.txt
argument-hint: [search-term] [optional-path]
Body:
Search for "$1" in ${2:-.}
Usage: /search "error" ./src or /search "error"
argument-hint: [commit-message]
Body:
Create commit with message: $ARGUMENTS
Usage: /commit Add new feature for user authentication
allowed-tools: Read, Grep, Glob
Use for: Analysis, searching, reporting
allowed-tools: Read, Write, Edit, Grep, Glob
Use for: Code generation, file manipulation
allowed-tools: Read, Grep, Glob, Bash
Use for: Testing, building, git operations
allowed-tools: Read, Write, Edit, Grep, Glob, Bash
Use for: Complete workflows (test + commit + push)
---
description: Commit changes and push to remote
allowed-tools: Read, Grep, Bash
argument-hint: [commit-message]
---
# Git Commit and Push
Commit all changes with the message: $ARGUMENTS
Then push to the remote repository.
## Workflow
1. Run `git add .`
2. Create commit with message from $ARGUMENTS
3. Push to origin
4. Report status
Usage: /git-commit-push Add authentication feature
---
description: Review a pull request for quality and security
allowed-tools: Read, Grep, Bash
argument-hint: [PR-number]
---
# Review Pull Request
Review pull request #$1 for:
- Code quality issues
- Security vulnerabilities
- Test coverage
- Documentation
Use GitHub CLI to fetch PR details and analyze changes.
Usage: /review-pr 123
---
description: Run specific test suite and report results
allowed-tools: Read, Grep, Bash
argument-hint: [test-path]
---
# Run Tests
Execute tests in: $1
Report:
- Pass/fail status
- Coverage metrics
- Failed test details
Usage: /run-tests ./tests/unit
---
description: Create a new React component with tests
allowed-tools: Read, Write, Grep, Glob
argument-hint: [component-name]
---
# Create React Component
Generate a new React component: $1
Include:
- Component file: $1.tsx
- Test file: $1.test.tsx
- Storybook file: $1.stories.tsx
Usage: /create-component UserProfile
---
description: Generate API documentation from code
allowed-tools: Read, Write, Grep, Glob, Bash
argument-hint: [source-directory]
---
# Generate API Docs
Generate API documentation for: ${1:-./src}
Output: ./docs/api.md
Usage: /generate-docs ./src/api or /generate-docs
Organize related commands in subdirectories:
.claude/commands/
├── git/
│ ├── commit.md → /project:git:commit
│ ├── pr.md → /project:git:pr
│ └── rebase.md → /project:git:rebase
├── test/
│ ├── run.md → /project:test:run
│ └── coverage.md → /project:test:coverage
└── deploy/
├── staging.md → /project:deploy:staging
└── production.md → /project:deploy:production
Benefits:
When creating commands:
---
description: Process a data file safely
allowed-tools: Read, Bash
---
# Process File
Process file: $1
## Safety Checks
1. Validate $1 is a valid file path
2. Check file exists and is readable
3. Verify file extension is allowed
4. Process with restricted permissions
Before finalizing a command, verify:
Full templates and examples are available at:
{baseDir}/templates/command-template.md - Basic command template{baseDir}/references/command-examples.md - Real-world examplesCommands need ongoing maintenance to stay effective.
Commands must use VERSION ALIASES or FULL IDs, not short aliases.
# ✅ CORRECT - version alias
model: claude-haiku-4-5
# ✅ CORRECT - full ID
model: claude-haiku-4-5-20251001
# ❌ WRONG - causes "model not found" error
model: haiku
model: sonnet
model: opus
Why: Commands are passed directly to the API. Only agents translate short aliases.
Update commands when:
When reviewing commands for updates:
run-tests, deploy-app)Problem: Command has model: haiku (short alias)
Solution: Change to version alias format:
# Before
model: haiku
# After
model: claude-haiku-4-5
Problem: Command needs to accept parameters Solution: Add argument-hint and document in body:
argument-hint: "[filename] [options]"
Problem: Command uses Bash without validation Solution: Either remove Bash from allowed-tools, or add safety checks in the workflow
Model Selection
claude-haiku-4-5claude-sonnet-4-5 or claude-opus-4-1Tool Permissions
Read, Grep, GlobArgument Documentation
Security
When the user asks to create a command:
When the user asks to update or fix commands:
Be proactive in:
Your goal is to help users create powerful, safe, and well-documented slash commands that streamline their workflows.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience