Manage Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-06-01) resources end-to-end. Use for querying instances, starting/stopping/rebooting, execu...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install alicloud-compute-swas-open或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install alicloud-compute-swas-open⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/alicloud-compute-swas-open/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: alicloud-compute-swas-open description: Manage Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-06-01) resources end-to-end. Use for querying instances, starting/stopping/rebooting, executing commands (cloud assistant), managing disks/snapshots/images, firewall rules/templates, key pairs, tags, monitoring, and lightweight database operations. version: 1.0.0 ---
Category: service
Use SWAS-OPEN OpenAPI to manage full SAS resources: instances, disks, snapshots, images, key pairs, firewall, Cloud Assistant, monitoring, tags, and lightweight databases.
ALICLOUD_REGION_ID can be used as default region; if unset choose the most reasonable region, ask user if unclear.1) Python SDK (preferred) 2) OpenAPI Explorer 3) Other SDKs
Virtual environment is recommended (avoid PEP 668 system install restrictions).
python3 -m venv .venv
. .venv/bin/activate
python -m pip install alibabacloud_swas_open20200601 alibabacloud_tea_openapi alibabacloud_credentials
import os
from alibabacloud_swas_open20200601.client import Client as SwasClient
from alibabacloud_swas_open20200601 import models as swas_models
from alibabacloud_tea_openapi import models as open_api_models
def create_client(region_id: str) -> SwasClient:
config = open_api_models.Config(
region_id=region_id,
endpoint=f"swas.{region_id}.aliyuncs.com",
)
ak = os.getenv("ALICLOUD_ACCESS_KEY_ID") or os.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID")
sk = os.getenv("ALICLOUD_ACCESS_KEY_SECRET") or os.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET")
if ak and sk:
config.access_key_id = ak
config.access_key_secret = sk
return SwasClient(config)
def list_regions():
client = create_client("cn-hangzhou")
resp = client.list_regions(swas_models.ListRegionsRequest())
return [r.region_id for r in resp.body.regions]
def list_instances(region_id: str):
client = create_client(region_id)
resp = client.list_instances(swas_models.ListInstancesRequest(region_id=region_id))
return resp.body.instances
def main():
for region_id in list_regions():
for inst in list_instances(region_id):
ip = getattr(inst, "public_ip_address", None) or getattr(inst, "inner_ip_address", None)
spec = getattr(inst, "plan_name", None) or getattr(inst, "plan_id", None)
print(inst.instance_id, ip or "-", spec or "-", region_id)
if __name__ == "__main__":
main()
scripts/list_instances_all_regions.pyscripts/summary_instances_by_plan.pyscripts/summary_instances_by_status.pyscripts/fix_ssh_access.pyscripts/get_ssh_port.pyaliyun CLI may not expose swas-open as product name; prefer Python SDK.If CLI is mandatory, generate request examples in OpenAPI Explorer first, then migrate to CLI.
1) Confirm resource type and region (instance/disk/snapshot/image/firewall/command/database/tag). 2) Identify API group and operation in references/api_overview.md. 3) Choose invocation method (Python SDK / OpenAPI Explorer / other SDK). 4) After mutations, verify state/results with query APIs.
ListInstances、StartInstance(s)、StopInstance(s)、RebootInstance(s) RunCommand or CreateCommand + InvokeCommand; use DescribeInvocations/DescribeInvocationResult ListFirewallRules/CreateFirewallRule(s)/ModifyFirewallRule/EnableFirewallRule/DisableFirewallRule CreateSnapshot、ResetDisk、CreateCustomImage etc. InstallCloudAssistant).DescribeInvocations or DescribeInvocationResult to fetch status and outputs.See references/command-assistant.md for details.
If you need to save results or responses, write to: output/compute-swas-open/
mkdir -p output/alicloud-compute-swas-open
for f in skills/compute/swas/alicloud-compute-swas-open/scripts/*.py; do
python3 -m py_compile "$f"
done
echo "py_compile_ok" > output/alicloud-compute-swas-open/validate.txt
Pass criteria: command exits 0 and output/alicloud-compute-swas-open/validate.txt is generated.
output/alicloud-compute-swas-open/.ALICLOUD_ACCESS_KEY_ID, ALICLOUD_ACCESS_KEY_SECRET, optional ALICLOUD_REGION_ID.1) Confirm user intent, region, identifiers, and whether the operation is read-only or mutating. 2) Run one minimal read-only query first to verify connectivity and permissions. 3) Execute the target operation with explicit parameters and bounded scope. 4) Verify results and save output/evidence files.
references/api_overview.mdreferences/endpoints.mdreferences/command-assistant.mdreferences/sources.md安装 Alicloud Compute Swas Open 后,可以对 AI 说这些话来触发它
Help me get started with Alicloud Compute Swas Open
Explains what Alicloud Compute Swas Open does, walks through the setup, and runs a quick demo based on your current project
Use Alicloud Compute Swas Open to manage Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-0...
Invokes Alicloud Compute Swas Open with the right parameters and returns the result directly in the conversation
What can I do with Alicloud Compute Swas Open in my developer & devops workflow?
Lists the top use cases for Alicloud Compute Swas Open, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/alicloud-compute-swas-open/ 目录(个人级,所有项目可用),或 .claude/skills/alicloud-compute-swas-open/(项目级)。重启 AI 客户端后,用 /alicloud-compute-swas-open 主动调用,或让 AI 根据上下文自动发现并使用。
Alicloud Compute Swas Open 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Alicloud Compute Swas Open 可免费安装使用。请查阅仓库了解许可证信息。
Manage Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-06-01) resources end-to-end. Use for querying instances, starting/stopping/rebooting, execu...
Alicloud Compute Swas Open 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using Alicloud Compute Swas Open
Identifies repetitive steps in your workflow and sets up Alicloud Compute Swas Open to handle them automatically