aliyun/alibabacloud-aiops-skills/alibabacloud-cadt-deploy-on-aliyun
Claude Code and agent skill by aliyun/alibabacloud-aiops-skills
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Build and deploy applications to Alibaba Cloud ECS — Local build + script injection + InstallApplication async deployment. Triggers: build, deploy, CI/CD, compile & package, publish to Alibaba Cloud, diagnose, troubleshoot, root cause, 502, 503, service not started, deployment failed.
Install
npx vskill@latest install aliyun/alibabacloud-aiops-skills/alibabacloud-cadt-deploy-on-aliyunSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as aliyun/alibabacloud-aiops-skills/alibabacloud-cadt-deploy-on-aliyun.
Alibaba Cloud Application Build & Deploy
Standalone deployment Skill: Build + Deploy pipeline orchestration. User directly provides ECS instance IDs, region, and application information — no project/environment hierarchy dependency.
Workflow
Path A: Build + Deploy (new deployment)
Path B: Diagnose + Fix + Redeploy (troubleshoot previous deployment)
Path B scope: "Build" in Path B means applying the diagnosed fix to existing deployment configuration (e.g.,application.ymlport, JVM flags, start/stop scripts, env vars) and re-packaging — NOT writing new application source code from scratch. The application already exists on the ECS instance.Path B re-deploy mandate: After the user confirms [1] "fix and re-deploy", the full pipeline (step-2 build → G4 checklist → InstallApplication → wait_ready) is always required — even when the diagnosed fix is infrastructure-level (e.g., security group rules, DNS, firewall). The ASK-USER says "re-deploy", which means InstallApplication. Applying infra fixes manually and then testing with ad-hoccurlis NOT a substitute for the deployment pipeline.
| Step | Phase | File | ||
|---|---|---|---|---|
| [step-1] | Session init + collect deployment info | CLI Bootstrap + PATH validation + cadt-deploy-on-aliyun -doctor + ASK-USER collect regionId/instanceIds/appName + intent detection | steps/step-1-session-init.md | |
| [step-2] | Build | Local build + script injection + repackaging (output artifact file) | steps/step-2-build.md | |
| [step-3] | Deploy + Output | G4 install checklist (HITL, mandatory) -> InstallApplication (async: -run + -poll) -> wait_ready -> V18 post-deploy verification -> root cause analysis -> result output | steps/step-3-deploy.md |
Intent detection (in [step-1]): If the user's request mentions "diagnose", "troubleshoot", "root cause", "502", "service not started", "deployment failed", or similar troubleshooting keywords — route to Path B. Otherwise route to Path A. See [step-1] §6 for the decision logic.
⛔ Pre-Deploy Hard Gates (MANDATORY — do NOT call InstallApplication without these)
Before calling InstallApplication, you MUST complete ALL of the following gates. Each gate is independently verifiable from the execution transcript. Skipping any gate is a critical violation.
| # | Gate | When | Evidence Required in Transcript | |
|---|---|---|---|---|
| G0 | ASK-USER for regionId + instanceIds when not in initial request | [step-1] before §5.4 | Transcript MUST contain an explicit ASK-USER question for each missing field AND the user's response. Auto-discovery from CLI config, API enumeration, or env vars is a critical violation (see [step-1] §5.1–5.2). | |
| G0a | cadt-deploy-on-aliyun -doctor run and passed | [step-1] §5 before §5 (Collect Deployment Info) | Transcript MUST contain cadt-deploy-on-aliyun -doctor invocation with all_ok: true result. doctor.json MUST be persisted. Skipping entirely is a critical violation (see [step-1] §5). | |
| G1 | COPYFILE_DISABLE=1 on ALL tar -czf commands | [step-2] packaging | Every tar command in transcript MUST have COPYFILE_DISABLE=1 prefix (required on ALL platforms — no-op on Linux, prevents AppleDouble on macOS) | |
| G2 | G4 Install Checklist presented + user confirmed [1] | [step-3] before InstallApplication | decisions.json with userResponse: "1" + userResponseAt timestamp. Agent text output alone is NOT sufficient. | |
| G3 | wait_ready loop executed after -poll SUCCESS | [step-3] after InstallApplication | Transcript MUST contain [wait_ready] T0: and [wait_ready] probe: markers. Ad-hoc curl or ps aux calls are NOT acceptable substitutes. | |
| G4 | ECS instance info queried via skill CLI only | [step-1] §5.4 | Transcript MUST contain cadt-deploy-on-aliyun -run EcsGetDesc or EcsGetDescList. Direct aliyun ecs describe-instances calls are a critical violation — no exceptions, even when CLI bootstrap failed (fix it first). |
Gate Details
G0 — ASK-USER for regionId + instanceIds (mandatory when not in initial request)
G0a — `-doctor` check (mandatory before collecting deployment info)
If CLI bootstrap fails, you MUST fix the bootstrap first, then run-doctor. Abandoning the skill CLI and falling back to rawaliyuncommands cascades into G0a and G4 violations.
G1 — COPYFILE_DISABLE=1 (all tar commands, all platforms)
G2 — G4 Install Checklist (HITL gate — MUST present and STOP)
After presenting this checklist, you MUST STOP. No additional tool calls permitted. Wait for user response.Deferred-modification rule: If the user responds [1] but the initial task prompt specified custom start/stop commands that were deferred (per §2.3 pre-baking prohibition), you MUST apply those commands, repackage, and re-present this checklist with the modified scripts before proceeding to InstallApplication. The user MUST see and confirm the actual commands that will run.
G3 — wait_ready loop (60s hard wait + 5s-interval probes)
You MUST execute the FULL loop script from step-3 §3.2 usingEcsRunCommandSync(probeslocalhostfrom inside the ECS). Ad-hoc singlecurlorps auxcommands are NOT acceptable. Do NOT substitute with a direct `curl` to the ECS public IP — security groups typically block inbound application ports, causing false timeouts even when the service is healthy internally.
G4 — Skill CLI required for ECS instance queries (no exceptions)
All ECS instance information queries MUST go throughcadt-deploy-on-aliyun -run EcsGetDesc(single) orEcsGetDescList(batch). The skill CLI ensures normalized responses,--user-agentpropagation, and auditable operation logs. If the skill CLI is unavailable (e.g., bootstrap failed), you MUST fix it before querying ECS info — using raw `aliyun ecs` as a workaround is still a critical violation.
Context Budget Management
This workflow has 3 major context-consuming phases: [step-1] init, [step-2] build, [step-3] deploy. Long builds (Maven downloading dependencies, npm install, etc.) can consume a large portion of the context window, leaving insufficient room for step-3.
Rules:
- After any build that takes more than 30 seconds, immediately proceed to step-3 without re-reading SKILL.md or step files. The build output is already in context — do not re-summarize it.
- Do NOT re-read step-2-build.md or step-3-deploy.md after the build completes. These files are large and will consume critical context budget. Read them ONCE during step-1/step-2, then proceed from memory.
- Minimum context reservation for step-3: Before starting step-2 build, estimate the build size. If the build will produce verbose output (Maven downloading hundreds of JARs, npm install with thousands of packages), use
-q(quiet) flags to suppress progress output:
``bash mvn -DskipTests package -q # Maven quiet mode npm install --silent && npm pack # npm silent mode pip install build -q # pip quiet mode ``
- If context is running low after build: Skip re-verification of build artifacts (the build exit code is sufficient) and proceed directly to script injection + repackaging + G4 + InstallApplication.
Standalone Entry Point
The user directly provides the following information:
- `regionId` (required): ECS instance region, e.g.
cn-hangzhou - `instanceIds` (required): ECS instance IDs, e.g.
i-bp1xxxxx - `appName` (required): application name, e.g.
my-app - Build info (optional, if building from source):
language,languageVersion,buildTool
All data is user-provided; no project/environment ID lookups needed.
⛔ No auto-discovery (critical):regionIdandinstanceIdsMUST come from the user's explicit input. Do NOT auto-discover them from CLI configuration (aliyun configure list), API enumeration (aliyun ecs describe-instances), environment variables, or any other automated source. If not provided by the user, you MUST ASK-USER. See [step-1] §5.1–5.2 for details. Deploying to an auto-selected region or instance is a critical violation.
Dependencies
| Tool | Purpose | |
|---|---|---|
cadt-deploy-on-aliyun CLI (built-in) | Operation dispatch (cadt-deploy-on-aliyun -run <Op>) | |
aliyun CLI | STS / OSS / ECS API | |
jq | JSON parsing | |
bash 4.0+ | Script execution |
Observability (MUST follow for every aliyun command)
Upon loading this skill, generate a random session ID (32-char lowercase hex string) once for the entire session. Use it as {session-id} below.
Rule: Every `aliyun` CLI command that calls a cloud API MUST include the `--user-agent` flag. Local utility commands (e.g. configure, plugin, version) do not support this flag and should be excluded.
Propagation paths (choose the right one per context)
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/migrationom/bpstudio/alibabacloud-cadt-deploy-on-aliyun/SKILL.md
Popularity
- Repository stars
- 216
- Repository forks
- 27
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aliyun/alibabacloud-aiops-skills/alibabacloud-cadt-deploy-on-aliyun)