Auto-claude-code-research-in-sleep exa-search
AI-powered web search via Exa with content extraction. Use when user says "exa search", "web search with content", "find similar pages", or needs broad web results beyond academic databases (arXiv, Semantic Scholar).
install
source · Clone the upstream repo
git clone https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/exa-search" ~/.claude/skills/wanshuiyin-auto-claude-code-research-in-sleep-exa-search && rm -rf "$T"
manifest:
skills/exa-search/SKILL.mdsource content
Exa AI-Powered Web Search
Search query: $ARGUMENTS
Role & Positioning
Exa is the broad web search source with built-in content extraction:
| Skill | Best for |
|---|---|
| Direct preprint search and PDF download |
| Published venue papers (IEEE, ACM, Springer), citation counts |
| Layered reading: search, brief, section map, section reads |
| Broad web search: blogs, docs, news, companies, research papers — with content extraction |
Use Exa when you need results beyond academic databases, or when you want content (highlights, full text, summaries) extracted alongside search results.
Constants
- FETCH_SCRIPT —
relative to the current project.tools/exa_search.py - MAX_RESULTS = 10 — Default number of results to return.
Overrides (append to arguments):
— top 5 results/exa-search "RAG pipelines" — max: 5 — research papers only/exa-search "diffusion models" — category: research paper — recent news/exa-search "startup funding" — category: news, start date: 2025-01-01 — full text mode/exa-search "transformer" — content: text, max chars: 8000 — LLM-generated summaries/exa-search "transformer" — content: summary — domain filter/exa-search "transformer" — domains: arxiv.org,huggingface.co — find similar pages/exa-search "https://arxiv.org/abs/2301.07041" — similar
Setup
Exa requires the
exa-py SDK and an API key:
pip install exa-py
Set your API key:
export EXA_API_KEY=your-key-here
Get a key from exa.ai.
Workflow
Step 1: Parse Arguments
Parse
$ARGUMENTS for:
- query: The search query (required) or a URL (for
mode)find-similar - similar: If present, use
mode instead of searchfind-similar - max: Override MAX_RESULTS
- category:
,research paper
,news
,company
,personal site
,financial reportpeople - content:
(default),highlights
,text
,summarynone - max chars: Max characters for content extraction
- type: Search type —
(default),auto
,neural
,fastinstant - domains: Comma-separated include domains
- exclude domains: Comma-separated exclude domains
- include text: Phrase that must appear in results
- exclude text: Phrase to exclude from results
- start date: ISO 8601 date — only results after this
- end date: ISO 8601 date — only results before this
- location: Two-letter ISO country code
Step 2: Locate Script
SCRIPT=$(find tools/ -name "exa_search.py" 2>/dev/null | head -1)
If not found, tell the user:
exa_search.py not found. Make sure tools/exa_search.py exists and exa-py is installed: pip install exa-py
Step 3: Execute Search
Standard search:
python3 "$SCRIPT" search "QUERY" --max 10 --content highlights
With filters:
python3 "$SCRIPT" search "QUERY" --max 10 \ --category "research paper" \ --start-date 2025-01-01 \ --content text --max-chars 8000
Find similar pages:
python3 "$SCRIPT" find-similar "URL" --max 5 --content highlights
Get content for known URLs:
python3 "$SCRIPT" get-contents "URL1" "URL2" --content text
Step 4: Present Results
Format results as a structured table:
| # | Title | URL | Date | Key Content | |---|-------|-----|------|-------------|
For each result:
- Show title and URL
- Show published date if available
- Show highlights, text excerpt, or summary depending on content mode
- Flag particularly relevant results
Step 5: Offer Follow-up
After presenting results, suggest:
- Deepen: "I can fetch full text for any of these results"
- Find similar: "I can find pages similar to any result"
- Narrow: "I can re-search with domain/date/text filters"
Key Rules
- Always check that
is set before searchingEXA_API_KEY - Default to
content mode for a good balance of speed and contexthighlights - Use
when the user is clearly looking for academic contentcategory: "research paper" - Use
content mode when the user needs full page contenttext - Combine with
or/arxiv
for comprehensive literature coverage/semantic-scholar