@claude-powers/slash-commands
Version:
๐ Claude Powers - Essential slash commands for Claude Code
389 lines (314 loc) โข 10.1 kB
Markdown
# ๐ Claude Powers
<div align="center">
<a href="https://www.npmjs.com/package/@claude-powers/slash-commands">
<img src="https://badge.fury.io/js/@claude-powers%2Fslash-commands.svg" alt="npm version">
</a>
<a href="https://opensource.org/licenses/MIT">
<img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT">
</a>
</div>
<div align="center">
<h3>Essential slash commands for Claude Code</h3>
<p>Development tools and code analysis</p>
</div>
---
## โจ Key Features
๐ **Intelligent Bug Detection** - Automatically finds problematic patterns
โก **Fast Analysis** - Scans complete projects in seconds
๐ ๏ธ **Fix Suggestions** - Get automatic solutions for detected issues
๐ **Detailed Reports** - Clear outputs with metrics and statistics
โ๏ธ **Flexible Configuration** - Customize rules according to your project
๐ **Multi-language** - Support for JS, TS, React, Node.js and more
## ๐ Installation
### ๐ฆ **NPM**
```bash
# Global installation
npm install -g @claude-powers/slash-commands
# Or in your project
npm install @claude-powers/slash-commands
npx claude-powers install
```
### โ
**Verify Installation**
```bash
npx claude-powers --version
npx claude-powers --help
```
## ๐ฏ Immediate Usage
Once installed, you can use the commands directly in Claude Code:
### Find Bugs
```
/find-bugs
```
```
/find-bugs src/components --types=react --severity=high
```
### Find Unused Code
```
/find-unused-code
```
```
/find-unused-code src/ --types=variables,functions --severity=medium
```
### Automate Git Workflow
```
/auto-commit
```
```
/create-pr --type=feature --reviewers=@team
```
### Automatic Code Review
```
/code-review
```
```
/code-review src/ --aspects=security,quality --severity=strict
```
### Specific Analysis
```
/find-bugs backend/ --types=node,js --output=json
/find-unused-code --types=deps --bundle-impact=true
/auto-commit --type=hotfix --validate=all
```
## ๐ Available Commands
### ๐ฅ **Super Powers** (Most Impactful)
| Command | Description | Impact | Status |
|---------|-------------|---------|--------|
| `/generate-tests` | Automatic test generation with 90%+ coverage | โญโญโญโญโญ | โ
Available |
| `/fix-bugs` | Auto-detection and bug fixing (90% reduction) | โญโญโญโญโญ | โ
Available |
| `/performance-turbo` | Automatic optimization (60%+ improvement) | โญโญโญโญโญ | โ
Available |
| `/security-fortress` | Automatic protection (95%+ vulnerabilities) | โญโญโญโญโญ | โ
Available |
| `/explain-code` | Personal code teacher (80% onboarding) | โญโญโญโญโญ | โ
Available |
### ๐ ๏ธ **Base Commands**
| Command | Description | Status |
|---------|-------------|--------|
| `/find-bugs` | Detects bugs and problematic patterns | โ
Available |
| `/find-unused-code` | Finds unused code, variables and files | โ
Available |
| `/auto-commit` | Generates automatic commits with AI | โ
Available |
| `/create-pr` | Creates intelligent pull requests | โ
Available |
| `/code-review` | Complete automatic code review | โ
Available |
## ๐ Usage Examples
### ๐ฅ **Super Powers Examples**
#### Generate Tests - Save 70% testing time
```bash
/generate-tests src/components/UserProfile.tsx --coverage=95%
```
**Result:** 24 unit tests + 6 integration tests + 8 edge cases in 2 minutes
#### Fix Bugs - Reduce production bugs 90%
```bash
/fix-bugs --types=memory-leaks,null-pointers --confidence=high
```
**Result:** 12 memory leaks + 8 null pointers fixed automatically
#### Performance Turbo - 60%+ automatic improvement
```bash
/performance-turbo --target=web --budget=strict
```
**Result:** Bundle 847KBโ287KB, LCP 3.2sโ1.4s, Lighthouse 45โ94
#### Security Fortress - Impenetrable fortress
```bash
/security-fortress --compliance=gdpr,owasp --harden=paranoid
```
**Result:** 23 vulnerabilities eliminated, OWASP Top 10 compliant
#### Explain Code - Personal teacher
```bash
/explain-code src/algorithm.js --level=beginner --diagram=flowchart
```
**Result:** Step-by-step explanation + diagrams + interactive examples
---
### ๐ ๏ธ **Base Commands Examples**
### Find Bugs
```bash
# Ejecutar en tu proyecto
/find-bugs src/
```
**Expected output:**
```
๐ CLAUDE POWERS - FIND BUGS REPORT
===================================
๐ SUMMARY:
โโโโโโโโโโโโโโโฌโโโโโโโโ
โ Severity โ Count โ
โโโโโโโโโโโโโโโผโโโโโโโโค
โ High โ 2 โ
โ Medium โ 5 โ
โ Low โ 8 โ
โ Total โ 15 โ
โโโโโโโโโโโโโโโดโโโโโโโโ
๐ DETAILS:
๐ src/components/UserForm.tsx
โ [HIGH] Line 23 - Comparison with == null
โ ๏ธ [MEDIUM] Line 45 - useEffect without dependencies
๐ ๏ธ SUGGESTIONS:
โข 12 automatic fixes available
โข 2 critical issues require manual review
```
### Find Unused Code
```bash
# Detect unused code
/find-unused-code
```
**Expected output:**
```
๐งน CLAUDE POWERS - UNUSED CODE REPORT
=====================================
๐ SUMMARY:
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโฌโโโโโโโโโโ
โ Category โ Count โ Size โ
โโโโโโโโโโโโโโโโโโโผโโโโโโโโผโโโโโโโโโโค
โ Variables โ 12 โ 35 LOC โ
โ Functions โ 5 โ 85 LOC โ
โ Imports โ 18 โ 18 LOC โ
โ Files โ 3 โ 210 LOC โ
โ Total โ 38 โ 348 LOC โ
โโโโโโโโโโโโโโโโโโโดโโโโโโโโดโโโโโโโโโโ
๐พ IMPACT: Bundle reducible by ~32KB
```
### Auto Commit & PR
```bash
# Generate intelligent commit
/auto-commit --interactive
```
**Expected output:**
```
๐ค CLAUDE POWERS - AUTO COMMIT ANALYSIS
=======================================
๐ DETECTED CHANGES:
โข Detected type: feat
โข Suggested scope: auth
โข 8 files changed, +292 -109
๐ฌ GENERATED MESSAGE:
feat(auth): implement OAuth2 authentication system
- Add LoginForm component with validation
- Implement AuthProvider for state management
- Add comprehensive test suite
โ
READY TO COMMIT
```
### Automatic Code Review
```bash
# Review code quality
/code-review --format=summary
```
**Expected output:**
```
๐จโ๐ป CLAUDE POWERS - CODE REVIEW REPORT
=======================================
๐ OVERALL SCORE: 8.2/10 (GOOD)
๐ฏ EVALUATED ASPECTS:
โข Quality: 8.5/10 (Excellent)
โข Architecture: 7.8/10 (Good)
โข Performance: 9.1/10 (Excellent)
โข Security: 7.2/10 (Good)
โข Testing: 7.9/10 (Good)
๐ฆ STATUS: โ
APPROVED WITH SUGGESTIONS
```
## โ๏ธ Configuration
### Basic Configuration
Create `.claude/find-bugs-config.json` in your project:
```json
{
"severity": "medium",
"rules": {
"javascript": true,
"typescript": true,
"react": true,
"node": true
},
"exclude": [
"node_modules",
"dist",
"*.test.js"
]
}
```
### Advanced Configuration
```json
{
"rules": {
"javascript": {
"enabled": true,
"checks": {
"equalityChecks": true,
"asyncAwait": true,
"promiseHandling": true
}
}
},
"customPatterns": [
{
"pattern": "console\\.log\\(",
"message": "Console.log detected",
"severity": "low"
}
]
}
```
## ๐ ๏ธ For Developers
### Project Structure
```
claude-powers/
โโโ .claude/
โ โโโ commands/ # Command definitions
โ โโโ find-bugs-config.json
โโโ scripts/ # Installation scripts
โโโ package.json
โโโ README.md
```
### Contributing
1. **Fork** the repository
2. **Create** a feature branch: `git checkout -b feature/new-command`
3. **Commit** your changes: `git commit -am 'Add new command'`
4. **Push** to the branch: `git push origin feature/new-command`
5. **Create** a Pull Request
### Adding New Commands
1. Create the command file in `.claude/commands/command-name.md`
2. Define the configuration in `.claude/command-name-config.json`
3. Update the installation script
4. Add tests if applicable
## ๐ Use Cases
### Daily Development
```bash
# Complete automated workflow
/find-bugs --severity=high
/find-unused-code --types=variables,imports --severity=medium
/code-review --aspects=quality,security --format=summary
/auto-commit --validate=lint,test
/create-pr --type=feature --draft=true
# Specific component review
/find-bugs src/components/Dashboard.tsx --types=react
/find-unused-code components/ --types=react --min-size=5
```
### CI/CD Pipeline
```yaml
# .github/workflows/quality.yml
- name: Analyze Code
run: npx claude-powers find-bugs --output=json --severity=high
```
### Pre-commit Hook
```bash
#!/bin/sh
npx claude-powers find-bugs --severity=high
```
## ๐ Roadmap
### v1.1.0 - Q1 2024
- [ ] `/fix-bugs` command with auto-correction
- [ ] ESLint integration
- [ ] Vue.js support
### v1.2.0 - Q2 2024
- [ ] `/analyze-performance` command
- [ ] Historical metrics
- [ ] Web dashboard
### v2.0.0 - Q3 2024
- [ ] Advanced AI for detection
- [ ] Customizable commands
- [ ] Command marketplace
## ๐ฆ Distribution
Claude Powers is available on npm for easy and fast installation.
## ๐ License
MIT License - see [LICENSE](./LICENSE) for complete details.
## ๐ฏ Brand & Colors
- **Primary Color**: `#009a7f` (Occupational Therapists Chile)
- **Typography**: Inter, SF Pro, system-ui
- **Icons**: Phosphor Icons
---
<div align="center">
<p>Made with โค๏ธ for developers</p>
</div>