@entro314labs/cc-slash-agents
v1.0.5
Published
Generate slash commands for Claude Code agents and create multi-agent workflows
Maintainers
Readme
cc-slash-agents (ccsa)
Generate slash commands for Claude Code agents and create multi-agent workflows
Problem
Claude Code has powerful agents for specialized tasks, but they're not as intuitive to use as slash commands:
- Agents:
"Please use the code-reviewer agent to analyze this file" - Commands:
/review-code
This CLI bridges that gap by generating slash commands from your agents automatically.
Solution
cc-slash-agents (alias: ccsa) scans your Claude Code agents and generates corresponding slash commands, making
your powerful agents as easy to use as built-in commands.
Installation
npm install -g @entro314labs/cc-slash-agentsOr use directly with npx:
npx @entro314labs/cc-slash-agents generateQuick Start
Initialize structure (if needed):
ccsa initCreate or use existing agents in
.claude/agents/:--- name: code-reviewer description: Expert code review specialist. Use PROACTIVELY for quality analysis. tools: Read, Grep, Edit --- You are a senior code reviewer focusing on quality and best practices...Generate slash commands:
ccsa generateUse in Claude Code:
/review-code src/components/Header.tsx
Commands
ccsa generate
Generate slash commands from your agents
ccsa generate # Generate from project agents
ccsa generate --scope user # Generate from user agents (~/.claude/agents)
ccsa generate --scope both # Generate from both
ccsa generate --dry-run # Preview without creating files
ccsa generate --force # Overwrite existing commandsccsa list
Show all agents and generated commands
ccsa list # Show everything
ccsa list --agents-only # Show only agents
ccsa list --commands-only # Show only commands
ccsa list --scope user # Show user-level onlyccsa sync
Update commands when agents change
ccsa sync # Update project commands
ccsa sync --clean # Remove orphaned commands
ccsa sync --scope both # Sync both project and userccsa init
Initialize Claude directory structure
ccsa init # Initialize .claude/ in current project
ccsa init --global # Initialize ~/.claude/ for userccsa clean
Remove generated commands
ccsa clean # Remove project commands (with confirmation)
ccsa clean --yes # Skip confirmation
ccsa clean --scope user # Clean user commandsHow It Works
1. Agent Discovery
Scans your agents directories:
- Project:
.claude/agents/(shared with team) - User:
~/.claude/agents/(personal, global)
2. Smart Naming
Converts agent names to intuitive commands:
cli-integrity-analyzer→/analyze-integritysenior-code-reviewer→/review-codemindful-dev→/mindful-devdocs-architect→/create-docs
3. Command Generation
Creates properly formatted slash commands:
---
description: Review code - expert analysis for quality and security
argument-hint: "file paths or specific areas to review"
allowed-tools: [Read, Grep, Edit]
---
Use the senior-code-reviewer agent to perform comprehensive code review analysis.
Provide file paths, code snippets, or specific areas to review for detailed assessment.
Arguments: $ARGUMENTS4. Conflict Resolution
Handles naming conflicts automatically:
code-reviewer+senior-code-reviewer→/review-code+/review-code-senior
File Structure
your-project/
├── .claude/
│ ├── agents/ # Your custom agents
│ │ ├── code-reviewer.md
│ │ ├── test-generator.md
│ │ └── docs-writer.md
│ └── commands/ # Generated slash commands
│ ├── review-code.md # Generated by ccsa
│ ├── generate-tests.md # Generated by ccsa
│ └── create-docs.md # Generated by ccsa
~/.claude/ # User-level (global)
├── agents/ # Personal agents
└── commands/ # Personal commandsExamples
Basic Usage
# Generate commands from project agents
ccsa generate
# List what you have
ccsa list
# Use in Claude Code
/review-code src/auth.ts
/generate-tests utils/helpers.js
/create-docs --api-referenceTeam Workflow
# Team creates agents in .claude/agents/
git add .claude/agents/
git commit -m "Add code review agent"
# Each team member generates commands
ccsa generate
# Everyone can now use /review-codePersonal Productivity
# Set up personal agents
ccsa init --global
# Create your productivity agent in ~/.claude/agents/
ccsa generate --scope user
# Available across all projects
/productivity-helper "plan my day"Advanced Features
Multi-Agent Workflows
Coming soon: Pipeline commands that coordinate multiple agents:
ccsa pipeline create "full-review" \
--agents "code-reviewer,security-auditor,performance-analyzer" \
--output-format "consolidated-report"Custom Templates
Coming soon: Customize command generation templates:
ccsa generate --template custom-template.mdBest Practices
Agent Design
- Clear descriptions: Include "Use PROACTIVELY" for auto-invocation
- Specific tools: List only required tools for better security
- Good naming: Use descriptive, consistent naming patterns
Collaboration
- Version control: Check
.claude/agents/into git - Documentation: Use
ccsa initto create helpful README files - Sync regularly: Run
ccsa syncwhen agents change
Maintenance
- Regular updates: Use
ccsa sync --cleanto remove orphaned commands - Review generated: Check generated commands match expectations
- Monitor usage: Use
ccsa listto see what's available
Troubleshooting
Commands not appearing in Claude Code?
- Ensure commands are in
.claude/commands/directory - Restart Claude Code if needed
- Check file permissions
Agent not generating command?
- Verify agent has required frontmatter (
name,description) - Check for YAML syntax errors
- Use
ccsa listto see discovered agents
Naming conflicts?
ccsa listshows resolved names- Use
--forceto overwrite existing commands - Consider renaming agents for clarity
Contributing
- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
License
MIT © Entro314 Labs
