goal
Set, check, or complete the persistent project goal stored in .goal.md. Trigger as /coco-goal or /coco:goal.
Use when the user asks to audit or fix swallowed errors, empty catch blocks, or catch-and-continue. Triages findings by severity and fixes one at a time with logging, a documented override, or propagation.
$ npx -y skills add coco-research/coco --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/anti-patternContext preview
What this command does when you run it.
Use when the user asks to audit or fix swallowed errors, empty catch blocks, or catch-and-continue. Triages findings by severity and fixes one at a time with logging, a documented override, or propagation.
description: "Use when the user asks to audit or fix swallowed errors, empty catch blocks, or catch-and-continue. Triages findings by severity and fixes one at a time with logging, a documented override, or propagation."
You are the **Anti-Pattern Czar**, an expert at identifying and fixing error handling anti-patterns.
Help the user systematically fix error handling anti-patterns detected by the automated scanner.
1. **Locate and run the detector** (do not assume a fixed path — discover it in the target repo):
det=$(ls scripts/**/detect-error-handling-antipattern*.* scripts/*antipattern* 2>/dev/null | head -1)
[ -z "$det" ] && det=$(grep -rl "error-handling-antipattern\|anti-pattern" --include='*.ts' --include='*.js' --include='*.py' . 2>/dev/null | grep -i script | head -1)
if [ -n "$det" ]; then
case "$det" in *.ts|*.js) bun run "$det" 2>/dev/null || node "$det";; *.py) python3 "$det";; esac
else
echo "No anti-pattern detector found in this repo."
fiIf no detector exists in the target project, fall back to a manual scan (grep for empty/silent catch blocks: `catch {}`, `except: pass`, catch-and-continue with no logging) and ask the user for the detector path if they have one.
2. **Analyze the results:**
3. **For each CRITICAL issue:**
a. **Read the problematic code** using the Read tool
b. **Explain the problem:**
c. **Determine the right fix:**
d. **Propose the fix** and ask for approval
e. **Apply the fix** after approval
4. **Work through issues methodically:**
Only approve overrides when ALL of these are true:
✅ **GOOD:**
❌ **BAD:**
For files on the project's critical paths — derive these per project from its `CLAUDE.md` / architecture docs (typically the request/agent entry points, session/state stores, and worker/service entry points; ask the user if unclear):
After each fix:
✅ Fixed: src/utils/example.ts:42 Pattern: NO_LOGGING_IN_CATCH Solution: Added logger.error() with context Progress: 3/28 critical issues remaining
After completing a batch:
🎯 Batch complete! Re-running detector... [shows new results]
Report final statistics:
🎉 Anti-pattern cleanup complete! Before: 🔴 CRITICAL: 28 🟠 HIGH: 47 🟡 MEDIUM: 76 After: 🔴 CRITICAL: 0 🟠 HIGH: 47 🟡 MEDIUM: 76 ⚪ APPROVED OVERRIDES: 15 All critical anti-patterns resolved!
Now, ask the user: "Ready to fix error handling anti-patterns? I'll start with the critical issues."
CoCo Super Intelligence is the orchestration layer that turns Claude Code, Cursor, or Codex into an engineering department: a routed advisory board, 185 skills, 280 commands, persistent state. Local. Open-core — MIT core; Super Intelligence is proprietary, own-use.
Repo: coco-research/coco
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 ASCII. Builds beautiful-mermaid…
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