A Claude Code skill that gives any Claude agent full knowledge of the PhyslibSearch API — semantic search over Physlib, a formal Lean 4 physics library.
Once installed, an agent can find theorems, definitions, and proofs by natural language description, fetch declarations by Lean name, and browse the module hierarchy — without any extra configuration.
All Claude Code surfaces (terminal CLI, Mac/Windows desktop app, VS Code extension, JetBrains extension) share the same ~/.claude/skills/ directory. One command installs the skill for all of them:
mkdir -p ~/.claude/skills/physlibsearch && curl -fsSo ~/.claude/skills/physlibsearch/SKILL.md \
https://raw.githubusercontent.com/Kernel-Science/physlibsearch-skill/main/SKILL.mdThen invoke with /physlibsearch in any Claude Code session, or just ask Claude to find a Lean theorem — it will load the skill automatically.
The Claude web/desktop app supports uploading custom skills directly:
- Open SKILL.md and save the file locally.
- In the Claude app, go to Settings → Skills (or the skills section of a Project).
- Upload
SKILL.md— the app reads thenameanddescriptionfrontmatter automatically.
If your version of the app does not yet have a Skills upload UI, paste the raw contents of SKILL.md into the Custom instructions field of a Project instead.
User-level (all projects): open Cursor Settings → Rules for AI and paste the contents of SKILL.md.
Project-level: create .cursor/rules/physlibsearch.mdc in your repo root:
mkdir -p .cursor/rules && curl -fsSo .cursor/rules/physlibsearch.mdc \
https://raw.githubusercontent.com/Kernel-Science/physlibsearch-skill/main/SKILL.mdUser-level (all projects): open Windsurf Settings → AI → Global Rules and paste the contents of SKILL.md.
Project-level: create .windsurfrules in your repo root:
curl -fsSo .windsurfrules \
https://raw.githubusercontent.com/Kernel-Science/physlibsearch-skill/main/SKILL.mdCreate .github/copilot-instructions.md in your repo root:
mkdir -p .github && curl -fsSo .github/copilot-instructions.md \
https://raw.githubusercontent.com/Kernel-Science/physlibsearch-skill/main/SKILL.mdCopilot picks this up automatically for all chat interactions in that repository.
Add the skill as a system prompt in ~/.continue/config.json:
{
"systemMessage": "<paste contents of SKILL.md here>",
"models": [...]
}Or use the @file context provider in chat to attach SKILL.md on demand.
Create a .gemini/styleguide.md file in your repo root and paste the contents of SKILL.md — Gemini Code Assist reads this file as project-level context.
Pass the skill as context when starting a session:
gemini --context "$(curl -fsSL https://raw.githubusercontent.com/Kernel-Science/physlibsearch-skill/main/SKILL.md)"Or add it to your ~/.gemini/settings.json system prompt for persistent access.
Pass the skill as a system prompt when starting a session:
codex --full-auto \
"$(curl -fsSL https://raw.githubusercontent.com/Kernel-Science/physlibsearch-skill/main/SKILL.md)"For persistent access, add the contents of SKILL.md to the instructions field in ~/.codex/config.toml.
- All five API endpoints (
/search,/expand,/fetch,/modules,/modules/declarations) with request/response shapes and curl examples - Query writing tips (natural language beats Lean syntax)
- When to use HyDE query expansion (
/expand) for technical queries - How to interpret the
distancefield - Rate limits and batching advice
Paste the raw contents of SKILL.md directly into your agent's system prompt or context window — no Claude Code required.
- Live search: physlibsearch.net
- API docs: physlibsearch.net/docs
- Source: github.com/Kernel-Science/physlibsearch
- Physlib: physlib.io