Agent skill

Aliyun Swas Manage

by cinience in cinience/alicloud-skills

A skill your agent uses when managing Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-06-01) resources end-to-end, including querying instances, starting/stopping/rebooting, executing…

MITAuto-check passedDevOps & Cloud

Install Aliyun Swas Manage

skills CLI
$ npx skills add cinience/alicloud-skills --skill aliyun-swas-manage -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cinience/alicloud-skills aliyun-swas-manage --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cinience/alicloud-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/compute/swas/aliyun-swas-manage .claude/skills/aliyun-swas-manage && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
aliyun-swas-manage
GitHub stars
397
Token cost
~1.9k tokens
SKILL.md length
508 words
Files
12 (incl. scripts, references)
Skills in repo
96
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when managing Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-06-01) resources end-to-end, including querying instances, starting/stopping/rebooting, executing…

  • Works in 3 steps: Python SDK (preferred) → OpenAPI Explorer → Other SDKs
  • Managing Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-06-0
  • SKILL.md covers Prerequisites, SDK Priority, CLI Notes and Workflow, plus 10 more sections
  • Runs Python scripts from its folder; calls python3 and python; needs ALIBABACLOUD_ACCESS_KEY_ID and ALIBABACLOUD_ACCESS_KEY_SECRET

What it does

Aliyun Swas Manage is an agent skill from cinience/alicloud-skills. Use when managing Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-06-01) resources end-to-end, including querying instances, starting/stopping/rebooting, executing commands (cloud assistant), managing disks/snapshots/images, firewall rules/templates, key pairs, tags, monitoring, lightweight database operations, and deploying application binaries with systemd service management and ESA CDN integration.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 14 other files, including scripts and reference files (for example `agents/openai.yaml`, `references/api_overview.md` and `references/command-assistant.md`).

It sits in DevOps & Cloud, covering Cloud networking, OpenAPI specifications and Linux administration. It works with Alibaba Cloud, OpenAPI, Linux and Python. The repository describes itself as: alibaba cloud skills,qwen ,wan and all skills. The licence is MIT.

When your agent uses it

  • Managing Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-06-0
  • Resources end-to-end
  • Including querying instances
  • Starting/stopping/rebooting

Example prompts

  • “/aliyun-swas-manage”

Requirements

  • Python 3
  • A credential in ALIBABACLOUD_ACCESS_KEY_SECRET
  • A credential in ALIBABA_CLOUD_ACCESS_KEY_SECRET

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Python SDK (preferred)
  2. OpenAPI Explorer
  3. Other SDKs

What it can do on your machine

Read from SKILL.md and the folder at commit 1818263. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 5 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • ALIBABACLOUD_ACCESS_KEY_ID
    • ALIBABACLOUD_ACCESS_KEY_SECRET
    • ALIBABA_CLOUD_ACCESS_KEY_ID
    • ALICLOUD_ACCESS_KEY_ID
    • ALIBABA_CLOUD_ACCESS_KEY_SECRET
    • ALICLOUD_ACCESS_KEY_SECRET

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Aliyun Swas Manage loads about 1.9k tokens when it runs, and up to ~5.4k if it reads all its reference files. Until then it costs about 109 tokens; SKILL.md has 508 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~109
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from cinience/alicloud-skills at commit 1818263, republished under its MIT licence (© cinience). 508 words, ~1,866 tokens.

Download SKILL.mdSave it as .claude/skills/aliyun-swas-manage/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.
name
aliyun-swas-manage
description
Use when managing Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-06-01) resources end-to-end, including querying instances, starting/stopping/rebooting, executing commands (cloud assistant), managing disks/snapshots/images, firewall rules/templates, key pairs, tags, monitoring, lightweight database operations, and deploying application binaries with systemd service management and ESA CDN integration.
version
1.0.0

Category: service

Simple Application Server (SWAS-OPEN 2020-06-01)

Use SWAS-OPEN OpenAPI to manage full SAS resources: instances, disks, snapshots, images, key pairs, firewall, Cloud Assistant, monitoring, tags, and lightweight databases.

Prerequisites

  • Prepare AccessKey with least-privilege RAM user/role.
  • Choose correct region and matching endpoint (public/VPC).ALIBABACLOUD_REGION_ID can be used as default region; if unset choose the most reasonable region, ask user if unclear.
  • This OpenAPI uses RPC signing; prefer Python SDK or OpenAPI Explorer instead of manual signing.

SDK Priority

  1. Python SDK (preferred)
  2. OpenAPI Explorer
  3. Other SDKs
