Best use case
loogle-search is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Search Mathlib for lemmas by type signature pattern using Loogle.
Teams using loogle-search should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/loogle-search/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How loogle-search Compares
| Feature / Agent | loogle-search | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Search Mathlib for lemmas by type signature pattern using Loogle.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Loogle Search - Mathlib Type Signature Search Search Mathlib for lemmas by type signature pattern. ## When to Use - Finding a lemma when you know the type shape but not the name - Discovering what's available for a type (e.g., all `Nontrivial ↔ _` lemmas) - Type-directed proof search ## Commands ```bash # Search by pattern (uses server if running, else direct) loogle-search "Nontrivial _ ↔ _" loogle-search "(?a → ?b) → List ?a → List ?b" loogle-search "IsCyclic, center" # JSON output loogle-search "List.map" --json # Start server for fast queries (keeps index in memory) loogle-server & ``` ## Query Syntax | Pattern | Meaning | |---------|---------| | `_` | Any single type | | `?a`, `?b` | Type variables (same variable = same type) | | `Foo, Bar` | Must mention both `Foo` and `Bar` | | `Foo.bar` | Exact name match | ## Examples ```bash # Find lemmas relating Nontrivial and cardinality loogle-search "Nontrivial _ ↔ _ < Fintype.card _" # Find map-like functions loogle-search "(?a → ?b) → List ?a → List ?b" # → List.map, List.pmap, ... # Find everything about cyclic groups and center loogle-search "IsCyclic, center" # → commutative_of_cyclic_center_quotient, ... # Find Fintype.card lemmas loogle-search "Fintype.card" ``` ## Performance - **With server running**: ~100-200ms per query - **Cold start (no server)**: ~10s per query (loads 343MB index) ## Setup Loogle must be built first: ```bash cd ~/tools/loogle && lake build lake build LoogleMathlibCache # or use --write-index ``` ## Integration with Proofs When stuck in a Lean proof: 1. Identify what type shape you need 2. Query Loogle to find the lemma name 3. Apply the lemma in your proof ```lean -- Goal: Nontrivial G from 1 < Fintype.card G -- Query: loogle-search "Nontrivial _ ↔ 1 < Fintype.card _" -- Found: Fintype.one_lt_card_iff_nontrivial exact Fintype.one_lt_card_iff_nontrivial.mpr h ```
Related Skills
search-tools
Search Tool Hierarchy
search-router
Choose the right search tool for each query type
research
Document codebase as-is with thoughts directory for historical context
research-external
External research workflow for docs, web, APIs - NOT codebase exploration
research-agent
Research agent for external documentation, best practices, and library APIs via MCP tools
repo-research-analyst
Analyze repository structure, patterns, conventions, and documentation for understanding a new codebase
perplexity-search
AI-powered web search, research, and reasoning via Perplexity
morph-search
Fast codebase search via WarpGrep (20x faster than grep)
github-search
Search GitHub code, repositories, issues, and PRs via MCP
elasticsearch-patterns
Mapping design, query optimization, aggregation patterns, index lifecycle management, and search relevance tuning.
search-hierarchy
Search Tool Hierarchy
workflow-router
Goal-based workflow orchestration - routes tasks to specialist agents based on user goals