OpenMath Open Theorem
name: openmath-open-theorem
by bennyzhe · published 2026-04-01
$ claw add gh:bennyzhe/bennyzhe-openmath-open-theorem---
name: openmath-open-theorem
description: Queries open formal verification theorems from the OpenMath platform. Use when the user asks for a list of open theorems, wants Lean or Rocq-specific theorems, needs full detail for a theorem ID, or wants to download a theorem and scaffold a local proof workspace.
version: v1.0.0
---
# OpenMath Open Theorem
Instructions
Query the OpenMath library to discover and scaffold open theorems. The discovery scripts use `OPENMATH_SITE_URL` and `OPENMATH_API_HOST` when set, and otherwise fall back to the default production endpoints.
First-run gate
Before discovery on a new machine or workspace, check the shared `openmath-env.json`. Auto-discovery only checks `./.openmath-skills/openmath-env.json` and `~/.openmath-skills/openmath-env.json`.
This gate is mandatory. If `openmath-env.json` is missing, or if it exists but `preferred_language` is missing, stop. Do not query the OpenMath theorem list, theorem detail, or download APIs until setup is complete.
If no config exists, stop and ask the user where to create it, then collect at least:
Command:
python3 scripts/check_openmath_env.pyWorkflow checklist
Scripts
| Script | Command | Use when |
|--------|---------|----------|
| Shared env check | `python3 scripts/check_openmath_env.py [--config <path>]` | Mandatory first-run gate; validates shared config, preferred language, and the resolved OpenMath website/API endpoints. |
| List open theorems | `python3 scripts/fetch_theorems.py [--config <path>] [language]` | Listing or filtering open theorems after the first-run gate passes. `language`: optional `lean` or `rocq`. Without an explicit CLI language, query only the configured `preferred_language`. |
| Theorem detail | `python3 scripts/fetch_theorem_detail.py [--config <path>] <id>` | Need description, metadata, and formal definition (source) for a theorem ID; refuses to run until the first-run gate passes. |
| Download & scaffold | `python3 scripts/download_theorem.py [--config <path>] <id> [--output-dir <path>] [--force]` | Creating a local Lean or Rocq proof workspace after the first-run gate passes. |
`openmath_api.py` is the shared API client. `openmath_env_config.py` reads shared user preferences from `openmath-env.json`.
Notes
References
Load when needed (one level from this file):
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...