Token导航 LogoToken导航

Agent Skill · 研究检索

openapi-endpoints(openapi 端点)

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

openapi-endpoints 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 55,255。

总安装 489周安装 21GitHub Stars 37下载 171核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:openapi-endpoints(openapi 端点)
来源仓库:https://github.com/timelessco/recollect
仓库路径:skills/openapi-endpoints
安装命令:
npx skills add https://github.com/timelessco/recollect --skill openapi-endpoints
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/timelessco/recollect --skill openapi-endpoints

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

openapi-endpoints 用于生成 OpenAPI 端点的详细描述和示例。适合在 Codex、Claude、Cursor、Gemini CLI 中辅助前后端联调时使用。支持请求/响应示例、参数下拉菜单和错误码覆盖。

安装命令:npx skills add https://github.com/timelessco/recollect --skill openapi-endpoints。需确保导出命名符合 camelCase,避免路径匹配失败。

来源仓库内路径:skills/openapi-endpoints

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/timelessco/recollect --skill openapi-endpoints;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

openapi-endpoints 怎么安装?

在终端执行 npx skills add https://github.com/timelessco/recollect --skill openapi-endpoints。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

openapi-endpoints 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

openapi-endpoints 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

openapi-endpoints 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

openapi-endpoints 用的人多吗?

公开数据是累计安装 489 次,近一周安装 21 次,下载 171 次,GitHub 37 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

openapi-endpoints 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
openapi-endpoints

openapi 端点 · 本页

48937操作浏览器未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

OpenAPI Endpoint Documentation Lab

This skill runs an end-to-end lab: discover → audit schemas → create supplement → verify. Execute all 6 phases autonomously. The spec is generated in two passes: (1) a filesystem scanner auto-infers schemas from handler factories, (2) a merge script overlays human-authored metadata from supplement files.

Execution Loop

Phase 1    Phase 2       Phase 3        Phase 4    Phase 5      Phase 6
DISCOVER → SCHEMA AUDIT → SUPPLEMENT → BARREL → VERIFY SPEC → VERIFY UI
    ↑                                                              |
    └──────────── fix and retry if any verification fails ─────────┘

Phase 1 — Discover

Gather all context autonomously. Never ask the caller for file paths.

Find the route handler

Glob src/app/api/**/<endpoint-name>/route.ts

Read it. Identify:

  • Factory: which of the 4 factories from src/lib/api-helpers/create-handler.ts?

- createGetApiHandlerWithAuth / createPostApiHandlerWithAuth (auth required) - createGetApiHandler / createPostApiHandler (no auth)

  • Method: GET or POST (from the factory name and the export: export const GET or export const POST)
  • ROUTE constant: the kebab-case identifier (used for Sentry, not the URL path)
  • Schemas: inline InputSchema/OutputSchema, or imported from ./schema

Find the schema

Check for colocated schema.ts first:

Glob src/app/api/**/<endpoint-name>/schema.ts

If no schema.ts exists, schemas are inline in route.ts. Note this for Phase 2.

Find the domain barrel

The domain is the first path segment after /api/ (e.g., instagram, profiles, twitter):

Read src/lib/openapi/endpoints/<domain>/index.ts

Read a sibling supplement for pattern reference

Pick any existing supplement in the same domain directory:

