← 返回 Skills 市场
sdk-team

Alibabacloud Solution Deploy

作者 alibabacloud-skills-team · GitHub ↗ · v0.0.2 · MIT-0
cross-platform ⚠ suspicious
110
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install alibabacloud-solution-deploy
功能描述
Deploy Alibaba Cloud official tech solutions. Trigger when the user mentions an Alibaba Cloud solution, pastes a solution URL (aliyun.com/solution/tech-solut...
使用说明 (SKILL.md)

Alibaba Cloud Solution Deploy

Match the user's scenario to the best execution path (Terraform or CLI), then complete the task end-to-end.

Core Principles

Maximum Automation

If 10 steps are needed and 9 can be automated, automate all 9. Only pause for the 1 that genuinely requires human action. Every cloud operation that has a CLI path should use it — the user came to you precisely so they don't have to click through consoles.

CLI-First, Console-Last

Express every cloud action as a runnable aliyun CLI command. Only fall back to console when no CLI exists — and when you do, give a direct deep-linked URL (not a product homepage). The difference between https://vision.aliyun.com/facebody and https://console.aliyun.com/ is the difference between being helpful and being useless.

Never Guess — Verify First

  • CLI syntax: Run aliyun \x3Cproduct> \x3Ccommand> --help before constructing commands. Parameter naming is inconsistent across products — --RegionId vs --region-id vs --region all exist.
  • Errors: Run diagnose_cli_command.py immediately on failure. Error messages from the Alibaba Cloud API are often cryptic — the diagnosis script calls a specialized endpoint that maps error codes to fixes.

Workflow

Step 0: Verify Environment

Run this first in any new session:

Pre-check: Aliyun CLI >= 3.3.1 required

Run aliyun version to verify >= 3.3.1. If not installed or version too low, see installation guide for instructions.

Then run the following command to enable automatic plugin installation and set the agent user-agent:

aliyun configure set --auto-plugin-install true --user-agent AlibabaCloud-Agent-Skills

This ensures product-specific CLI plugins are downloaded on first use (no manual install needed), and identifies requests as coming from this skill.

Then run the full environment check:

bash {{SKILL_PATH}}/scripts/verify_env.sh

This checks: CLI version, valid credentials, auto-plugin-install, Python3 + SDK. If any check fails, tell the user what to fix and stop — a broken environment means every subsequent command will fail.

RAM Permission Pre-check

Before executing any commands, verify the current user has the required permissions:

  1. Compare the user's permissions against references/ram-policies.md
  2. If any permission is missing, abort and prompt the user to attach the required policy

Minimum required permissions are listed in references/ram-policies.md.

Step 1: Understand the Scenario

Extract from the user's request:

  • What they want to build or configure
  • Which Alibaba Cloud products are involved (or can be inferred)
  • Key requirements: region, instance specs, budget, HA needs, environment (dev/staging/prod)

Distill into search keywords (Chinese + English) for Step 2. For example, "我要搭个RAG知识库" → keywords: RAG, 知识库, AnalyticDB, 百炼.

Step 2: Route to the Right Path

Check references/alicloud-tech-solutions-all.md — the master catalog of 187 Alibaba Cloud tech solutions. Search by keyword match against the solution names and descriptions.

Each row has a Terraform Module 名称 column:

  • Column has a value (e.g., analyticdb-rag, deepseek-personal-website) → Path A: Terraform
  • Column is empty or no matching solution foundPath B: CLI-First

Also use intent-mapping.md for fuzzy keyword → solution matching (e.g., "小程序" → develop-your-wechat-mini-program-in-10-minutes).

Tell the user which path you're taking and why before proceeding.


Path A: Terraform Solution

When a Terraform module matches, deploy through the IaCService remote runtime — no local terraform binary needed.

A.1: Locate the Module

Look up the Module 名称 and Module 地址 in references/tf-plan/tf-solutions.md. Match by:

  1. Exact module name from the master catalog
  2. Keyword match against the 描述 column
  3. Intent mapping

A.2: Fetch Example Parameters

Every module has a GitHub repo with tested examples. Derive the URLs:

Module 地址: https://registry.terraform.io/modules/alibabacloud-automation/\x3Cname>/alicloud/latest
GitHub repo: https://github.com/alibabacloud-automation/terraform-alicloud-\x3Cname>
Example:     https://raw.githubusercontent.com/alibabacloud-automation/terraform-alicloud-\x3Cname>/main/examples/complete/main.tf

Fetch the example main.tf via WebFetch. These values come from real tested deployments — they're far more reliable than generic defaults.

Parameter priority:

  1. User explicitly specified → always use
  2. Example main.tf from examples/complete/ → use as default
  3. Fallback defaults (only if fetch fails): see terraform-defaults.md

A.3: Confirm with User

Show the parameters and ask for confirmation. Never silently apply them — cloud resources cost real money.

以下是基于官方示例的部署参数,请确认或修改:
• Region: cn-hangzhou
• Instance type: ecs.c7.large
• VPC CIDR: 172.16.0.0/12
• Password: (请提供)

Sensitive values like passwords and API keys: never generate them yourself. The user provides these.

A.4: Write main.tf and Deploy

# Based on: https://github.com/alibabacloud-automation/terraform-alicloud-\x3Cname>/blob/main/examples/complete/main.tf
module "\x3Cmodule_name>" {
  source  = "alibabacloud-automation/\x3Cmodule_name>/alicloud"
  version = "~> 1.0"
  # Parameters adjusted per user confirmation
}

Deploy using the remote runtime — see terraform-online-runtime.md for full usage:

SKILL_DIR="{{SKILL_PATH}}"
TF="${SKILL_DIR}/scripts/terraform_runtime_online.sh"
STATE_ID=$($TF apply main.tf | grep '^STATE_ID=' | cut -d= -f2)
echo "STATE_ID=$STATE_ID" >> terraform_state_ids.env

The STATE_ID is required for any future update or destroy. Losing it means you lose control over the resources.

A.5: Verify and Report

Confirm resources exist. Provide the destroy command for cleanup.


Path B: CLI-First Execution

This path handles everything without a Terraform template. The approach: understand the architecture → decompose into steps → find the CLI command for each step → execute.

B.1: Understand the Architecture

Before writing any commands, understand what you're building:

  • If the master catalog had a matching solution (just without TF Module), it still has tutorial links (部署教程 column). Fetch that page to understand the target architecture, required products, and deployment sequence. This gives you the blueprint — you'll then translate each step into CLI commands.
  • If no solution matched at all, reason from the user's description: what products are needed, what depends on what, what's the end state.

B.2: Decompose into Steps

Break the goal into atomic steps ordered by dependency. Think through:

  • Resource creation order: VPC → VSwitch → Security Group → ECS is almost always the foundation
  • ID chaining: which step outputs IDs that later steps need (VpcId → CreateVSwitch, VSwitchId → RunInstances)
  • Async operations: some create calls return immediately but the resource takes time — you'll need to poll
  • What might not have a CLI: some product activations, some console-only features

B.3: Research CLI Commands

For each step, use the scripts to find the correct API name and parameters. This is critical — don't rely on memory. Alibaba Cloud has thousands of APIs, and parameter names are inconsistent across products.

python3 {{SKILL_PATH}}/scripts/lsit_products.py '\x3Ckeyword>'        # Find product code + API version
python3 {{SKILL_PATH}}/scripts/search_apis.py '\x3Cwhat you want to do>'  # Natural language → API
python3 {{SKILL_PATH}}/scripts/search_documents.py '\x3Ctopic>'       # Parameter details, valid values, constraints
python3 {{SKILL_PATH}}/scripts/lsit_api_overview.py \x3CProduct> \x3Cversion>  # Full API list for a product

Run scripts in parallel when researching multiple products — don't serialize what can be parallelized.

Common CLI shortcuts that avoid console entirely:

Scenario CLI Command Notes
Get Bailian (百炼) API Key aliyun modelstudio list-workspacesaliyun modelstudio create-api-key --WorkspaceId \x3Cid> Avoids console entirely. Almost every AI solution needs this.
Run commands on ECS aliyun ecs RunCommand --Type RunShellScript --CommandContent '\x3Cscript>' --InstanceId.1 \x3Cid> Use Cloud Assistant instead of asking the user to SSH in.
OSS operations aliyun ossutil cp/ls/mb ... Use ossutil subcommand, not oss.

The Bailian API Key pattern is especially important — nearly every AI-related solution needs a DashScope/Bailian SK, and users often don't know it can be obtained programmatically. Whenever a plan involves 百炼/Bailian/DashScope, proactively use the modelstudio commands to get the key.

B.4: Present Plan and Confirm

Before running any write operations, show the complete execution plan. The plan MUST include a RAM permissions section listing all permissions the current account needs — this lets the user verify access before execution starts, avoiding mid-deploy Forbidden.RAM errors.

Derive the required permissions from the planned CLI commands: each aliyun \x3Cproduct> \x3CAPI> call maps to a RAM action in the form \x3Cproduct>:\x3CAPI> (e.g., aliyun vpc CreateVpcvpc:CreateVpc).

所需 RAM 权限:

| 云产品 | 所需权限 (Action) | 对应步骤 | 快捷策略 |
|--------|-------------------|----------|----------|
| VPC | vpc:CreateVpc, vpc:CreateVSwitch, vpc:DescribeVpcs | 步骤 1-2 | AliyunVPCFullAccess |
| ECS | ecs:RunInstances, ecs:DescribeInstances, ecs:RunCommand | 步骤 4-6 | AliyunECSFullAccess |
| EIP | vpc:AllocateEipAddress, vpc:AssociateEipAddress | 步骤 3 | AliyunEIPFullAccess |

提示: 可使用快捷策略快速授权,或按 Action 列配置最小权限自定义策略。

---

执行计划 (共 N 步, M 步 CLI 自动化, K 步需控制台):

步骤 1 — 创建 VPC
  aliyun vpc CreateVpc --RegionId cn-hangzhou --CidrBlock 172.16.0.0/12 --VpcName demo-vpc

步骤 2 — 创建交换机 (依赖: 步骤1 VpcId)
  aliyun vpc CreateVSwitch --RegionId cn-hangzhou --VpcId \x3C步骤1> --ZoneId cn-hangzhou-h --CidrBlock 172.16.0.0/24

步骤 3 — [控制台] 开通视觉智能 API (无 CLI)
  打开: https://vision.aliyun.com/facebody → 点击 "立即开通"

Wait for user approval. Cloud resources cost money, and some operations (like deleting RDS instances) are irreversible.

B.5: Execute

For each step:

  1. Verify syntax first: aliyun \x3Cproduct> \x3Capi> --help — catch parameter errors before they hit the API
  2. Run the command
  3. Verify result: poll async operations; describe the resource to confirm it exists
  4. Capture output: save IDs, endpoints, connection strings for subsequent steps and final report

B.6: Handle Errors

When a command fails:

python3 {{SKILL_PATH}}/scripts/diagnose_cli_command.py '\x3Cthe full command>' '\x3Cthe error message>'

The diagnosis script calls a specialized API that maps error codes to actionable fixes. Apply the fix and retry. If the same error persists after the fix, report to the user with the diagnosis — don't keep retrying blindly.

Resume from the failed step. Never re-run steps that already succeeded — those resources already exist and re-running would either fail (duplicate) or create unwanted duplicates.

B.7: Report

Summarize:

  • Resources created (with IDs)
  • Access endpoints / connection strings
  • How to use what was built
  • Cleanup commands (delete in reverse dependency order: ECS → Security Group → VSwitch → VPC)

Script Reference

Script Purpose Example
verify_env.sh Environment check bash {{SKILL_PATH}}/scripts/verify_env.sh
lsit_products.py Find product code + version python3 {{SKILL_PATH}}/scripts/lsit_products.py 'ECS'
search_apis.py Natural language → API python3 {{SKILL_PATH}}/scripts/search_apis.py '创建ECS实例'
search_documents.py Doc search for details python3 {{SKILL_PATH}}/scripts/search_documents.py 'ECS实例规格'
lsit_api_overview.py Full API list for a product python3 {{SKILL_PATH}}/scripts/lsit_api_overview.py Ecs 2014-05-26
diagnose_cli_command.py Diagnose CLI errors python3 {{SKILL_PATH}}/scripts/diagnose_cli_command.py '\x3Ccmd>' '\x3Cerr>'
terraform_runtime_online.sh Remote TF execution See terraform-online-runtime.md

References

安全使用建议
This skill appears to do what it says (search solutions, generate parameters, and deploy via Alibaba Cloud CLI/IaCService), but there are important concerns you should address before installing: - Credentials: The skill metadata claims no required env vars, yet SKILL.md and the scripts require Alibaba Cloud credentials (AK/SK, STS token, or ECS RAM role) and will read ~/.aliyun/config.json or environment variables. Do not enable this skill with your production root credentials. Use a dedicated RAM user or temporary STS credentials. - Permissions: The provided RAM policy includes powerful iacservice:* and openapiexplorer:* actions with Resource "*". If you proceed, attach the minimal necessary permissions and test in a sandbox account to avoid unexpected charges or resource creation. - Dependencies: The Python scripts rely on Alibaba Cloud SDK packages and the runtime requires aliyun CLI >=3.3.x. Ensure those are present in a controlled environment. Ask the publisher to list these as required dependencies in metadata. - State & cost: The skill will create cloud resources and save STATE_IDs locally; review and retain state IDs for teardown. Always review plans and explicitly confirm before apply — SKILL.md says to prompt the user, but confirm this behavior in practice. - Source & trust: The source/owner in the registry is opaque. If you don't recognize the publisher, request provenance (GitHub repo, homepage) and inspect the scripts yourself. Prefer running this in a test/sandbox Alibaba account first. - Ask for fixes: Request that the publisher update the skill metadata to declare required env vars (ALIBABA_CLOUD_ACCESS_KEY_ID / ALIBABA_CLOUD_ACCESS_KEY_SECRET or note ECS RAM role), and list runtime Python and CLI dependencies, and narrow recommended IAM permissions. If you accept those conditions and test in a non-production account with least-privilege credentials, the skill's behavior is understandable for its stated purpose; otherwise treat it as risky.
能力标签
requires-wallet
能力评估
Purpose & Capability
Name/description match the files and scripts: the skill searches Alibaba Cloud solution catalogs, calls OpenAPI Explorer, and can deploy Terraform modules via IaCService. However the registry metadata declares no required environment variables or primary credential even though the skill clearly requires Alibaba Cloud credentials (AK/SK, STS, or ECS role) and RAM permissions to operate. That mismatch (claimed no credentials vs. actual need) is inconsistent.
Instruction Scope
SKILL.md explicitly instructs the agent to read local configuration (~/.aliyun/config.json or env vars), run verify_env.sh, call Alibaba Cloud OpenAPI endpoints, fetch module examples from GitHub raw URLs, generate HCL and call a remote IaCService to apply/destroy infrastructure. These actions are coherent with the stated purpose but involve reading local credentials/config and writing state files (e.g., terraform_state_ids.env). The instructions do include user confirmation points (plan → present → confirm → apply), which is good, but they also direct the agent to run many automated commands that will use your credentials.
Install Mechanism
There is no install spec (instruction-only), which reduces installation risk. However the provided Python scripts import Alibaba Cloud SDK packages (alibabacloud_tea_openapi, alibabacloud_credentials, alibabacloud_openapi_util, etc.) and the shell scripts expect an aliyun CLI >=3.3.x and Bash. These runtime dependencies are not declared in registry metadata; the skill will fail or behave unexpectedly if the environment lacks those SDKs/tools.
Credentials
The skill requires access to Alibaba Cloud credentials and requests RAM permissions that include openapiexplorer actions and broad IaCService actions (Validate/ExecuteApply/ExecuteDestroy) with Resource="*" (see references/ram-policies.md). Those permissions are consistent with deploying arbitrary solutions, but they are powerful (can create/destroy resources and bill your account). The registry metadata declaring no required env vars or primary credential is a clear inconsistency. Also the recommended IAM policy is wide (Resource "*") — you should prefer least-privilege bindings.
Persistence & Privilege
always:false and the skill does not claim system-wide persistence. The scripts write local artifacts (STATE_IDs to terraform_state_ids.env) and may modify ~/.aliyun/config.json via aliyun configure if the user runs those commands, which is expected for a deploy tool. The skill does not try to alter other skills' configs or enforce permanent inclusion.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install alibabacloud-solution-deploy
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /alibabacloud-solution-deploy 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.0.2
alibabacloud-solution-deploy v0.0.2 - Documentation (SKILL.md) updated to improve detail and clarity in existing instructions and workflow. - No changes to logic, scripts, or code—documentation-only update. - Expanded explanations and step guidance for both Terraform and CLI-first deployment paths. - Refined environment and permission verification steps for reliability.
v0.0.1
Initial release: Deploy Alibaba Cloud official tech solutions via Terraform modules or CLI commands with end-to-end automation. - Matches user scenarios to the best deployment path (Terraform or CLI-first), ensuring maximum automation. - Verifies environment and RAM permissions before any operation; stops if requirements are unmet. - Automates parameter extraction from official module examples when using Terraform, with user confirmation before deployment. - CLI-first workflows decompose solutions into ordered cloud API commands, falling back to console links only when unavoidable. - Provides direct user guidance on every step and links to all relevant references and examples.
元数据
Slug alibabacloud-solution-deploy
版本 0.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Alibabacloud Solution Deploy 是什么?

Deploy Alibaba Cloud official tech solutions. Trigger when the user mentions an Alibaba Cloud solution, pastes a solution URL (aliyun.com/solution/tech-solut... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 110 次。

如何安装 Alibabacloud Solution Deploy?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install alibabacloud-solution-deploy」即可一键安装,无需额外配置。

Alibabacloud Solution Deploy 是免费的吗?

是的,Alibabacloud Solution Deploy 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Alibabacloud Solution Deploy 支持哪些平台?

Alibabacloud Solution Deploy 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Alibabacloud Solution Deploy?

由 alibabacloud-skills-team(@sdk-team)开发并维护,当前版本 v0.0.2。

💬 留言讨论