skills/command-creator/SKILL.md
Define custom Claude Code slash commands for agents in the Traycer enforcement framework. This skill should be used when creating or updating agents and needing to specify reusable prompts that agents can execute as slash commands. Commands are Markdown files stored in .claude/commands/ and referenced in agent config.yaml files. This is for Claude Code slash commands (/command-name), not bash/CLI commands.
npx skillsauth add auldsyababua/instructor-workflow command-creatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill guides the creation of Claude Code slash commands for agents in the Traycer enforcement framework. Claude Code commands are custom slash commands defined as Markdown files containing prompts.
Use command-creator when:
Claude Code commands are custom slash commands that:
.claude/commands/ (project) or ~/.claude/commands/ (personal)/command-name syntax@ prefixCommands are NOT:
| Element | Purpose | Example | Invocation |
|---------|---------|---------|------------|
| Commands | Quick, reusable prompts | /git-commit, /review-pr | Explicit: /command-name |
| Skills | Complex workflows with multiple files | security-validation, test-standards | Automatic based on context |
| System Prompt | Agent personality and core behavior | Agent role, coordination logic | Always active |
Use commands when:
Use skills when:
Use system prompt when:
File: .claude/commands/optimize.md
Analyze this code for performance issues and suggest optimizations:
Invocation: /optimize
File: .claude/commands/git-commit.md
---
tools:
argument-hint: [message]
description: Create a git commit
model: haiku
---
Create a git commit with message: $ARGUMENTS
Invocation: /git-commit "fix: resolve login bug"
| Field | Purpose | Default | Example |
|-------|---------|---------|---------|
| allowed-tools | Tools command can use | Inherits from conversation | Bash(git add:*) |
| argument-hint | Expected arguments | None | [pr-number] [priority] |
| description | Brief description | First line | Create a git commit |
| model | Specific model | Inherits from conversation | haiku |
| disable-model-invocation | Prevent SlashCommand tool | false | true |
$ARGUMENTSCaptures all arguments as a single string:
---
description: Fix a GitHub issue
---
Fix issue #$ARGUMENTS following our coding standards:
1. Understand the issue
2. Locate relevant code
3. Implement solution
4. Add tests
5. Prepare PR description
Usage:
/fix-issue 123 high-priority
$ARGUMENTS becomes: "123 high-priority"
$1, $2, $3Access specific arguments individually:
---
argument-hint: [pr-number] [priority] [assignee]
description: Review pull request
---
Review PR #$1 with priority $2 and assign to $3.
Focus on security, performance, and code style.
Usage:
/review-pr 456 high alice
$1 = "456"$2 = "high"$3 = "alice"Execute bash commands before prompt runs using ! prefix:
---
tools: Bash(git status:*), Bash(git diff:*), Bash(git log:*)
description: Create a git commit based on current changes
---
## Context
- Current git status: !`git status`
- Staged and unstaged changes: !`git diff HEAD`
- Current branch: !`git branch --show-current`
- Recent commits: !`git log --oneline -10`
## Your task
Based on the above changes, create a single git commit with an appropriate message.
Important: Must include allowed-tools with Bash tool for bash execution.
Include file contents using @ prefix:
---
description: Review specific file implementation
---
Review the implementation in @src/utils/helpers.js and suggest improvements.
Multiple files:
Compare @src/old-version.js with @src/new-version.js and highlight differences.
Organize commands in subdirectories:
Project structure:
.claude/commands/
├── git-commit.md # /git-commit (project)
├── frontend/
│ └── component.md # /component (project:frontend)
└── qa/
└── review.md # /review (project:qa)
Personal structure:
~/.claude/commands/
├── security-review.md # /security-review (user)
└── templates/
└── pr-template.md # /pr-template (user:templates)
Conflict handling:
Project commands (.claude/commands/):
/helpPersonal commands (~/.claude/commands/):
/helpName: Use lowercase, hyphens for spaces
git-commit, review-pr, fix-issueGitCommit, review_pr, fixIssueArguments: Decide on argument pattern
$ARGUMENTS for all args$1, $2, $3 for specific argsPrompt: Write clear instructions
! for bash, @ for files)For project command:
mkdir -p .claude/commands
cat > .claude/commands/review-pr.md << 'EOF'
---
argument-hint: [pr-number]
description: Review pull request for code quality
---
Review pull request #$ARGUMENTS:
1. Check for security vulnerabilities
2. Verify test coverage
3. Assess code quality and style
4. Suggest improvements
Provide summary in Markdown format.
EOF
For personal command:
mkdir -p ~/.claude/commands
cat > ~/.claude/commands/security-scan.md << 'EOF'
---
description: Scan code for security issues
---
Scan this code for security vulnerabilities:
- Hardcoded secrets
- Insecure dependencies
- Authentication issues
- Input validation problems
EOF
Enhance command with metadata:
---
# Brief description shown in /help
description: Create a git commit
# Hint shown during autocomplete
argument-hint: [message]
# Tools the command can use
tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*)
# Specific model (optional)
model: haiku
# Prevent SlashCommand tool from invoking (optional)
disable-model-invocation: false
---
Your command prompt here with $ARGUMENTS
> /help
# Verify command appears in list
> /command-name arg1 arg2
# Test execution with arguments
File: docs/agents/tracking-agent/config.yaml
name: tracking-agent
commands:
- git-commit # References .claude/commands/git-commit.md
- linear-update # References .claude/commands/linear-update.md
- review-pr # References .claude/commands/review-pr.md
Important: Reference by name without .md extension.
File: .claude/commands/optimize.md
Analyze the performance of this code and suggest three specific optimizations:
Usage: /optimize
File: .claude/commands/fix-issue.md
---
argument-hint: [issue-number]
description: Fix a GitHub issue following project standards
---
Fix issue #$ARGUMENTS following these steps:
1. **Understand**: Read issue description and requirements
2. **Locate**: Find relevant code in codebase
3. **Implement**: Create solution addressing root cause
4. **Test**: Add appropriate tests
5. **Document**: Prepare concise PR description
Follow project coding standards and conventions.
Usage: /fix-issue 123
File: .claude/commands/git-commit.md
---
tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*), Bash(git diff:*), Bash(git log:*)
description: Create a git commit based on current changes
---
## Context
- Current git status: !`git status`
- Staged and unstaged changes: !`git diff HEAD`
- Current branch: !`git branch --show-current`
- Recent 10 commits: !`git log --oneline -10`
## Your Task
Based on the above git context, create a single git commit:
1. **Analyze changes**: Review the git diff
2. **Choose files**: Select relevant files to stage
3. **Write message**: Create commit message following format:
- Type: `feat|fix|docs|refactor|test|chore`
- Format: `<type>: <description>`
- Example: `feat: add user authentication`
4. **Create commit**: Execute git commands to stage and commit
**Important**: Follow this repository's commit message style (see recent commits).
Usage: /git-commit
File: .claude/commands/review-pr.md
---
argument-hint: [pr-number] [priority] [assignee]
description: Review pull request with priority and assignment
---
Review pull request #$1:
**Priority**: $2
**Assign to**: $3
**Review checklist**:
1. Security vulnerabilities
2. Performance issues
3. Code style violations
4. Test coverage
5. Documentation completeness
Provide detailed review comments with severity levels.
Usage: /review-pr 456 high alice
File: .claude/commands/explain-file.md
---
argument-hint: <file-path>
description: Explain implementation of a specific file
---
Explain the implementation in @$ARGUMENTS:
1. **Purpose**: What does this file do?
2. **Structure**: How is the code organized?
3. **Key functions**: What are the main functions/classes?
4. **Dependencies**: What does it depend on?
5. **Usage**: How is it used elsewhere?
Provide clear, beginner-friendly explanation.
Usage: /explain-file src/utils/helpers.js
File: docs/agents/qa-agent/config.yaml
name: qa-agent
description: Quality assurance and validation agent
# Skills for complex workflows
skills:
- security-validation
- test-standards
- code-quality-standards
# Commands for explicit invocations
commands:
- review-pr # Quick PR review
- security-scan # Security check
- test-coverage # Coverage analysis
ref_docs:
- test-audit-protocol.md
- traycer-coordination-guide.md
Agent can use commands:
/review-pr 456SlashCommand tool (if enabled)SlashCommand tool requirements:
description frontmatterdisable-model-invocation: trueWhen creating commands for the Traycer enforcement framework:
Commands live in: .claude/commands/<command-name>.md
Example:
.claude/commands/
├── git-commit.md
├── review-pr.md
└── your-new-command.md
When called standalone (user asks to create a command):
When called by agent-builder:
After creating the command, update each agent's config.yaml:
File: docs/agents/<agent-name>/config.yaml
Add command name (without .md extension) to commands: section:
commands:
- existing-command-1
- existing-command-2
- your-new-command # Add here (no .md extension)
.claude/commands/<command-name>.md/command-name argsGood: Single-purpose, clear prompt
Review this code for security vulnerabilities
Bad: Multiple unrelated tasks
Review code for security, performance, style, tests, documentation, and deployment issues
Good: review-pr, git-commit, fix-issue
Bad: r, gc, fix
Good: Include relevant git context
- Current branch: !`git branch --show-current`
- Recent commits: !`git log --oneline -5`
Bad: Assume context is known
Create a commit
Good: Clear argument hint
---
argument-hint: [pr-number] [priority] [assignee]
---
Bad: No hint, unclear usage
Good: Complete metadata
---
description: Review pull request
argument-hint: [pr-number]
tools: Bash(gh pr view:*)
---
Bad: No frontmatter (description defaults to first line)
Good: Organized by function
.claude/commands/
├── git/
│ ├── commit.md
│ ├── branch.md
│ └── push.md
├── qa/
│ ├── review.md
│ └── test.md
Bad: Flat structure with many commands
Include bash output for context:
---
tools: Bash(git status:*), Bash(git diff:*)
---
## Context
- Git status: !`git status --short`
- Changes: !`git diff --stat`
## Task
[Your instructions based on context]
Use positional args for structured input:
---
argument-hint: [component] [action] [target]
---
$1: Component name
$2: Action to perform
$3: Target file/directory
Execute $2 on $1 targeting $3.
Reference specific files:
Review @$ARGUMENTS for:
1. Code quality
2. Security issues
3. Performance concerns
Usage: /review src/auth.js
Break complex tasks into steps:
Execute deployment workflow for $ARGUMENTS:
**Phase 1: Pre-deployment**
- [ ] Run tests
- [ ] Security scan
- [ ] Build artifacts
**Phase 2: Deployment**
- [ ] Deploy to staging
- [ ] Verify health checks
- [ ] Deploy to production
**Phase 3: Post-deployment**
- [ ] Monitor metrics
- [ ] Verify functionality
- [ ] Document deployment
When using Agent Builder skill to create an agent:
.claude/commands/config.yamlCommand Creator provides:
Creating commands:
/command-name argsCommand naming:
git-commit, review-pr, fix-issueGitCommit, review_pr, fixIssueFile location:
.claude/commands/command-name.md~/.claude/commands/command-name.mdConfig reference:
commands:
- command-name # No .md extension
For detailed patterns and examples, see references/command-examples.md:
tools
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
testing
Three-step Linear update protocol after job completion - update child issue, check parent completion, update parent if all children done
testing
This skill should be used whenever users need help planning trips, creating travel itineraries, managing travel budgets, or seeking destination advice. On first use, collects comprehensive travel preferences including budget level, travel style, interests, and dietary restrictions. Generates detailed travel plans with day-by-day itineraries, budget breakdowns, packing checklists, cultural do's and don'ts, and region-specific schedules. Maintains database of preferences and past trips for personalized recommendations.
tools
Proactive token budget assessment and task chunking strategy. Use this skill when queries involve multiple large file uploads, requests for comprehensive multi-document analysis, complex multi-step workflows with heavy research (10+ tool calls), phrases like "complete analysis", "full audit", "thorough review", "deep dive", or tasks combining extensive research with large output artifacts. This skill helps assess token consumption risk early and recommend chunking strategies before beginning work.