qodex-ai/ai-agent-skills/directive-synthesis
Claude Code and agent skill by qodex-ai/ai-agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Synthesize structured directives and command specifications. Creates executable instruction sets with proper syntax and parameter definitions.
Install
npx vskill@latest install qodex-ai/ai-agent-skills/directive-synthesisSKILL.md
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:
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):
With Arguments:
With Bash Execution:
Full-Featured:
4. Generate Command File
Create command structure based on complexity:
Template for Simple Command:
Template for Command with Frontmatter:
5. Build Command Workflow
Structure the workflow with clear steps:
6. Add Argument Handling
All Arguments ($ARGUMENTS):
User runs: /fix-issue 123 high-priority Becomes: "Fix issue #123 high-priority following our coding standards."
Positional Arguments ($1, $2, $3):
User runs: /review-pr 456 high alice security Becomes individual parameters you can reference separately.
With Defaults:
7. Add Bash Execution (if needed)
Use ! prefix to execute commands before processing:
Important:
- Must specify
allowed-toolswith specific Bash permissions - Output is included in command context
- Commands run before Claude processes the prompt
8. Add File References
Use @ prefix to reference files:
9. Configure Thinking Mode (if needed)
For complex problems, trigger extended thinking:
These keywords can trigger extended thinking mode.
10. Create the File
Save to correct location:
Personal command:
Project command:
11. Test the Command
Provide testing instructions:
Test cases:
Frontmatter Reference
Field| Purpose| Example ---|---|--- argument-hint| Show expected arguments in autocomplete| [pr-number] [priority] description| Brief description for /help menu| Review pull request allowed-tools| Tools command can use| Bash(git:*), Read, Write model| Specific model to use| claude-sonnet-4-5-20250929 disable-model-invocation| Prevent SlashCommand tool from calling this| true
Bash Tool Permissions
When using ! prefix or needing bash execution:
Permission patterns:
Bash(git:*)- All git commandsBash(npm run:*)- All npm run scriptsBash(git add:*), Bash(git commit:*)- Specific git commands
Argument Patterns
Pattern 1: All Arguments
Usage: /test users api database Becomes: "Run tests for: users api database"
Pattern 2: Positional
Usage: /deploy my-app staging v1.2.3 Becomes: "Deploy my-app to staging environment with tag v1.2.3"
Pattern 3: Mixed
Usage: /analyze src/app.js performance security Becomes: "Analyze file src/app.js for: src/app.js performance security" Note: $ARGUMENTS includes all args, so $1 is duplicated
Better approach:
This uses $1 separately and remaining args starting from $2
Pattern 4: With Defaults
Command Size Guidelines
- ✅ Good: < 100 lines
- ⚠️ Warning: 100-150 lines
- ❌ Too large: > 250 lines (must refactor)
If too large:
- Extract to external script
- Split into multiple commands
- Use sub-commands pattern
Common Command Types
1. Git Workflow
2. Code Generator
3. Analysis Tool
4. Deployment Helper
5. Documentation Generator
Examples from TOON Formatter
Simple version:
Advanced version with bash:
Troubleshooting
Command Not Found
Check:
Remember:
- Filename (without
.md) becomes command name - Hyphens in filename become hyphens in command
- Case-sensitive on Linux/Mac
Arguments Not Working
Debug:
Run command and check output to see what's being passed.
Bash Commands Not Executing
Check:
allowed-toolsincludes correct Bash permissions- Using
!prefix:!command`` - Backticks are correct: \
command\not 'command' - Command is allowed by permissions
Command Not in /help
Possible reasons:
- File not in correct location
- File doesn't have
.mdextension - Syntax error in frontmatter
- Need to restart Claude Code
Best Practices
DO:
✅ Provide clear argument hints ✅ Include usage examples ✅ Handle errors gracefully ✅ Show progress for long operations ✅ Document expected behavior ✅ Test with various inputs ✅ Use descriptive command names
DON'T:
❌ Make commands too complex (>250 lines) ❌ Forget to specify allowed-tools for Bash ❌ Use unclear argument names ❌ Skip error handling ❌ Hardcode values (use arguments) ❌ Forget to test edge cases
Comparison: Commands vs Skills
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/directive-synthesis/SKILL.md
Popularity
- Repository stars
- 5
- Repository forks
- 1
- 7-day trend score
- 9
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 8 Apr 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/qodex-ai/ai-agent-skills/directive-synthesis)