LAP: compact API specs for agents
LAP (Lean API Platform)
The lapsh CLI compacts OpenAPI and GraphQL specs for agents and installs a skill into Claude Code, Cursor and Codex
- 345 ★ on the repository
- Last commit
- Apache-2.0
Extended access
Why this level
- The CLI and the skill reach a public registry, download third-party specs and install skills into agent folders
- The publish command sends your spec to the registry after sign-in, so private APIs must not be published this way
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/lap-lean-api-platformDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The CLI and the skill reach a public registry, download third-party specs and install skills into agent folders
- The publish command sends your spec to the registry after sign-in, so private APIs must not be published this way
This is third-party code. Review the repository files before installing.
What it does
LAP turns an API description into the compact .lap format, which an agent reads more easily than the original YAML. It accepts OpenAPI, GraphQL, AsyncAPI, Protobuf, Postman and Smithy. The CLI removes scaffolding, writes types briefly (for example a uuid type instead of two lines) and pulls shared fields into one place. lapsh convert turns the format back into OpenAPI. The lapsh init command installs the lap skill into an agent: Claude Code by default, and Cursor and Codex with --target cursor and --target codex. After that the agent itself searches the registry for the spec of the service it needs, downloads it with lapsh get or compiles a local file with lapsh compile. For particular services a ready skill can be installed, for example lapsh skill-install stripe. The registry at lap.sh holds more than fifteen hundred ready specs, and a publisher publishes their own with lapsh publish after signing in. A skill can also be built from your own spec with lapsh skill, and the --ai flag brings the local Claude CLI into the build.
Who it is for. For developers who connect an agent in Claude Code, Cursor or Codex to third-party APIs and want to give it an exact spec in compact form.
Good fit when
- An agent must integrate with Stripe or another API and needs its verified spec instead of guesses
- A huge OpenAPI file does not fit in context and must be squeezed while keeping endpoints and types
- Your own spec should become a skill that team agents install with one command
- You want to search the registry for APIs on a topic such as payments and sort the results by popularity
- Specs in GraphQL, AsyncAPI or Protobuf need to be brought to one form for the agent
Not a fit when
- The API is small and its docs fit in a prompt: compilation adds a needless step
- You need full human-readable documentation with field descriptions: lean mode drops them
- The environment has neither Node.js nor Python: the CLI installs through npm or pip
Example request
Find the Stripe spec in the LAP registry, install the skill and show which endpoints I need to create a payment.Limitations
You need Node.js or Python: the CLI installs through npm or pip or runs directly through npx. Publishing to the registry needs an account and sign-in with lapsh login.
In the author's measurements across 500 blind runs on 50 APIs, agent accuracy without docs was 0.399 and with a ready LAP spec 0.860. The lean variant scored 0.851 against 0.825 for the original spec at 35 percent lower cost. Median OpenAPI compression is 5.2 times. These are the project's own results with no independent check.
In Codex agents reach the registry through curl, which is faster in the sandbox, and automatic updates through hooks still depend on the experimental codex_hooks flag. Third-party authors publish specs to the registry, so verify critical details against the service's own documentation.
How to disable. Delete the installed skills from ~/.claude/skills/lap (from their own skill folders for Cursor and Codex) and remove the package with npm uninstall -g @lap-platform/lapsh.
FAQ
How do I install LAP in Claude Code?
Run npx @lap-platform/lapsh init. It installs the lap skill, and the agent itself calls search, download and compile when it sees an API task. You can also invoke the skill by hand as /lap.
Which spec formats does LAP understand?
OpenAPI in YAML and JSON, GraphQL, AsyncAPI, Protobuf, Postman and Smithy. The CLI detects the format itself.
How does lean mode differ from ordinary compression?
Lean also drops field descriptions and keeps names, types and constraints. Size falls by roughly another 15 percent, while agent accuracy holds in the author's measurements.
How do I install a ready skill for a particular API?
Find the service with lapsh search and run lapsh skill-install with its name, for example stripe. The skill lands in ~/.claude/skills for Claude Code.
How do I make a skill from my own spec?
The command lapsh skill spec.yaml -o skills/ --no-ai builds a basic skill mechanically, and the --ai flag adds a refinement pass through the Claude CLI.
Discussion
No questions or reviews yet.
Related
CLI toolsCodely team skills that run agent work in phases: a plan in a file or GitHub issues, review after each phase and a clean commit
The author's personal set: shared agent rules and dozens of skills for GitHub, the browser, macOS, messaging and releases, plus a sync script
A CLI that generates and maintains AI context files, CLAUDE.md, Cursor rules, AGENTS.md and Copilot instructions, keeping them accurate as code changes
Softaworks Agent Toolkit
Softaworks Agent Skills
A marketplace of skills, subagents and commands for coding agents: development, documentation, planning and workplace communication
A set of slash commands, skills and subagents for Claude Code: review, tests, security, releases, docs and GitHub to Linear sync
A terminal coding agent that picks a model for each request on its own and shows spend in real time
README in short
The documentation shows five compression stages with the savings of each, summaries of measurements on 1,500 specs and a table of formats. A separate block gathers badges for the Claude Code, OpenClaw, Cursor and Codex skills.
README badge
Original SKILL.md
---
name: lap
description: "LAP CLI -- compile, search, and manage API specs for AI agents. Use when working with API specifications (OpenAPI, GraphQL, AsyncAPI, Protobuf, Postman), compiling specs to LAP format, searching the LAP registry, generating skills from API specs, or publishing APIs. Commands: init, compile, search, get, skill, skill-install, skill-batch, publish, login, logout, whoami."
user-invocable: true
version: 1.0.0
metadata:
openclaw:
emoji: "\u26A1"
requires:
anyBins: ["npx", "lapsh"]
install:
- id: node
kind: node
package: "@lap-platform/lapsh"
bins: ["lapsh"]
label: "Install LAP CLI (npm)"
---
# LAP CLI
Compile, search, and manage API specs for AI agents.
## Command Resolution
Detect the available CLI binary once per session:
```bash
# Prefer global install, fall back to npx
if command -v lapsh &>/dev/null; then
LAP_CMD="lapsh"
else
LAP_CMD="npx @lap-platform/lapsh"
fi
```
Use `$LAP_CMD` (or the resolved form) for all commands below.
---
## Agent Flow -- Consuming APIs
Use this flow when a user needs to find, download, or work with an API.
### 1. Discover
```bash
lapsh search <query> [--tag <tag>] [--sort relevance|popularity|date] [--limit <n>]
```
Search the LAP registry. Results show name, endpoint count, compression ratio, and a `[skill]` marker for installable skills.
```bash
# Find payment APIs sorted by popularity
lapsh search payment --sort popularity
# JSON output for scripting
lapsh search payment --json | jq '.results[] | select(.has_skill) | .name'
```
### 2. Acquire