Skill: fardeenxyz/exa (version 0.0.2)

--- name: exa description: Neural web search and code context via Exa AI API. Requires EXA_API_KEY. Use for finding documentation, code examples, research papers, or company info. metadata: {"clawdbot":{"emoji":"🧠","requires":{"env":["EXA_API_KEY"]}}} --- # Exa - Neural Web Search Direct API access to Exa's neural search engine. ## Setup **1. Get your API Key:** Get a key from [Exa Dashboard](https://dashboard.exa.ai/api-keys). **2. Set it in your environment:** ```bash export EXA_API_KEY="your-key-here" ``` ## Usage ### Web Search ```bash bash scripts/search.sh "query" [num_results] [type] ``` * `type`: auto (default), neural, fast, deep * `category`: company, research-paper, news, github, tweet, personal-site, pdf ### Code Context Finds relevant code snippets and documentation. ```bash bash scripts/code.sh "query" [num_results] ``` ### Get Content Extract full text from URLs. ```bash bash scripts/content.sh "url1" "url2" ```

path: scripts/code.sh
content: #!/bin/bash
# Exa code context search

QUERY="$1"
NUM_RESULTS="${2:-10}"

if [ -z "$QUERY" ]; then
    echo "Usage: $0 \"query\" [num_results]" >&2
    exit 1
fi

if [ -z "${EXA_API_KEY:-}" ]; then
    echo "Error: EXA_API_KEY is not set." >&2
    echo "Please set EXA_API_KEY environment variable." >&2
    exit 1
fi

# Optimized settings for code/docs
# No domain restrictions - let Exa's neural search find the best docs/repos
PAYLOAD=$(jq -n \
    --arg query "$QUERY" \
    --argjson numResults "$NUM_RESULTS" \
    '{
        query: $query,
        type: "auto",
        numResults: $numResults,
        text: true,
        highlights: true
    }')

curl -s -X POST 'https://api.exa.ai/search' \
    -H "x-[REDACTED_SECRET]" \
    -H 'Content-Type: application/json' \
    -d "$PAYLOAD"


path: scripts/content.sh
content: #!/bin/bash
# Get content from URLs

if [ $# -eq 0 ]; then
    echo "Usage: $0 url1 [url2 ...]" >&2
    exit 1
fi

if [ -z "${EXA_API_KEY:-}" ]; then
    echo "Error: EXA_API_KEY is not set." >&2
    echo "Please set EXA_API_KEY environment variable." >&2
    exit 1
fi

URLS=$(printf '%s\n' "$@" | jq -R . | jq -s .)

PAYLOAD=$(jq -n \
    --argjson ids "$URLS" \
    '{
        ids: $ids,
        text: true,
        highlights: true,
        summary: true
    }')

curl -s -X POST 'https://api.exa.ai/contents' \
    -H "x-[REDACTED_SECRET]" \
    -H 'Content-Type: application/json' \
    -d "$PAYLOAD"


path: scripts/search.sh
content: #!/bin/bash
# Exa web search

QUERY="$1"
NUM_RESULTS="${2:-10}"
TYPE="${3:-auto}"
CATEGORY="$4"

# 1. Check for Query
if [ -z "$QUERY" ]; then
    echo "Usage: $0 \"query\" [num_results] [type] [category]" >&2
    exit 1
fi

# 2. Check for API Key
if [ -z "${EXA_API_KEY:-}" ]; then
    echo "Error: EXA_API_KEY is not set." >&2
    echo "" >&2
    echo "To fix:" >&2
    echo "1. Get a key from https://dashboard.exa.ai/api-keys" >&2
    echo "2. Run: export EXA_API_KEY=\"your-key\"" >&2
    exit 1
fi

# 3. Build Payload
PAYLOAD=$(jq -n \
    --arg query "$QUERY" \
    --arg type "$TYPE" \
    --argjson numResults "$NUM_RESULTS" \
    '{
        query: $query,
        type: $type,
        numResults: $numResults,
        text: true,
        highlights: true,
        summary: true
    }')

if [ -n "$CATEGORY" ]; then
    PAYLOAD=$(echo "$PAYLOAD" | jq --arg cat "$CATEGORY" '. + {category: $cat}')
fi

# 4. Call API
curl -s -X POST 'https://api.exa.ai/search' \
    -H "x-[REDACTED_SECRET]" \
    -H 'Content-Type: application/json' \
    -d "$PAYLOAD"


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)