Implementation: How to implement slash commands for both Cursor and Claude C...
Documentation for Sessions
⚙️ Implementation: How to implement slash commands for both Cursor and Claude C...
📋 Decision Context
Question:
How to implement slash commands for both Cursor and Claude Code?
Task: Implement slash commands for Cursor and Claude Code
🎯 Decision Made
Chosen:
Both platforms: Cursor uses .cursor/commands/.md files, Claude Code uses MCP Prompts in server.ts + .claude/commands/.md
Options Considered:
- Cursor-only markdown commands
- Claude Code-only MCP prompts
- Both platforms with different approaches
💭 Reasoning
Each platform has different slash command mechanisms. Cursor reads markdown files from .cursor/commands/, while Claude Code exposes MCP prompts as /mcp__servername__promptname and also supports local .claude/commands/ markdown files. Implementing both ensures maximum cross-platform compatibility.
📁 Files Involved
MCP/mcp-gograb-ai/src/server.ts.cursor/commands/ai-preflight.md.claude/commands/preflight.md
🔗 Related
- Decision ID:
dev_1768417807994_vhji16y - Session: 42
- Workspace: editor2
Auto-generated by MCP Smart Consolidation