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:
21
01-slash-commands/optimize.md
Normal file
21
01-slash-commands/optimize.md
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
name: Code Optimization
|
||||
description: Analyze code for performance issues and suggest optimizations
|
||||
tags: performance, analysis
|
||||
---
|
||||
|
||||
# Code Optimization
|
||||
|
||||
Review the provided code for the following issues in order of priority:
|
||||
|
||||
1. **Performance bottlenecks** - identify O(n²) operations, inefficient loops
|
||||
2. **Memory leaks** - find unreleased resources, circular references
|
||||
3. **Algorithm improvements** - suggest better algorithms or data structures
|
||||
4. **Caching opportunities** - identify repeated computations
|
||||
5. **Concurrency issues** - find race conditions or threading problems
|
||||
|
||||
Format your response with:
|
||||
- Issue severity (Critical/High/Medium/Low)
|
||||
- Location in code
|
||||
- Explanation
|
||||
- Recommended fix with code example
|
||||
Reference in New Issue
Block a user