Glob src/lib/openapi/endpoints/<domain>/*.ts

Read one (not index.ts, not *-examples.ts, not edge-process-imports.ts). This shows the exact pattern to follow — tags, security, example format.

Determine naming

  • Export name: <camelCaseDomainAndEndpoint>Supplement (e.g., instagramLastSyncedIdSupplement)
  • File name: <endpoint-name>.ts matching the route directory name
  • Path: /<domain>/<endpoint-name> (relative to /api, no /api prefix, no trailing slash)
  • Tags: capitalized domain name matching siblings (e.g., ["Instagram"], ["Profiles"])

Phase 2 — Schema Audit & Fix

Every Zod schema field must have .meta({description: "..."}). This maps directly to field descriptions in the generated OpenAPI spec via @asteasolutions/zod-to-openapi. Without it, fields appear in the spec with no description — bad developer experience.

Check all fields

Read the schema (from schema.ts or inline in route.ts). For every field in both InputSchema and OutputSchema, check for .meta({description: "..."}).

Add missing .meta()

For any field without .meta(), add it:

// Before
z.string()

// After
z.string().meta({ description: "The ID of the last synced Instagram bookmark" })

For nested objects and arrays:

z.array(z.int()).meta({ description: "Updated ordered list of favorite category IDs" })
z.object({
  id: z.string().meta({ description: "Tag identifier" }),
  name: z.string().meta({ description: "Tag display name" }),
}).meta({ description: "The newly created tag" })

Extract inline schemas to schema.ts if needed

If schemas are defined inline in route.ts and don't already have a schema.ts file, extract them to a colocated schema.ts. Follow this pattern:

// src/app/api/<domain>/<endpoint>/schema.ts
import { z } from "zod";

export const <PascalCase>InputSchema = z.object({
  field: z.string().meta({ description: "Field description" }),
});

export const <PascalCase>OutputSchema = z.object({
  field: z.string().meta({ description: "Field description" }),
});

Then update route.ts to import from ./schema instead of defining inline.

Reference examples for .meta() style

Read these files for well-documented schema patterns:

  • src/app/api/category/delete-user-category/schema.ts — 11-field response, boolean default
  • src/app/api/tags/create-and-assign-tag/schema.ts — nested sub-schemas with independent .meta()
  • src/app/api/bookmark/fetch-discoverable-by-id/schema.ts — deeply nested with MetadataSchema

Phase 3 — Create Supplement

Template

Use this template. Fill in applicable fields, delete inapplicable ones:

/**
 * @module Build-time only
 */
import { type EndpointSupplement } from "@/lib/openapi/supplement-types";
import { bearerAuth } from "@/lib/openapi/registry";

export const <camelCaseName>Supplement = {
	path: "/<domain>/<endpoint-name>",
	method: "<get|post>",
	tags: ["<Domain>"],
	summary: "<One-line summary for Scalar heading>",
	description: "<Detailed explanation. Supports markdown.>",
	security: [{ [bearerAuth.name]: [] }, {}],
	// --- Request examples (POST only) ---
	// Single: requestExample: { field: "value" },
	// Named:  requestExamples: { "key": { summary, description, value } },
	// --- Response examples ---
	// Single: responseExample: { data: { ... }, error: null },
	// Named:  responseExamples: { "key": { summary, description, value } },
	// --- Error examples ---
	// response400Examples: { "key": { summary, description, value: { data: null, error: "..." } } },
	// --- Additional response codes ---
	// additionalResponses: { 400: { description: "..." } },
	// --- Parameter examples (GET only) ---
	// parameterExamples: { paramName: { "key": { summary, description, value } } },
} satisfies EndpointSupplement;

Rules

  • path relative to /api — NOT /api/bookmarks/check-url, just /bookmarks/check-url
  • method lowercase: "get" or "post"
  • Tags capitalized: "Bookmarks", "Categories", "Twitter", "iPhone"
  • Security: [{[bearerAuth.name]: []}, {}] — {} means cookie auth also accepted
  • No-auth endpoints: security: []
  • Export name: <camelCaseName>Supplement
  • File header: /** @module Build-time only */
  • Use realistic example data (actual IDs, realistic strings — not "test-123")
  • Response examples must include the {data:..., error: null} wrapper
  • Named example keys: kebab-case, both summary and description required
  • When supplement exceeds 250 lines, extract examples to <endpoint-name>-examples.ts with as const

Choosing single vs named examples

ScenarioUse
One obvious happy pathresponseExample (singular)
Multiple success scenariosresponseExamples (named, creates dropdown in Scalar)
Endpoint can return validation errorsAdd response400Examples + additionalResponses: {400}
GET with query paramsAdd parameterExamples (creates dropdown per param in "Try It")

Phase 4 — Barrel Export

Read the domain barrel at src/lib/openapi/endpoints/<domain>/index.ts. Add the new export in alphabetical order among existing exports:

export { <camelCaseName>Supplement } from "./<endpoint-name>";

The collectSupplements() function in the merge script auto-discovers any export with path and method properties from these barrels — no registration needed beyond the barrel export.


Phase 5 — Verify (Script-Based)

This phase does NOT require a running dev server. These are all build-time operations.

