Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计异常

improve-sdk-namingimprove SDK naming 命令行

Agent Skill

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

总安装

212

周安装

9

GitHub Stars

11

下载量

74
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/speakeasy-api/agent-skills --skill improve-sdk-naming

简介

improve-sdk-naming 用于辅助 API 设计和接口文档生成。

  • 适合梳理 endpoint、生成 OpenAPI 草稿或检查字段命名。
  • 使用时需确认真实业务语义和鉴权方式,避免凭空补字段。
  • 最好从现有代码或接口样例中提取事实生成文档。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

improve-sdk-naming

Improve SDK method naming using AI-powered suggestions or manual overrides. Covers both automatic speakeasy suggest commands and manual naming with x-speakeasy-group and x-speakeasy-name-override extensions.

When to Use

Use this skill when you want AI-powered suggestions from Speakeasy:

  • SDK methods have ugly auto-generated names like GetApiV1Users
  • You want Speakeasy AI to suggest better operation IDs
  • You want AI-generated suggestions for error types
  • Looking to improve spec quality automatically using speakeasy suggest
  • User says: "suggest improvements", "speakeasy suggest", "AI suggestions", "suggest operation-ids", "suggest error-types", "get AI recommendations"

NOT for: Manually creating overlays (see manage-openapi-overlays instead)

Inputs

InputRequiredDescription
OpenAPI specYesPath to the spec file (-s)
AuthenticationYesVia speakeasy auth login or SPEAKEASY_API_KEY env var
Output fileNoPath for overlay output (-o)

Outputs

OutputDescription
SuggestionsBetter operation names or error types printed to console
Overlay fileOptional: saves suggestions as an overlay YAML file (-o)

Prerequisites

For non-interactive environments (CI/CD, AI agents), set the API key as an environment variable:

export SPEAKEASY_API_KEY="<your-api-key>"

For interactive use, authenticate directly:

speakeasy auth login

Command

AI-Powered Suggestions

# Suggest better operation IDs (SDK method names)
speakeasy suggest operation-ids -s <spec-path>

# Suggest error type definitions
speakeasy suggest error-types -s <spec-path>

# Output suggestions as an overlay file
speakeasy suggest operation-ids -s <spec-path> -o suggested-overlay.yaml

Check Current Operation IDs

Run the suggest command without -o to preview what would change:

speakeasy suggest operation-ids -s openapi.yaml

SDK Method Naming Convention

Speakeasy generates grouped SDK methods from operation IDs. The naming convention uses x-speakeasy-group for the namespace and x-speakeasy-name-override for the method name.

HTTP MethodSDK UsageOperation ID
GET (list)sdk.users.list()users_list
GET (single)sdk.users.get()users_get
POSTsdk.users.create()users_create
PUTsdk.users.update()users_update
DELETEsdk.users.delete()users_delete

The operation ID format is {group}_{method}. Speakeasy splits on the underscore to create the namespace and method name in the generated SDK.

Example

Step 1: Get AI Suggestions

speakeasy suggest operation-ids -s openapi.yaml -o operation-ids-overlay.yaml

This analyzes your spec and generates an overlay that transforms names like:

  • get_api_v1_users_list -> listUsers
  • post_api_v1_users_create -> createUser

Step 2: Review and Apply the Overlay

The AI-generated overlay (from -o) creates naming improvements using x-speakeasy-group and x-speakeasy-name-override.

Note: For manual overlay creation, use the manage-openapi-overlays skill instead of this skill.

Step 3: Add the Overlay to workflow.yaml

sources:
  my-api:
    inputs:
      - location: ./openapi.yaml
    overlays:
      - location: ./operation-ids-overlay.yaml

Step 4: Regenerate the SDK

speakeasy run --output console

Error Type Suggestions

The suggest error-types command analyzes your API and suggests structured error responses:

speakeasy suggest error-types -s openapi.yaml

This suggests:

  • Common HTTP error codes (400, 401, 404, 500)
  • Custom error schemas appropriate for your API

Output as an overlay:

speakeasy suggest error-types -s openapi.yaml -o error-types-overlay.yaml

What NOT to Do

  • Do NOT modify operationIds directly in the source spec if it is externally managed. Use overlays instead.
  • Do NOT use generic names like get or post without a group. Always pair x-speakeasy-name-override with x-speakeasy-group.
  • Do NOT forget to add the generated overlay to workflow.yaml after creating it. Without this step, the names will not change in the generated SDK.
  • Do NOT create duplicate operation names across different groups. Each {group}_{method} combination must be unique.

Troubleshooting

ErrorCauseSolution
"unauthorized"Missing or invalid API keySet SPEAKEASY_API_KEY env var or run speakeasy auth login
Names unchanged after regenerationOverlay not added to workflowAdd the overlay to the overlays list in workflow.yaml
No suggestions returnedSpec already has good namingNo action needed; names are already well-structured
Duplicate method namesSimilar endpoints share namesUse unique x-speakeasy-name-override values for each endpoint
Timeout during suggestVery large specTry running on a smaller subset or increase timeout

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.29%
按下载量换算27

Claude

30.08%
按下载量换算22

Cursor

20%
按下载量换算15

Gemini CLI

11.18%
按下载量换算8

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills