Install
openclaw skills install @volc-sdk-team/volcengine-sdk-generatorGenerate 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.
openclaw skills install @volc-sdk-team/volcengine-sdk-generatorGenerate 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.
| Topic | Reference |
|---|---|
| Go SDK configuration | references/sdk-integration-go.md |
| Python SDK configuration | references/sdk-integration-python.md |
| Java SDK configuration | references/sdk-integration-java.md |
| Node.js SDK configuration | references/sdk-integration-nodejs.md |
| PHP SDK configuration | references/sdk-integration-php.md |
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.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.--query; do not rewrite it into a guessed API name or SDK method.--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.rg_rank.py once with the original request. If the returned candidates remain ambiguous, list them concisely and ask the user to choose.api, sdk, or demo are sent online but are likely to be ambiguous. Refine the query with a concrete resource or action word.service_code value from the selected API record when calling make_code.py; for example, Kafka is not kafka.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.api-swagger only after a concrete API is selected.api-swagger fetch may include both Version and APIVersion because that endpoint expects them; the make-code payload must not include Version.make-code with ApiAction, ServiceCode, APIVersion, Region, and Params.Version to make-code.Params must come from the user. Do not auto-fill from swagger demos..N parameters for make-code; pass the user’s JSON object as Params.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.make-code templates for Python, Go, Java, and PHP to assign the response and print it.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).DemoSdk.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.make-code after the user chooses.Parse the user request:
cn-beijing.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.
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.
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.
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