本文へ移動
cccskills
無料GitHub で公開

volcengine-sdk-generator

Generate accurate Volcengine SDK examples by locating an API through API Explorer search, fetching its swagger, and calling api/common/explorer/make-code with user-provided Params. Use when the user asks how to write Volcengine SDK code, generate SDK samples, or call a Volcengine API in Python, Go, Java, PHP, cURL, Node.js. Supports Chinese and English API names such as "角色扮演", "AssumeRole", or "STS AssumeRole". Also use for explicit SDK configuration questions about retry, timeout, AK/SK, STS, AssumeRole, temporary credentials, proxy, connection pooling, SSL, debug mode, request signing, response parsing, and error handling. If the user only needs API parameters, enum values, required fields, error codes, response schemas, pagination, or API comparisons, hand off to volcengine-api. If they need CLI-based operations, hand off to volcengine-cli.

インストール方法を見る

含まれるファイル(9)

  • SKILL.md9.1 KB
  • references/sdk-integration-go.md6.8 KB
  • references/sdk-integration-java.md8.0 KB
  • references/sdk-integration-nodejs.md7.5 KB
  • references/sdk-integration-php.md6.3 KB
  • references/sdk-integration-python.md7.5 KB
  • scripts/make_code.py28.1 KB
  • scripts/rg_rank.py8.7 KB
  • scripts/sdk_info.py4.2 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Volcengine SDK Generator

Generate ordinary Volcengine API call examples by default. Keep the default output focused on the API call itself: authentication setup, request object/params, invocation, and printing the response. Do not add retry, proxy, connection pool, debug logging, or other advanced SDK configuration unless the user explicitly asks for those topics.

For advanced SDK configuration questions, use the language-specific files under references/. These reference files are self-contained; answer from them directly.

TopicReference
Go SDK configurationreferences/sdk-integration-go.md
Python SDK configurationreferences/sdk-integration-python.md
Java SDK configurationreferences/sdk-integration-java.md
Node.js SDK configurationreferences/sdk-integration-nodejs.md
PHP SDK configurationreferences/sdk-integration-php.md

Core Rules

  • API discovery uses scripts/rg_rank.py, which calls API Explorer search with both Channel=service and Channel=api. After a concrete API is selected, call scripts/make_code.py in direct mode with --service-code, --api-version, and --action.
  • API discovery is online-only. The search endpoint does not require cookies, login state, UID, DID, UUID, or browser-specific headers. The script sends only Query, Channel, Limit, and Offset as query parameters.
  • rg_rank.py preserves Channel=api order except for version selection: when the same service_code + action has multiple versions and the user did not specify one, it moves the result with IsRecommended=1 ahead of the other versions in that group. It also includes Channel=service results as separate service metadata.
  • If online search fails, report the returned search errors. Do not guess an API or fall back to a bundled catalog.
  • Use the user's original request as --query; do not rewrite it into a guessed API name or SDK method.
  • Extract a shorter --query only when the user clearly self-corrects with words such as 等等, 不对, 重新来, 我改主意, 其实想要, 其实是想要, 应该是, or 改成; the extracted query must be a continuous substring from the user request, not a guessed API name.
  • When multiple resources or services appear without a clear self-correction, run rg_rank.py once with the original request. If the returned candidates remain ambiguous, list them concisely and ask the user to choose.
  • Pure-generic queries such as api, sdk, or demo are sent online but are likely to be ambiguous. Refine the query with a concrete resource or action word.
  • ServiceCode is case-sensitive. Preserve the exact service_code value from the selected API record when calling make_code.py; for example, Kafka is not kafka.
  • When the same service_code + action appears in multiple API versions and the user did not specify a version, select the result with is_recommended=true even if its remote_rank is lower. If the user specified a version, use that exact version.
  • Fetch api-swagger only after a concrete API is selected.
  • The api-swagger fetch may include both Version and APIVersion because that endpoint expects them; the make-code payload must not include Version.
  • Call make-code with ApiAction, ServiceCode, APIVersion, Region, and Params.
  • Do not send Version to make-code.
  • Params must come from the user. Do not auto-fill from swagger demos.
  • Swagger is used for API metadata, required parameter hints, and lightweight validation. Do not serialize query arrays, form arrays, or .N parameters for make-code; pass the user’s JSON object as Params.
  • If the user omits required top-level parameters, mock only those top-level required parameters and clearly mark them as mock values. Do not mock optional parameters. If a required top-level parameter is an object or array, recursively fill only required child fields/items.
  • Mock values must be derived from the fetched swagger first: prefer example, then examples, then default, then enum, then type/constraint-aware fallback. If a swagger example is masked, such as **** or XX, skip it and use a valid fallback value.
  • Mock comments must be in Chinese by default and placed near the mocked assignment line when the target language supports line comments; do not add a duplicate mock banner at the top of the returned code.
  • Returned SDK code must print the API response value. The script post-processes fixed make-code templates for Python, Go, Java, and PHP to assign the response and print it.
  • Return the code generated by scripts/make_code.py as the primary SDK example. Do not rewrite SDK request construction, authentication setup, or response handling into a custom application unless the user explicitly asks for that. If optional formatting or convenience logic is added, keep the generated active response print, such as print(resp), fmt.Println(resp), System.out.println(resp), print_r($response), or console.log(response).
  • If language is not specified, return all languages from DemoSdk.
  • SDK install/dependency info is a separate, on-demand capability. Only when the user explicitly asks how to install the SDK or which package/version to use (keywords such as 依赖, 安装, install, 版本, 包, maven, go get, pip, composer, npm), run scripts/sdk_info.py with --service-code and --api-version (reuse the selected API's values; add --language to filter to one of go/python/java/php/nodejs). It returns the live install command (RunCommand) plus package and version per language. Do NOT run it during normal code generation.
  • If the API match is ambiguous, show concise candidates and ask the user to choose one. Do not add follow-up execution boilerplate such as saying that you will fetch swagger, mock required params, and call make-code after the user chooses.

Workflow

  1. Parse the user request:

    • API hint: action, Chinese name, service code, or natural-language description.
    • Language: Python, Go, Java, PHP, cURL, Node.js, or unspecified.
    • Params: JSON object supplied by the user.
    • Region: user value or default cn-beijing.
  2. Locate or validate the API once for every request. If the user already provides service_code, api_version, and action, use those exact values in direct mode; make_code.py verifies them through the online api-swagger response. For natural-language requests, call scripts/rg_rank.py with --query first. Use the full original request unless a clear self-correction keyword points to a later target; in that case use the final target substring.

  3. After selecting service_code, api_version, and action, call scripts/make_code.py in direct API mode with --service-code, --api-version, and --action. If top-level required params are missing, the script fills only those required top-level params with swagger-derived mock values and annotates the returned code in Chinese. Ask for clarification only when API selection is genuinely ambiguous in the online results; in that clarification, only list candidates and ask the user to choose.

  4. Once params are available, call make-code through the script and return the official code. Do not transform the generated sample into a hand-written utility; any custom formatting must be secondary and must preserve the active response print.

Commands

Search online candidates:

python3 scripts/rg_rank.py \
  --query '角色扮演' \
  --limit 10 \
  --format text

Direct API mode:

In TRN examples, <account-id> is the Volcengine account ID segment, such as a masked 2134xxxyyy.

python3 scripts/make_code.py \
  --service-code sts \
  --api-version 2018-01-01 \
  --action AssumeRole \
  --language python \
  --params-json '{"DurationSeconds":3600,"RoleSessionName":"demo","RoleTrn":"trn:iam::<account-id>:role/demo"}'

Use --refresh-swagger when API Explorer metadata has just changed or generated code looks stale:

python3 scripts/make_code.py \
  --service-code sts \
  --api-version 2018-01-01 \
  --action AssumeRole \
  --refresh-swagger \
  --params-json '{}'

Fetch SDK install/dependency info on demand (only when the user asks about install, package, or version):

python3 scripts/sdk_info.py \
  --service-code sts \
  --api-version 2018-01-01 \
  --language go

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Query and answer questions about Volcengine API specifications. Use when the user asks about API parameters, error codes, request methods, enum values, required fields, response structures, pagination, parameter dependencies, service capability lists, API availability, or API comparisons, even if they do not explicitly say "API". Typical intent includes checking what an action supports, which fields are required, what values a parameter accepts, why an API returns a specific error, how to pass nested or body parameters, how pagination works, what an API response contains, whether a batch operation exists, what services or versions expose an operation, or how two APIs differ. Use API Explorer data as the authoritative source and preserve constraints, examples, and caveats found in the spec. Answer in Chinese or English. When the user needs runnable SDK code, language-specific examples, or SDK configuration, hand off to volcengine-sdk-generator. When they need CLI operations, hand off to volcengine-cli.

日本語の概要は準備中です。原文の説明を表示しています。

volcengine/volcengine-skills212026年9月23日 更新

Create and manage Volcengine cloud resources using the Volcengine CLI (`ve` command). Supports all Volcengine services including ECS, VPC, CLB, RDS, Redis, and more. Trigger this skill whenever the user asks to create, query, modify, or delete cloud resources on Volcengine, mentions the `ve` command, says "volcengine CLI", or describes infrastructure tasks such as "create an ECS instance", "set up a VPC", "list security groups", "allocate an EIP". Also trigger on Chinese prompts mentioning "火山引擎" or "火山" (e.g., "火山引擎上有哪些 ECS"、"查一下我火山的云服务器"、 "火山引擎创建一个 VPC"、"火山的 Redis 实例列一下"). Also trigger when the user encounters errors from `ve` commands and needs troubleshooting help. Also use for TOS bucket/object operations, tosutil (sometimes written tosutils), Ark CLI / arkcli model discovery, inference, generation, endpoints, fine-tuning, plans, or usage, and TLS (日志服务) / volclog log search, analysis, ingest, export, or LogCollector collection, through `ve tosutil`, `ve arkcli` and `ve volclog`.

日本語の概要は準備中です。原文の説明を表示しています。

volcengine/volcengine-skills212026年9月23日 更新

Use when the user asks to query Volcengine CloudTrail audit logs, investigate login or resource operations, or manage CloudTrail trails and backfill delivery tasks. Trigger on 操作审计, 审计日志, CloudTrail, cloud_trail, trail, 跟踪, 历史补投, or backfill in a Volcengine context. Audit queries are read-only; trail and backfill mutations require an explicit preview and confirmation.

日本語の概要は準備中です。原文の説明を表示しています。

volcengine/volcengine-skills212026年9月23日 更新

火山引擎合规最佳实践助手:一是根据用户诉求(要满足的合规标准、关键词、关注的风险等级), 从火山引擎官方内置的合规包模板里推荐该开启哪些、并标出哪些已开启;二是汇总账号当前的合规 态势,把已生效规则/合规包(官方内置 + 用户自定义)的评估结果按类别(法规 / 最佳实践 / 自定义)与严重度聚合成一份合规总览报告;三是当官方基线没覆盖时,指导用户写一条 Rego 策略 作为自定义合规规则并注册评估。可在用户确认后把推荐的模板部署为合规包。Use when 用户想做「合规检查 / 合规巡检 / 安全合规 / 合规最佳实践 / 该开哪些合规规则 / 等保合规 / 我火山账号合规吗 / 有哪些不合规 / 帮我写条自定义合规规则」,或提到火山引擎「配置审计 / Config / 合规包 / conformance pack / Rego 策略」。Trigger on 火山 / 火山引擎 / volcengine 关键词叠加合规场景。部署合规包 / 注册自定义规则属写操作,需用户确认;合规报告 与资源修复严格分离。

日本語の概要は準備中です。原文の説明を表示しています。

volcengine/volcengine-skills212026年9月23日 更新

Manage Volcengine's AI-native BaaS platform (Supabase edition / AIDAP / 火山引擎 AI 原生 BaaS 平台 Supabase 版) — a Volcengine-operated distribution that differs from official Supabase. Use when the user asks to create, inspect, or manage Volcengine Supabase or AIDAP resources — workspaces, branches, computes, SQL queries, schema changes, Auth, Realtime, Edge Functions, Storage buckets, frontend static-site hosting (Pages), API keys, connection info, or TypeScript type generation — or when a Volcengine deployment selects AIDAP as its database provider. Also trigger on Chinese prompts mentioning "火山引擎 Supabase" or "火山 Supabase". Operations run through the byted-supabase-cli command-line tool (installed via `npm i -g @byted-supabase/cli`; this is NOT the official `supabase` CLI). Do NOT use it for general database discussions, non-Supabase services (RDS MySQL, Redis), or pure client-side coding unrelated to Supabase backend management.

日本語の概要は準備中です。原文の説明を表示しています。

volcengine/volcengine-skills212026年9月23日 更新

Deploy a local project directory or Git repository to Volcengine as a running, reachable cloud service. USE WHEN: deploy to Volcengine, deploy to 火山引擎/火山, deploy this repo/project, publish current code, launch the app, run it in the cloud, expose it as a service, deploy to ECS/VKE/veFaaS, run on ECS, push to VKE, deploy as serverless/FaaS, or the user wants the agent to choose a Volcengine hosting target. If the user only asks which Volcengine deployment target to choose, use `volcengine-prepare` skill first. Not for creating a single standalone resource — use `volcengine-cli` skill for that.

日本語の概要は準備中です。原文の説明を表示しています。

volcengine/volcengine-skills212026年9月23日 更新

volcengine のスキルをすべて見る

このスキルの問題を報告する