Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

swagger-api-queryswagger API query 搜索

Agent Skill

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

总安装

1,105

周安装

47

GitHub Stars

公开资料未说明

下载量

387
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/zhihuihu/agent-skills --skill swagger-api-query

简介

swagger-api-query 用于辅助 API 设计、接口文档和请求响应结构梳理。

  • 适合生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。
  • 使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则。
  • 涉及生成接口文档时,应避免凭空补字段,最好从现有代码或样例中提取事实。
  • 当前已有较完整的功能说明,可直接用于相关开发场景。

SKILL.md

Swagger API Query Assistant

Use scripts/swagger_query.py to index and query OpenAPI/Swagger JSON documents on-demand.

Execution Principles

  1. Narrow down first: Prioritize list-tags, search, or tag commands
  2. Then get details: Only call detail for target endpoints
  3. Then view models: Only call schema when you need field definitions
  4. Default text output: Use --format json only when downstream programs need to consume the data

Dependencies

  • Python 3.6+
  • OpenAPI/Swagger JSON document

Document Path Resolution

The script looks for documents in this order:

  1. Explicit --spec <path> parameter
  2. api-docs.json in current directory or parent directories
  3. api-docs.json in skill directory or parent directories

If not found, the script will show checked paths and suggest using --spec.

Standard Workflow

1) Understand modules

python skills/swagger-api-query/scripts/swagger_query.py list-tags

2) Locate candidate endpoints

List all endpoints:

python skills/swagger-api-query/scripts/swagger_query.py list-all

Query by tag:

python skills/swagger-api-query/scripts/swagger_query.py tag "User Management"

Search by keyword:

python skills/swagger-api-query/scripts/swagger_query.py search "user"

3) View endpoint details

python skills/swagger-api-query/scripts/swagger_query.py detail "/inter-api/admin/users/{id}/status" put

If the path has only one method, you can omit the method parameter.

4) View Schema (optional)

python skills/swagger-api-query/scripts/swagger_query.py schema "UserDTO"

Structured Output

python skills/swagger-api-query/scripts/swagger_query.py --format json search "login"
python skills/swagger-api-query/scripts/swagger_query.py --spec "D:/my/project/api-docs.json" --format json detail "/api/auth/login" post

Common Tasks

Find login endpoint

python skills/swagger-api-query/scripts/swagger_query.py search "login"
python skills/swagger-api-query/scripts/swagger_query.py detail "/api/auth/login" post

List user management endpoints

python skills/swagger-api-query/scripts/swagger_query.py tag "User Management"
python skills/swagger-api-query/scripts/swagger_query.py detail "/api/users" get

Command Reference

CommandDescriptionExample
Global Parameters
--spec <path>Specify document path--spec "D:/project/api-docs.json"
--format jsonJSON structured output--format json search "user"
Commands
list-tagsList all API categoriespython scripts/swagger_query.py list-tags
list-allList all endpoint indexespython scripts/swagger_query.py list-all
tag <tag-name>Query endpoints by tagpython scripts/swagger_query.py tag "User Management"
search <keyword>Search by keywordpython scripts/swagger_query.py search "user"
detail <path> [method]View endpoint detailspython scripts/swagger_query.py detail "/api/users" get
schema <schema-name>View schema definitionpython scripts/swagger_query.py schema "UserDTO"

Notes

  • detail requires explicit method (get/post/...) for paths with multiple methods
  • Use quotes for paths, tags, or keywords containing spaces
  • The script returns clear error messages (file not found, JSON parse failed, path or schema not found)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.26%
按下载量换算129

Claude

30.58%
按下载量换算118

Cursor

19.45%
按下载量换算75

Gemini CLI

10.43%
按下载量换算40

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills