# Exa Code Search

> Code search using Exa. Finds real code snippets, API docs, and examples from GitHub, StackOverflow, and technical docs. Use when searching for code examples, API syntax, library documentation, or debugging help.

- Skill: `codealive-ai/exa-code-search` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add codealive-ai/exa-code-search`
- Raw SKILL.md: https://api.skillmd.com/api/skills/codealive-ai/exa-code-search/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: CodeAlive-AI (https://skillmd.com/u/codealive-ai)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/codealive-ai/exa-code-search

---


# Code Search (Exa)

## Tool

Call the native MCP tool `exa-code__get_code_context_exa` directly. Parameters go in a JSON object.

## Critical Rules

- **Never run in main context.** Spawn subagents or run sequentially.
- **Always include the programming language** in the query to reduce noise.
  - Good: "Go generics", "Python asyncio", "React 19 hooks"
  - Bad: "generics", "async", "hooks"
- Include framework + version when relevant: "Next.js 14", "Playwright Python".
- Include exact identifiers (function names, error messages) when you have them.

## Token Tuning

| Need | tokensNum |
|------|-----------|
| Quick snippet | 1000-3000 |
| Most tasks | 5000 (default) |
| Complex integration | 10000-20000 |

## Call Examples

Tool: `exa-code__get_code_context_exa`

```
# Find code example
{ query: "Python asyncio aiohttp client example", tokensNum: 5000 }

# API usage
{ query: "OpenAI Responses API streaming Python", tokensNum: 8000 }

# Debugging
{ query: "Next.js 14 App Router useSearchParams error boundary", tokensNum: 5000 }

# Complex integration
{ query: "Playwright Python page.wait_for_selector timeout handling", tokensNum: 15000 }
```

## Output Format

Return:
1. Best minimal working snippet(s) — copy/paste ready
2. Notes — version constraints, gotchas
3. Sources — URLs if present

Deduplicate similar results; keep only the best representative snippet per approach.

