Loading...
Loading...
Alicloud Service Scenario-Based Skill. Use for auto-deploying the "Build AI Animation Story Creation App" solution. Automatically creates OSS Bucket, deploys FC application via Devs template, and stops at the experience page. Triggers: "AI动画创作", "animation creation", "动画故事部署", "deploy animation story app".
npx skill4agent add aliyun/alibabacloud-aiops-skills alibabacloud-tech-solution-animation-creation-auto-deployOSS Bucket + DashScope (Bailian API Key) + FC App (ComfyUI + WebUI — two functions deployed via Devs template)Prerequisites (scripts/ runtime dependencies):
Dependency Min Version Check Command Purpose bash4.0+ bash --versionScript runtime CLIaliyun>= 3.3.7 aliyun versionAlibaba Cloud resource operations (3.3.7+ required for subcommand)ai-modepython33.6+ python3 --versionJSON parsing curlany curl --versionHTTP API calls If Aliyun CLI is not installed or version too low, seefor installation instructions. Then [MUST] runreferences/cli-installation-guide.mdto enable automatic plugin installation.aliyun configure set --auto-plugin-install true
aliyun configure ai-mode enable
aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-tech-solution-animation-creation-auto-deploy"
aliyun plugin updatePre-check: Alibaba Cloud Credentials RequiredSecurity Rules:
- NEVER read, echo, or print AK/SK values
- NEVER ask the user to input AK/SK directly in the conversation or command line
- NEVER use
with literal credential valuesaliyun configure set- ONLY use
to check credential statusaliyun configure listbashaliyun configure listCheck the output for a valid profile (AK, STS, or OAuth identity).If no valid profile exists, STOP here.
- Obtain credentials from Alibaba Cloud Console
- Configure credentials outside of this session
- Return and re-run after
shows a valid profilealiyun configure list
references/ram-policies.mdAliyunFCFullAccessAliyunOSSFullAccessdevs:CreateProjectdevs:RenderServicesByTemplatedevs:UpdateEnvironmentdevs:DeployEnvironmentdevs:ListEnvironmentsdevs:GetEnvironmentbash scripts/attach-policies.sh[MUST] Permission Failure Handling: When any command or API call fails due to permission errors at any point during execution, follow this process:
- Read
to get the full list of permissions required by this SKILLreferences/ram-policies.md- Use
skill to guide the user through requesting the necessary permissionsram-permission-diagnose- Pause and wait until the user confirms that the required permissions have been granted
IMPORTANT: Parameter Confirmation — Before executing any command or API call, all parameters are either fixed values or auto-generated/created — no manual user input required.
| Parameter | Required | Description | Value |
|---|---|---|---|
| Yes | Deployment region (FC and OSS in the same region) | Fixed |
| Yes | OSS Bucket name | Auto-generated |
| Yes | Bailian (DashScope) API Key | Auto-created via |
| Yes | Devs project name | Auto-generated |
# Generate random names
BUCKET_NAME="animation-story-$(cat /dev/urandom | LC_ALL=C tr -dc 'a-z' | head -c 6)"
PROJECT_NAME="animation-creation-$(cat /dev/urandom | LC_ALL=C tr -dc 'a-z' | head -c 6)"
echo "BUCKET_NAME=$BUCKET_NAME, PROJECT_NAME=$PROJECT_NAME"aliyun modelstudiosource scripts/create-api-key.shNote: Useto ensure thesourcevariable is exported to the current shell. The script automatically fetches the default workspace (or creates one if none exists), creates an API Key, and prints the full value.API_KEY
Note: The OSS CLI plugin uses theflag (not--ua) to set the User-Agent.--user-agent
ORDER.OPENDaliyun ossadmin open-oss-service --endpoint oss-admin.aliyuncs.com --force --user-agent AlibabaCloud-Agent-Skills/alibabacloud-tech-solution-animation-creation-auto-deploy 2>&1 || truealiyun oss mb "oss://$BUCKET_NAME" --region cn-hangzhou --ua AlibabaCloud-Agent-Skills/alibabacloud-tech-solution-animation-creation-auto-deployaliyun oss stat "oss://$BUCKET_NAME" --ua AlibabaCloud-Agent-Skills/alibabacloud-tech-solution-animation-creation-auto-deployCreateProjecttemplateConfigproductionNote: CreateProject only creates the project and an empty environment — it does NOT trigger deployment automatically. You must follow up with RenderServicesByTemplate + UpdateEnvironment + DeployEnvironment to complete deployment.
aliyun devs create-project --body "{
\"name\": \"$PROJECT_NAME\",
\"spec\": {
\"templateConfig\": {
\"templateName\": \"animation-creation\",
\"parameters\": {
\"region\": \"cn-hangzhou\",
\"bailian_api_key\": \"$API_KEY\",
\"ossBucket\": \"$BUCKET_NAME\"
}
}
}
}" --user-agent AlibabaCloud-Agent-Skills/alibabacloud-tech-solution-animation-creation-auto-deployTemplate parameter notes (confirmed — do not modify):
: Fixedregioncn-hangzhou : Bailian API Key auto-created in Step 1bailian_api_key : OSS Bucket name created in Step 2 (withoutossBucketprefix)oss://- All parameters are passed via
, notparametersvariableValues
All commands in this step use shell variables,MY_UID,PROJECT_NAME,BUCKET_NAME— make sure Step 1 and Parameter Confirmation have been executed.API_KEY
source scripts/setup-role.shNote: Useto ensure thesourcevariable is exported to the current shell. The script automatically checks whether the role exists and creates it if not. This role is the standard Devs role, typically auto-created when using the FC console's application feature for the first time.MY_UID
The following script automatically: renders the template → filters out custom-domain → adds roleArn → calls UpdateEnvironment. The agent does not need to handle JSON manually.
bash scripts/render-and-update.shKey notes (built into the script — no manual handling needed):
service is automatically filtered out (causes "Unknown service type" error)custom-domain is automatically addedroleArn- Uses
to pass data (--bodycannot correctly pass deeply nested JSON)--spec
Built-in rate-limit protection: The script retries up to 3 times with 60-second intervals, and stops immediately on 404. Run the script directly — do not callmanually.deploy-environment
bash scripts/deploy-environment.shbash scripts/poll-deploy-status.shWhy is a custom domain needed? FC trigger URLs () force a*.fcapp.runresponse header, causing the browser to download the HTML instead of rendering it. A custom domain (Content-Disposition: attachment) is required for the application to work properly.*.devsapp.net
Must use FC 2.0 API () to create the helper function: FC 3.0 does not supportaliyun fc-openin function names. The$plugin will be auto-installed via thefc-openconfiguration.--auto-plugin-install true
MY_UIDPROJECT_NAMEbash scripts/create-custom-domain.shhttp://${PROJECT_NAME}-web.fcv3.${MY_UID}.cn-hangzhou.fc.devsapp.net/⚠️ 安全提醒 — 展示访问 URL 时必须告知用户: 该 URL 可通过公网直接访问,请勿随意分享给不信任的人。未经授权的访问可能导致:
- 云资源被消耗: 每次访问都会消耗函数计算资源和百炼 API 调用额度,可能产生额外费用。
- 隐私信息泄露: 生成的动画故事、上传的图片等内容可能包含个人或敏感信息。
PROJECT_NAMEMY_UIDBUCKET_NAMEAPI_KEY_ID# 1. Delete FC custom domain
aliyun fc delete-custom-domain --domain-name "${PROJECT_NAME}-web.fcv3.${MY_UID}.cn-hangzhou.fc.devsapp.net" --region cn-hangzhou --user-agent AlibabaCloud-Agent-Skills/alibabacloud-tech-solution-animation-creation-auto-deploy
# 2. Delete Devs project (also deletes associated FC functions; --force true skips environment resource check)
aliyun devs delete-project --name "$PROJECT_NAME" --force true --user-agent AlibabaCloud-Agent-Skills/alibabacloud-tech-solution-animation-creation-auto-deploy
# 3. Delete OSS Bucket (recursively delete all objects first, then delete the Bucket)
aliyun oss rm "oss://$BUCKET_NAME" -r -f --region cn-hangzhou --ua AlibabaCloud-Agent-Skills/alibabacloud-tech-solution-animation-creation-auto-deploy
aliyun oss rm "oss://$BUCKET_NAME" -b -f --region cn-hangzhou --ua AlibabaCloud-Agent-Skills/alibabacloud-tech-solution-animation-creation-auto-deploy
# 4. Delete Bailian API Key (API_KEY_ID is output during create-api-key.sh execution)
aliyun modelstudio delete-api-key --api-key-id "$API_KEY_ID" --user-agent AlibabaCloud-Agent-Skills/alibabacloud-tech-solution-animation-creation-auto-deployaliyun configure ai-mode disablereferences/related-commands.mdKey limitation: First-time activation of FC has no CLI/API support — users must activate it manually in the console.Auto-activated: OSS service via(built into Step 2). Bailian workspace viaaliyun ossadmin open-oss-service(built into Step 1).aliyun modelstudio create-workspace
cn-hangzhou| Reference | Description |
|---|---|
| references/ram-policies.md | RAM permission policies |
| references/related-commands.md | CLI/SDK command reference |
| references/verification-method.md | Deployment verification steps |
| references/acceptance-criteria.md | Acceptance criteria |
| references/cli-installation-guide.md | CLI installation guide |