$npx -y skills add Dianel555/DSkills --skill exaHigh-precision semantic search and content retrieval via Exa API. Use when: (1) Deep research requiring semantic understanding, (2) Code documentation and examples lookup, (3) Company/professional research, (4) AI-powered comprehensive research tasks, (5) URL content extraction w
| 1 | # Exa Search |
| 2 | |
| 3 | High-precision semantic search via Exa API. Standalone CLI only (no MCP dependency). |
| 4 | |
| 5 | ## Execution Method |
| 6 | |
| 7 | ```bash |
| 8 | # Prerequisites: pip install httpx tenacity |
| 9 | # Environment: EXA_API_KEY (required), EXA_API_URL (optional, default: https://api.exa.ai) |
| 10 | |
| 11 | # All examples assume cwd == skills/exa/. The shim auto-chdirs if you launch |
| 12 | # it from elsewhere (e.g., the repo root). |
| 13 | cd skills/exa |
| 14 | python scripts/exa_cli.py --help |
| 15 | ``` |
| 16 | |
| 17 | ## Available Tools |
| 18 | |
| 19 | ```bash |
| 20 | # Basic semantic search (highlights always on; supports inline category:<type>) |
| 21 | python scripts/exa_cli.py web_search_exa --query "TypeScript design patterns" [--num-results 10] |
| 22 | python scripts/exa_cli.py web_search_exa --query "category:company Anthropic AI safety" |
| 23 | |
| 24 | # Batch URL fetch (urls is a repeatable flag; payload field is upstream `ids`) |
| 25 | python scripts/exa_cli.py web_fetch_exa \ |
| 26 | --urls "https://a.com" --urls "https://b.com" \ |
| 27 | [--max-chars 3000] [--out content.json] |
| 28 | |
| 29 | # Advanced filtered search (list params are repeatable flags, no comma syntax) |
| 30 | python scripts/exa_cli.py web_search_advanced_exa --query "transformer" \ |
| 31 | [--type auto|fast|instant] [--category research\ paper] \ |
| 32 | [--include-domains arxiv.org --include-domains papers.nips.cc] \ |
| 33 | [--exclude-domains medium.com] \ |
| 34 | [--include-text "attention"] [--exclude-text "tutorial"] \ |
| 35 | [--start-date 2024-01-01] [--end-date 2024-12-31] \ |
| 36 | [--num-results 10] [--max-age-hours 168] \ |
| 37 | [--text] [--highlights] [--summary] \ |
| 38 | [--max-chars 5000] # only effective when --text is set; emits stderr warning otherwise |
| 39 | [--out results.json] |
| 40 | |
| 41 | # Configuration / connectivity probe (omit --no-test to run a numResults=1 ping) |
| 42 | python scripts/exa_cli.py get_config_info [--no-test] |
| 43 | ``` |
| 44 | |
| 45 | ## Tool Capability Matrix |
| 46 | |
| 47 | | Tool | Required | Optional | Output | |
| 48 | |------|----------|----------|--------| |
| 49 | | `web_search_exa` | `--query` | `--num-results` (1-100) | Search results JSON (highlights always present) | |
| 50 | | `web_fetch_exa` | `--urls` (repeatable, ≥1) | `--max-chars` (default 3000), `--out` | `/contents` response JSON | |
| 51 | | `web_search_advanced_exa` | `--query` | `--type`, `--category`, repeatable `--include-domains`/`--exclude-domains`/`--include-text`/`--exclude-text`, `--start-date`, `--end-date`, `--num-results`, `--max-age-hours`, `--text`, `--highlights`, `--summary`, `--max-chars`, `--out` | Filtered search results JSON | |
| 52 | | `get_config_info` | – | `--no-test` | Config + (default) `connection_test` | |
| 53 | |
| 54 | ## Global Options |
| 55 | |
| 56 | Place before the subcommand: |
| 57 | |
| 58 | | Option | Purpose | |
| 59 | |--------|---------| |
| 60 | | `--api-url` | Override `EXA_API_URL` (does not write to `os.environ`) | |
| 61 | | `--api-key` | Override `EXA_API_KEY` | |
| 62 | | `--debug` | Enable JSON debug events on stderr (`EXA_DEBUG=true`) — never logs auth values | |
| 63 | | `--max-retry-wait <s>` | Cap (seconds) for single retry wait + exponential backoff (default 60, env: `EXA_MAX_RETRY_WAIT`) | |
| 64 | | `--auth-scheme <scheme>` | Authentication scheme: `x-api-key` (default) or `bearer` for third-party endpoints (env: `EXA_AUTH_SCHEME`) | |
| 65 | |
| 66 | ## Tool Routing Guide |
| 67 | |
| 68 | | Use Case | Recommended Tool | |
| 69 | |----------|------------------| |
| 70 | | Real-time news, current events | grok-search | |
| 71 | | Semantic/conceptual research | **exa** (`web_search_exa`) | |
| 72 | | Domain or date-bounded research | **exa** (`web_search_advanced_exa`) | |
| 73 | | Read full content of one or more URLs | **exa** (`web_fetch_exa`) | |
| 74 | | Academic papers, technical docs | **exa** (`web_search_advanced_exa --include-domains arxiv.org ...`) | |
| 75 | |
| 76 | ## Workflow Patterns |
| 77 | |
| 78 | ### Pattern 1: Quick Semantic Search |
| 79 | ```bash |
| 80 | python scripts/exa_cli.py web_search_exa --query "best practices for React hooks" --num-results 5 |
| 81 | ``` |
| 82 | |
| 83 | ### Pattern 2: Filtered Research (repeatable flags) |
| 84 | ```bash |
| 85 | python scripts/exa_cli.py web_search_advanced_exa --query "transformer architecture" \ |
| 86 | --include-domains arxiv.org --include-domains papers.nips.cc \ |
| 87 | --start-date 2023-01-01 --text --summary |
| 88 | ``` |
| 89 | |
| 90 | ### Pattern 3: Batch URL Read |
| 91 | ```bash |
| 92 | python scripts/exa_cli.py web_fetch_exa \ |
| 93 | --urls "https://example.com/a" --urls "https://example.com/b" \ |
| 94 | --max-chars 4000 --out batch.json |
| 95 | ``` |
| 96 | |
| 97 | ### Pattern 4: Third-Party Endpoint (Bearer Auth) |
| 98 | ```bash |
| 99 | # Connect to exa-pool or other Exa-compatible proxy |
| 100 | export EXA_API_URL=https://pool.example.com |
| 101 | export EXA_AUTH_SCHEME=bearer |
| 102 | export EXA_API_KEY=your-bearer-token |
| 103 | |
| 104 | python scripts/exa_cli.py web_search_exa --query "AI agents" --num-results 5 |
| 105 | |
| 106 | # Or use CLI flags for one-off requests |
| 107 | python scrip |