cloudbase-declarative-deploy skill
✓ 인증됨build-plan-apply 워크플로우와 선언적 cloudbaserc 설정을 사용하여 CloudBase 프로젝트를 배포합니다.
- GitHub 스타
- 1,164
- 파일
- 5
- 마지막 커밋
- 2026년 11월 11일
- 라이선스
- MIT
- 허용된 도구
- —
cloudbase-declarative-deploy skill은 무엇을 하나요?
cloudbase-declarative-deploy은(는) agent skill입니다. build-plan-apply 워크플로우와 선언적 cloudbaserc 설정을 사용하여 CloudBase 프로젝트를 배포합니다.
skill의 SKILL.md에서 생성된 요약입니다.
cloudbase-declarative-deploy skill 정보
이 SKILL은 복잡한 클라우드 인프라를 관리하는 개발자가 전체 CloudBase 프로젝트를 하나의 원하는 상태로 배포할 수 있게 해줍니다. cloudbaserc 설정 파일을 사용하면 에이전트가 데이터베이스, 함수, 애플리케이션, 호스팅 및 게이트웨이의 배포를 특정 의존성 순서에 따라 오케스트레이션할 수 있습니다. 이는 환경 재정의(environment overrides)를 통해 프로덕션이나 스테이징과 같은 다중 환경 설정을 관리하는 팀에 특히 유용합니다.
로컬 환경에서 워크플로우는 엄격한 build-plan-apply 순서를 따릅니다. 에이전트는 먼저 정적 호스팅 아티팩트를 위해 deployBuild를 사용한 다음, deployPlan을 실행하여 dry-run을 수행하고 변경 사항을 미리 보고, 마지막으로 확인 플래그와 함께 deployApply를 실행하여 변경 사항을 반영해야 합니다. 로컬 파일 시스템을 사용할 수 없는 클라우드 호스팅 MCP 모드에서는 SKILL이 함수 및 애플리케이션을 위한 2단계 업로드 채널로 전환되며, 로컬 셸 명령어 대신 클라우드 측 파이프라인을 활용합니다. 이를 통해 로컬 액세스가 없는 상태에서도 보안 업로드 URL과 클라우드 기반 빌드 프로세스를 통해 리소스를 배포할 수 있습니다.
agent가 수행할 수 있는 작업
- 1인프라 변경 사항 미리보기실제 변경을 적용하기 전에 어떤 리소스가 생성, 업데이트 또는 건너뛰어지는지 정확히 확인하기 위해 dry-run을 실행합니다.
- 2다중 리소스 프로젝트 배포단일 설정 파일을 사용하여 데이터베이스와 함수를 포함한 전체 프로젝트를 배포합니다.
- 3다중 환경 배포 관리환경 재정의를 사용하여 프로덕션 또는 스테이징과 같은 다양한 배포 대상을 관리합니다.
- 4로컬에서 정적 호스팅 빌드배포 프로세스가 시작되기 전에 호스팅 사이트를 위한 로컬 빌드 아티팩트를 생성합니다.
skill의 SKILL.md를 기반으로 작성되었습니다. 모든 사용 사례는 해당 문서의 인용구와 대조 확인되었습니다.
cloudbase-declarative-deploy skill 설치 방법
각 명령은 skill 폴더를 클라이언트의 skills 디렉터리에 복사합니다. 클라이언트를 재시작하거나 새 세션을 시작하여 로드하세요.Claude Code에 cloudbase-declarative-deploy skill 설치
~/.claude/skills/cloudbase-declarative-deploy/SKILL.md
$ npx degit TencentCloudBase/CloudBase-AI-Toolkit/config/.claude/skills/cloudbase-declarative-deploy ~/.claude/skills/cloudbase-declarative-deployClaude Code (project)에 cloudbase-declarative-deploy skill 설치
.claude/skills/cloudbase-declarative-deploy/SKILL.md
$ npx degit TencentCloudBase/CloudBase-AI-Toolkit/config/.claude/skills/cloudbase-declarative-deploy .claude/skills/cloudbase-declarative-deployCodex에 cloudbase-declarative-deploy skill 설치
~/.agents/skills/cloudbase-declarative-deploy/SKILL.md
$ npx degit TencentCloudBase/CloudBase-AI-Toolkit/config/.claude/skills/cloudbase-declarative-deploy ~/.agents/skills/cloudbase-declarative-deployGemini CLI에 cloudbase-declarative-deploy skill 설치
~/.gemini/skills/cloudbase-declarative-deploy/SKILL.md
$ npx degit TencentCloudBase/CloudBase-AI-Toolkit/config/.claude/skills/cloudbase-declarative-deploy ~/.gemini/skills/cloudbase-declarative-deployClaude.ai에 cloudbase-declarative-deploy skill 설치
npx degit TencentCloudBase/CloudBase-AI-Toolkit/config/.claude/skills/cloudbase-declarative-deploy cloudbase-declarative-deploy && zip -r cloudbase-declarative-deploy.zip cloudbase-declarative-deploy # claude.ai → Customize → Skills → + → Create skill → Upload a skill → cloudbase-declarative-deploy.zip
자동 검사
2026년 11월 15일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 보안 감사는 아닙니다. 에이전트가 실행하기 전에 스크립트를 읽어 보세요. 검사 방식
- 소스 저장소 연결 및 접근 가능tencentcloudbase/cloudbase-ai-toolkit/config/.claude/skills/cloudbase-declarative-deploy is public and reachablegithub.com/tencentcloudbase/cloudbase-ai-toolkit/tree/HEAD/c ↗통과
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit 2026-11-11github.com/tencentcloudbase/cloudbase-ai-toolkit/commits ↗통과
- 스크립트에 다운로드 후 실행이나 자격 증명 탈취가 없음No scripts in the skill folder통과
- SKILL.md에 숨겨진 지침 없음No override phrases, safeguard switches, credential requests or hidden charactersgithub.com/tencentcloudbase/cloudbase-ai-toolkit/blob/HEAD/c ↗통과
- 사전 허용 도구가 제한됨No pre-approved tools; the agent asks before using onegithub.com/tencentcloudbase/cloudbase-ai-toolkit/blob/HEAD/c ↗통과
- SKILL.md가 Agent Skills 형식을 따름Valid name and description; says when to use it; 261 linesgithub.com/tencentcloudbase/cloudbase-ai-toolkit/blob/HEAD/c ↗통과
SKILL.md
GitHub에서 보기CloudBase Declarative Deploy
Deploy a whole CloudBase project from one cloudbaserc config as desired state,
using the deployBuild (local hosting build), deployPlan (dry-run) and deployApply
(apply) MCP tools. The orchestrator applies resources in a fixed dependency order:
database → functions → app → hosting → gateway
Sibling skills (local only)
Sibling CloudBase skills ship beside this skill. Use local relative paths such as
../cloudbase-cli/SKILL.md.
Cloud-hosted MCP mode does not guarantee access to a local workspace filesystem or stable relative paths. If a referenced sibling file is not available in cloud mode, use this skill's embedded guidance as source of truth and ask the user for any missing constraints (or to install the missing skill). Do not HTTP-fetch remote skill or protocol markdown into the agent context.
Cross-cutting protocols (required before applying any deploy):
- Change Safety Protocol:
../cloudbase-platform/references/protocols/change-safety-protocol.md - Deployment Gate:
../cloudbase-platform/references/protocols/deployment-gate.md
When to use this skill
- The project has a
cloudbaserc.json/.yaml/.yml/.jsdescribing multiple resources, and the user wants to deploy them together as one config. - The user asks for 声明式部署 / 配置式部署 / "deploy from cloudbaserc" / "deploy the whole project".
- The user wants to preview what a deploy will change before applying (dry-run plan).
- The user wants to build the static hosting artifact locally first (declarative
hosting deploys no longer build implicitly — see
deployBuild). - Multi-environment deploy: production/staging via
mode+envOverrides.
Do NOT use for
- Deploying a single cloud function or one static site via
tcbCLI →../cloudbase-cli/SKILL.md. - In-app SDK integration (web/miniprogram/node) → the matching SDK skill.
- Console UI operations.
Cloud mode: deploy through the two-step upload channel
deployBuild / deployPlan / deployApply in this skill are the local-form declarative
executor. In cloud-hosted MCP mode they are intentionally not registered, because that
runtime has no local cwd and no filesystem-bound execution path.
This is an execution-channel switch, not a capability gap. Everything still deploys, but the artifact is uploaded first and the build runs in the cloud. If those three tools are missing from the tool list, that is expected — pick the channel that matches the resource.
Cloud functions — two-phase zip
queryFunctions(action=getFunctionUploadUrl, functionName?)returnsuploadUrl,uploadHeaders,cosBucketName,cosBucketRegion,cosObjectName,expiresInSecondsPUTthe function zip touploadUrlwithuploadHeadersmanageFunctions(action=createFunction|updateFunctionCode, code={cosBucketName, cosObjectName, cosBucketRegion?})— phase B deploys from the environment's own COS bucket (deployMode=cos); pass the triple through unchanged, the schema is strict
contentPath (a local directory) is rejected in cloud mode. For layer contents use
base64Content; for code use the two-phase path above.
CloudApp — two-step upload plus a cloud pipeline
queryApps(action=getUploadUrl, serviceName=...)returnsuploadUrl,uploadHeaders,unixTimestamp- Upload the source/build zip to
uploadUrlwith the returned headers (Content-Type: application/zip)- Public dependencies resolvable from a lockfile:
package.jsonplus lockfile is enough - Private or offline dependencies: package
node_modulesexplicitly
- Public dependencies resolvable from a lockfile:
manageApps(action=deployApp, cosTimestamp=<unixTimestamp>, installCmd?, buildCmd?, deployCmd?)installCmd/buildCmd/deployCmdare pipeline declarations executed in the cloud container; you pass data and declarations, you do not run local shell commands
Static hosting — route through CloudApp
manageHosting(action=upload) is blocked in cloud mode because it needs a local path.
Deploy a static site through the CloudApp two-step upload above (upload the prebuilt
artifact, exclude node_modules). Uploading or downloading an already-hosted file has no
remote substitute and needs local mode. The other hosting actions (delete,
setWebsiteDocument, enableService, bindDomain, unbindDomain, updateDomain) remain
available.
What cloud mode does not give you
- No dry-run. There is no
deployPlanagainst a localcloudbaserc. Do not claim a plan was generated or reviewed in cloud mode; state what is about to be deployed and what the upload contains. Roadmap: uploadcloudbasercas a data artifact, then run server-side plan/apply orchestration. - No local project context.
mode/envOverridesresolution from a project file does not apply; pass the target environment explicitly.
For parameter details, see references/plan-and-apply.md (Cloud-hosted upload pipeline path).
Core principles
-
Plan before apply — always. Run
deployPlanfirst (dry-run, zero side effects). Read the per-resource action classification and show it to the user before callingdeployApply. -
Apply requires explicit confirm.
deployApplywill refuse unlessconfirm=trueis passed. This is the destructive-write guard. -
Deployment Gate. Before any apply, complete
cloudbase-platform/references/protocols/deployment-gate.mdand present the mandatory declaration. -
Conservative on existing resources by default.
yesdefaults tofalse→ existing resources are skipped, not overwritten. Only passyes=truewhen the user explicitly wants to overwrite/update existing resources. -
database failure always aborts. Even with
continueOnError=true, a database-stage failure stops the whole deploy, because later resources depend on it. -
Resolve envId explicitly. Never rely on implicit defaults silently — know which environment is targeted (see the priority table below) and confirm it with the user before applying.
Plan action classification
deployPlan returns a list of resource entries. Each status means:
| status | meaning |
|---|---|
create |
new resource, will be created |
update |
exists, will be overwritten/updated |
skip |
no change needed |
conflict |
conflict detected — deploy will abort, must resolve first |
deploy |
direct overwrite upload |
If any entry is conflict, stop and resolve it before applying.
envId resolution priority
explicit envId param > cloudbaserc `envId` > logged-in / bound environment
If none can be resolved, the tool errors out. Prefer confirming the resolved envId with the user before applying to production.
Local workflow (build → plan → apply)
When app or hosting needs built artifacts, declarative deploy is a three-step flow —
deployApply runs no build for either resource type:
- Ensure a
cloudbasercconfig exists under the project root (cwd). - Build first. Which executor depends on the resource:
hostingwith abuildCommand: calldeployBuild({ cwd, mode? })to produce the local artifacts (builds every hosting item; pure-static items without a build command are skipped automatically).app: build it yourself in the project directory —deployBuilddoes not coverapp. RundeployPlanfirst and usebuildHint.buildCommand/buildHint.outputDirto know what to run and where the artifacts must land.- If the build artifacts are missing at apply time,
deployApplyfails withBUILD_OUTPUT_NOT_FOUNDand directs you back to this step. deployBuildneeds noenvIdand noconfirm(local build only, never touches cloud resources); if dependencies are not installed it fails withDEPENDENCY_NOT_INSTALLEDand tells you to run install first.
- Call
deployPlan(optionally withmode,envId,only,skip). Read the plan, and checkbuildHint.artifactReadyon everyapp/hostingitem. - Present the plan + Deployment Gate declaration to the user; get confirmation.
- Call
deployApplywithconfirm=true(plusyes/concurrency/continueOnErroras needed). Reuse the samemode/envId/only/skipas the plan. A hosting item with existing build output is uploaded directly (the tool clears the build command and reportshostingNeutralized: true); rebuild after source changes so the upload is not stale. - Report the applied result back to the user.
For cloud-hosted MCP mode, do not ask for local cwd/filesystem reads; use the
Cloud mode upload-channel flow above.
Build & pipeline execution
Use this mental model: build → plan → apply. The build executor depends on resource type.
deployApply never runs a build — neither for app nor for hosting. buildCommand /
installCommand / framework in cloudbaserc are only used to infer the output
directory; they are never executed by apply.
| resource | typical build executor | deployment path |
|---|---|---|
hosting |
deployBuild (local shell build, run before apply) |
deployApply uploads the built output directly; missing output → BUILD_OUTPUT_NOT_FOUND |
app |
you build it — run the build in the project directory before apply (deployBuild does not cover app) |
deployApply uploads outputDir as-is; missing/empty → BUILD_OUTPUT_NOT_FOUND |
app via cloud pipeline |
CLI tcb app deploy (source zip + cloud build) |
not reachable through deployApply — use the CLI when a cloud build is wanted |
functions |
local zip / cloud build / image pipeline | depends on buildStrategy (zip/cloud/local/image) |
Reading the build context from deployPlan
app and hosting plan items carry a machine-readable buildHint:
"buildHint": {
"buildCommand": "npm run build", // null → nothing to build
"outputDir": "/abs/path/to/dist", // what apply will upload
"artifactReady": false // false → apply will fail
}
Read these fields instead of parsing the localized text in details. When
artifactReady is false: run deployBuild for hosting, or execute
buildHint.buildCommand in the project directory for app; then re-run deployPlan
and confirm artifactReady: true. Never edit the config to work around it.
deployBuild builds every hosting item that has a buildCommand (framework mapping or
package.json auto-detection); it skips pure-static items and does not touch app.
Build failures surface as BUILD_FAILED, missing local dependencies as
DEPENDENCY_NOT_INSTALLED (run install first — deployBuild never installs
dependencies for you).
Build command resolution follows declaration priority:
explicit config > framework mapping defaults > package.json auto-detection
buildCommand / installCommand / deployCmd are declarative intent in config.
Execution ownership depends on path:
- local-form paths: specific steps may run in local shell executor
- cloud-hosted paths: commands are executed by cloud pipeline container (staticCmd), or replaced by prebuilt artifact upload
So the answer to "can cloud mode run local CLI commands" is: execution authority is moved from local shell to cloud pipeline; agent transmits declarations and artifacts.
Routing
| User task | Read |
|---|---|
| cloudbaserc resource fields & desired-state config shape | references/config-schema.md |
| deployPlan → deployApply two-step flow, parameters, safety | references/plan-and-apply.md |
| Multi-env (mode / envOverrides), envId priority, env vars | references/multi-env.md |
Minimum self-check
- Built the hosting artifacts first (
deployBuild) whenhostingdeclares abuildCommand? - Built the
appartifacts yourself (deployBuilddoes not coverapp) and confirmedbuildHint.artifactReady: truein the plan? - Ran
deployPlanand read the action classification beforedeployApply? - Resolved and confirmed the target
envId? - Completed the Deployment Gate declaration before applying?
- Passed
confirm=trueonly after user confirmation? - Left
yes=falseunless overwrite of existing resources was explicitly requested? - Handled any
conflictentries before applying?
Reference index
All packaged reference files (required for skill lint reachability):
이 스킬의 파일
5cloudbase-declarative-deploy skill 질문
Claude Code에 cloudbase-declarative-deploy skill을 어떻게 설치하나요?
npx degit TencentCloudBase/CloudBase-AI-Toolkit/config/.claude/skills/cloudbase-declarative-deploy ~/.claude/skills/cloudbase-declarative-deploy를 실행합니다. Claude Code는 ~/.claude/skills(모든 프로젝트) 또는 .claude/skills(한 프로젝트)에서 skills를 로드하며, 설명이 작업과 일치할 때 skill을 사용합니다.
cloudbase-declarative-deploy skill을 사용할 수 있는 클라이언트는 무엇인가요?
Agent Skills 형식을 읽는 모든 클라이언트(Claude Code, Codex, Gemini CLI, claude.ai(ZIP으로 업로드))가 사용할 수 있습니다. skill 내 스크립트는 클라이언트가 코드 실행을 허용하는 경우에만 실행됩니다.
CloudBase 리소스의 배포 순서는 어떻게 되나요?
오케스트레이터는 데이터베이스, 함수, 앱, 호스팅, 게이트웨이 순으로 정해진 의존성 순서에 따라 리소스를 적용합니다.
배포를 적용하기 전에 dry-run을 실행할 수 있나요?
네, deployApply를 호출하기 전에 deployPlan 도구를 사용하여 dry-run을 수행하고 변경 사항을 미리 확인할 수 있습니다.
deployApply가 애플리케이션이나 호스팅 아티팩트를 자동으로 빌드하나요?
아니요, deployApply는 앱 또는 호스팅 리소스에 대한 빌드를 실행하지 않습니다. deployBuild 또는 로컬 명령어를 사용하여 사전에 빌드해야 합니다.