directive-synthesis
БесплатноБез исполняемых скриптовНе проверенSynthesize structured directives and command specifications. Creates executable instruction sets with proper syntax and parameter definitions.
от qodex-ai★ 50 звёзд на GitHubОб этом скилле
Claude Code Command Builder
Purpose
Guide users through creating effective Claude Code slash commands with proper structure, argument handling, and workflow design. Auto-invokes when users want to create or modify custom commands.
When to Use
Auto-invoke when users mention:
- Creating commands - "create command", "make command", "new slash command"
- Command structure - "command template", "command format", "command frontmatter"
- Arguments - "$ARGUMENTS", "$1", "$2", "command parameters", "positional args"
- Workflows - "command workflow", "command steps", "command process"
- Bash execution - "!
command", "execute bash in command", "command with bash"
Knowledge Base
- Official docs:
.claude/skills/ai/claude-code/docs/code_claude_com/docs_en_slash-commands.md - Project guide:
.claude/docs/creating-components.md - Examples in repository:
.claude/commands/
Process
1. Gather Requirements
Ask the user:
Let me help you create a Claude Code slash command! I need a few details:
1. **Command name** (lowercase-with-hyphens):
Example: deploy, review-pr, commit, analyze-tokens
This will be invoked as: /your-command-name
2. **What does this command do?**
Describe the workflow in 1-2 sentences.
3. **Does it need arguments?**
- None (simple prompt)
- All arguments: $ARGUMENTS
- Positional: $1, $2, $3, etc.
4. **Does it need bash execution?**
Commands that run before the slash command (e.g., !`git status`)
5. **Scope:**
- Personal (`~/.claude/commands/`) - just for you
- Project (`.claude/commands/`) - shared with team
6. **Namespace/subdirectory?**
Example: git/, deploy/, testing/
Helps organize related commands
2. Validate Input
Check the command name:
- Must be valid filename (no spaces, special chars except hyphen)
- Descriptive and memorable
- Won't conflict with built-in commands
- Use hyphens (not underscores)
Validate arguments:
- Define expected arguments
- Provide defaults if needed
- Document argument order
3. Determine Command Type
Simple Prompt (no frontmatter):
Analyze this code for performance issues and suggest optimizations.
With Arguments:
---
argument-hint: [file-path]
description: Analyze file for performance issues
---
Analyze the file at $1 for performance issues and suggest optimizations.
With Bash Execution:
---
allowed-tools: Bash(git status:*), Bash(git diff:*)
description: Create a git commit
---
## Current State
- Git status: !`git status`
- Staged changes: !`git diff --staged`
- Recent commits: !`git log --oneline -5`
## Your Task
Based on the above changes, create a git commit with a clear, conventional commit message.
Full-Featured:
---
allowed-tools: Bash(npm run:*), Bash(git add:*), Bash(git commit:*)
argument-hint: [component-name]
description: Create a new React component with tests
model: sonnet
---
# Create React Component
Component name: $1
Execute the following workflow:
1. **Validate Input**
!`test -n "$1" && echo "Creating component: $1" || echo "Error: Component name required"`
2. **Check Existing Files**
!`ls src/components/$1.tsx 2>/dev/null || echo "Component does not exist"`
3. **Create Files**
Create the following files:
- `src/components/$1.tsx`
- `src/components/$1.test.tsx`
- `src/components/$1.module.css`
4. **Run Tests**
After creation, run: !`npm run test -- $1`
4. Generate Command File
Create command structure based on complexity:
Template for Simple Command:
Brief description of what the command does.
[Prompt instructions for Claude]
Template for Command with Frontmatter:
---
argument-hint: [arg1] [arg2]
description: Brief description shown in /help
allowed-tools: Bash(command:*), Read, Write
model: sonnet
disable-model-invocation: false
---
# Command Name
Usage: /command-name [args]
[Detailed instructions]
5. Build Command Workflow
Structure the workflow with clear steps:
Execute the following workflow:
1. **Step Name**
```bash
# Bash command (if needed)
command arg1 arg2
- What this step does
- Validation checks
- Error handling
Next Step [Instructions for Claude]
- What to check
- How to proceed
- What to output
Final Step
- Summary of results
- Next actions for user
- Success criteria
### 6. Add Argument Handling
**All Arguments ($ARGUMENTS):**
```markdown
Fix issue #$ARGUMENTS following our coding standards.
User runs: /fix-issue 123 high-priority
Becomes: "Fix issue #123 high-priority following our coding standards."
Positional Arguments ($1, $2, $3):
Review PR #$1 with priority $2 and assign to $3.
Focus on: $4
User runs: /review-pr 456 high alice security
Becomes individual parameters you can reference separately.
With Defaults:
---
argument-hint: [en
Установить directive-synthesis в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл directive-synthesis?
Synthesize structured directives and command specifications. Creates executable instruction sets with proper syntax and parameter definitions.
Как установить скилл directive-synthesis?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл directive-synthesis запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic