claude-command-authoring
БесплатноБез исполняемых скриптовНе проверенCreates custom slash commands for Claude Code with proper syntax, frontmatter, arguments, bash execution, and file references. Use when building slash…
от diegosouzapw★ 68 звёзд на GitHubОб этом скилле
Claude Command Authoring
Create custom slash commands that extend Claude Code with frequently-used prompts and workflows.
Overview
Slash commands are Markdown files that define reusable prompts. They support:
- Arguments:
$1,$2,$ARGUMENTS - Bash execution:
!prefix for command output - File references:
@prefix to include file contents - Frontmatter: Metadata for configuration
- Namespacing: Organize in subdirectories
Quick Start
Basic Command
# Create a simple command
mkdir -p .claude/commands
cat > .claude/commands/review.md << 'EOF'
---
description: Review code for best practices and potential issues
---
Review the following code for:
- Code quality and readability
- Potential bugs or edge cases
- Performance considerations
- Security concerns
EOF
# Use it
/review
Command with Arguments
---
description: Fix a specific issue by number
argument-hint: <issue-number>
---
Fix issue #$1 following our coding standards and best practices.
Review the issue details, implement a fix, add tests, and create a commit.
Command with Bash Execution
---
description: Create a git commit from staged changes
allowed-tools: Bash(git *)
---
## Context
Current branch: !`git branch --show-current`
Staged changes: !`git diff --staged`
Recent commits: !`git log --oneline -5`
## Task
Create a single commit with a clear message based on the staged changes above.
Command with File References
---
description: Compare two implementations
argument-hint: <file1> <file2>
---
Compare these two implementations and explain the differences:
**File 1**: @$1
**File 2**: @$2
Provide a detailed comparison focusing on architecture, performance, and maintainability.
Command Scopes
Project Commands (.claude/commands/)
- Shared with your team via git
- Show "(project)" in
/help - Team-specific workflows
Personal Commands (~/.claude/commands/)
- Available across all your projects
- Show "(user)" in
/help - Individual preferences
Plugin Commands (plugin/commands/)
- Bundled with plugins
- Show "(plugin-name)" in
/help - Distributed via marketplaces
Frontmatter Options
| Field | Purpose | Example |
|---|---|---|
description |
Brief description shown in /help |
"Deploy to staging environment" |
argument-hint |
Expected arguments for autocomplete | "<environment> [--skip-tests]" |
allowed-tools |
Restrict tool usage | "Bash(git *), Read, Write" |
model |
Specific model to use | "claude-3-5-haiku-20241022" |
disable-model-invocation |
Prevent SlashCommand tool usage | true |
Argument Handling
All Arguments ($ARGUMENTS)
Fix issues: $ARGUMENTS
Usage: /fix-issues 123 456 789 → $ARGUMENTS = "123 456 789"
Individual Arguments ($1, $2, $3, ...)
Review PR #$1 with priority $2 and assign to $3
Usage: /review-pr 456 high alice → $1="456", $2="high", $3="alice"
Combining Arguments with Files
Compare @$1 with @$2 and summarize differences
Usage: /compare src/old.ts src/new.ts
Bash Execution with !
Execute bash commands before the prompt runs:
---
description: Show current project status
---
## Git Status
!`git status`
## Recent Activity
!`git log --oneline -10`
## Uncommitted Changes
!`git diff`
Based on the above, provide a summary of the current project state.
Output truncation: Commands producing >15,000 chars are truncated by default.
Set SLASH_COMMAND_TOOL_CHAR_BUDGET environment variable to adjust.
File References with @
Include file contents in your command:
---
description: Explain a specific file
argument-hint: <file-path>
---
# File Analysis
**File**: @$1
Provide a detailed explanation of:
1. Purpose and responsibility
2. Key functions and methods
3. Dependencies and imports
4. Potential improvements
Namespacing
Organize commands in subdirectories:
.claude/commands/
├── frontend/
│ ├── component.md → /component (project:frontend)
│ └── styling.md → /styling (project:frontend)
└── backend/
├── migration.md → /migration (project:backend)
└── testing.md → /testing (project:backend)
Access: /component or /frontend/component
Tool Restrictions
Limit what tools Claude can use:
---
description: Safe code review (read-only)
allowed-tools: Read, Grep, Glob
---
Review the codebase for issues without making any changes.
Claude can only use specified tools without asking permission.
Best Practices
1. Clear Descriptions
---
# ❌ Too vague
description: Deploy stuff
# ✅ Specific and helpful
description: Deploy to staging with health checks and Slack notification
---
2. Helpful Argument Hints
---
# ❌ Not helpful
argument-hint: args
# ✅ Clear expectations
argument-hint: <environ
Установить claude-command-authoring в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл claude-command-authoring?
Creates custom slash commands for Claude Code with proper syntax, frontmatter, arguments, bash execution, and file references. Use when building slash commands, creating custom Claude Code commands, setting up team workflows, or when users mention slash commands, command files, or .md command creation.
Как установить скилл claude-command-authoring?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл claude-command-authoring запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic