Agent SkillsAgent Skills
takoeight0821

loogle

@takoeight0821/loogle
takoeight0821
1
0 forks
Updated 4/13/2026
View on GitHub

Search for Lean 4 and Mathlib theorems, lemmas, and definitions by type signature, name, or subexpression pattern. Use when the user asks to find a theorem, look up a Lean definition, search for lemmas, or needs help discovering Mathlib functions.

Installation

$npx agent-skills-cli install @takoeight0821/loogle
Claude Code
Cursor
Copilot
Codex
Antigravity

Details

Path.agent/skills/loogle/SKILL.md
Branchmain
Scoped Name@takoeight0821/loogle

Usage

After installing, this skill will be available to your AI coding assistant.

Verify installation:

npx agent-skills-cli list

Skill Instructions


name: loogle description: Search for Lean 4 and Mathlib theorems, lemmas, and definitions by type signature, name, or subexpression pattern. Use when the user asks to find a theorem, look up a Lean definition, search for lemmas, or needs help discovering Mathlib functions.

Loogle - Lean/Mathlib Search

Search for Lean 4 and Mathlib declarations using the Loogle API.

How to Search

Use WebFetch to query the Loogle JSON API:

https://loogle.lean-lang.org/json?q=<URL-encoded-query>

Query Syntax

TypeSyntaxExample
By constantConstantNameList.map
By name substring"text""differ"
By subexpression_ * (_ ^ _)Pattern matching
By type signature(?a -> ?b) -> List ?a -> List ?bType search
By conclusion`- goal`
Combinedfilter1, filter2AND logic

Response Handling

Success response:

  • count: Total matches found
  • hits: Array of results (max 200)
    • name: Declaration name
    • type: Type signature
    • module: Source module
    • doc: Documentation (may be null)

Error response:

  • error: Error message
  • suggestions: Array of suggested corrections

When presenting results, show the declaration name, type signature, and module. Include documentation if available.

Example Queries

  • Find list functions: List, ?a -> ?b
  • Search by name: "append"
  • Type signature: Nat -> Nat -> Bool
  • Parsec functions: Std.Internal.Parsec
  • Option operations: Option, "map"