npx claudepluginhub robertogogoni/cortex-claude --plugin cortexThis skill uses the workspace's default tool permissions.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Details PluginEval's skill quality evaluation: 3 layers (static, LLM judge), 10 dimensions, rubrics, formulas, anti-patterns, badges. Use to interpret scores, improve triggering, calibrate thresholds.
name: cortex description: Cross-session memory with deep reasoning - query, reflect, learn, consolidate version: 2.0.0 triggers:
Cortex provides persistent memory across Claude Code sessions. This skill exposes the Cortex MCP tools as user-friendly commands with visual feedback.
| Command | Description | Cost |
|---|---|---|
/cortex | Show status and available commands | Free |
/cortex help | Show detailed help with examples | Free |
/cortex query <search> | Search stored memories | ~$0.001 |
/cortex recall | Get context-aware memories for current task | ~$0.001 |
/cortex reflect <topic> | Deep meta-cognitive analysis | ~$0.01 |
/cortex infer <concepts> | Find connections between ideas | ~$0.01 |
/cortex learn <insight> | Store a new learning | ~$0.01 |
/cortex consolidate | Clean up and organize memories | ~$0.02 |
/cortex stats | Show memory counts and API costs | Free |
/cortex health | Verify all systems are working | Free |
/cortex log | View recent activity log | Free |
/cortex config | View/edit configuration | Free |
/cortex export [format] | Export memories (json/md) | Free |
/cortex session | Show current session summary | Free |
When Cortex processes, display neural activity:
╭──────────────────────────────────╮
│ 🧠 CORTEX ══════════════════════│
│ · ∿ · ∿ · ∿ · │
│ ◇━━━◇━━━◇ ◆━━━◆━━━◆ │
│ Haiku Sonnet │
│ querying... │
╰──────────────────────────────────╯
When the user invokes /cortex or asks about memories/past sessions:
/cortex help)Display comprehensive help with groupings:
╭─────────────────────────────────────────────────╮
│ 🧠 CORTEX v2.0 - Claude's Memory Layer │
├─────────────────────────────────────────────────┤
│ QUICK │
│ /cortex Status overview │
│ /cortex help This screen │
│ /cortex stats Memory counts & costs │
│ /cortex health Verify everything works │
│ │
│ MEMORY (Haiku - fast, ~$0.001) │
│ /cortex query "X" Search memories │
│ /cortex recall Context retrieval │
│ │
│ REASONING (Sonnet - deep, ~$0.01) │
│ /cortex reflect "X" Meta-analysis │
│ /cortex infer A B Find connections │
│ /cortex learn "X" Store insight │
│ /cortex consolidate Clean up │
│ │
│ UTILITIES │
│ /cortex log Recent activity │
│ /cortex config View/edit settings │
│ /cortex export Export memories │
│ /cortex session Current session info │
│ │
│ NATURAL LANGUAGE │
│ "What did I do last time?" │
│ "Remember: always validate JWT first" │
│ "What patterns am I seeing?" │
│ "How does X connect to Y?" │
╰─────────────────────────────────────────────────╯
/cortex or /cortex status)Display current Cortex status:
╭─────────────────────────────────────────────╮
│ 🧠 CORTEX STATUS │
├─────────────────────────────────────────────┤
│ MCP Server: ✓ Connected │
│ Memories: 127 total │
│ • Skills: 23 │
│ • Patterns: 34 │
│ • Learnings: 45 │
│ • Insights: 25 │
│ Last Activity: 2 hours ago │
│ Session Cost: $0.02 │
╰─────────────────────────────────────────────╯
To get this data:
~/.claude/memory/data/memories/*.jsonl~/.claude/memory/logs/ for last activity/cortex query <search>)╭──────────────────────────────────────╮
│ 🧠 CORTEX ═══════════════════════ │
│ · ∿ · ∿ · │
│ ◇━━━◇━━━◇ Haiku searching... │
╰──────────────────────────────────────╯
Use the cortex__query MCP tool with the search term.
Display results with relevance scores.
/cortex reflect <topic>)╭──────────────────────────────────────╮
│ 🧠 CORTEX ═══════════════════════ │
│ · ∿ · ∿ · │
│ ◆━━━◆━━━◆ Sonnet thinking...│
╰──────────────────────────────────────╯
Use the cortex__reflect MCP tool. This uses Sonnet for deep reasoning.
Include depth parameter: quick (512 tokens), moderate (1024), deep (2048).
/cortex learn <insight>)╭──────────────────────────────────────╮
│ 🧠 CORTEX ═══════════════════════ │
│ · ∿ · ∿ · │
│ ◆━━━◆━━━◆ Sonnet analyzing..│
╰──────────────────────────────────────╯
Use the cortex__learn MCP tool to store the insight.
Report quality score and whether it was stored.
/cortex stats)Read and display:
╭─────────────────────────────────────────────╮
│ 🧠 CORTEX STATS │
├─────────────────────────────────────────────┤
│ MEMORIES │
│ Skills: 23 entries (12 KB) │
│ Patterns: 34 entries (8 KB) │
│ Learnings: 45 entries (15 KB) │
│ Insights: 25 entries (6 KB) │
│ ───────────────────────────────── │
│ Total: 127 entries (41 KB) │
├─────────────────────────────────────────────┤
│ API USAGE (This Session) │
│ Haiku: 1,234 tokens ~$0.0003 │
│ Sonnet: 5,678 tokens ~$0.017 │
│ ───────────────────────────────── │
│ Total Cost: ~$0.02 │
╰─────────────────────────────────────────────╯
/cortex health)Run comprehensive health check:
╭─────────────────────────────────────────────────╮
│ 🧠 CORTEX HEALTH CHECK │
├─────────────────────────────────────────────────┤
│ MCP Server ✓ Connected │
│ Memory Files ✓ 5 files (127 entries) │
│ API Key ✓ Valid (sk-ant-...) │
│ Hooks ✓ SessionStart, SessionEnd │
│ Last Activity 2 hours ago │
│ Disk Usage 41 KB │
├─────────────────────────────────────────────────┤
│ STATUS: All systems operational ✓ │
╰─────────────────────────────────────────────────╯
To verify:
claude mcp list | grep cortexls ~/.claude/memory/data/memories/[ -n "$ANTHROPIC_API_KEY" ] && echo "Set"grep -A3 "SessionStart" ~/.claude/settings.json/cortex log)Show recent activity from logs:
╭─────────────────────────────────────────────────╮
│ 🧠 CORTEX ACTIVITY LOG (last 10) │
├─────────────────────────────────────────────────┤
│ 14:32 query "authentication" → 3 hits │
│ 14:28 learn "JWT pattern" → stored │
│ 14:15 recall (session start) → 2 items │
│ 13:45 reflect "debugging approach" → complete│
│ ... │
╰─────────────────────────────────────────────────╯
Read from: ~/.claude/memory/logs/*.log
/cortex config)Show current configuration:
╭─────────────────────────────────────────────────╮
│ 🧠 CORTEX CONFIGURATION │
├─────────────────────────────────────────────────┤
│ SESSION START │
│ Max memories injected: 5 │
│ Relevance threshold: 0.3 │
│ │
│ SESSION END │
│ Quality threshold: 0.4 │
│ Max extractions: 10 │
│ │
│ LADS (Learning) │
│ Evolution enabled: yes │
│ Evolution interval: 24h │
│ │
│ Config file: ~/.claude/memory/data/configs/ │
│ current.json │
╰─────────────────────────────────────────────────╯
Read from: ~/.claude/memory/data/configs/current.json
/cortex export [format])Export memories to file:
/cortex export # Default: markdown
/cortex export json # JSON format
/cortex export md # Markdown format
Output example for markdown:
# Cortex Memory Export
Generated: 2026-01-27
## Skills (23 entries)
- Authentication: Use JWT with refresh tokens...
- Error handling: Always log context...
## Learnings (45 entries)
- "Always validate JWT expiry before permissions"
- "Use circuit breaker for external API calls"
...
/cortex session)Show current session summary:
╭─────────────────────────────────────────────────╮
│ 🧠 CORTEX SESSION │
├─────────────────────────────────────────────────┤
│ Started: 14:00 (2h 32m ago) │
│ Working Dir: ~/.claude/memory │
│ Git Branch: master │
│ │
│ INJECTED AT START │
│ • JWT authentication pattern │
│ • Error handling best practices │
│ │
│ WILL EXTRACT AT END │
│ • MCP Resources implementation approach │
│ • Skill enhancement patterns │
│ │
│ API Usage: ~$0.02 │
╰─────────────────────────────────────────────────╯
This shows what memories were injected at session start and previews what will be extracted at session end.
This skill should auto-activate when the user says:
When auto-activated, show the visual feedback and use the appropriate tool.
If MCP server is not connected:
╭──────────────────────────────────────╮
│ 🧠 CORTEX ═══════════════════════ │
│ ✗ MCP Server Not Connected │
│ │
│ Try: claude mcp list │
│ Check: ~/.claude.json │
╰──────────────────────────────────────╯
User: /cortex query authentication
Response: Shows neural animation, then displays matching memories about authentication patterns.
User: "What approach did I use for the login system?" Response: Auto-activates, queries memories, shows relevant past decisions.
User: /cortex learn "Always validate JWT expiry before checking permissions"
Response: Analyzes insight quality, stores if good, reports result.