mirror of
https://github.com/anthropics/claude-plugins-official.git
synced 2026-02-03 08:53:37 +00:00
merge slash commands and skills
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# Hooks Recommendations
|
||||
|
||||
Hooks automatically run commands in response to Claude's tool usage. They're ideal for enforcement and automation that should happen consistently.
|
||||
Hooks automatically run commands in response to Claude Code events. They're ideal for enforcement and automation that should happen consistently.
|
||||
|
||||
**Note**: These are common patterns. Use web search to find hooks for tools/frameworks not listed here to recommend the best hooks for the user.
|
||||
|
||||
## Auto-Formatting Hooks
|
||||
|
||||
@@ -135,6 +137,83 @@ Hooks automatically run commands in response to Claude's tool usage. They're ide
|
||||
|
||||
---
|
||||
|
||||
## Notification Hooks
|
||||
|
||||
Notification hooks run when Claude Code sends notifications. Use matchers to filter by notification type.
|
||||
|
||||
### Permission Alerts
|
||||
| Matcher | Use Case |
|
||||
|---------|----------|
|
||||
| `permission_prompt` | Alert when Claude requests permissions |
|
||||
|
||||
**Recommend**: Play sound, send desktop notification, or log permission requests
|
||||
**Value**: Never miss permission prompts when multitasking
|
||||
|
||||
### Idle Notifications
|
||||
| Matcher | Use Case |
|
||||
|---------|----------|
|
||||
| `idle_prompt` | Alert when Claude is waiting for input (60+ seconds idle) |
|
||||
|
||||
**Recommend**: Play sound or send notification when Claude needs attention
|
||||
**Value**: Know when Claude is ready for your input
|
||||
|
||||
### Example Configuration
|
||||
|
||||
```json
|
||||
{
|
||||
"hooks": {
|
||||
"Notification": [
|
||||
{
|
||||
"matcher": "permission_prompt",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "afplay /System/Library/Sounds/Ping.aiff"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "idle_prompt",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "osascript -e 'display notification \"Claude is waiting\" with title \"Claude Code\"'"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Available Matchers
|
||||
|
||||
| Matcher | Triggers When |
|
||||
|---------|---------------|
|
||||
| `permission_prompt` | Claude needs permission for a tool |
|
||||
| `idle_prompt` | Claude waiting for input (60+ seconds) |
|
||||
| `auth_success` | Authentication succeeds |
|
||||
| `elicitation_dialog` | MCP tool needs input |
|
||||
|
||||
---
|
||||
|
||||
## Quick Reference: Detection → Recommendation
|
||||
|
||||
| If You See | Recommend This Hook |
|
||||
|------------|-------------------|
|
||||
| Prettier config | Auto-format on Edit/Write |
|
||||
| ESLint config | Auto-lint on Edit/Write |
|
||||
| Ruff/Black config | Auto-format Python |
|
||||
| tsconfig.json | Type-check on Edit |
|
||||
| Test directory | Run related tests on Edit |
|
||||
| .env files | Block .env edits |
|
||||
| Lock files | Block lock file edits |
|
||||
| Go project | gofmt on Edit |
|
||||
| Rust project | rustfmt on Edit |
|
||||
| Multitasking workflow | Notification hooks for alerts |
|
||||
|
||||
---
|
||||
|
||||
## Hook Placement
|
||||
|
||||
Hooks go in `.claude/settings.json`:
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
MCP (Model Context Protocol) servers extend Claude's capabilities by connecting to external tools and services.
|
||||
|
||||
**Note**: These are common MCP servers. Use web search to find MCP servers specific to the codebase's services and integrations.
|
||||
|
||||
## Setup & Team Sharing
|
||||
|
||||
**Connection methods:**
|
||||
|
||||
@@ -1,89 +1,98 @@
|
||||
# Plugin Recommendations
|
||||
|
||||
Plugins are installable collections of skills that extend Claude's capabilities. They bundle related skills, reference materials, and workflows together.
|
||||
Plugins are installable collections of skills, commands, agents, and hooks. Install via `/plugin install`.
|
||||
|
||||
## Available Plugins
|
||||
|
||||
### anthropic-agent-skills
|
||||
**The comprehensive skills bundle from Anthropic**
|
||||
|
||||
| Recommend When | Examples |
|
||||
|----------------|----------|
|
||||
| General productivity | Default recommendation |
|
||||
| Document workflows | docx, xlsx, pptx, pdf |
|
||||
| Frontend development | frontend-design, webapp-testing |
|
||||
| Building AI tools | mcp-builder, skill-creator |
|
||||
| Creative work | canvas-design, algorithmic-art |
|
||||
|
||||
**Includes**: docx, xlsx, pptx, pdf, frontend-design, canvas-design, algorithmic-art, mcp-builder, skill-creator, webapp-testing, doc-coauthoring, internal-comms, brand-guidelines, theme-factory, slack-gif-creator, web-artifacts-builder
|
||||
|
||||
**Install**: This plugin is commonly pre-installed. Check with `claude plugins list`.
|
||||
**Note**: These are plugins from the official repository. Use web search to discover additional community plugins.
|
||||
|
||||
---
|
||||
|
||||
### frontend-design
|
||||
**Specialized frontend UI development**
|
||||
## Official Plugins
|
||||
|
||||
| Recommend When | Examples |
|
||||
|----------------|----------|
|
||||
| React/Vue/Angular work | Component development |
|
||||
| Landing pages | Marketing sites |
|
||||
| Dashboard UI | Admin interfaces |
|
||||
| Design system | Component libraries |
|
||||
### Development & Code Quality
|
||||
|
||||
**Value**: Creates distinctive, production-grade UI avoiding generic AI aesthetics.
|
||||
| Plugin | Best For | Key Features |
|
||||
|--------|----------|--------------|
|
||||
| **plugin-dev** | Building Claude Code plugins | Skills for creating skills, hooks, commands, agents |
|
||||
| **pr-review-toolkit** | PR review workflows | Specialized review agents (code, tests, types) |
|
||||
| **code-review** | Automated code review | Multi-agent review with confidence scoring |
|
||||
| **code-simplifier** | Code refactoring | Simplify code while preserving functionality |
|
||||
| **feature-dev** | Feature development | End-to-end feature workflow with agents |
|
||||
|
||||
### Git & Workflow
|
||||
|
||||
| Plugin | Best For | Key Features |
|
||||
|--------|----------|--------------|
|
||||
| **commit-commands** | Git workflows | /commit, /commit-push-pr commands |
|
||||
| **hookify** | Automation rules | Create hooks from conversation patterns |
|
||||
|
||||
### Frontend
|
||||
|
||||
| Plugin | Best For | Key Features |
|
||||
|--------|----------|--------------|
|
||||
| **frontend-design** | UI development | Production-grade UI, avoids generic aesthetics |
|
||||
|
||||
### Learning & Guidance
|
||||
|
||||
| Plugin | Best For | Key Features |
|
||||
|--------|----------|--------------|
|
||||
| **explanatory-output-style** | Learning | Educational insights about code choices |
|
||||
| **learning-output-style** | Interactive learning | Requests contributions at decision points |
|
||||
| **security-guidance** | Security awareness | Warns about security issues when editing |
|
||||
|
||||
### Language Servers (LSP)
|
||||
|
||||
| Plugin | Language |
|
||||
|--------|----------|
|
||||
| **typescript-lsp** | TypeScript/JavaScript |
|
||||
| **pyright-lsp** | Python |
|
||||
| **gopls-lsp** | Go |
|
||||
| **rust-analyzer-lsp** | Rust |
|
||||
| **clangd-lsp** | C/C++ |
|
||||
| **jdtls-lsp** | Java |
|
||||
| **kotlin-lsp** | Kotlin |
|
||||
| **swift-lsp** | Swift |
|
||||
| **csharp-lsp** | C# |
|
||||
| **php-lsp** | PHP |
|
||||
| **lua-lsp** | Lua |
|
||||
|
||||
---
|
||||
|
||||
## Plugin vs Individual Skills
|
||||
## Quick Reference: Codebase → Plugin
|
||||
|
||||
### When to Recommend Plugin Installation
|
||||
- User needs multiple related skills
|
||||
- Team standardization desired
|
||||
- First-time Claude Code setup
|
||||
- Comprehensive capability needed
|
||||
|
||||
### When to Recommend Individual Skill Usage
|
||||
- Specific one-time task
|
||||
- Already have plugin installed
|
||||
- Just need one capability
|
||||
| Codebase Signal | Recommended Plugin |
|
||||
|-----------------|-------------------|
|
||||
| Building plugins | plugin-dev |
|
||||
| PR-based workflow | pr-review-toolkit |
|
||||
| Git commits | commit-commands |
|
||||
| React/Vue/Angular | frontend-design |
|
||||
| Want automation rules | hookify |
|
||||
| TypeScript project | typescript-lsp |
|
||||
| Python project | pyright-lsp |
|
||||
| Go project | gopls-lsp |
|
||||
| Security-sensitive code | security-guidance |
|
||||
| Learning/onboarding | explanatory-output-style |
|
||||
|
||||
---
|
||||
|
||||
## Checking Installed Plugins
|
||||
## Plugin Management
|
||||
|
||||
```bash
|
||||
# List installed plugins
|
||||
claude plugins list
|
||||
# Install a plugin
|
||||
/plugin install <plugin-name>
|
||||
|
||||
# Check available skills
|
||||
claude skills list
|
||||
# List installed plugins
|
||||
/plugin list
|
||||
|
||||
# View plugin details
|
||||
/plugin info <plugin-name>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Custom Plugin Development
|
||||
## When to Recommend Plugins
|
||||
|
||||
For teams wanting to bundle their own skills:
|
||||
|
||||
| Recommend When | Examples |
|
||||
|----------------|----------|
|
||||
| Company-specific workflows | Internal processes |
|
||||
| Team best practices | Shared patterns |
|
||||
| Domain expertise | Industry knowledge |
|
||||
| Tool integrations | Internal tools |
|
||||
|
||||
Use the **skill-creator** skill to build individual skills, then bundle them into a plugin for team distribution.
|
||||
|
||||
---
|
||||
|
||||
## Quick Reference
|
||||
|
||||
| Need | Recommended Plugin/Skill |
|
||||
|------|-------------------------|
|
||||
| General productivity | anthropic-agent-skills (full bundle) |
|
||||
| Document creation | docx, xlsx, pptx, pdf skills |
|
||||
| Frontend work | frontend-design plugin |
|
||||
| Testing | webapp-testing skill |
|
||||
| Building tools | mcp-builder skill |
|
||||
| Custom workflows | skill-creator skill |
|
||||
**Recommend plugin installation when:**
|
||||
- User wants to install Claude Code automations from Anthropic's official repository or another shared marketplace
|
||||
- User needs multiple related capabilities
|
||||
- Team wants standardized workflows
|
||||
- First-time Claude Code setup
|
||||
@@ -1,216 +1,408 @@
|
||||
# Skills Recommendations
|
||||
|
||||
Skills are packaged expertise with workflows, reference materials, and best practices that Claude can invoke for specialized tasks.
|
||||
Skills are packaged expertise with workflows, reference materials, and best practices. Create them in `.claude/skills/<name>/SKILL.md`. Skills can be invoked by Claude automatically when relevant, or by users directly with `/skill-name`.
|
||||
|
||||
## Built-in Agents
|
||||
Some pre-built skills are available through official plugins (install via `/plugin install`).
|
||||
|
||||
### Plan Agent
|
||||
**Best for**: Complex implementations needing architectural planning
|
||||
|
||||
| Recommend When | Examples |
|
||||
|----------------|----------|
|
||||
| Multi-file changes needed | New feature development |
|
||||
| Architectural decisions | System design |
|
||||
| Unknown scope | Needs investigation first |
|
||||
| Multiple valid approaches | Trade-off analysis |
|
||||
|
||||
**Value**: Thinks through implementation before coding, identifies files to change, considers edge cases.
|
||||
|
||||
### Explore Agent
|
||||
**Best for**: Understanding large or unfamiliar codebases
|
||||
|
||||
| Recommend When | Examples |
|
||||
|----------------|----------|
|
||||
| Large codebase (>500 files) | Navigate efficiently |
|
||||
| New to the project | Understand structure |
|
||||
| Finding patterns | How is X done? |
|
||||
| Debugging | Trace execution paths |
|
||||
|
||||
**Value**: Quickly searches, reads, and synthesizes information across many files.
|
||||
**Note**: These are common patterns. Use web search to find skill ideas specific to the codebase's tools and frameworks.
|
||||
|
||||
---
|
||||
|
||||
## Document Creation Skills
|
||||
## Available from Official Plugins
|
||||
|
||||
### docx (Word Documents)
|
||||
**Best for**: Creating and editing Word documents
|
||||
### Plugin Development (plugin-dev)
|
||||
|
||||
| Recommend When | Examples |
|
||||
|----------------|----------|
|
||||
| Report generation | Technical reports |
|
||||
| Contract templates | Legal documents |
|
||||
| Documentation export | Share with non-developers |
|
||||
| Tracked changes | Review workflows |
|
||||
| Skill | Best For |
|
||||
|-------|----------|
|
||||
| **skill-development** | Creating new skills with proper structure |
|
||||
| **hook-development** | Building hooks for automation |
|
||||
| **command-development** | Creating slash commands |
|
||||
| **agent-development** | Building specialized subagents |
|
||||
| **mcp-integration** | Integrating MCP servers into plugins |
|
||||
| **plugin-structure** | Understanding plugin architecture |
|
||||
|
||||
### xlsx (Spreadsheets)
|
||||
**Best for**: Creating and analyzing Excel files
|
||||
### Git Workflows (commit-commands)
|
||||
|
||||
| Recommend When | Examples |
|
||||
|----------------|----------|
|
||||
| Data analysis | Process CSV/Excel data |
|
||||
| Report generation | Formatted tables |
|
||||
| Financial models | Formulas and calculations |
|
||||
| Data transformation | Clean and reshape data |
|
||||
| Skill | Best For |
|
||||
|-------|----------|
|
||||
| **commit** | Creating git commits with proper messages |
|
||||
| **commit-push-pr** | Full commit, push, and PR workflow |
|
||||
|
||||
### pptx (Presentations)
|
||||
**Best for**: Creating PowerPoint presentations
|
||||
### Frontend (frontend-design)
|
||||
|
||||
| Recommend When | Examples |
|
||||
|----------------|----------|
|
||||
| Technical presentations | Architecture diagrams |
|
||||
| Project updates | Status slides |
|
||||
| Demo decks | Feature walkthroughs |
|
||||
| Training materials | Educational content |
|
||||
|
||||
### pdf (PDF Documents)
|
||||
**Best for**: PDF manipulation and creation
|
||||
|
||||
| Recommend When | Examples |
|
||||
|----------------|----------|
|
||||
| Form filling | Complete PDF forms |
|
||||
| Document merging | Combine files |
|
||||
| Text extraction | Parse PDF content |
|
||||
| PDF generation | Create from data |
|
||||
|
||||
---
|
||||
|
||||
## Frontend & Design Skills
|
||||
|
||||
### frontend-design
|
||||
**Best for**: Creating polished, production-ready UI components
|
||||
|
||||
| Recommend When | Examples |
|
||||
|----------------|----------|
|
||||
| UI component work | React, Vue, Angular |
|
||||
| Landing pages | Marketing sites |
|
||||
| Dashboard design | Data visualization |
|
||||
| Design system work | Component libraries |
|
||||
| Skill | Best For |
|
||||
|-------|----------|
|
||||
| **frontend-design** | Creating polished UI components |
|
||||
|
||||
**Value**: Creates distinctive, high-quality UI instead of generic AI aesthetics.
|
||||
|
||||
### canvas-design
|
||||
**Best for**: Creating visual art and static designs
|
||||
### Automation Rules (hookify)
|
||||
|
||||
| Recommend When | Examples |
|
||||
|----------------|----------|
|
||||
| Poster creation | Marketing materials |
|
||||
| Visual diagrams | Architecture visuals |
|
||||
| Infographics | Data visualization |
|
||||
| Skill | Best For |
|
||||
|-------|----------|
|
||||
| **writing-rules** | Creating hookify rules for automation |
|
||||
|
||||
### algorithmic-art
|
||||
**Best for**: Generative art with p5.js
|
||||
### Feature Development (feature-dev)
|
||||
|
||||
| Recommend When | Examples |
|
||||
|----------------|----------|
|
||||
| Interactive visuals | Creative coding |
|
||||
| Generative patterns | Flow fields, particles |
|
||||
| Data art | Algorithmic visualization |
|
||||
|
||||
### theme-factory
|
||||
**Best for**: Applying themes to artifacts
|
||||
|
||||
| Recommend When | Examples |
|
||||
|----------------|----------|
|
||||
| Brand consistency | Apply company colors |
|
||||
| Document styling | Professional look |
|
||||
| Presentation themes | Consistent decks |
|
||||
|
||||
### brand-guidelines
|
||||
**Best for**: Applying Anthropic brand styling
|
||||
|
||||
| Recommend When | Examples |
|
||||
|----------------|----------|
|
||||
| Anthropic materials | Official branding |
|
||||
| Partner materials | Co-branded content |
|
||||
| Skill | Best For |
|
||||
|-------|----------|
|
||||
| **feature-dev** | End-to-end feature development workflow |
|
||||
|
||||
---
|
||||
|
||||
## Development Skills
|
||||
## Quick Reference: Official Plugin Skills
|
||||
|
||||
### mcp-builder
|
||||
**Best for**: Creating MCP servers to extend Claude
|
||||
|
||||
| Recommend When | Examples |
|
||||
|----------------|----------|
|
||||
| Custom tool needs | Internal APIs |
|
||||
| API integrations | Third-party services |
|
||||
| Workflow automation | Custom tooling |
|
||||
|
||||
**Value**: Guides creation of well-designed MCP servers in Python (FastMCP) or TypeScript.
|
||||
|
||||
### webapp-testing
|
||||
**Best for**: Testing web applications with Playwright
|
||||
|
||||
| Recommend When | Examples |
|
||||
|----------------|----------|
|
||||
| UI testing needs | Verify functionality |
|
||||
| Visual debugging | Screenshot issues |
|
||||
| Browser automation | Interactive testing |
|
||||
| Console log analysis | Debug JS errors |
|
||||
|
||||
### skill-creator
|
||||
**Best for**: Creating new skills for Claude
|
||||
|
||||
| Recommend When | Examples |
|
||||
|----------------|----------|
|
||||
| Repeatable workflows | Standardize processes |
|
||||
| Domain expertise | Package knowledge |
|
||||
| Team patterns | Share best practices |
|
||||
| Codebase Signal | Skill | Plugin |
|
||||
|-----------------|-------|--------|
|
||||
| Building plugins | skill-development | plugin-dev |
|
||||
| Git commits | commit | commit-commands |
|
||||
| React/Vue/Angular | frontend-design | frontend-design |
|
||||
| Automation rules | writing-rules | hookify |
|
||||
| Feature planning | feature-dev | feature-dev |
|
||||
|
||||
---
|
||||
|
||||
## Collaboration Skills
|
||||
## Custom Project Skills
|
||||
|
||||
### doc-coauthoring
|
||||
**Best for**: Co-authoring documentation with users
|
||||
Create project-specific skills in `.claude/skills/<name>/SKILL.md`.
|
||||
|
||||
| Recommend When | Examples |
|
||||
|----------------|----------|
|
||||
| Technical specs | RFC documents |
|
||||
| Decision docs | ADRs |
|
||||
| Proposals | Feature proposals |
|
||||
| Documentation | User guides |
|
||||
### Skill Structure
|
||||
|
||||
**Value**: Structured workflow for iterative document refinement.
|
||||
```
|
||||
.claude/skills/
|
||||
└── my-skill/
|
||||
├── SKILL.md # Main instructions (required)
|
||||
├── template.yaml # Template to apply
|
||||
├── scripts/
|
||||
│ └── validate.sh # Script to run
|
||||
└── examples/ # Reference examples
|
||||
```
|
||||
|
||||
### internal-comms
|
||||
**Best for**: Writing internal communications
|
||||
### Frontmatter Reference
|
||||
|
||||
| Recommend When | Examples |
|
||||
|----------------|----------|
|
||||
| Status reports | Project updates |
|
||||
| Announcements | Team comms |
|
||||
| Incident reports | Post-mortems |
|
||||
| FAQs | Knowledge sharing |
|
||||
```yaml
|
||||
---
|
||||
name: skill-name
|
||||
description: What this skill does and when to use it
|
||||
disable-model-invocation: true # Only user can invoke (for side effects)
|
||||
user-invocable: false # Only Claude can invoke (for background knowledge)
|
||||
allowed-tools: Read, Grep, Glob # Restrict tool access
|
||||
context: fork # Run in isolated subagent
|
||||
agent: Explore # Which agent type when forked
|
||||
---
|
||||
```
|
||||
|
||||
### Invocation Control
|
||||
|
||||
| Setting | User | Claude | Use for |
|
||||
|---------|------|--------|---------|
|
||||
| (default) | ✓ | ✓ | General-purpose skills |
|
||||
| `disable-model-invocation: true` | ✓ | ✗ | Side effects (deploy, send) |
|
||||
| `user-invocable: false` | ✗ | ✓ | Background knowledge |
|
||||
|
||||
---
|
||||
|
||||
## Multimedia Skills
|
||||
## Custom Skill Examples
|
||||
|
||||
### slack-gif-creator
|
||||
**Best for**: Creating animated GIFs for Slack
|
||||
### API Documentation with OpenAPI Template
|
||||
|
||||
| Recommend When | Examples |
|
||||
|----------------|----------|
|
||||
| Team celebrations | Achievements |
|
||||
| Demo animations | Feature previews |
|
||||
| Fun reactions | Custom emoji-style GIFs |
|
||||
Apply a YAML template to generate consistent API docs:
|
||||
|
||||
```
|
||||
.claude/skills/api-doc/
|
||||
├── SKILL.md
|
||||
└── openapi-template.yaml
|
||||
```
|
||||
|
||||
**SKILL.md:**
|
||||
```yaml
|
||||
---
|
||||
name: api-doc
|
||||
description: Generate OpenAPI documentation for an endpoint. Use when documenting API routes.
|
||||
---
|
||||
|
||||
Generate OpenAPI documentation for the endpoint at $ARGUMENTS.
|
||||
|
||||
Use the template in [openapi-template.yaml](openapi-template.yaml) as the structure.
|
||||
|
||||
1. Read the endpoint code
|
||||
2. Extract path, method, parameters, request/response schemas
|
||||
3. Fill in the template with actual values
|
||||
4. Output the completed YAML
|
||||
```
|
||||
|
||||
**openapi-template.yaml:**
|
||||
```yaml
|
||||
paths:
|
||||
/{path}:
|
||||
{method}:
|
||||
summary: ""
|
||||
description: ""
|
||||
parameters: []
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema: {}
|
||||
responses:
|
||||
"200":
|
||||
description: ""
|
||||
content:
|
||||
application/json:
|
||||
schema: {}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Quick Reference: Detection Patterns
|
||||
### Database Migration Generator with Script
|
||||
|
||||
| Look For | Suggests Skill |
|
||||
|----------|---------------|
|
||||
| Complex task, multiple files | Plan agent |
|
||||
| "How does X work?" | Explore agent |
|
||||
| `.docx` files or doc requests | docx skill |
|
||||
| `.xlsx` files or spreadsheet work | xlsx skill |
|
||||
| Presentation needs | pptx skill |
|
||||
| PDF files to process | pdf skill |
|
||||
| React/Vue/Angular components | frontend-design |
|
||||
| UI design requests | canvas-design |
|
||||
| Testing local web app | webapp-testing |
|
||||
| "Build an MCP server" | mcp-builder |
|
||||
| Documentation writing | doc-coauthoring |
|
||||
| Internal announcement | internal-comms |
|
||||
Generate and validate migrations using a bundled script:
|
||||
|
||||
```
|
||||
.claude/skills/create-migration/
|
||||
├── SKILL.md
|
||||
└── scripts/
|
||||
└── validate-migration.sh
|
||||
```
|
||||
|
||||
**SKILL.md:**
|
||||
```yaml
|
||||
---
|
||||
name: create-migration
|
||||
description: Create a database migration file
|
||||
disable-model-invocation: true
|
||||
allowed-tools: Read, Write, Bash
|
||||
---
|
||||
|
||||
Create a migration for: $ARGUMENTS
|
||||
|
||||
1. Generate migration file in `migrations/` with timestamp prefix
|
||||
2. Include up and down functions
|
||||
3. Run validation: `bash ~/.claude/skills/create-migration/scripts/validate-migration.sh`
|
||||
4. Report any issues found
|
||||
```
|
||||
|
||||
**scripts/validate-migration.sh:**
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# Validate migration syntax
|
||||
npx prisma validate 2>&1 || echo "Validation failed"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Test Generator with Examples
|
||||
|
||||
Generate tests following project patterns:
|
||||
|
||||
```
|
||||
.claude/skills/gen-test/
|
||||
├── SKILL.md
|
||||
└── examples/
|
||||
├── unit-test.ts
|
||||
└── integration-test.ts
|
||||
```
|
||||
|
||||
**SKILL.md:**
|
||||
```yaml
|
||||
---
|
||||
name: gen-test
|
||||
description: Generate tests for a file following project conventions
|
||||
disable-model-invocation: true
|
||||
---
|
||||
|
||||
Generate tests for: $ARGUMENTS
|
||||
|
||||
Reference these examples for the expected patterns:
|
||||
- Unit tests: [examples/unit-test.ts](examples/unit-test.ts)
|
||||
- Integration tests: [examples/integration-test.ts](examples/integration-test.ts)
|
||||
|
||||
1. Analyze the source file
|
||||
2. Identify functions/methods to test
|
||||
3. Generate tests matching project conventions
|
||||
4. Place in appropriate test directory
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Component Generator with Template
|
||||
|
||||
Scaffold new components from a template:
|
||||
|
||||
```
|
||||
.claude/skills/new-component/
|
||||
├── SKILL.md
|
||||
└── templates/
|
||||
├── component.tsx.template
|
||||
├── component.test.tsx.template
|
||||
└── component.stories.tsx.template
|
||||
```
|
||||
|
||||
**SKILL.md:**
|
||||
```yaml
|
||||
---
|
||||
name: new-component
|
||||
description: Scaffold a new React component with tests and stories
|
||||
disable-model-invocation: true
|
||||
---
|
||||
|
||||
Create component: $ARGUMENTS
|
||||
|
||||
Use templates in [templates/](templates/) directory:
|
||||
1. Generate component from component.tsx.template
|
||||
2. Generate tests from component.test.tsx.template
|
||||
3. Generate Storybook story from component.stories.tsx.template
|
||||
|
||||
Replace {{ComponentName}} with the PascalCase name.
|
||||
Replace {{component-name}} with the kebab-case name.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### PR Review with Checklist
|
||||
|
||||
Review PRs against a project-specific checklist:
|
||||
|
||||
```
|
||||
.claude/skills/pr-check/
|
||||
├── SKILL.md
|
||||
└── checklist.md
|
||||
```
|
||||
|
||||
**SKILL.md:**
|
||||
```yaml
|
||||
---
|
||||
name: pr-check
|
||||
description: Review PR against project checklist
|
||||
disable-model-invocation: true
|
||||
context: fork
|
||||
---
|
||||
|
||||
## PR Context
|
||||
- Diff: !`gh pr diff`
|
||||
- Description: !`gh pr view`
|
||||
|
||||
Review against [checklist.md](checklist.md).
|
||||
|
||||
For each item, mark ✅ or ❌ with explanation.
|
||||
```
|
||||
|
||||
**checklist.md:**
|
||||
```markdown
|
||||
## PR Checklist
|
||||
|
||||
- [ ] Tests added for new functionality
|
||||
- [ ] No console.log statements
|
||||
- [ ] Error handling includes user-facing messages
|
||||
- [ ] API changes are backwards compatible
|
||||
- [ ] Database migrations are reversible
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Release Notes Generator
|
||||
|
||||
Generate release notes from git history:
|
||||
|
||||
**SKILL.md:**
|
||||
```yaml
|
||||
---
|
||||
name: release-notes
|
||||
description: Generate release notes from commits since last tag
|
||||
disable-model-invocation: true
|
||||
---
|
||||
|
||||
## Recent Changes
|
||||
- Commits since last tag: !`git log $(git describe --tags --abbrev=0)..HEAD --oneline`
|
||||
- Last tag: !`git describe --tags --abbrev=0`
|
||||
|
||||
Generate release notes:
|
||||
1. Group commits by type (feat, fix, docs, etc.)
|
||||
2. Write user-friendly descriptions
|
||||
3. Highlight breaking changes
|
||||
4. Format as markdown
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Project Conventions (Claude-only)
|
||||
|
||||
Background knowledge Claude applies automatically:
|
||||
|
||||
**SKILL.md:**
|
||||
```yaml
|
||||
---
|
||||
name: project-conventions
|
||||
description: Code style and patterns for this project. Apply when writing or reviewing code.
|
||||
user-invocable: false
|
||||
---
|
||||
|
||||
## Naming Conventions
|
||||
- React components: PascalCase
|
||||
- Utilities: camelCase
|
||||
- Constants: UPPER_SNAKE_CASE
|
||||
- Files: kebab-case
|
||||
|
||||
## Patterns
|
||||
- Use `Result<T, E>` for fallible operations, not exceptions
|
||||
- Prefer composition over inheritance
|
||||
- All API responses use `{ data, error, meta }` shape
|
||||
|
||||
## Forbidden
|
||||
- No `any` types
|
||||
- No `console.log` in production code
|
||||
- No synchronous file I/O
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Environment Setup
|
||||
|
||||
Onboard new developers with setup script:
|
||||
|
||||
```
|
||||
.claude/skills/setup-dev/
|
||||
├── SKILL.md
|
||||
└── scripts/
|
||||
└── check-prerequisites.sh
|
||||
```
|
||||
|
||||
**SKILL.md:**
|
||||
```yaml
|
||||
---
|
||||
name: setup-dev
|
||||
description: Set up development environment for new contributors
|
||||
disable-model-invocation: true
|
||||
---
|
||||
|
||||
Set up development environment:
|
||||
|
||||
1. Check prerequisites: `bash scripts/check-prerequisites.sh`
|
||||
2. Install dependencies: `npm install`
|
||||
3. Copy environment template: `cp .env.example .env`
|
||||
4. Set up database: `npm run db:setup`
|
||||
5. Verify setup: `npm test`
|
||||
|
||||
Report any issues encountered.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Argument Patterns
|
||||
|
||||
| Pattern | Meaning | Example |
|
||||
|---------|---------|---------|
|
||||
| `$ARGUMENTS` | All args as string | `/deploy staging` → "staging" |
|
||||
|
||||
Arguments are appended as `ARGUMENTS: <value>` if `$ARGUMENTS` isn't in the skill.
|
||||
|
||||
## Dynamic Context Injection
|
||||
|
||||
Use `!`command`` to inject live data before the skill runs:
|
||||
|
||||
```yaml
|
||||
## Current State
|
||||
- Branch: !`git branch --show-current`
|
||||
- Status: !`git status --short`
|
||||
```
|
||||
|
||||
The command output replaces the placeholder before Claude sees the skill content.
|
||||
|
||||
@@ -1,251 +0,0 @@
|
||||
# Slash Command Recommendations
|
||||
|
||||
Slash commands are quick, repeatable prompts with optional arguments. They're ideal for frequently used workflows that don't need the overhead of a subagent.
|
||||
|
||||
## Code Review Commands
|
||||
|
||||
### /pr-review
|
||||
**Best for**: Reviewing current branch changes
|
||||
|
||||
| Recommend When | Detection |
|
||||
|----------------|-----------|
|
||||
| Git-based workflow | `.git/` directory |
|
||||
| PR-driven development | GitHub/GitLab remote |
|
||||
| Regular code reviews | Team process |
|
||||
|
||||
**Value**: Quick review of PR changes with actionable feedback
|
||||
|
||||
---
|
||||
|
||||
### /quick-review
|
||||
**Best for**: Fast review of a specific file
|
||||
|
||||
| Recommend When | Detection |
|
||||
|----------------|-----------|
|
||||
| Single file review needs | Ad-hoc reviews |
|
||||
| Pre-commit checks | Before committing |
|
||||
|
||||
**Value**: Focused review without full PR context
|
||||
|
||||
---
|
||||
|
||||
## Testing Commands
|
||||
|
||||
### /test
|
||||
**Best for**: Running tests for a specific file or pattern
|
||||
|
||||
| Recommend When | Detection |
|
||||
|----------------|-----------|
|
||||
| Jest configured | `jest.config.js`, package.json |
|
||||
| pytest configured | `pytest.ini`, pyproject.toml |
|
||||
| vitest configured | `vitest.config.js` |
|
||||
| Test directory exists | `tests/`, `__tests__/` |
|
||||
|
||||
**Value**: Quick test runs with failure analysis
|
||||
|
||||
---
|
||||
|
||||
### /test-file
|
||||
**Best for**: Generating tests for a specific file
|
||||
|
||||
| Recommend When | Detection |
|
||||
|----------------|-----------|
|
||||
| Test framework present | Testing deps installed |
|
||||
| Source files without tests | Missing test coverage |
|
||||
|
||||
**Value**: Generates tests following project conventions
|
||||
|
||||
---
|
||||
|
||||
## Documentation Commands
|
||||
|
||||
### /doc
|
||||
**Best for**: Generating documentation for code
|
||||
|
||||
| Recommend When | Detection |
|
||||
|----------------|-----------|
|
||||
| JSDoc/docstring patterns | Existing doc style |
|
||||
| API code | Public functions/classes |
|
||||
|
||||
**Value**: Consistent documentation format
|
||||
|
||||
---
|
||||
|
||||
### /api-doc
|
||||
**Best for**: Documenting API endpoints
|
||||
|
||||
| Recommend When | Detection |
|
||||
|----------------|-----------|
|
||||
| REST endpoints | Express, FastAPI routes |
|
||||
| OpenAPI/Swagger | Existing spec files |
|
||||
| Undocumented APIs | Routes without docs |
|
||||
|
||||
**Value**: Generates endpoint docs with examples
|
||||
|
||||
---
|
||||
|
||||
### /changelog
|
||||
**Best for**: Updating changelog with recent changes
|
||||
|
||||
| Recommend When | Detection |
|
||||
|----------------|-----------|
|
||||
| CHANGELOG.md exists | Changelog present |
|
||||
| Release workflow | Semantic versioning |
|
||||
|
||||
**Value**: Categorized changelog entries
|
||||
|
||||
---
|
||||
|
||||
## Debugging Commands
|
||||
|
||||
### /debug
|
||||
**Best for**: Investigating issues in code
|
||||
|
||||
| Recommend When | Detection |
|
||||
|----------------|-----------|
|
||||
| Bug reports common | Active development |
|
||||
| Complex codebase | Many files/dependencies |
|
||||
|
||||
**Value**: Systematic debugging approach
|
||||
|
||||
---
|
||||
|
||||
### /ci-fix
|
||||
**Best for**: Debugging CI/CD failures
|
||||
|
||||
| Recommend When | Detection |
|
||||
|----------------|-----------|
|
||||
| CI configured | `.github/workflows/`, `.circleci/` |
|
||||
| Frequent CI failures | Active CI pipeline |
|
||||
|
||||
**Value**: Reproduces and fixes CI issues
|
||||
|
||||
---
|
||||
|
||||
## Refactoring Commands
|
||||
|
||||
### /refactor
|
||||
**Best for**: Improving code structure
|
||||
|
||||
| Recommend When | Detection |
|
||||
|----------------|-----------|
|
||||
| Legacy code | Old patterns detected |
|
||||
| Code smells | Long files, complex functions |
|
||||
|
||||
**Value**: Guided refactoring with explanations
|
||||
|
||||
---
|
||||
|
||||
### /extract
|
||||
**Best for**: Extracting reusable code
|
||||
|
||||
| Recommend When | Detection |
|
||||
|----------------|-----------|
|
||||
| Code duplication | Similar patterns |
|
||||
| Long functions | Needs decomposition |
|
||||
|
||||
**Value**: Creates clean extractions with proper types
|
||||
|
||||
---
|
||||
|
||||
## Project Commands
|
||||
|
||||
### /init-claude
|
||||
**Best for**: Setting up Claude Code configuration
|
||||
|
||||
| Recommend When | Detection |
|
||||
|----------------|-----------|
|
||||
| No `.claude/` directory | New project setup |
|
||||
| No CLAUDE.md | Missing context |
|
||||
|
||||
**Value**: Creates complete Claude Code setup
|
||||
|
||||
---
|
||||
|
||||
### /setup
|
||||
**Best for**: Developer environment setup
|
||||
|
||||
| Recommend When | Detection |
|
||||
|----------------|-----------|
|
||||
| New developer onboarding | README instructions |
|
||||
| Complex setup | Multiple steps needed |
|
||||
|
||||
**Value**: Automated environment setup
|
||||
|
||||
---
|
||||
|
||||
## Utility Commands
|
||||
|
||||
### /explain
|
||||
**Best for**: Understanding code
|
||||
|
||||
| Recommend When | Detection |
|
||||
|----------------|-----------|
|
||||
| Complex codebase | New to project |
|
||||
| Legacy code | Undocumented patterns |
|
||||
|
||||
**Value**: Clear explanations without jargon
|
||||
|
||||
---
|
||||
|
||||
### /find
|
||||
**Best for**: Locating code by description
|
||||
|
||||
| Recommend When | Detection |
|
||||
|----------------|-----------|
|
||||
| Large codebase | Many files |
|
||||
| Unfamiliar structure | New to project |
|
||||
|
||||
**Value**: Finds code by concept, not just text
|
||||
|
||||
---
|
||||
|
||||
## Quick Reference: Detection → Recommendation
|
||||
|
||||
| If You See | Recommend Command |
|
||||
|------------|------------------|
|
||||
| Git repository | /pr-review |
|
||||
| Test framework | /test |
|
||||
| Test gaps | /test-file |
|
||||
| API routes | /api-doc |
|
||||
| CHANGELOG.md | /changelog |
|
||||
| CI/CD config | /ci-fix |
|
||||
| Complex code | /explain |
|
||||
| Large codebase | /find |
|
||||
| No .claude/ | /init-claude |
|
||||
|
||||
---
|
||||
|
||||
## Slash Command Placement
|
||||
|
||||
Commands go in `.claude/commands/`:
|
||||
|
||||
```
|
||||
.claude/
|
||||
└── commands/
|
||||
├── test.md
|
||||
├── pr-review.md
|
||||
└── explain.md
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Argument Patterns
|
||||
|
||||
| Pattern | Meaning | Example |
|
||||
|---------|---------|---------|
|
||||
| `<arg>` | Required | `<file-path>` |
|
||||
| `[arg]` | Optional | `[branch-name]` |
|
||||
| `$ARGUMENTS` | All args as string | Full input |
|
||||
| `$1`, `$2` | Positional args | First, second arg |
|
||||
|
||||
---
|
||||
|
||||
## Tool Restrictions Guide
|
||||
|
||||
| Use Case | Restrict To |
|
||||
|----------|------------|
|
||||
| Read-only | Read, Grep, Glob |
|
||||
| Can edit | + Write |
|
||||
| Can run commands | + Bash |
|
||||
| Full access | Omit restriction |
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
Subagents are specialized Claude instances that run in parallel, each with their own context window and tool access. They're ideal for focused reviews, analysis, or generation tasks.
|
||||
|
||||
**Note**: These are common patterns. Design custom subagents based on the codebase's specific review and analysis needs.
|
||||
|
||||
## Code Review Agents
|
||||
|
||||
### code-reviewer
|
||||
|
||||
Reference in New Issue
Block a user