Alibabacloud Mcp Core Script Generate
Generate Alibaba Cloud MCP Core RunScript-compatible Python scripts from natural-language cloud operation requests. Use when the user explicitly asks for…
от sdk-team653 установки в других каталогах
Установить Alibabacloud Mcp Core Script Generate в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Alibaba Cloud Script Generator
Turn a natural-language Alibaba Cloud request into one RunScript-compatible Python script.
The script must use await call_cli(...), assign the final value to result, and pass
check_sandbox.py validation before output. Do not execute the script unless the user asks.
Scope Check Before You Start
- RunScript sandbox scripts (this skill): generates
call_cli()-based Python for the RunScript sandbox — no SDK imports, no credentials, no local execution. - SDK project code →
alibabacloud-sdk-usage: generates typed/generic SDK code with imports, credential providers, and dependency management for user projects. - Operational patterns (batch ops, audits, rotations) →
alibabacloud-find-skillsfirst.
Workflow
Split the request into atomic cloud operations. For each operation, you must call at least one of the following methods to discover API parameters before writing any code:
Method A — MCP tools (preferred): call
AlibabaCloud___SearchApiswith a natural language description, thenAlibabaCloud___GetApiDefinitionwith the confirmed product, action, and version. Batch search calls in one parallel round.Method B — HTTP metadata (when MCP tools return errors): The endpoint
https://next.api.aliyun.com/meta/v1/products/{product}/versions/{version}/api-docs.jsoncontains all API definitions for a product. IfWebFetchcannot extract the target API (response too large), download the full JSON withcurland extract the target API'sparametersarray locally — use any method that works (e.g.python3 -c,grep,jq).You must actually execute one of these methods — reading about them is not sufficient. Only if your tool call returns an error may you fall back to best-known parameter names, adding:
# WARNING: API parameters not verified — confirm before use.Generate one Python script body following the Sandbox Contract and Script Patterns below. Only whitelisted modules may be imported. When multiple tool calls are needed, batch them in parallel. Never repeat the same tool call with the same arguments.
Write to
/tmp/aliyun-runscript.pyand validate with the local sandbox checker (<SKILL_DIR>/scripts/check_sandbox.py):cat > /tmp/aliyun-runscript.py <<'PYEOF' <script body here> PYEOF python3 <SKILL_DIR>/scripts/check_sandbox.py /tmp/aliyun-runscript.pyIf validation fails, read the
→ fixsuggestion for each violation, fix ONLY the listed issues, and re-validate. Maximum 3 rounds. If violations persist, show them to the user.After validation passes, output only the Python script body — no Markdown fences, headings, or explanatory text unless the user asks.
Sandbox Contract
All rules below are enforced by scripts/check_sandbox.py (local pre-check) and remote validation.
See references/runscript-contract.md for full definitions with examples.
| Category | Rule |
|---|---|
| Imports | Only whitelisted modules may be imported: asyncio, collections, csv, dataclasses, datetime, decimal, enum, fractions, functools, itertools, json, math, re, statistics, string, time, typing, uuid. Do NOT import random, os, subprocess, requests, or any module not in this list. call_cli is pre-injected — do NOT import or define it. |
| API calls | Use ONLY call_cli(product, version, action, params). Pre-injected. No SDK clients, no HTTP requests, no subprocess. Parameter values must be plain strings/numbers — do NOT pass aliyun ... CLI command strings as parameter values. |
| Param values | Parameter values must NOT contain lowercase aliyun (triggers BLK-4001). E.g. use "1.28.3" not "1.28.3-aliyun.1". Query APIs to fetch exact values when unsure. |
| Output | Assign final data to result (dict or list). No print(). |
| Concurrency | Parallel API calls must use asyncio.gather(return_exceptions=True). Thread/process-based concurrency (threading, multiprocessing, concurrent.futures) is not in the whitelist and will fail validation. |
| Forbidden | os, subprocess, socket, requests, eval, exec, compile, getattr, setattr, globals, input, breakpoint, __import__, threading, multiprocessing, concurrent.futures, dunder chains. |
| Blocked APIs | Credential-returning APIs (ram.ListAccessKeys, sts.AssumeRole, kms.GetSecretValue). CLI meta products (configure, plugin, ossutil). |
| Structure | call_cli must be reachable from module-level execution. Do NOT wrap all calls in an uninvoked async def — either write await call_cli(...) at top level, or define a function and call it: async def main(): ... \n await main(). |
| Numbers | Do NOT use leading zeros in numeric literals (e.g., 01, 010). Write 1, 10 instead. IP addresses and CIDR blocks must be strings: "10.0.0.0/8", not bare n |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
mcp__plugin_alibabacloud-core_alibabacloud-core__AlibabaCloud___SearchApis - 02
mcp__plugin_alibabacloud-core_alibabacloud-core__AlibabaCloud___GetApiDefinition - 03
mcp__plugin_alibabacloud-core_alibabacloud-core__AlibabaCloud___ListApis - 04
mcp__plugin_alibabacloud-core_alibabacloud-core__AlibabaCloud___ListProducts
FAQ
Что делает скилл Alibabacloud Mcp Core Script Generate?
Generate Alibaba Cloud MCP Core RunScript-compatible Python scripts from natural-language cloud operation requests. Use when the user explicitly asks for RunScript scripts, MCP Core scripts, or sandbox-compatible cloud automation code. For standard SDK Python code with imports and credentials, use `alibabacloud-sdk-usage` instead.
Как установить скилл Alibabacloud Mcp Core Script Generate?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Alibabacloud Mcp Core Script Generate запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…