goal
CommandSet, check, or complete the persistent project goal stored in .goal.md. Trigger as /coco-goal or /coco:goal.
Use when the user asks to refactor a file, module, or scope while preserving behaviour, for example /util refactor-code src/auth. Fills test gaps first, refactors incrementally with commits, then verifies tests, lint, and performance.
$ npx -y skills add coco-research/coco --agent claude-code
name: refactor-code description: "Use when the user asks to refactor a file, module, or scope while preserving behaviour, for example /util refactor-code src/auth. Fills test gaps first, refactors incrementally with commits, then verifies tests, lint, and performance."
Intelligently refactor and improve code quality
Follow this systematic approach to refactor code: **$ARGUMENTS**
1. **Pre-Refactoring Analysis**
2. **Test Coverage Verification**
3. **Refactoring Strategy**
4. **Environment Setup**
5. **Incremental Refactoring**
6. **Code Quality Improvements**
7. **Performance Optimizations**
8. **Design Pattern Application**
9. **Error Handling Improvement**
10. **Documentation Updates**
11. **Testing Enhancements**
12. **Static Analysis**
13. **Performance Verification**
14. **Integration Testing**
15. **Code Review Preparation**
16. **Documentation of Changes**
17. **Deployment Considerations**
Remember: Refactoring should preserve external behavior while improving internal structure. Always prioritize safety over speed, and maintain comprehensive test coverage throughout the process.
495 personas across 13 departments, 229 skills[^installed] and 388 commands in the full catalog (coco 1.9.0, 2026-10-21). Agent skills, slash commands and subagents for Claude Code, Cursor, Codex and other AI coding agents.
Set, check, or complete the persistent project goal stored in .goal.md. Trigger as /coco-goal or /coco:goal.
Use when the user asks for a diagram or chart: flowchart, sequence, state, class, ER, or XY chart, as SVG, HTML, or terminal…
Show latest emails from a specific person. Usage: /email-read alice
Draft a reply to a specific email. Usage: /email-reply Project Phase 2 Contract Data
Save matching emails to a project folder for sync processing. Usage: /email-save alice to emails/
Search emails by subject keywords. Usage: /email-search github webhook
Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.