When the user asks to implement, fix, add, or change code:
- ALWAYS use the
/implementskill - NEVER start coding directly without the agent workflow
- NEVER skip the research phase
- "implement", "implementar", "implementa"
- "add feature", "adicionar", "adiciona"
- "fix bug", "corrigir", "corrige", "fix"
- "refactor", "refatorar"
- "create", "criar" (when referring to code)
- "build", "construir"
- "write code", "escrever código"
User: "Add a logout button"
Claude: Uses /implement Add logout button
User: "Fix the authentication bug"
Claude: Uses /implement CX-N (if task exists) or /implement Fix authentication bug
User: "Implement dark mode"
Claude: Uses /implement Implement dark mode
- Answering questions about code
- Explaining how something works
- Small documentation updates
- Typo fixes in non-code files
- Configuration changes
Always prefer Cortex MCP tools over Bash commands:
| Action | Use This | NOT This |
|---|---|---|
| Create task | mcp__cortex__task(action="create") |
cx add |
| Update task | mcp__cortex__task(action="update") |
cx start/done/mv |
| Search memory | mcp__cortex__memory(action="list", search=...) |
cx memory search |
| Save memory | mcp__cortex__memory(action="save") |
cx memory diary |
- Every piece of work needs a Cortex task (CX-N)
- Tasks are created via MCP tools, not internal Claude tasks
- Status updates go through MCP:
mcp__cortex__task(action="update", status="progress|done")
If the project has a built code graph (codegraph:status shows nodes > 0), use it:
# Ultra-compact overview (~100 tokens) — ALWAYS call this first
mcp__cortex__codegraph(action="context", task="what you are doing")
# Find symbols by name (substring match)
mcp__cortex__codegraph(action="query", name="SymbolName")
# Understand dependencies
mcp__cortex__codegraph(action="edges", node_id="cn-xxx")
# Check blast radius before changes
mcp__cortex__codegraph(action="impact", node_id="cn-xxx")
# Get review hints
mcp__cortex__codegraph(action="review_hints", since="HEAD")
# Risk-scored changes
mcp__cortex__codegraph(action="detect_changes", since="HEAD")
mcp__cortex__codegraph(action="build") # first time (full)
mcp__cortex__codegraph(action="update") # after changes (incremental)
mcp__cortex__codegraph(action="dead_code") # unreferenced symbols
mcp__cortex__codegraph(action="communities") # module structure
mcp__cortex__codegraph(action="refactor") # refactoring suggestions
mcp__cortex__codegraph(action="rename_preview", node_id="cn-xxx", new_name="NewName")
mcp__cortex__codegraph(action="visualize") # D3.js HTML graph
mcp__cortex__codegraph(action="wiki") # markdown docs
Supported languages: Go, Elixir, TypeScript, Rust, Python
If the project has a style guide configured (style_guide:status shows configured), agents MUST use it:
# Search for relevant conventions
mcp__cortex__style_guide(action="search", query="naming conventions")
mcp__cortex__style_guide(action="search", query="error handling")
mcp__cortex__style_guide(action="search", query="testing patterns")
mcp__cortex__style_guide(action="sync") # full sync from repo
mcp__cortex__style_guide(action="sync_if_needed") # only if cooldown expired
mcp__cortex__style_guide(action="status") # config + stats
mcp__cortex__style_guide(action="rules") # list generated rules
Style guide rules in .claude/rules/ are loaded automatically by Claude Code.
Cortex has a learnings system that automatically extracts success/failure patterns.
- Automatic extraction: When
cx doneor agents complete tasks with extreme reward (≥80% or ≤40%), the system extracts learnings via GPT-4o-mini - Storage: Learnings are saved in SQLite with type, confidence, domain and tags
- Usage by agents: Agents fetch relevant learnings before executing
# Research Agent - start of workflow
mcp__cortex__learnings(action="relevant", task_type="feature", domain="go")
# Implement Agent - before implementing
mcp__cortex__learnings(action="relevant", task_type="feature")
# Verify Agent - know failure patterns
mcp__cortex__learnings(action="list", type="failure_pattern", limit=5)
| Type | Description |
|---|---|
success_pattern |
Patterns that led to success |
failure_pattern |
Patterns that caused failures |
domain_knowledge |
Domain-specific knowledge |
user_feedback |
User feedback |
mcp__cortex__learnings(action="list")- List with filters (type, domain, limit)mcp__cortex__learnings(action="relevant")- Fetch relevant for task_type/domain
OPENAI_API_KEYconfigured for automatic extraction- Without the key, extraction is silently ignored