Install
openclaw skills install volcengine-prepareUse when the user wants to deploy a local directory or GitHub repository to Volcengine and needs the project analyzed, the app shape understood, and a ranked recommendation across ECS, VKE, and veFaaS before choosing an execution path. Also trigger when the user asks "what deploy mode should I use", "is this repo ready for Volcengine", or "check my repo before deploying". This skill prepares the decision; `volcengine-deploy` performs the chosen deployment, and `volcengine-iac` is used only when the user chooses Terraform/IaC or the task already has an IaC workflow.
openclaw skills install volcengine-prepareAnalyze a repo, explain viable Volcengine deployment paths, and decide the resource management path. Treat this skill as decision support, not as a workflow engine. Do not make a heavy report schema the goal.
Default flow:
ecs | vke | vefaas as machine-readable mode values.cli or iac. Recommend IaC for VKE, managed dependencies, team-managed infrastructure, or plan/diff/destroy requirements; recommend CLI for pure ECS single-VM deployments, temporary validation, missing Terraform, blocked provider registry access, or explicit CLI preference..volcengine/ when the work will continue across steps.Do not run strict tool dependency checks during recommendation. Check path-specific tools only after the user chooses a path.
State directory:
.volcengine/
deploy-choice.json # chosen mode/resource strategy, when persistence is useful
created-resources.json # maintained by deploy only for CLI fast path
terraform/ # IaC working files, only when infra_management=iac
iac-outputs.json # Terraform outputs consumed by deploy
Use /tmp only for temporary clones or caches.
For Git URLs, clone to a temporary cache. For local paths, analyze in place.
input="${1:-.}"
if [[ "$input" =~ ^(https?|git@) ]]; then
repo_name=$(basename "$input" .git)
cache_dir="/tmp/volcengine-prepare/$repo_name"
mkdir -p "$cache_dir"
[ -d "$cache_dir/src/.git" ] || git clone --depth 1 "$input" "$cache_dir/src"
repo_dir="$cache_dir/src"
else
repo_dir=$(cd "$input" && pwd)
repo_name=$(basename "$repo_dir")
fi
git_sha=$(cd "$repo_dir" && git rev-parse --short HEAD 2>/dev/null || echo "unversioned")
Run:
skill_dir="$(dirname "$0")" # or the path to this skill
analysis=$(bash "$skill_dir/scripts/analyze-repo.sh" "$repo_dir")
echo "$analysis" | jq .
Show the important findings in plain language:
Project: <repo_name> @ <git_sha>
Runtime: <language> / <framework>
Deployable subdir: <deploy_subdir or repo root>
Entrypoint: <entrypoint>
Port: <port>
Packaging signals: Dockerfile=<yes/no>, compose=<yes/no if detected>
Dependencies: <mysql, redis, ...>
Migrations: <paths or none>
If the analyzer cannot identify a runnable project, ask what runtime or subdirectory to deploy before recommending a path. A documentation HTML file alone is not a deployable app signal.
If VOLCENGINE_ACCESS_KEY, VOLCENGINE_SECRET_KEY, and VOLCENGINE_REGION are set, verify identity:
ve sts GetCallerIdentity
Do not read ~/.volcengine/config.json; it may contain secrets. If env vars are absent, keep the recommendation going and tell the user credential checks will happen when executing the chosen path.
If cloud service availability matters for a near-term choice, run the read-only probe:
services=$(bash "$skill_dir/scripts/check-region-services.sh")
echo "$services" | jq .
Surface permission or region notes in the corresponding option; do not hide that option.
Prechecks are advisory, not gates. If you can cheaply check quotas or permissions, present the result as a risk:
检测到 <quota/permission> 可能不足,继续可能在创建资源时失败。仍要继续吗?
If account real-name verification or balance cannot be queried reliably, give a short reminder instead of inventing a check:
创建云资源可能要求账号已实名且余额/授信充足;如果创建失败,需要先在控制台处理账号状态。
Use references/deploy-mode-heuristics.md for the detailed decision rules. Present a ranked list, not recommended=true/false flags or scoring internals.
Always include all three options:
volcengine-vefaas skill for deployment; if that fails, return to the main flow so the user can retry or choose ECS/VKE.Include:
低, 中, 中-高)iac or cli) and whyDo not check every tool before the user chooses. Phrase setup needs as decision guidance:
资源管理需要用户确认:VKE、托管数据库/缓存/存储/LB/域名/证书或团队长期资源推荐 Terraform/volcenginecc;纯 ECS 单机、临时验证、无 Terraform 或 provider registry 不通时推荐 ve CLI 快速创建并记录资源账本。
选择 VKE 后会检查 kubectl;如果用户选择 IaC,也会检查 terraform/provider 可用性。
选择 veFaaS 后会切换/调用 `volcengine-vefaas` skill 检查 vefaas CLI、登录状态和框架识别;失败时回到这里,用户可修复后重试或改选 ECS/VKE。
After showing the ranked list, ask only what cannot be safely inferred:
1. 部署方式:默认使用推荐第一项。可选 ECS / VKE / veFaaS(记录为 `ecs` / `vke` / `vefaas`)。
2. 资源策略:默认新建独立项目 deploy-<repo> 并创建新资源;也可以复用已有资源。
3. 资源管理:推荐 <cli|iac>,请确认使用 CLI 资源账本还是 Terraform/IaC。
Ask whether to use Terraform/IaC explicitly. Give a recommendation, but do not turn it into a default:
资源管理建议:VKE、托管依赖、团队长期资源或需要 plan/diff/destroy 时选 Terraform/volcenginecc;纯 ECS 单机、临时 demo、无 Terraform 或 provider registry 不通时选 ve CLI 快速创建并记录资源账本。请确认用 `iac` 还是 `cli`。
If the user says "you decide", use:
deploy-<repo>references/deploy-mode-heuristics.md: plain ECS single-VM without managed dependencies can be cli; VKE, managed dependencies, team-owned infrastructure, or plan/diff/destroy needs are iacIf the user chooses reuse, ask for only the resource IDs needed by that path. Reused resources must not be destroyed by cleanup.
If execution continues in the same conversation, no file is required. If the user may resume later or the next step needs a durable handoff, write only a small choice record:
{
"schema_version": "1",
"repo_dir": "/absolute/path",
"repo_name": "my-app",
"git_sha": "abc1234",
"region": "cn-beijing",
"mode": "ecs",
"port": 8080,
"dependencies": ["redis"],
"resource_strategy": "create-isolated-project",
"project": "deploy-my-app",
"infra_management": "cli"
}
Write it to .volcengine/deploy-choice.json.
Do not write score tables, rationale arrays, or a full recommendation matrix unless the user asks for a report.
项目检测:
- 运行时:<language>/<framework>
- 入口/端口:<entrypoint> / <port>
- 打包信号:Dockerfile=<yes/no>, Compose=<yes/no>
- 依赖:<deps or none>
- 迁移:<paths or none>
- 资源管理建议:<iac|cli>(VKE/托管依赖/团队资源通常建议 iac;纯 ECS 单机或 IaC 不可用通常建议 cli)
推荐顺序:
1. <mode>
原因:...
代价:...
费用粗估:...
2. <mode>
...
3. <mode>
...
请确认:
1. 部署方式:默认 <first mode>
2. 资源策略:默认新建独立项目 deploy-<repo>;也可复用已有资源
3. 资源管理:建议 <iac|cli>;请确认用 `iac` 还是 `cli`