Custom Slash Commands and Skills: Quick Reference — Claude Code Configuration & Workflows (Claude Certified Architect)
Quick Reference: Custom Slash Commands and Skills in Claude Code This guide provides essential facts and rules for configuring custom slash commands...
Quick Reference: Custom Slash Commands and Skills in Claude Code
This guide provides essential facts and rules for configuring custom slash commands and skills within Claude Code workflows, enabling efficient team collaboration and enhanced automation.
1. Definitions
- Slash Commands: User-invoked commands prefixed with a slash (/) to trigger specific functions or workflows within Claude Code.
- Skills: Modular, reusable capabilities or actions that can be invoked by slash commands or integrated into workflows.
2. Creating Custom Slash Commands
- Syntax: Begin with /, followed by a concise command name (e.g., /summarize).
- Purpose: Designed to execute a defined task or invoke a skill.
- Parameters: Commands can accept arguments for dynamic behavior; define expected parameters clearly in the command metadata.
- Documentation: Provide descriptive help text accessible via /help <command>.
3. Defining Skills
- Modularity: Skills should be self-contained with clear input/output interfaces.
- Reusability: Design skills to be invoked by multiple commands or workflows.
- Configuration: Include metadata such as name, description, input schema, and output format.
- Versioning: Maintain version control to manage updates and backward compatibility.
4. Path-Specific Conventions
- Organization: Place commands and skills in dedicated directories reflecting project structure (e.g., /commands/, /skills/).
- Naming: Use consistent, descriptive file and folder names for easy navigation.
- Hierarchy: Support nested commands or skill groups via subfolders.
5. Execution Modes
- Planning Mode: Use for complex, multi-step tasks requiring intermediate validation.
- Direct Execution Mode: Suitable for simple, atomic commands or skills.
- Selection: Choose mode based on task complexity and need for iterative refinement.
6. Iterative Refinement
- Feedback Loops: Enable commands/skills to request clarifications or additional input.
- Stepwise Execution: Break down tasks into smaller steps for improved accuracy.
- Logging: Track command invocations and outputs for debugging and improvement.
7. Integration with CI/CD Pipelines
- Automated Testing: Include unit tests for commands and skills to validate functionality on code changes.
- Code Review: Use CI tools to enforce style and correctness standards.
- Deployment: Automate deployment of updated commands and skills to production environments.
Example: Defining a Custom Slash Command
Command: /generate-report
Purpose: Generate a summary report from project memory files.
Configuration Snippet:
- Name: generate-report
- Description: "Generates a detailed summary report based on current project data."
- Parameters: dateRange (optional), format (pdf, html)
- Execution Mode: Planning
Usage: /generate-report dateRange=lastMonth format=pdf
More in this topic
Iterative Refinement Techniques — Claude Code Configuration & Workflows (Claude Certified Architect)CLAUDE.md Hierarchy, Scoping, and Modular Organisation: Common Mistakes — Claude Code Configuration & Workflows (Claude Certified Architect)Custom Slash Commands and Skills: Practice Questions — Claude Code Configuration & Workflows (Claude Certified Architect)Custom Slash Commands and Skills: Common Mistakes — Claude Code Configuration & Workflows (Claude Certified Architect)Path-Specific Rules for Conditional Convention Loading: Practice Questions — Claude Code Configuration & Workflows (Claude Certified Architect)CLAUDE.md Hierarchy, Scoping, and Modular Organisation: Quick Reference — Claude Code Configuration & Workflows (Claude Certified Architect)CLAUDE.md Hierarchy, Scoping, and Modular Organisation: Practice Questions — Claude Code Configuration & Workflows (Claude Certified Architect)Custom Slash Commands and Skills — Claude Code Configuration & Workflows (Claude Certified Architect)CLAUDE.md Hierarchy, Scoping, and Modular Organisation — Claude Code Configuration & Workflows (Claude Certified Architect)CI/CD Integration — Claude Code Configuration & Workflows (Claude Certified Architect)Claude Code Configuration & Workflows — Claude Certified Architect - FoundationCustom Slash Commands and Skills: Worked Example — Claude Code Configuration & Workflows (Claude Certified Architect)Path-Specific Rules for Conditional Convention Loading — Claude Code Configuration & Workflows (Claude Certified Architect)Path-Specific Rules for Conditional Convention Loading: Quick Reference — Claude Code Configuration & Workflows (Claude Certified Architect)Plan Mode vs Direct Execution — Claude Code Configuration & Workflows (Claude Certified Architect)CLAUDE.md Hierarchy, Scoping, and Modular Organisation: Worked Example — Claude Code Configuration & Workflows (Claude Certified Architect)Path-Specific Rules for Conditional Convention Loading: Worked Example — Claude Code Configuration & Workflows (Claude Certified Architect)Path-Specific Rules for Conditional Convention Loading: Common Mistakes — Claude Code Configuration & Workflows (Claude Certified Architect)
📚
Category: Claude Certified Architect
Ready to test your knowledge?
Put what you've learned into practice with a quick quiz and track your progress.
Test your knowledge →