Python SDK quick query (instance ID / IP / plan)

Virtual environment is recommended (avoid PEP 668 system install restrictions).

bash
python3 -m venv .venv
. .venv/bin/activate
python -m pip install alibabacloud_swas_open20200601 alibabacloud_tea_openapi alibabacloud_credentials
python
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("ALIBABACLOUD_ACCESS_KEY_ID")
        or os.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID")
        or os.getenv("ALICLOUD_ACCESS_KEY_ID")
    )
    sk = (
        os.getenv("ALIBABACLOUD_ACCESS_KEY_SECRET")
        or os.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET")
        or os.getenv("ALICLOUD_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()
  • All-region instance inventory (TSV/JSON):scripts/list_instances_all_regions.py
  • Count instances by plan:scripts/summary_instances_by_plan.py
  • Count instances by status:scripts/summary_instances_by_status.py
  • Fix SSH key-based access (custom port supported):scripts/fix_ssh_access.py
  • Get current SSH port of an instance:scripts/get_ssh_port.py

CLI Notes

  • aliyun 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.

Workflow

  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.

Common Operation Map

  • Instance query/start/stop/reboot:ListInstances、StartInstance(s)、StopInstance(s)、RebootInstance(s)
  • Command execution:RunCommand or CreateCommand + InvokeCommand; use DescribeInvocations/DescribeInvocationResult
  • Firewall:ListFirewallRules/CreateFirewallRule(s)/ModifyFirewallRule/EnableFirewallRule/DisableFirewallRule
  • Snapshot/disk/image:CreateSnapshot、ResetDisk、CreateCustomImage etc.

Application Deployment Best Practices

Binary Update Workflow

部署二进制到 SWAS 服务器的正确流程(避免 "text file busy" 错误):

1. 交叉编译 (GOOS=linux GOARCH=amd64)
2. SSH 停止远端服务 (systemctl stop)
3. SCP 上传二进制
4. SSH 重启服务 (systemctl start)
5. 验证服务状态

关键: 必须先停止服务再上传,否则覆盖运行中的二进制报 "text file busy"。

Systemd Service Management
bash
# 创建服务文件: /etc/systemd/system/myapp.service
# 启用开机自启: systemctl enable myapp
# 修改 .service 后: systemctl daemon-reload
# 查看日志: journalctl -u myapp -f
ESA CDN Integration

将 SWAS 应用通过 ESA CDN 暴露为 HTTPS 服务:

  1. ESA DNS 添加 A 记录 (proxied=true)
  2. ESA 申请 SSL 证书
  3. ESA 创建 Origin Rule (回源 HTTP + 指定端口)

流量路径: 客户端 HTTPS → ESA (SSL 终止) → HTTP 回源 → SWAS 应用端口

Detailed reference: references/deploy-workflow.md

Show full SKILL.md (225 more words)Show less

Cloud Assistant Execution Notes

  • Target instance must be in Running state.
  • Cloud Assistant agent must be installed (use InstallCloudAssistant).
  • For PowerShell commands, ensure required modules are available on Windows instances.
  • After execution, use DescribeInvocations or DescribeInvocationResult to fetch status and outputs.

See references/command-assistant.md for details.

Clarifying questions (ask when uncertain)

  1. What is the target region? Is VPC endpoint required?
  2. What are target instance IDs? Are they currently Running?
  3. What command/script type/timeout is needed? Linux or Windows?
  4. Do you need batch execution or scheduled execution?

Output Policy

If you need to save results or responses, write to: output/compute-swas-open/

Validation

bash
mkdir -p output/aliyun-swas-manage
for f in skills/compute/swas/aliyun-swas-manage/scripts/*.py; do
  python3 -m py_compile "$f"
done
echo "py_compile_ok" > output/aliyun-swas-manage/validate.txt

Pass criteria: command exits 0 and output/aliyun-swas-manage/validate.txt is generated.

Output And Evidence

  • Save artifacts, command outputs, and API response summaries under output/aliyun-swas-manage/.
  • Include key parameters (region/resource id/time range) in evidence files for reproducibility.

Prerequisites

  • Configure least-privilege Alibaba Cloud credentials before execution.
  • Prefer environment variables: ALIBABACLOUD_ACCESS_KEY_ID, ALIBABACLOUD_ACCESS_KEY_SECRET, optional ALIBABACLOUD_REGION_ID.
  • If region is unclear, ask the user before running mutating operations.

Workflow

  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 and operation groups:references/api_overview.md
  • Endpoints and integration:references/endpoints.md
  • Cloud Assistant highlights:references/command-assistant.md
  • Application deployment workflow: references/deploy-workflow.md
  • Official source list:references/sources.md

© cinience, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 11 other files (scripts, references) in skills/compute/swas/aliyun-swas-manage of cinience/alicloud-skills.

  • SKILL.md
  • agents/openai.yaml
  • references/api_overview.md
  • references/command-assistant.md
  • references/deploy-workflow.md
  • references/endpoints.md
  • references/sources.md
  • scripts/fix_ssh_access.py
  • scripts/get_ssh_port.py
  • scripts/list_instances_all_regions.py
  • scripts/summary_instances_by_plan.py
  • scripts/summary_instances_by_status.py

Open the folder on GitHubat commit 1818263

Compare with similar skills

Aliyun Swas Manage next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Aliyun Swas Manage compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Aliyun Swas Manage this skillcinience/alicloud-skills397—~1.9kAutomated safety check: PassMIT
Datadog Data Source GeneratorDataDog/terraform-provider-datadog468—~2.7kAutomated safety check: PassMPL-2.0
Setup Cpu Proxy Serverdrawthingsai/draw-things-community584—~3.8kAutomated safety check: PassGPL-3.0
Agentic Workflows API Documentation Lungoagntcy/coffeeAgntcy112—~2.6kAutomated safety check: PassApache-2.0
Minimegasandia-minimega/minimega160—~3.2kAutomated safety check: PassGPL-3.0-only
Alibabacloud Ecs Sec Userspacealiyun/alibabacloud-ecs-troubleshoot-skills148—~2.6kAutomated safety check: NotesApache-2.0

Similar skills

  • Datadog Data Source Generator

    DataDog/terraform-provider-datadog

    Official

    Generates a Datadog Terraform provider data source from an OpenAPI operation with tfgen and opens a review-ready GitHub PR with a risk scan and testing guide.

    468 GitHub stars~2.7k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Setup Cpu Proxy Server

    drawthingsai/draw-things-community

    Set up and verify a new Draw Things CPU proxy and Envoy server using the scripts in Scripts/ServerManagement/CPUScript.

    584 GitHub stars~3.8k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Authors and maintains the human-facing Agentic Workflows API documentation for the lungo subproject at coffeeAGNTCY/coffeeagents/lungo/docs/workflow-instanceapi.md.

    112 GitHub stars~2.6k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Minimega

    sandia-minimega/minimega

    This skill should be used when the user asks how to configure, run, automate, integrate, or troubleshoot minimega (VMs, namespaces, VLANs, clusters, miniccc, miniweb, command socket or Python API…

    160 GitHub stars~3.2k tokensUpdated 5 days ago
    DevOps & CloudAuto-check passed
  • Alibabacloud Ecs Sec Userspace

    aliyun/alibabacloud-ecs-troubleshoot-skills

    Linux 用户态安全入侵检测与取证工具,专为 AI Agent 设计。自动判断服务器是否被入侵, 提供完整证据链和可执行修复建议。51 个安全分析器覆盖进程/网络/认证/持久化/Rootkit/ 恶意软件/内存取证/容器逃逸等 12 类检测维度,10 个数据采集器全面采集系统状态, 映射 103+ MITRE ATT&CK 技术,支持 standalone/docker/k8s 三种部署模式。

    148 GitHub stars~2.6k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check: notes
  • Alibabacloud Ecs Linux Os Troubleshooting

    aliyun/alibabacloud-ecs-troubleshoot-skills

    Troubleshoot an Alibaba Cloud ECS Linux OS. An agent skill from aliyun/alibabacloud-ecs-troubleshoot-skills.

    148 GitHub stars~4.1k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed

More from cinience/alicloud-skills

All 96 skills in this repo
  • Aliyun Skill Creator

    cinience/alicloud-skills

    A skill your agent uses when creating, migrating, or optimizing skills for this alicloud-skills repository.

    397 GitHub stars~2.8k tokensUpdated 2 mo ago
    Auto-check passed
  • Alicloud Acs Agent Sandbox

    cinience/alicloud-skills

    Bootstrap, create, connect to, operate, secure, scale, upgrade, troubleshoot, inspect, and tear down Alibaba Cloud Container Compute Service (ACS) Agent Sandbox environments.

    397 GitHub stars~2.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Alicloud Acs Cluster

    cinience/alicloud-skills

    Create, inspect, connect to, inventory, and delete Alibaba Cloud Container Compute Service (ACS) clusters through the official CS OpenAPI.

    397 GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Aliyun Adb Mysql

    cinience/alicloud-skills

    A skill your agent uses when managing Alibaba Cloud AnalyticDB for MySQL (ADB) via OpenAPI/SDK, including the user needs AnalyticDB resource lifecycle and configuration operations, status checks, or…

    397 GitHub stars~708 tokensUpdated 2 mo ago
    Auto-check passed
  • Aliyun Aicontent Generate

    cinience/alicloud-skills

    A skill your agent uses when managing Alibaba Cloud AIContent (AiContent) via OpenAPI/SDK, including the user needs AI content generation or content workflow operations in Alibaba Cloud, including…

    397 GitHub stars~734 tokensUpdated 2 mo ago
    Auto-check passed
  • Aliyun Aimiaobi Generate

    cinience/alicloud-skills

    A skill your agent uses when managing Alibaba Cloud Quan Miao (AiMiaoBi) via OpenAPI/SDK, including the user asks for Alibaba Cloud MiaoBi content operations, including listing resources…

    397 GitHub stars~724 tokensUpdated 2 mo ago
    Auto-check passed

Questions about Aliyun Swas Manage

What does Aliyun Swas Manage do?

A skill your agent uses when managing Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-06-01) resources end-to-end, including querying instances, starting/stopping/rebooting, executing…. Aliyun Swas Manage is an agent skill from cinience/alicloud-skills. Use when managing Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-06-01) resources end-to-end, including querying instances, starting/stopping/rebooting, executing commands (cloud assistant), managing disks/snapshots/images, firewall rules/templates, key pairs, tags, monitoring, lightweight database operations, and deploying application binaries with systemd service management and ESA CDN integration.

When should I use Aliyun Swas Manage?

Aliyun Swas Manage fits situations like: managing Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-06-0; resources end-to-end; including querying instances; starting/stopping/rebooting.

How do I install Aliyun Swas Manage in Claude Code?

Run `npx skills add cinience/alicloud-skills --skill aliyun-swas-manage -a claude-code`. Or copy the skill folder (skills/compute/swas/aliyun-swas-manage in cinience/alicloud-skills) into .claude/skills/aliyun-swas-manage in your project. Claude Code loads it when a task matches its description.

How do I install Aliyun Swas Manage in Codex?

Run `npx skills add cinience/alicloud-skills --skill aliyun-swas-manage -a codex`. Or copy the skill folder (skills/compute/swas/aliyun-swas-manage in cinience/alicloud-skills) into .agents/skills/aliyun-swas-manage in your project. Codex loads it when a task matches its description.

Can I use Aliyun Swas Manage in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cinience/alicloud-skills --skill aliyun-swas-manage -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/aliyun-swas-manage, .gemini/skills/aliyun-swas-manage, .github/skills/aliyun-swas-manage and .opencode/skills/aliyun-swas-manage in your project.

What does Aliyun Swas Manage need to run?

Going by SKILL.md and its folder, Aliyun Swas Manage needs Python for the scripts in its folder, the command-line tools its instructions call (python3 and python) and credentials named ALIBABACLOUD_ACCESS_KEY_ID, ALIBABACLOUD_ACCESS_KEY_SECRET, ALIBABA_CLOUD_ACCESS_KEY_ID and ALICLOUD_ACCESS_KEY_ID. Our summary lists: Python 3; A credential in ALIBABACLOUD_ACCESS_KEY_SECRET; A credential in ALIBABA_CLOUD_ACCESS_KEY_SECRET.

Does Aliyun Swas Manage access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Aliyun Swas Manage safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Aliyun Swas Manage use?

Aliyun Swas Manage is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Aliyun Swas Manage use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.5k tokens, read only when the agent opens those files.

What are the alternatives to Aliyun Swas Manage?

Skills that share tags, products or a category with Aliyun Swas Manage: Datadog Data Source Generator (DataDog/terraform-provider-datadog, 468 stars), Setup Cpu Proxy Server (drawthingsai/draw-things-community, 584 stars), Agentic Workflows API Documentation Lungo (agntcy/coffeeAgntcy, 112 stars) and Minimega (sandia-minimega/minimega, 160 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Aliyun Swas Manage?

cinience (a GitHub user) maintains it in cinience/alicloud-skills, which has 397 GitHub stars. The repository holds 96 skills in this directory. The repository was last updated on August 11, 2026.

Source: cinience/alicloud-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.