appdeploy
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAppDeploy Skill
AppDeploy Skill
Deploy web apps to AppDeploy via HTTP API.
通过HTTP API将Web应用部署到AppDeploy平台。
When to Use This Skill
何时使用该Skill
- Use when planning or building apps and web apps
- Use when deploying an app to a public URL
- Use when publishing a website or web app
- Use when the user says "deploy this", "make this live", or "give me a URL"
- Use when updating an already-deployed app
- 在规划或构建应用及Web应用时使用
- 在将应用部署到公开URL时使用
- 在发布网站或Web应用时使用
- 当用户说“部署这个”、“让它上线”或“给我一个URL”时使用
- 在更新已部署的应用时使用
Setup (First Time Only)
首次设置
-
Check for existing API key:
- Look for a file in the project root
.appdeploy - If it exists and contains a valid , skip to Usage
api_key
- Look for a
-
If no API key exists, register and get one:bash
curl -X POST https://api-v2.appdeploy.ai/mcp/api-key \ -H "Content-Type: application/json" \ -d '{"client_name": "claude-code"}'Response:json{ "api_key": "ak_...", "user_id": "agent-claude-code-a1b2c3d4", "created_at": 1234567890, "message": "Save this key securely - it cannot be retrieved later" } -
Save credentials to:
.appdeployjson{ "api_key": "ak_...", "endpoint": "https://api-v2.appdeploy.ai/mcp" }Addto.appdeployif not already present..gitignore
-
检查现有API密钥:
- 在项目根目录查找文件
.appdeploy - 如果文件存在且包含有效的,直接跳转到使用步骤
api_key
- 在项目根目录查找
-
若无API密钥,注册获取:bash
curl -X POST https://api-v2.appdeploy.ai/mcp/api-key \ -H "Content-Type: application/json" \ -d '{"client_name": "claude-code"}'响应示例:json{ "api_key": "ak_...", "user_id": "agent-claude-code-a1b2c3d4", "created_at": 1234567890, "message": "Save this key securely - it cannot be retrieved later" } -
将凭据保存到文件:
.appdeployjson{ "api_key": "ak_...", "endpoint": "https://api-v2.appdeploy.ai/mcp" }如果中没有包含.gitignore,请添加进去。.appdeploy
Usage
使用方法
Make JSON-RPC calls to the MCP endpoint:
bash
curl -X POST {endpoint} \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Authorization: Bearer {api_key}" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "{tool_name}",
"arguments": { ... }
}
}'向MCP端点发起JSON-RPC调用:
bash
curl -X POST {endpoint} \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Authorization: Bearer {api_key}" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "{tool_name}",
"arguments": { ... }
}
}'Workflow
工作流程
-
First, get deployment instructions: Callto understand constraints and requirements.
get_deploy_instructions -
Get the app template: Callwith your chosen
get_app_templateandapp_type.frontend_template -
Deploy the app: Callwith your app files. For new apps, set
deploy_apptoapp_id.null -
Check deployment status: Callto check if the build succeeded.
get_app_status -
View/manage your apps: Useto list your deployed apps.
get_apps
-
首先,获取部署说明: 调用了解部署约束和规则。
get_deploy_instructions -
获取应用模板: 选择和
app_type后,调用frontend_template。get_app_template -
部署应用: 携带应用文件调用。对于新应用,将
deploy_app设为app_id。null -
检查部署状态: 调用查看构建是否成功。
get_app_status -
查看/管理应用: 使用列出已部署的所有应用。
get_apps
Available Tools
可用工具
get_deploy_instructions
get_deploy_instructions
Use this when you are about to call deploy_app in order to get the deployment constraints and hard rules. You must call this tool before starting to generate any code. This tool returns instructions only and does not deploy anything.
Parameters:
在调用deploy_app之前使用该工具,获取部署约束和硬性规则。在生成任何代码之前必须调用此工具。该工具仅返回说明,不执行部署操作。
参数:
deploy_app
deploy_app
Use this when the user asks to deploy or publish a website or web app and wants a public URL.
Before generating files or calling this tool, you must call get_deploy_instructions and follow its constraints.
Parameters:
- : any (required) - existing app id to update, or null for new app
app_id - : string (required) - app architecture: frontend-only or frontend+backend
app_type - : string (required) - short display name
app_name - : string (optional) - short description of what the app does
description - : any (optional) - REQUIRED when app_id is null. One of: 'html-static' (simple sites), 'react-vite' (SPAs, games), 'nextjs-static' (multi-page). Template files auto-included.
frontend_template - : array (optional) - Files to write. NEW APPS: only custom files + diffs to template files. UPDATES: only changed files using diffs[]. At least one of files[] or deletePaths[] required.
files - : array (optional) - Paths to delete. ONLY for updates (app_id required). Cannot delete package.json or framework entry points.
deletePaths - : string (required) - The coding agent model used for this deployment, to the best of your knowledge. Examples: 'codex-5.3', 'chatgpt', 'opus 4.6', 'claude-sonnet-4-5', 'gemini-2.5-pro'
model - : string (required) - The intent of this deployment. User-initiated examples: 'initial app deploy', 'bugfix - ui is too noisy'. Agent-initiated examples: 'agent fixing deployment error', 'agent retry after lint failure'
intent
当用户要求部署或发布网站/Web应用并需要公开URL时使用。
在生成文件或调用此工具之前,必须先调用get_deploy_instructions并遵循其约束条件。
参数:
- : any(必填)- 要更新的现有应用ID,新应用填null
app_id - : string(必填)- 应用架构:frontend-only(仅前端)或frontend+backend(前后端一体)
app_type - : string(必填)- 简短显示名称
app_name - : string(可选)- 应用功能的简短描述
description - : any(可选)- 新应用必填(app_id为null时)。可选值:'html-static'(简单站点)、'react-vite'(单页应用、游戏)、'nextjs-static'(多页应用)。模板文件会自动包含在部署中。
frontend_template - : array(可选)- 要写入的文件。新应用:仅需自定义文件和模板文件的差异内容。更新应用:仅需包含变更文件的差异内容diffs[]。files[]或deletePaths[]至少需填一个。
files - : array(可选)- 要删除的路径。仅适用于应用更新(需提供app_id)。不能删除package.json或框架入口文件。
deletePaths - : string(必填)- 用于此次部署的编码Agent模型(据你所知)。示例:'codex-5.3'、'chatgpt'、'opus 4.6'、'claude-sonnet-4-5'、'gemini-2.5-pro'
model - : string(必填)- 此次部署的意图。用户发起的示例:'initial app deploy'(首次应用部署)、'bugfix - ui is too noisy'(修复UI过于繁杂的问题)。Agent发起的示例:'agent fixing deployment error'(Agent修复部署错误)、'agent retry after lint failure'(Agent在Lint失败后重试)
intent
get_app_template
get_app_template
Call get_deploy_instructions first. Then call this once you've decided app_type and frontend_template. Returns base app template and SDK types. Template files auto-included in deploy_app.
Parameters:
- : string (required)
app_type - : string (required) - Frontend framework: 'html-static' - Simple sites, minimal framework; 'react-vite' - React SPAs, dashboards, games; 'nextjs-static' - Multi-page apps, SSG
frontend_template
先调用get_deploy_instructions。确定app_type和frontend_template后调用此工具。返回基础应用模板和SDK类型。模板文件会自动包含在deploy_app的部署中。
参数:
- : string(必填)
app_type - : string(必填)- 前端框架:'html-static'(简单站点、轻量框架);'react-vite'(React单页应用、仪表盘、游戏);'nextjs-static'(多页应用、静态站点生成)
frontend_template
get_app_status
get_app_status
Use this when deploy_app tool call returns or when the user asks to check the deployment status of an app, or reports that the app has errors or is not working as expected. Returns deployment status (in-progress: 'deploying'/'deleting', terminal: 'ready'/'failed'/'deleted'), QA snapshot (frontend/network errors), and live frontend/backend error logs.
Parameters:
- : string (required) - Target app id
app_id - : integer (optional) - Optional timestamp in epoch milliseconds to filter errors. When provided, returns only errors since that timestamp.
since
当deploy_app工具返回结果,或用户要求检查应用部署状态,或反馈应用存在错误、无法正常工作时使用。返回部署状态(进行中:'deploying'/'deleting',终态:'ready'/'failed'/'deleted')、QA快照(前端/网络错误)以及实时的前端/后端错误日志。
参数:
- : string(必填)- 目标应用ID
app_id - : integer(可选)- 可选的时间戳(毫秒级时间戳),用于过滤错误。提供后仅返回该时间戳之后的错误。
since
delete_app
delete_app
Use this when you want to permanently delete an app. Use only on explicit user request. This is irreversible; after deletion, status checks will return not found.
Parameters:
- : string (required) - Target app id
app_id
当需要永久删除应用时使用。仅在用户明确要求时使用。此操作不可逆;删除后,状态检查会返回“未找到”。
参数:
- : string(必填)- 目标应用ID
app_id
get_app_versions
get_app_versions
List deployable versions for an existing app. Requires app_id. Returns newest-first {name, version, timestamp} items. Display 'name' to users. DO NOT display the 'version' value to users. Timestamp values MUST be converted to user's local time
Parameters:
- : string (required) - Target app id
app_id
列出现有应用的可部署版本。需要提供app_id。返回按时间倒序排列的{name, version, timestamp}条目。向用户展示'name'字段,不要展示'version'值。必须将timestamp转换为用户本地时间。
参数:
- : string(必填)- 目标应用ID
app_id
apply_app_version
apply_app_version
Start deploying an existing app at a specific version. Use the 'version' value (not 'name') from get_app_versions. Returns true if accepted and deployment started; use get_app_status to observe completion.
Parameters:
- : string (required) - Target app id
app_id - : string (required) - Version id to apply
version
开始部署现有应用的特定版本。使用get_app_versions返回的'version'值(而非'name')。如果请求被接受且部署启动,返回true;使用get_app_status查看部署完成情况。
参数:
- : string(必填)- 目标应用ID
app_id - : string(必填)- 要部署的版本ID
version
src_glob
src_glob
Use this when you need to discover files in an app's source snapshot. Returns file paths matching a glob pattern (no content). Useful for exploring project structure before reading or searching files.
Parameters:
- : string (required) - Target app id
app_id - : string (optional) - Version to inspect (defaults to applied version)
version - : string (optional) - Directory path to search within
path - : string (optional) - Glob pattern to match files (default: **/*)
glob - : boolean (optional) - Include directory paths in results
include_dirs - : string (optional) - Token from previous response for pagination
continuation_token
当需要发现应用源码快照中的文件时使用。返回匹配glob模式的文件路径(不包含内容)。在读取或搜索文件前,用于探索项目结构非常有用。
参数:
- : string(必填)- 目标应用ID
app_id - : string(可选)- 要检查的版本(默认是当前已部署版本)
version - : string(可选)- 要搜索的目录路径
path - : string(可选)- 匹配文件的glob模式(默认:**/*)
glob - : boolean(可选)- 在结果中包含目录路径
include_dirs - : string(可选)- 上一次响应返回的分页令牌
continuation_token
src_grep
src_grep
Use this when you need to search for patterns in an app's source code. Returns matching lines with optional context. Supports regex patterns, glob filters, and multiple output modes.
Parameters:
- : string (required) - Target app id
app_id - : string (optional) - Version to search (defaults to applied version)
version - : string (required) - Regex pattern to search for (max 500 chars)
pattern - : string (optional) - Directory path to search within
path - : string (optional) - Glob pattern to filter files (e.g., '*.ts')
glob - : boolean (optional) - Enable case-insensitive matching
case_insensitive - : string (optional) - content=matching lines, files_with_matches=file paths only, count=match count per file
output_mode - : integer (optional) - Lines to show before each match (0-20)
before_context - : integer (optional) - Lines to show after each match (0-20)
after_context - : integer (optional) - Lines before and after (overrides before/after_context)
context - : boolean (optional) - Include line numbers in output
line_numbers - : integer (optional) - Max file size to scan in bytes (default 10MB)
max_file_size - : string (optional) - Token from previous response for pagination
continuation_token
当需要在应用源码中搜索指定模式时使用。返回匹配的行及可选上下文。支持正则表达式模式、glob过滤和多种输出模式。
参数:
- : string(必填)- 目标应用ID
app_id - : string(可选)- 要搜索的版本(默认是当前已部署版本)
version - : string(必填)- 要搜索的正则表达式模式(最大500字符)
pattern - : string(可选)- 要搜索的目录路径
path - : string(可选)- 过滤文件的glob模式(例如:'*.ts')
glob - : boolean(可选)- 启用大小写不敏感匹配
case_insensitive - : string(可选)- content=返回匹配行;files_with_matches=仅返回文件路径;count=返回每个文件的匹配次数
output_mode - : integer(可选)- 每个匹配行前显示的行数(0-20)
before_context - : integer(可选)- 每个匹配行后显示的行数(0-20)
after_context - : integer(可选)- 匹配行前后显示的行数(会覆盖before/after_context)
context - : boolean(可选)- 在输出中包含行号
line_numbers - : integer(可选)- 要扫描的最大文件大小(字节,默认10MB)
max_file_size - : string(可选)- 上一次响应返回的分页令牌
continuation_token
src_read
src_read
Use this when you need to read a specific file from an app's source snapshot. Returns file content with line-based pagination (offset/limit). Handles both text and binary files.
Parameters:
- : string (required) - Target app id
app_id - : string (optional) - Version to read from (defaults to applied version)
version - : string (required) - Path to the file to read
file_path - : integer (optional) - Line offset to start reading from (0-indexed)
offset - : integer (optional) - Number of lines to return (max 2000)
limit
当需要读取应用源码快照中的特定文件时使用。返回文件内容,支持基于行的分页(offset/limit)。支持文本和二进制文件。
参数:
- : string(必填)- 目标应用ID
app_id - : string(可选)- 要读取的版本(默认是当前已部署版本)
version - : string(必填)- 要读取的文件路径
file_path - : integer(可选)- 开始读取的行偏移量(从0开始)
offset - : integer(可选)- 返回的行数(最大2000)
limit
get_apps
get_apps
Use this when you need to list apps owned by the current user. Returns app details with display fields for user presentation and data fields for tool chaining.
Parameters:
- : string (optional) - Token for pagination
continuation_token
Generated by
scripts/generate-appdeploy-skill.ts当需要列出当前用户拥有的所有应用时使用。返回应用详情,包含用于向用户展示的字段和用于工具链式调用的数据字段。
参数:
- : string(可选)- 分页令牌
continuation_token
由生成
scripts/generate-appdeploy-skill.ts