Skip to content

Kernel-Science/physlibsearch-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

physlibsearch — Claude Code Skill

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.

Install

Claude Code — CLI, Desktop, VS Code, JetBrains

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.md

Then invoke with /physlibsearch in any Claude Code session, or just ask Claude to find a Lean theorem — it will load the skill automatically.

Claude app (claude.ai)

The Claude web/desktop app supports uploading custom skills directly:

  1. Open SKILL.md and save the file locally.
  2. In the Claude app, go to Settings → Skills (or the skills section of a Project).
  3. Upload SKILL.md — the app reads the name and description frontmatter 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.

Cursor

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.md

Windsurf

User-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.md

GitHub Copilot

Create .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.md

Copilot picks this up automatically for all chat interactions in that repository.

Continue (open-source, VS Code / JetBrains)

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.

Gemini Code Assist (VS Code / JetBrains)

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.

Gemini CLI

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.

OpenAI Codex (CLI)

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.

What the skill covers

  • 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 distance field
  • Rate limits and batching advice

Use in a custom agent

Paste the raw contents of SKILL.md directly into your agent's system prompt or context window — no Claude Code required.

Links

About

Claude Code skill for PhyslibSearch — semantic search over the Physlib Lean 4 physics library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors