Install
$ agentstack add skill-buhaiqing-aliyun-skills-alicloud-ess-ops ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ● Environment & secrets Used
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
> This skill follows the Agent Skill OpenSpec.
Alibaba Cloud Auto Scaling (ESS) Operations Skill
Common JSON Paths (Centralized)
# CreateScalingGroup: $.ScalingGroupId
# DescribeScalingGroups: $.ScalingGroups[].{ScalingGroupId,ScalingGroupName,ActiveScalingConfigurationId,LifecycleState,MinSize,MaxSize,DesiredCapacity}
# CreateScalingConfiguration: $.ScalingConfigurationId
# DescribeScalingConfigurations: $.ScalingConfigurations[].{ScalingConfigurationId,ScalingConfigurationName,ImageId,InstanceType,LifecycleState}
# CreateScalingRule: $.ScalingRuleId
# DescribeScalingRules: $.ScalingRules[].{ScalingRuleId,ScalingRuleName,ScalingRuleAri,Cooldown,MinAdjustmentMagnitude,ScalingRuleType}
# CreateScheduledTask: $.ScheduledTaskId
# DescribeScheduledTasks: $.ScheduledTasks[].{ScheduledTaskId,ScheduledTaskName,Description,ScheduleExpression,RecurrenceValue}
# CreateLifecycleHook: $.LifecycleHookId
# DescribeLifecycleHooks: $.LifecycleHooks[].{LifecycleHookId,LifecycleHookName,LifecycleTransition,HeartbeatTimeout,DefaultResult}
# CreateAlarm: $.AlarmTaskId
# DescribeAlarms: $.AlarmList[].{AlarmTaskId,AlarmTaskName,MetricName,ComparisonOperator,Threshold,State}
# DescribeScalingActivities: $.ScalingActivities[].{ScalingActivityId,Description,Cause,StartTime,EndTime,StatusCode,StatusMessage}
# DescribeScalingInstances: $.ScalingInstances[].{InstanceId,ScalingConfigurationId,ScalingGroupId,HealthStatus,LifecycleState}
# DescribeRegions: $.Regions[].{RegionId,RegionEndpoint,LocalName}
# EnableScalingGroup: $.RequestId
# DisableScalingGroup: $.RequestId
# DeleteScalingGroup: $.RequestId
# AttachInstances: $.RequestId
# DetachInstances: $.RequestId
# RemoveInstances: $.RequestId
# SetInstancesProtection: $.RequestId
# ExecuteScalingRule: $.ScalingActivityId
Overview
Auto Scaling (ESS) is Alibaba Cloud's elastic scaling service that automatically adjusts compute resources based on policies. This skill is an operational runbook for agents: Pre-flight → Execute (CLI primary + SDK fallback) → Validate → Recover.
Runtime Rules
| Area | Rule | Reference | | --- | --- | --- | | CLI path | MANDATORY: Always prefer the SkillOpt wrapper ./scripts/ess-skillopt-wrapper.sh for all ESS CLI operations to enable automated self-repair and dynamic optimization; fallback to native aliyun ess only when the wrapper is unavailable or skillopt-lib.sh is missing. | [CLI](references/cli-usage.md), [SkillOpt](references/skillopt-integration.md) |
Five Core Standards (Quality Gates)
| # | Standard | How This Skill Fulfills It | |---|----------|---------------------------| | 1 | Clear Boundaries | SHOULD/SHOULD NOT Use conditions with precise triggers and delegation rules | | 2 | Structured I/O | Placeholders ({{env.*}}, {{user.*}}, {{output.*}}) with type and source | | 3 | Explicit Actionable Steps | Every operation: Pre-flight → Execute → Validate → Recover | | 4 | Complete Failure Strategies | Error taxonomy with ≥ 10 product-specific codes; HALT vs retry | | 5 | Absolute Single Responsibility | Auto Scaling groups, configurations, rules, scheduled tasks, lifecycle hooks; delegates ECS/ALB/RDS |
Trigger & Scope (Agent-Readable)
SHOULD Use This Skill When
- User mentions "Auto Scaling" OR "ESS" OR "弹性伸缩" OR "伸缩组" OR "伸缩配置"
- Task involves CRUD on scaling groups (create, describe, modify, enable, disable, delete)
- Task involves scaling configurations (create, describe, modify, set as default, delete)
- Task involves scaling rules (create, describe, modify, delete, execute)
- Task involves scheduled tasks (create, describe, modify, delete)
- Task involves lifecycle hooks (create, describe, modify, complete heartbeat, delete)
- Task involves alarm-based scaling (create/describe/modify/delete alarm-based rules)
- Task involves instance management (attach, detach, remove, enter/exit standby, set health status)
- Task involves load balancer association (attach/detach CLB, ALB, VServerGroup, ServerGroup)
- Task involves notification configurations (create, describe, modify, delete)
- Task involves instance refresh (start, cancel, resume, rollback, query)
- Task involves tag management (tag/untag scaling groups)
- Task involves monitoring scaling activities or diagnostics
- User asks about elasticity strategy, capacity planning, or automatic scaling
SHOULD NOT Use This Skill When
- Task is purely billing / account management → delegate to:
alicloud-billing-ops - Task is RAM / permission model only → delegate to:
alicloud-ram-ops - Task is about ECS instance lifecycle without scaling → delegate to:
alicloud-ecs-ops - Task is about SLB/ALB configuration without scaling integration → delegate to:
alicloud-slb-ops/alicloud-alb-ops - Task is about RDS instance without scaling → delegate to:
alicloud-rds-ops - User insists on console-only flows → state limitation; do not invent undocumented HTTP steps
Delegation Rules
| 能力 | 委托目标 | 说明 | |------|----------|------| | GCL 质量门禁 | alicloud-gcl-runner-ops | 对写操作执行前,委托 GCL 循环进行对抗性评审 | | ECS 实例管理 | alicloud-ecs-ops | 创建/修改非伸缩组管理的 ECS 实例 | | ALB/SLB 配置 | alicloud-alb-ops / alicloud-slb-ops | 独立配置负载均衡器 | | RDS 实例管理 | alicloud-rds-ops | 独立管理 RDS 实例 | | VPC 网络 | alicloud-vpc-ops | VPC 和交换机管理 |
Variable Convention (Agent-Readable)
| Var | Category | Items | |-----|----------|-------| | {{env.*}} | Environment (NEVER ask; HALT if unset) | ALIBABA_CLOUD_ACCESS_KEY_ID, ALIBABA_CLOUD_ACCESS_KEY_SECRET, ALIBABA_CLOUD_REGION_ID | | {{user.*}} | User input (ask once, reuse) | region, scaling_group_id/name, min/max/desired_size, vpc_id, vswitch_ids, removal_policies, scaling_configuration_id/name, image_id, instance_type, security_group_id, scaling_rule_id/name/type, adjustment_value, cooldown, scheduled_task_id/name, recurrence, launch_time, lifecycle_hook_id/name, transition, heartbeat_timeout, alarm_task_id/name, metric_name, threshold, comparison_operator, instance_ids, load_balancer_ids, db_instance_ids, alb_sg_id, notification_arn, tag_key/value | | {{output.*}} | API response (parse per OpenAPI path) | scaling_group_id, scaling_configuration_id, scaling_rule_id, scheduled_task_id, lifecycle_hook_id, alarm_task_id, scaling_activity_id, request_id, client_token |
Credential Security (Mandatory — 凭据安全)
> NEVER log, print, or expose ALIBABA_CLOUD_ACCESS_KEY_SECRET, access_key_secret, or any credential field value in console output, debug messages, error messages, or logs.
| Pattern | Safe (✅) | Unsafe (❌) | |---------|-----------|-------------| | Console output | Secret= | Secret=LTAI5t... | | Error messages | Error: API call failed (credential omitted) | Error: InvalidAccessKeySecret.XXX | | Env verification | test -n "$ALIBABA_CLOUD_ACCESS_KEY_SECRET" | echo "Secret=$ALIBABA_CLOUD_ACCESS_KEY_SECRET" | | JIT Go SDK | AccessKeySecret: tea.String(os.Getenv("...")) (env read safe) | fmt.Printf("Config: %+v", config) or log.Printf("%+v", ...) | | Debug mode | Warning message only | Unmasked credential output |
Credential verification MUST check existence only, never echo the value.
- ✅ Bash:
test -n "$ALIBABA_CLOUD_ACCESS_KEY_SECRET" - ❌ Bash:
echo $ALIBABA_CLOUD_ACCESS_KEY_SECRET - ✅ Go:
if os.Getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET") == "" - ❌ Go:
fmt.Println(os.Getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET"))
> If any execution flow violates this rule, the skill SHALL be blocked from merge as a security incident.
API and Response Conventions (Agent-Readable)
- OpenAPI is canonical for all paths, fields, enums, and response shapes.
- ClientToken: ESS supports
ClientTokenfor write operations — always generate UUID v4 for idempotency. - Pagination: Most Describe* operations support
PageNumber+PageSize(default 10, max 50). UseTotalCountto paginate. - Timestamps: ISO 8601 format (e.g.,
2026-06-07T10:00:00Z). - Async operations: Scaling group creation, instance attach/detach, scaling rule execution trigger
ScalingActivityId. Poll withDescribeScalingActivities. - Quota limits: Use
DescribeLimitationto check resource limits per region.
Expected State Transitions
| Operation | Initial State | Target State | Poll Interval | Max Wait | |-----------|---------------|--------------|---------------|----------| | CreateScalingGroup | — | Active | 5s | 120s | | EnableScalingGroup | Inactive | Active | 5s | 60s | | DisableScalingGroup | Active | Inactive | 5s | 60s | | DeleteScalingGroup | any | absent | 5s | 300s | | AttachInstances | — | attached | 5s | 120s | | DetachInstances | — | detached | 5s | 120s | | RemoveInstances | — | removed | 5s | 120s | | ExecuteScalingRule | — | activity complete | 10s | 300s | | StartInstanceRefresh | — | refreshed | 10s | 600s |
Changelog
| Version | Date | Changes | |---------|------|---------| | 1.0.0 | 2026-06-07 | Initial ESS skill with dual-path (CLI + SDK) support, GCL required |
Quick Start
Prerequisites
- [ ]
aliyunCLI installed - [ ] Credentials:
ALIBABA_CLOUD_ACCESS_KEY_ID,ALIBABA_CLOUD_ACCESS_KEY_SECRET - [ ] Region:
ALIBABA_CLOUD_REGION_ID
First Command
# List all scaling groups in region
aliyun ess DescribeScalingGroups --RegionId "{{env.ALIBABA_CLOUD_REGION_ID}}"
Capabilities at a Glance
| Operation | Description | Risk | |-----------|-------------|------| | CreateScalingGroup | Create scaling group | Low | | ModifyScalingGroup | Modify scaling group attributes | Medium | | DeleteScalingGroup | Delete scaling group | High | | EnableScalingGroup | Enable a scaling group | Medium | | DisableScalingGroup | Disable a scaling group | Medium | | CreateScalingConfiguration | Create scaling configuration | Low | | DeleteScalingConfiguration | Delete scaling configuration | Medium | | CreateScalingRule | Create scaling rule | Low | | DeleteScalingRule | Delete scaling rule | Medium | | ExecuteScalingRule | Execute a scaling rule (trigger scaling) | Medium | | CreateScheduledTask | Create scheduled task | Low | | DeleteScheduledTask | Delete scheduled task | Low | | CreateLifecycleHook | Create lifecycle hook | Low | | DeleteLifecycleHook | Delete lifecycle hook | Low | | AttachInstances | Attach ECS/ECI instances to scaling group | Medium | | DetachInstances | Detach instances from scaling group | Medium | | RemoveInstances | Remove instances from scaling group | High | | EnterStandby / ExitStandby | Toggle standby mode for instances | Low | | AttachLoadBalancers | Attach CLB to scaling group | Medium | | DetachLoadBalancers | Detach CLB from scaling group | Medium | | StartInstanceRefresh | Start instance refresh | High | | CreateAlarm | Create alarm-based scaling rule | Low | | DeleteAlarm | Delete alarm-based scaling rule | Medium | | SetGroupDeletionProtection | Enable/disable group deletion protection | Low | | TagResources / UntagResources | Manage tags | Low |
> EXECUTION MANDATORY RULE: 所有 control-plane CLI 执行步骤 必须 通过 SkillOpt wrapper ./scripts/ess-skillopt-wrapper.sh 运行。 > 以下所有代码块中的 aliyun ess ... 命令在执行时应替换为 ./scripts/ess-skillopt-wrapper.sh ...。 > 仅在 wrapper 脚本不可用或 skillopt-lib.sh 缺失时,才退回到原生 aliyun ess CLI 调用。 > 参考 ## Runtime Rules 中的 CLI path 规则。
Execution Flows (Agent-Readable)
每项操作遵循 Pre-flight → Execute → Validate → Recover。完整 CLI/SDK 命令见 [references/execution-flows.md](references/execution-flows.md).
Operation: Create Scaling Group
Pre-flight Checks
| Check | Method | Expected | On Failure | |-------|--------|----------|------------| | CLI | aliyun version | Exit code 0 | Document CLI install | | Credentials | Env vars or CLI config | Non-empty keys | HALT; user configures | | Region | aliyun ess DescribeRegions | {{user.region}} supported | Suggest valid region | | VPC/VSwitch | aliyun vpc DescribeVpcs/DescribeVSwitches | Exist in region | Delegate to alicloud-vpc-ops | | Quota | aliyun ess DescribeLimitation | Below group limit | HALT; request quota increase |
Execution
Full CLI command in [references/execution-flows.md §1](references/execution-flows.md#1-create-scaling-group)
Post-execution Validation
- Capture
{{output.scaling_group_id}}from$.ScalingGroupId. - Poll
DescribeScalingGroupsuntilLifecycleState == Active. - On success, report ID, name, and state.
- On failure, check status message.
Failure Recovery
| Error pattern | Max retries | Backoff | Agent Action | |---------------|-------------|---------|--------------| | InvalidParameter | 0-1 | — | Fix args from OpenAPI; retry once | | QuotaExceeded.ScalingGroup | 0 | — | HALT — request quota increase | | InsufficientBalance | 0 | — | HALT — recharge account | | VSwitchId.NotAvailable | 0 | — | Suggest valid VSwitch in same VPC | | Throttling / 429 | 3 | exponential | Back off; respect Retry-After header | | InternalError / 5xx | 3 | 2s, 4s, 8s | Retry; then HALT with RequestId |
Operation: Describe/List Scaling Groups
Execution — CLI
aliyun ess DescribeScalingGroups --RegionId "{{user.region}}"
aliyun ess DescribeScalingGroups --ScalingGroupId.1 "{{user.scaling_group_id}}"
Present to User
| Field | Path | |-------|------| | Scaling Group ID | $.ScalingGroups[].ScalingGroupId | | Name | $.ScalingGroups[].ScalingGroupName | | Lifecycle State | $.ScalingGroups[].LifecycleState | | Min/Max/Desired | $.ScalingGroups[].{MinSize,MaxSize,DesiredCapacity} | | Active Config ID | $.ScalingGroups[].ActiveScalingConfigurationId | | VPC / VSwitches | $.ScalingGroups[].{VpcId,VSwitchIds} | | Total Count | $.TotalCount |
Operation: Modify Scaling Group
Pre-flight Checks
| Check | Method | Expected | On Failure | |-------|--------|----------|------------| | Scaling group exists | DescribeScalingGroups | LifecycleState Active/Inactive | HALT — group not found | | Capacity validation | Check MinSize ≤ DesiredCapacity ≤ MaxSize | Valid range | HALT — adjust capacity bounds |
Execution
Full CLI command in [references/execution-flows.md §2](references/execution-flows.md#2-modify-scaling-group)
Post-execution Validation
aliyun ess DescribeScalingGroups --ScalingGroupId.1 "{{user.scaling_group_id}}"
Operation: Delete Scaling Group
Pre-flight (Safety Gate)
- MUST obtain explicit confirmation with
{{user.scaling_group_id}}and name. - MUST check group has no instances (
DescribeScalingInstances). If instances exist, advise user toRemoveInstancesfirst or useForceDelete=true. - MUST verify no scaling activities in progress.
- RECOMMEND disabling the scaling group first (
DisableScalingGroup). - RECOMMEND checking associated resources — deletion cascades.
Execution
Full CLI command in [references/execution-flows.md §3](references/execution-flows.md#3-delete-scaling-group)
Post-execution Validation
Poll DescribeScalingGroups until the group ID is absent. Max wait: 300s. Warn if ForceDelete=true was used.
Operation: Scaling Configuration
Execution
Full CLI commands in [references/execution-flows.md §4](references/execution-flows.md#4-scaling-configuration)
Post-execution Validation
Capture $.ScalingConfigurationId. Verify:
aliyun ess DescribeScalingConfigurations --ScalingConfigurationId.1 "{{output.scaling_configuration_id}}"
Operation: Scaling Rules
Execution
Full CLI commands in [refere
…
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: buhaiqing
- Source: buhaiqing/aliyun-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.