Token导航 LogoToken导航

Agent Skill · 研究检索

yapi(yapi 文档)

yapi 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

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

总安装 1,523周安装 61GitHub Stars 150下载 493核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/leeguooooo/cross-request-master --skill yapi

这个 Skill 是做什么的

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

yapi 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。它能帮助 Agent 组织信息源、过滤无关内容,并输出结构化候选列表供进一步评估。使用时需明确搜索目标和来源范围,避免依赖单一渠道或忽略时效性限制。

安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。yapi 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/yapi

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

yapi 怎么安装?

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

yapi 支持哪些 AI 工具?

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

yapi 需要什么权限?

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

yapi 是免费的吗?

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

yapi 用的人多吗?

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

yapi 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

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

值得选的地方

  • 同时适配 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调用外部服务未明确有提醒
yapi

yapi 文档 · 本页

1,523150操作浏览器未明确有提醒

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

SKILL.md 原文

YApi interface docs

Install / update

Preferred install / refresh flow:

npx skills add leeguooooo/cross-request-master -y -g

Preferred config bootstrap after skill install:

yapi config init --base-url=https://your-yapi-domain.com --auth-mode=global --email=YOUR_EMAIL
yapi login --base-url=https://your-yapi-domain.com --browser

Compatibility path when the user also wants to write ~/.yapi/config.toml in one step:

npm install -g @leeguoo/yapi-mcp
yapi install-skill --yapi-base-url=https://your-yapi-domain.com --yapi-auth-mode=global --yapi-email=YOUR_EMAIL --force

Command policy

Always use the real yapi CLI directly; do not call plugin-local node scripts/... files from the user's project. Inside Cursor or Claude Code, commands run from the user's workspace, so relative plugin paths are unreliable.

Prefer yapi command. If missing, fallback to one-shot npx without forcing global install:

yapi -h
# fallback:
npx -y -p @leeguoo/yapi-mcp yapi -h

In command examples below, yapi can be replaced by npx -y -p @leeguoo/yapi-mcp yapi. When CLI version is newer than the installed skill snapshot, yapi warns and asks to rerun:

npx skills add leeguooooo/cross-request-master -y -g
# compatibility:
npx -y -p @leeguoo/yapi-mcp yapi install-skill --force

Setup / auth bootstrap

  1. Read configured base_url from ~/.yapi/config.toml when available.
  2. If config is missing, prefer browser login bootstrap:
yapi login --base-url https://your-yapi-domain.com --browser
# optional explicit page:
yapi login --base-url https://your-yapi-domain.com --login-url https://your-yapi-domain.com/
  1. If the user provides email/password, global auth also works:
yapi login --base-url https://your-yapi-domain.com --email you@example.com --password '***'
  1. Validate login before deeper operations:
yapi whoami

Quick workflow

  1. Classify the user input first — do not pick a strategy until you know which it is:

- A. YApi page URL (https://yapi.example.com/project/123/api/456) → extract IDs from path → yapi interface get --id 456. Skip search. - B. HTTP endpoint path (/api/auth/token, /v1/users/:id) → see ## Find interface by HTTP path below. yapi search does not index paths, do not use it for this case. - C. Product keyword (语音房列表, voice room) → yapi search with keyword expansion (see ## Keyword expansion). - D. Numeric api_id → yapi interface get --id <api_id> directly.

  1. Confirm auth (yapi whoami), then run yapi login --browser when needed (open base URL, finish login in browser, then press Enter to sync cookie).
  2. Fetch raw JSON first, then summarize: method, path, headers, params, body, response schema/examples.
  3. For docs sync tasks, do --dry-run first, then real sync.
  4. If docs sync still hits 413, note that CLI already retries the file with --mermaid-classic; if it still fails, split the doc or reduce embedded diagrams.

Find interface by HTTP path

When the user gives an HTTP endpoint path like /api/auth/token (not a YApi page URL), yapi search will return empty because YApi's project search does not index interface paths. Use yapi interface list-menu with the built-in --path filter instead — the CLI does the filtering, no shell pipes needed.

Required input: project ID. If the user did not provide one, ask first or list candidates (yapi project list --group-id <id>); do not start enumerating projects/groups speculatively.

# substring match, case-insensitive (matches /api/auth/token, /api/auth/token/refresh, etc.)
yapi interface list-menu --project-id 365 --path /api/auth/token

# narrow further by HTTP method (case-insensitive exact match)
yapi interface list-menu --project-id 365 --path /api/auth/token --method POST

# combine to find all POST endpoints under a prefix
yapi interface list-menu --project-id 365 --path /api/auth --method POST

The filtered response shape is:

{
  "errcode": 0,
  "data": {
    "matches": [
      { "project_id": 365, "catid": 100, "cat_name": "Auth",
        "_id": 31400, "title": "Get Token", "path": "/api/auth/token", "method": "POST" }
    ],
    "total": 1
  }
}

After locating the _id, fetch full details:

yapi interface get --id 31400

Anti-patterns — do not do these:

  • ❌ yapi search --q '/api/auth/token' (project search does not index paths; will return empty)
  • ❌ yapi interface list --project-id X --limit all | python... (slow, brittle, blocked by most security gates)
  • ❌ Enumerating groups → projects → repeated search to guess where the path lives. Ask the user for the project instead.

Keyword expansion

Do not stop after one failed yapi search.

When the user asks with fuzzy product wording such as "语音房列表", "房间列表", "房间详情", "推荐房间", "语音房", "直播间", or similar:

  1. Search the original phrase first.
  2. If there is no direct hit, immediately retry 3-6 closely related variants before asking the user for more detail.
  3. Prefer Chinese variants, English variants, and endpoint-style nouns.
  4. If there are still no interface hits, search likely related nouns/categories separately before giving up.

Suggested expansions for room-style queries:

  • 语音房列表
  • 房间列表
  • 语音房
  • 房间详情
  • 房间推荐
  • room list
  • room detail
  • voice room

Example:

yapi search --q "语音房列表"
yapi search --q "房间列表"
yapi search --q "语音房"
yapi search --q "房间详情"
yapi search --q "room list"
yapi search --q "voice room"

Only ask the user for project name / extra keywords after the expanded search pass still returns no useful interface results.

URL detection

  1. Read configured base_url from ~/.yapi/config.toml.
rg -n "^base_url\\s*=" ~/.yapi/config.toml
  1. If URL origin matches base_url, extract IDs from path:

- /project/123/... -> project_id=123 - .../api/456 -> api_id=456 - .../api/cat_789 -> catid=789

  1. Prefer direct lookup when api_id exists:
yapi --path /api/interface/get --query id=<api_id>

Common commands

# version/help
yapi --version
yapi self-update
yapi -h

# auth
yapi whoami
yapi login --base-url https://your-yapi-domain.com --browser
yapi login --browser
yapi login --login-url https://your-yapi-domain.com/
yapi logout

# search / fetch
yapi search --q keyword --project-id 310
yapi --path /api/interface/get --query id=123
yapi --path /api/interface/list_cat --query catid=123
yapi --path /api/interface/list_cat --query "catid=4631&limit=50&page=1"

# browse entities
yapi group list
yapi project list --group-id 129 --page 1 --limit 10
yapi project get --id 365
yapi project token --project-id 365
yapi interface list-menu --project-id 365
yapi interface list-menu --project-id 365 --path /api/auth/token
yapi interface list-menu --project-id 365 --path /api/auth --method POST
yapi interface list --project-id 365 --limit all
yapi interface get --id 31400
yapi interface cat add --project-id 365 --name "公共分类" --desc ""
yapi interface cat update --cat-id 3722 --name "公共分类 1" --desc "公共分类"
yapi interface cat delete --cat-id 4169
yapi env --project-id 365
yapi member list --project-id 365
yapi follow
yapi user search --q keyword
yapi log list --type group --type-id 129 --page 1 --limit 10

# exports / test collections
yapi export --project-id 365 --type swagger --name openapi.json
yapi col list --project-id 365
yapi col cases --id 12 --project-id 365

Config cache locations:

  • Config: ~/.yapi/config.toml
  • Auth cache: ~/.yapi-mcp/auth-*.json

Browser login dependency:

agent-browser-stealth -V
# install once if missing browser runtime
agent-browser-stealth install

Docs sync

Binding mode (recommended):

yapi docs-sync bind add --name projectA --dir docs/release-notes --project-id 267 --catid 3667
yapi docs-sync bind list
yapi docs-sync bind get --name projectA
yapi docs-sync bind update --name projectA --source-file architecture.md
yapi docs-sync --binding projectA --dry-run
yapi docs-sync --binding projectA --source-file architecture.md
yapi docs-sync --binding projectA

Notes:

  • Binding file: .yapi/docs-sync.json
  • Mapping outputs: .yapi/docs-sync.links.json, .yapi/docs-sync.projects.json, .yapi/docs-sync.deployments.json
  • When bindings live under the global ~/.yapi/docs-sync.json, relative --dir values are resolved from the current git project root and stored as $HOME-relative paths.
  • Default behavior syncs changed files only; use --force for full sync.
  • Compatible with directory .yapi.json config as fallback (without binding).
  • yapi docs-sync bind remove --name projectA removes a binding.
  • --source-file overrides binding source_files; --clear-source-files clears the stored list on bind update.
  • --dry-run prints per-file preview lines with Markdown/HTML/payload sizes before upload.
  • If upload hits 413 Payload Too Large, the CLI first retries that file with --mermaid-classic, then reports payload size, parsed server limit (when available), and the largest Mermaid block if it still fails.
  • Mermaid/PlantUML/Graphviz/D2 rendering depends on local tool availability; missing tools do not block basic sync.

Interface creation guardrails

  • Always set req_body_type (use json if unsure) and provide res_body (prefer JSON Schema) when creating/updating interfaces.
  • Put structured request/response fields in req_* / res_body, not only in free-text desc/markdown.

平台分布

Claude

31.96%
按下载量换算158

Codex

30.66%
按下载量换算151

Cursor

18.27%
按下载量换算90

Gemini CLI

9.88%
按下载量换算49

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

可疑

权限和风险

操作浏览器

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

安装前确认

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

继续浏览同类 Skills