Clode Studio provides both built-in slash commands and a visual Command Studio for creating custom commands. Commands enhance your workflow by providing quick access to common actions and custom prompts.
/open [file]- Open a file in the editor (aliases:/o,/edit)/save- Save the current file (alias:/s)/close- Close the current file/find <pattern>- Search in files (aliases:/search,/grep)
/task <description>- Create a new task (aliases:/todo,/t)/tasks- Show all tasks (alias:/todos)
/context- Show context usage (alias:/ctx)/optimize- Optimize context usage/checkpoint [name]- Create a context checkpoint (alias:/cp)
/knowledge [query]- Search knowledge base (aliases:/kb,/know)/knowledge-add <title>- Add new knowledge entry (alias:/kb-add)
/claude [name]- Create new Claude instance (alias:/new)/personality <name>- Set Claude personality (alias:/p)/session- Resume a previous session (alias:/resume)/think [level]- Set thinking level: normal, more, hard, ultra
/memory- Edit CLAUDE.md memory files (aliases:/mem,/claude.md)/mcp- Show MCP connections/commands- Open command studio (aliases:/cmd,/slash)/help- Show available commands (aliases:/?,/h)/clear- Clear terminal/chat (alias:/cls)/reload- Reload the application
/workspace- Switch workspace (alias:/ws)
Access the Command Studio:
- Click the Commands tab in the bottom panel
- Or use
/commandsin Claude - Or press Cmd/Ctrl + Shift + C (coming soon)
name: review
description: Review code for best practices
argument-hint: <file or directory>
---
Review the code in {{ args }} and provide feedback on:
1. Code quality and best practices
2. Potential bugs or issues
3. Performance considerationsname: test
description: Generate tests for code
allowed-tools:
- read_file
- write_file
---
Generate comprehensive unit tests for {{ args }}.
Use the appropriate testing framework.name: status
description: Show git and project status
---
!git status --short
!npm list --depth=0
Analyze the above status and suggest next steps.name: review-pr
description: Review pull request changes
---
@.git/COMMIT_EDITMSG
!git diff --cached
Review these changes for the pull request.{{ args }}- All arguments passed to the command{{ arg1 }},{{ arg2 }}- Individual arguments$1,$2- Alternative syntax for arguments
!command- Execute bash command and include output@file.txt- Include contents of a file{{ VAR }}- Environment variable substitution
Commands are stored in:
- Project:
.claude/commands/in your project - Personal:
~/.claude/commands/in home directory
.claude/commands/
├── dev/
│ ├── review.md
│ └── test.md
├── git/
│ ├── commit.md
│ └── pr.md
└── docs/
└── generate.md
Use commands with categories: /git/commit, /dev/review
name: commit
description: Create a smart git commit
allowed-tools:
- run_bash_command
---
!git diff --cached
!git status --short
Based on the changes above, create a conventional commit message.
Then use run_bash_command to commit with that message.name: api-docs
description: Generate API documentation
argument-hint: <controller-file>
allowed-tools:
- read_file
- write_file
---
Read {{ args }} and generate OpenAPI documentation.
Consider:
- All endpoints
- Request/response schemas
- Authentication requirements
- Error responses
Save the documentation to docs/api/{{ arg1 }}.ymlname: refactor
description: Suggest refactoring improvements
argument-hint: <file>
allowed-tools:
- read_file
---
Analyze {{ args }} for refactoring opportunities:
1. Code smells
2. Design pattern applications
3. Performance improvements
4. Testability enhancements
Provide specific before/after examples.name: security
description: Security audit for code
allowed-tools:
- read_file
- search_files
---
!grep -r "password\|secret\|key\|token" . --include="*.js" --include="*.ts"
Perform a security audit:
1. Check for exposed secrets
2. SQL injection vulnerabilities
3. XSS possibilities
4. Authentication bypasses
5. Dependency vulnerabilities- Use lowercase with hyphens:
generate-docs - Be descriptive but concise
- Use categories for organization
- Avoid conflicts with built-in commands
- Start with clear instructions
- Use markdown formatting
- Specify expected output format
- Include examples when helpful
- List edge cases to consider
- Only request needed tools
- Be specific about file access
- Consider read-only vs write access
- Document why tools are needed
- Avoid expensive bash commands
- Cache results when possible
- Use specific file paths
- Limit search scopes
- Type
/to see suggestions - Use
/helpfor full list - Check Command Studio for visual browser
- Project commands override personal ones
In Command Studio:
- Search by name or description
- Filter by category
- View by source (project/personal)
- See allowed tools at a glance
- Commands are just markdown files
- Share via git repositories
- Copy to
.claude/commands/ - Maintain in version control
- Store in project's
.claude/commands/ - Commit to repository
- Document in README
- Use categories for organization
- Check spelling and case
- Verify file exists in commands directory
- Ensure
.mdextension - Check for category prefix
- Test in Command Studio
- Verify placeholder syntax
- Check tool permissions
- Test bash commands separately
- Simplify complex commands
- Reduce file operations
- Optimize bash commands
- Use specific file paths
Create shorter versions:
name: gp
description: Git pull and update
---
!git pull
!npm install
Update complete. Check for any conflicts.Ask for clarification:
name: create
description: Create a new component
---
What type of component would you like to create?
1. React functional component
2. Vue composition component
3. Web component
Please specify any props or features needed.Combine multiple operations:
name: deploy
description: Full deployment process
---
!npm test
!npm run build
!git status
If all tests pass and build succeeds,
guide me through deployment steps.Use current context:
name: explain
description: Explain current context
---
Based on our current conversation and the files
we've been working with, provide a summary of:
1. What we're trying to accomplish
2. Progress so far
3. Next stepsRemember: Custom commands are powerful tools for encoding your workflow. Start simple and evolve them as you discover patterns in your work!