Claude Code Plugin
Sugar has native Claude Code integration, allowing you to delegate work directly from your Claude Code sessions.
Installation
Install the Sugar plugin in Claude Code:
/plugin install roboticforce/sugar Available Commands
/sugar-task
Create tasks with rich context directly from Claude Code:
/sugar-task "Fix authentication timeout" --type bug_fix --urgent With rich context:
/sugar-task "User Dashboard Redesign" --json --description '{
"priority": 5,
"type": "feature",
"context": "Complete overhaul of user dashboard",
"technical_requirements": [
"React 18 with TypeScript",
"Responsive design",
"Real-time data updates"
],
"success_criteria": [
"Dashboard loads in < 2 seconds",
"Mobile responsive on all breakpoints"
]
}' /sugar-status
Check Sugar's current status and queue:
/sugar-status /sugar-run
Start Sugar's autonomous execution:
/sugar-run # Start continuous execution
/sugar-run --once # Run single cycle
/sugar-run --dry-run # Safe mode - show what would be done /sugar-review
Review and manage the task queue:
/sugar-review /sugar-analyze
Analyze codebase for potential work:
/sugar-analyze # Full analysis
/sugar-analyze --errors # Focus on error logs Specialized Agents
Sugar includes specialized AI agents for different tasks:
Sugar Orchestrator
Primary coordination and workflow management:
- Complex workflow orchestration
- Multi-agent coordination
- Quality assurance oversight
Task Planner
Strategic planning and task breakdown:
- Requirements analysis
- Task decomposition
- Architecture planning
Quality Guardian
Code quality and testing enforcement:
- Code quality review
- Testing validation
- Security auditing
Workflow Example
Delegate work while you continue coding:
# During a Claude Code session...
You: "I'm working on the checkout flow but found some test failures.
Can you handle fixing those while I continue here?"
Claude: "I'll create a Sugar task for the test fixes."
/sugar-task "Fix checkout test failures" --type test --urgent
# Sugar picks up the task and works on it in the background
# You continue your work in Claude Code
# Later, check progress:
/sugar-status MCP Server Integration
For advanced integration, Sugar includes an MCP server:
// In your Claude Code MCP settings
{
"mcpServers": {
"sugar": {
"command": "sugar",
"args": ["mcp"]
}
}
} This enables:
- Real-time task queue access
- Direct task manipulation from prompts
- System status monitoring
- Seamless tool integration
Best Practices
When to Delegate
- Bug fixes that aren't blocking your current work
- Test writing for code you just completed
- Documentation updates
- Refactoring tasks in other parts of the codebase
Provide Context
The more context you provide, the better Sugar can execute:
/sugar-task "Fix memory leak" --json --description '{
"context": "Memory grows unbounded in production after 24 hours",
"suspected_cause": "Cache not being cleared properly",
"files_to_check": ["src/cache.ts", "src/services/dataService.ts"],
"success_criteria": ["Memory stable over 48 hours", "All existing tests pass"]
}' Review Results
Always review Sugar's completed work:
/sugar-status
/sugar-review Troubleshooting
Plugin Not Found
# Make sure to use the full path
/plugin install roboticforce/sugar Sugar CLI Not Found
Ensure Sugar is installed and in your PATH:
pip install sugarai
which sugar Tasks Not Executing
Check that Sugar is initialized in your project:
sugar init
sugar status