Prompting Strategies
Be specific with domain terms
Be specific with domain terms
Use the actual names from your codebase — class names, service names, module names. The more specific you are, the more relevant the results.
Ask about patterns, not just code
Ask about patterns, not just code
CodeAlive understands architectural patterns, not just individual files. Ask higher-level questions:
Make chat questions self-contained
Make chat questions self-contained
Tool API chat is stateless. Include the relevant findings and constraints again when you drill deeper:
Combine search and chat
Combine search and chat
Start with This gives chat more focused context and produces better answers.
semantic_search or grep_search to gather evidence, then use chat only if you still need a synthesized explanation:Search Optimization
Choose the right search tool
Choose the right search tool
Use the canonical pair by default:
Scope searches to repositories
Scope searches to repositories
If you have multiple repositories indexed, scope your search to avoid noise:Use
get_data_sources to see available repositories and workspaces. Pass your task as its
query argument to get only the relevant sources, each with a relevanceReason — useful when
many repositories are indexed.Search first, then chat
Search first, then chat
semantic_search and grep_search are the default tools. chat is slower, can take up to 30 seconds, and uses more tokens but synthesizes a complete answer.Recommended flow:- Search to find where relevant code lives
- Fetch or read the most relevant artifacts
- Chat only when you need synthesis, explanation, or analysis
Workspace Organization
Keep workspaces focused
Keep workspaces focused
Indexing too many unrelated repositories in one workspace adds noise to search results. If you’re getting irrelevant hits, split your workspace or scope your queries to specific repos.
Cost & Token Optimization
Use search before chat
Use search before chat
semantic_search and grep_search are significantly cheaper and faster than chat. Use search for lookups and locating code. Reserve chat for synthesis and analysis.If your agent supports subagents and you need maximum reliability or depth, prefer a subagent-driven workflow built on semantic_search and grep_search instead of jumping straight to chat.Write focused queries
Write focused queries
Shorter, more focused queries return better results and use fewer tokens. Instead of explaining your entire situation, ask a direct question:
Agent-Specific Tips
Claude Code
Claude Code
- Use
claude mcp addfor the simplest setup — one command, done - Add CodeAlive to your custom instructions so Claude uses it automatically
- Works with both remote MCP and local Docker
Cursor
Cursor
- Composer Agent mode automatically uses MCP tools when relevant
- Use
.cursor/mcp.jsonfor project-specific config (shareable with team) - Add CodeAlive patterns to
.cursorrulesfor consistent AI behavior
Windsurf
Windsurf
- Config uses
serverUrl— noturl— different from other agents - Supports Streamable HTTP transport
- Check Windsurf’s MCP settings page for connection status
Cline
Cline
- Supports auto-approve for MCP tools to reduce confirmation prompts
- Add CodeAlive rules to
.cline/rules.mdfor automatic context usage:
VS Code + GitHub Copilot
VS Code + GitHub Copilot
- Native MCP support is GA in VS Code
- Configure in
.vscode/mcp.jsonfor project-level setup - Agent mode in Copilot Chat automatically discovers MCP tools
What’s Next
Example Workflows
See real-world usage patterns
Troubleshooting
Solutions for common issues