Gemini search

From wanshuiyin/Auto-claude-code-research-in-sleep · View interactive version

Gemini search is an AI agent skill from the GitHub repository wanshuiyin/Auto-claude-code-research-in-sleep. Search research papers via Gemini for broad literature discovery. Use when user says "gemini search", "gemini papers", "search with gemini", or wants AI-powered literature discovery beyond arXiv/Semantic Scholar indexes.

How to use this skill

Skill file

Gemini Literature Search

Search query: $ARGUMENTS

Role & Positioning

This skill uses Gemini as a broad literature discovery source:

| Skill | Source | Best for |

|-------|--------|----------|

| /arxiv | arXiv API | Latest preprints, cutting-edge unrefereed work |

| /semantic-scholar | Semantic Scholar API | Published venue papers (IEEE, ACM, Springer) with citation counts |

| /deepxiv | DeepXiv CLI | Layered reading: search, brief, section map, section reads |

| /exa-search | Exa API | Broad web search: blogs, docs, news, companies, research papers |

| /gemini-search | Gemini MCP / CLI | AI-powered broad literature discovery — searches across multiple angles, aliases, and sub-problems |

Use Gemini when you want AI-driven discovery that goes beyond keyword matching — Gemini decomposes topics into sub-problems, explores naming variants, and surfaces papers that traditional API searches may miss.

Constants

Overrides (append to arguments):

- /gemini-search "topic" — max: 20 — request up to 20 papers

- /gemini-search "topic" — year: 2020- — papers from 2020 onward

- /gemini-search "topic" — code-only — only papers with open-source code

- /gemini-search "topic" — venues: NeurIPS,ICML,ICLR — focus on specific venues

- /gemini-search "topic" — model: gemini-3-flash-preview — Gemini 3 Flash (faster, higher quota, less capable than Pro)

- /gemini-search "topic" — model: auto-gemini-3 — auto-routes within the Gemini 3 family by load

- /gemini-search "topic" — model: gemini-2.5-pro — legacy (only if your gemini-cli < v0.40)

Environment & Setup

Prerequisites

  1. Node.js v16.0.0+
  2. Google Gemini CLI — installed and authenticated

```bash

npm install -g @google/gemini-cli

gemini auth

```

  1. gemini-mcp-tool — MCP bridge for Codex CLI (jamubc/gemini-mcp-tool)

```bash

npm install -g gemini-mcp-tool

```

MCP Configuration

Register the Gemini bridge in Codex CLI:

codex mcp add gemini-cli -- npx -y gemini-mcp-tool

Authentication

Gemini CLI uses your Google account or an API key. Reuse an existing Google account login, or set an API key in the same shell before starting Codex so the MCP process inherits it:

export GEMINI_API_KEY='your-key-here'
codex

A separate tool-shell export does not update an already running host or MCP process. If you keep credentials in an environment file, load it explicitly before starting the host rather than relying on automatic .env loading.

Available MCP Tools

| Tool | Parameters | Description |

|------|-----------|-------------|

| mcp__gemini-cli__ask-gemini | prompt (required), model (optional), sandbox (optional) | Ask Gemini for analysis or research; supports @file syntax |

| mcp__gemini-cli__sandbox-test | prompt (required), model (optional) | Safe code execution in sandbox |

| mcp__gemini-cli__ping | — | Connection test |

| mcp__gemini-cli__help | — | Show Gemini CLI help |

Verify Setup

gemini --version

Workflow

Step 1: Parse Arguments

Parse $ARGUMENTS for:

Step 2: Execute Search (MCP Priority)

Priority 1 — Gemini MCP (preferred):

Try calling mcp__gemini-cli__ask-gemini with the search prompt:

mcp__gemini-cli__ask-gemini({
  prompt: 'You are a research literature scout. Search comprehensively for papers on: "QUERY"

IMPORTANT CONSTRAINTS:
1. Search from MULTIPLE angles — do not just use the exact query. Decompose the topic into sub-problems, aliases, neighboring tasks, and common benchmark/settings variants.
2. Prefer papers that are genuinely relevant, not merely keyword-adjacent.
3. Include top venues, journals, surveys, recent preprints, and papers with code when available.
4. Focus on papers from MIN_YEAR onward unless older foundational work is necessary.

For EACH paper found, provide ALL of the following in this exact format:
- Title: [exact title]
- Authors: [full author list]
- Year: [publication year]
- Venue: [exact conference/journal name + year, or "arXiv preprint" if not published]
- arXiv ID: [format 2401.12345, or "N/A"]
- DOI: [if available, or "N/A"]
- Code URL: [GitHub/GitLab link if available, or "No code"]
- Summary: [one-sentence core contribution]

Find at least MAX_RESULTS papers with good coverage across:
- strong recent papers from top venues
- surveys/reviews if they exist
- papers with open-source code
- closely related variants of the topic

Format as a numbered list with all fields for each paper.',
  model: 'auto-gemini-3'
})

Priority 2 — Gemini CLI fallback (if MCP unavailable):

If mcp__gemini-cli__ask-gemini fails or is not configured, fall back to CLI:

gemini -p 'You are a research literature scout. Search comprehensively for papers on: "QUERY"
...same prompt as above...' 2>/dev/null

When to use which:

Step 3: Parse Results

Extract structured paper information from Gemini's response. For each paper, normalize to:

{
  title, authors, year, venue,
  arxiv_id,    // "N/A" if not available
  doi,         // "N/A" if not available
  code_url,    // "No code" if not available
  summary      // one-sentence contribution
}

If Gemini returns fewer papers than requested, note this but do not re-query.

Step 4: Present Results

Format results as a structured table:

| # | Title | Venue | Year | Code | Summary |
|---|-------|-------|------|------|---------|
| 1 | ... | NeurIPS 2024 | 2024 | [GitHub](url) | ... |
| 2 | ... | IEEE TWC | 2023 | No | ... |

For each paper, also show:

Step 5: Offer Follow-up

After presenting results, suggest:

/semantic-scholar "topic"    — search published venue papers with citation counts
/arxiv "arXiv:XXXX.XXXXX"   — fetch specific preprint details
/research-lit "topic" — sources: gemini, semantic-scholar  — combined multi-source review
/novelty-check "idea"       — verify novelty against literature

Key Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.