Initial commit: Claude How To project
Added comprehensive examples for Claude Code features including slash commands, subagents, memory, MCP protocol, skills, and plugins with documentation and quick reference guides. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
59
01-slash-commands/README.md
Normal file
59
01-slash-commands/README.md
Normal file
@@ -0,0 +1,59 @@
|
||||
# Slash Commands Examples
|
||||
|
||||
This folder contains example slash commands that can be used with Claude Code.
|
||||
|
||||
## Installation
|
||||
|
||||
Copy these files to your project's `.claude/commands/` directory:
|
||||
|
||||
```bash
|
||||
cp *.md /path/to/your/project/.claude/commands/
|
||||
```
|
||||
|
||||
## Available Commands
|
||||
|
||||
### 1. `/optimize` - Code Optimization
|
||||
Analyzes code for performance issues, memory leaks, and optimization opportunities.
|
||||
|
||||
**Usage:**
|
||||
```
|
||||
/optimize
|
||||
[Paste your code]
|
||||
```
|
||||
|
||||
### 2. `/pr` - Pull Request Preparation
|
||||
Guides you through PR preparation checklist including linting, testing, and commit message formatting.
|
||||
|
||||
**Usage:**
|
||||
```
|
||||
/pr
|
||||
```
|
||||
|
||||
### 3. `/generate-api-docs` - API Documentation Generator
|
||||
Generates comprehensive API documentation from source code.
|
||||
|
||||
**Usage:**
|
||||
```
|
||||
/generate-api-docs
|
||||
```
|
||||
|
||||
## File Structure
|
||||
|
||||
Place commands in your project:
|
||||
```
|
||||
project/
|
||||
├── .claude/
|
||||
│ └── commands/
|
||||
│ ├── optimize.md
|
||||
│ ├── pr.md
|
||||
│ └── docs/
|
||||
│ └── generate-api-docs.md
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
- Use clear, action-oriented names
|
||||
- Document trigger words in description
|
||||
- Keep commands focused on single task
|
||||
- Version control project commands
|
||||
- Organize in subdirectories for categories
|
||||
Reference in New Issue
Block a user