5a. Regenerate the spec

npx tsx scripts/generate-openapi.ts

Check the output line: Supplements applied: X/Y. Verify X increased by 1 compared to before. If X < Y, a supplement path or method doesn't match — check Phase 3 rules.

5b. Verify in JSON

cat public/openapi.json | jq '.paths["/<domain>/<endpoint-name>"].<method> | {summary, tags, description}'

All three fields should be non-null and match what you wrote in the supplement.

5c. Auto-fix formatting

pnpm fix

5d. Type check

pnpm lint:types

If either fails, fix and re-run from 5a.


Phase 6 — Verify (Browser-Based)

6a. Ensure dev server is running

lsof -i :3000

If no process on port 3000, start the dev server:

pnpm dev &

Wait for it to be ready (check with curl -s http://localhost:3000 > /dev/null).

6b. Check Scalar UI

Use Chrome MCP to navigate to http://localhost:3000/api-docs. Search or scroll to find the endpoint under its tag group. Confirm:

  • Endpoint appears with correct summary
  • Tag grouping matches (e.g., under "Instagram")
  • Examples render in the "Try It" panel
  • Field descriptions from .meta() appear in the schema viewer

If the endpoint doesn't appear, re-run Phase 5a and check for merge warnings.


Updating an Existing Endpoint

For updates, start at Phase 2 (schema audit) and run through Phase 6. Common updates:

Schema changes

Modify Zod schema in schema.ts — scanner picks it up automatically. Ensure all new fields have .meta({description}).

Adding/updating examples

Edit the supplement file. Use named examples for multiple scenarios.

Adding error examples

Add response400Examples and additionalResponses: {400: {description}}.


Supplement Reference

EndpointSupplement fields

FieldTypeWhen to use
pathstringAlways (required)
methodstringAlways (required)
tagsstring[]Always — groups endpoint in Scalar sidebar
summarystringAlways — one-line heading
descriptionstringAlways — detailed explanation, supports markdown
securityArray<Record<string, string[]>>Always — auth requirements
requestExampleRecord<string, unknown>POST with one obvious request body
requestExamplesNamed examplesPOST with multiple request scenarios
responseExampleRecord<string, unknown>One obvious success response
responseExamplesNamed examplesMultiple success scenarios (dropdown in Scalar)
response400ExampleRecord<string, unknown>One obvious validation error
response400ExamplesNamed examplesMultiple validation error scenarios
additionalResponsesRecord<number, {description}>Custom descriptions for 400/403/404/409/500
parameterExamplesRecord<string, NamedExamples>GET endpoints with query params (dropdown per param)

Response components (auto-registered by scanner)

  • ValidationError (400) — {data: null, error: string}
  • Unauthorized (401) — {data: null, error: "Not authenticated"}
  • InternalError (500) — {data: null, error: "Failed to process request"}

additionalResponses overrides the 400 description while preserving the schema.

Naming conventions

  • Export: <camelCaseName>Supplement (e.g., checkUrlSupplement)
  • Example keys: kebab-case ("single-tweet", "validation-error")
  • Example files: <endpoint-name>-examples.ts (use as const)
  • Tags: capitalized ("Bookmarks", "iPhone")
  • Named examples require both summary and description

Edge Functions

Edge functions use a different workflow (manual registerPath() with raw SchemaObject). See reference.md for the complete pattern.


Troubleshooting

Supplement not appearing in spec

  1. Exported from domain index.ts barrel?
  2. path matches route exactly (relative to /api, no trailing slash)?
  3. method matches handler export ("get" for GET, "post" for POST)?
  4. Check console — mergeSupplements prints warnings for unmatched supplements

400 examples not showing

  1. Has additionalResponses: {400: {description}}?
  2. Using response400Examples (not responseExamples)?

Common mistakes

  • /api/bookmarks/check-url instead of /bookmarks/check-url
  • Forgetting as const on example data in -examples.ts files
  • responseExample (singular) when you need responseExamples (named)
  • Missing summary or description on named examples
  • Forgetting .meta({description}) on schema fields — run Phase 2 again

平台分布

Codex

36.24%
按下载量换算62

Claude

29.55%
按下载量换算51

Cursor

19.31%
按下载量换算33

Gemini CLI

8.66%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills