← 返回 Skills 市场
LAP CLI
作者
mickmicksh
· GitHub ↗
· v1.0.0
· MIT-0
220
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install lap
功能描述
LAP CLI -- compile, search, and manage API specs for AI agents. Use when working with API specifications (OpenAPI, GraphQL, AsyncAPI, Protobuf, Postman), com...
使用说明 (SKILL.md)
\r \r
LAP CLI\r
\r Compile, search, and manage API specs for AI agents.\r \r
Command Resolution\r
\r Detect the available CLI binary once per session:\r \r
# Prefer global install, fall back to npx\r
if command -v lapsh &>/dev/null; then\r
LAP_CMD="lapsh"\r
else\r
LAP_CMD="npx @lap-platform/lapsh"\r
fi\r
```\r
\r
Use `$LAP_CMD` (or the resolved form) for all commands below.\r
\r
---\r
\r
## Agent Flow -- Consuming APIs\r
\r
Use this flow when a user needs to find, download, or work with an API.\r
\r
### 1. Discover\r
\r
```bash\r
lapsh search \x3Cquery> [--tag \x3Ctag>] [--sort relevance|popularity|date] [--limit \x3Cn>]\r
```\r
\r
Search the LAP registry. Results show name, endpoint count, compression ratio, and a `[skill]` marker for installable skills.\r
\r
```bash\r
# Find payment APIs sorted by popularity\r
lapsh search payment --sort popularity\r
\r
# JSON output for scripting\r
lapsh search payment --json | jq '.results[] | select(.has_skill) | .name'\r
```\r
\r
### 2. Acquire\r
\r
**Option A -- Install a skill** (if `[skill]` marker present):\r
```bash\r
lapsh skill-install \x3Cname>\r
# Installs to ~/.claude/skills/\x3Cname>/\r
```\r
\r
**Option B -- Download the spec**:\r
```bash\r
lapsh get \x3Cname> -o \x3Cname>.lap\r
lapsh get \x3Cname> --lean -o \x3Cname>.lean.lap\r
```\r
\r
**Option C -- Compile a local spec**:\r
```bash\r
lapsh compile \x3Cspec-file> -o output.lap\r
lapsh compile \x3Cspec-file> -o output.lean.lap --lean\r
```\r
\r
Supported formats: OpenAPI (YAML/JSON), GraphQL (SDL), AsyncAPI, Protobuf, Postman, Smithy. Format is auto-detected.\r
\r
### 3. Use\r
\r
Once you have a `.lap` file, read it directly -- LAP is designed for AI consumption. Key markers:\r
\r
| Marker | Meaning |\r
|--------|---------|\r
| `@api` | API name, version, base URL |\r
| `@endpoint` | HTTP method + path |\r
| `@param` | Parameter (query, path, header) |\r
| `@body` | Request body schema |\r
| `@response` | Response status + schema |\r
| `@required` | Required fields |\r
| `@error` | Error response |\r
\r
---\r
\r
## Publisher Flow -- Publishing APIs\r
\r
Use this flow when a user wants to compile, package, and publish an API spec.\r
\r
### 1. Authenticate\r
\r
```bash\r
lapsh login\r
lapsh whoami # verify\r
```\r
\r
### 2. Compile\r
\r
```bash\r
lapsh compile spec.yaml -o spec.lap\r
lapsh compile spec.yaml -o spec.lean.lap --lean\r
```\r
\r
### 3. Generate Skill\r
\r
```bash\r
# Basic skill (Layer 1 -- mechanical)\r
lapsh skill spec.yaml -o skills/ --no-ai\r
\r
# AI-enhanced skill (Layer 2 -- requires claude CLI)\r
lapsh skill spec.yaml -o skills/ --ai\r
\r
# Generate and install directly\r
lapsh skill spec.yaml --install\r
```\r
\r
### 4. Publish\r
\r
```bash\r
lapsh publish spec.yaml --provider stripe.com\r
lapsh publish spec.yaml --provider stripe.com --name charges --source-url https://...\r
lapsh publish spec.yaml --provider stripe.com --skill # include skill\r
lapsh publish spec.yaml --provider stripe.com --skill --skill-ai # with AI skill\r
```\r
\r
### 5. Verify\r
\r
```bash\r
lapsh search \x3Cname> # confirm it appears in registry\r
```\r
\r
### 6. Batch Operations\r
\r
```bash\r
# Generate skills for all specs in a directory\r
lapsh skill-batch specs/ -o skills/\r
\r
```\r
\r
---\r
\r
## Quick Reference\r
\r
### Core Commands\r
\r
| Command | Description |\r
|---------|-------------|\r
| `compile \x3Cspec>` | Compile API spec to LAP format |\r
\r
### Registry Commands\r
\r
| Command | Description |\r
|---------|-------------|\r
| `search \x3Cquery>` | Search the LAP registry |\r
| `get \x3Cname>` | Download a LAP spec |\r
| `publish \x3Cspec>` | Compile and publish to registry |\r
| `login` | Authenticate via GitHub OAuth |\r
| `logout` | Revoke token |\r
| `whoami` | Show authenticated user |\r
\r
### Skill Commands\r
\r
| Command | Description |\r
|---------|-------------|\r
| `skill \x3Cspec>` | Generate Claude Code skill from spec |\r
| `skill-batch \x3Cdir>` | Batch generate skills |\r
| `skill-install \x3Cname>` | Install skill from registry |\r
\r
---\r
\r
## Error Recovery\r
\r
| Problem | Fix |\r
|---------|-----|\r
| `command not found: lapsh` | `npm install -g @lap-platform/lapsh` or use `npx @lap-platform/lapsh` |\r
| `Not authenticated` | Run `lapsh login` first |\r
| `Format detection failed` | Pass `-f openapi` (or graphql, asyncapi, protobuf, postman, smithy) |\r
| `403 Forbidden` on get | Spec may be private or registry may block without User-Agent -- update lapsh |\r
| `YAML parse error` | Check spec is valid YAML/JSON -- use a linter first |\r
| `Layer 2 requires claude` | Install Claude CLI or use `--no-ai` for Layer 1 skills |\r
| `Provider required` | `publish` needs `--provider \x3Cdomain>` (e.g., `--provider stripe.com`) |\r
\r
---\r
\r
## Environment Variables\r
\r
| Variable | Purpose | Default |\r
|----------|---------|---------|\r
| `LAP_REGISTRY` | Override registry URL | `https://registry.lap.sh` |\r
\r
---\r
\r
## References\r
\r
- [{baseDir}/references/agent-flow.md](references/agent-flow.md) -- Extended agent workflow with examples\r
- [{baseDir}/references/publisher-flow.md](references/publisher-flow.md) -- Extended publisher workflow with examples\r
- [{baseDir}/references/command-reference.md](references/command-reference.md) -- Complete command reference with all flags\r
安全使用建议
This skill appears coherent for a CLI that manages API specs. Before installing: (1) prefer using `npx @lap-platform/lapsh` for one-off use rather than a global npm install; (2) inspect the package source on npm/GitHub (owner, repo, recent releases, code) if you plan to install globally; (3) if you run `lapsh login`, understand an OAuth token will be stored locally—revoke it if you stop using the service; (4) when using `lapsh skill-install`, review the installed skill directory (e.g., ~/.claude/skills/<name>/) before allowing your agent to use it, since installed skills contain executable instructions; (5) if you have an internal registry need, set LAP_REGISTRY to a trusted URL. These steps reduce supply-chain and token exposure risk.
功能分析
Type: OpenClaw Skill
Name: lap
Version: 1.0.0
The 'lap' skill bundle provides a CLI interface for managing and compiling API specifications (OpenAPI, GraphQL, etc.) into a token-efficient format for AI agents. It includes standard functionality for searching a registry (registry.lap.sh), installing API-specific skills, and publishing specs via GitHub OAuth. The instructions in SKILL.md and the reference documents are consistent with its stated purpose and do not exhibit any signs of malicious intent or high-risk vulnerabilities.
能力评估
Purpose & Capability
Name/description (LAP CLI for compiling/searching/publishing API specs) align with the declared install (npm package @lap-platform/lapsh) and the runtime instructions. Required binaries (lapsh or npx) are appropriate for a Node-based CLI. No unrelated credentials or system services are requested.
Instruction Scope
SKILL.md is an instruction-only guide that stays on-topic: it describes searching, downloading, compiling, generating skills, and publishing. It references interactive login (GitHub OAuth) and installing skills into ~/.claude/skills/, which is expected given the functionality. Note: 'lapsh login' stores an auth token locally (normal for a registry CLI) and 'skill-install' will write files under the user's skills directory; users should review installed skill contents before trusting them.
Install Mechanism
The install uses an npm package (@lap-platform/lapsh) that creates a lapsh binary. This is a common and reasonable mechanism for a Node CLI, but npm installs carry the usual supply-chain risk (package code executes on installation/run). Prefer running via npx (ephemeral) if you don't trust a global install, and review the package's upstream source before installing globally.
Credentials
No required environment variables or secrets are declared. The only environment hint is LAP_REGISTRY (overrideable registry URL), which is appropriate. The skill mentions GitHub OAuth for publishing—requiring a locally stored token—which is consistent with its publisher flow. No unrelated tokens/credentials are requested.
Persistence & Privilege
The skill is not always-enabled and does not request elevated platform privileges. It can install skills into ~/.claude/skills/, which is expected for a skill manager but means installed skills become discoverable/usable by the agent. The CLI stores auth tokens locally after login (normal). There is no attempt to modify other skills' configs or system-wide agent settings in the instructions.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install lap - 安装完成后,直接呼叫该 Skill 的名称或使用
/lap触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Version 1.0.0
元数据
常见问题
LAP CLI 是什么?
LAP CLI -- compile, search, and manage API specs for AI agents. Use when working with API specifications (OpenAPI, GraphQL, AsyncAPI, Protobuf, Postman), com... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 220 次。
如何安装 LAP CLI?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install lap」即可一键安装,无需额外配置。
LAP CLI 是免费的吗?
是的,LAP CLI 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
LAP CLI 支持哪些平台?
LAP CLI 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 LAP CLI?
由 mickmicksh(@mickmicksh)开发并维护,当前版本 v1.0.0。
推荐 Skills