app-platform-router
npx skills add https://github.com/bikramkgupta/do-app-platform-skills --skill app-platform-router
Agent 安装分布
Skill 文档
App Platform Skills â Router
Overview
This skill routes DigitalOcean App Platform tasks to specialized sub-skills. Each sub-skill is optimized for a specific workflow, keeping context focused and responses precise.
Philosophy: These skills are opinionated playbooks, not documentation replicas. They make decisions for you (VPC by default, GitHub Actions for CI/CD, etc.) and only defer to docs for edge cases.
Key Principle: Skills contain only DO-specific knowledge the LLM doesn’t have from training. Generic SQL, SDK patterns, and programming concepts are NOT duplicated here.
Trust the AI: The AI assistant should reason about the full workflow, chain skills together when needed, and adapt based on context (greenfield vs brownfield vs troubleshooting). Skills provide domain knowledge, not rigid scripts to follow blindly.
Available Skills
Development Phase
| Skill | Purpose | Key Artifacts |
|---|---|---|
| devcontainers | Local development environment with prod parity | .devcontainer/, docker-compose.dev.yml |
Architecture Phase
| Skill | Purpose | Key Artifacts |
|---|---|---|
| designer | Natural language â production-ready App Spec | .do/app.yaml |
| migration | Convert existing apps (Heroku, AWS, etc.) to App Platform. Deep Heroku chapter with Procfile/app.json/heroku.yml parsing, add-on mapping, pipeline migration | .do/app.yaml, migration checklist |
| planner | Generate staged project plans from design to deployment | Plan/*.md stage files |
Operations Phase
| Skill | Purpose | Key Artifacts |
|---|---|---|
| deployment | Ship code to production via GitHub Actions | .github/workflows/deploy.yml |
| troubleshooting | Debug running apps with pre-built debug container, analyze logs | Fixes, diagnostic reports |
| sandbox | Isolated containers for AI agent code execution, testing | Ephemeral sandboxes |
Data Services
| Skill | Purpose | Key Artifacts |
|---|---|---|
| postgres | Full PostgreSQL setup: schemas, users, permissions, multi-tenant | SQL scripts (user-executed) |
| managed-db-services | MySQL, MongoDB, Valkey, Kafka, OpenSearch (bindable vars) | App spec snippets |
| spaces | S3-compatible object storage configuration | CORS config, app spec snippets |
AI Services
| Skill | Purpose | Key Artifacts |
|---|---|---|
| ai-services | Gradient AI inference endpoints | App spec snippets |
Console SDK for AI Assistants
CRITICAL: AI assistants cannot use doctl apps console â it opens an interactive WebSocket session that requires human input. Use the do-app-sandbox Python package instead.
# Install
uv pip install do-app-sandbox # or: pip install do-app-sandbox
Two Use Cases (Same Package, Different Skills)
| Use Case | SDK Method | Skill |
|---|---|---|
| Debug EXISTING app | Sandbox.get_from_id(app_id, component) |
troubleshooting |
| Create NEW sandbox | Sandbox.create(), SandboxManager |
sandbox |
# Debug existing app (troubleshooting skill)
app = Sandbox.get_from_id(app_id="your-app-id", component="web")
# Create new isolated sandbox (sandbox skill)
sandbox = Sandbox.create(image="python")
Full guide: See shared/console-sdk-patterns.md
Routing Decision Tree
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â USER REQUEST â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â
â¼
âââââââââââââââââââââââââââ
â Setting up development? â
âââââââââââââââââââââââââââ
â
"local" / "devcontainer"
â¼
âââââââââââââ
âdevcontainersâ
âââââââââââââ
â
â¼
âââââââââââââââââââââââââââ
â Designing or creating? â
âââââââââââââââââââââââââââ
â â â
"new app"â â "migrate" â "plan" / "staged"
â¼ â¼ â¼
âââââââââââââ âââââââââââââ âââââââââââââ
â designer â â migration â â planner â
âââââââââââââ âââââââââââââ âââââââââââââ
â
â¼
âââââââââââââââââââââââââââ
â Shipping code? â
âââââââââââââââââââââââââââ
â
"deploy" / "ship" / "release"
â¼
âââââââââââââ
âdeployment â
âââââââââââââ
â
â¼
âââââââââââââââââââââââââââ
â Something broken? â
âââââââââââââââââââââââââââ
â
"broken" / "failing" / "debug" / "logs"
â¼
âââââââââââââââââ
âtroubleshootingâ
âââââââââââââââââ
â
â¼
âââââââââââââââââââââââââââ
â Need isolated execution?â
âââââââââââââââââââââââââââ
â
"sandbox" / "isolated" / "execute code" / "code interpreter"
â¼
âââââââââââââ
â sandbox â
âââââââââââââ
â
â¼
âââââââââââââââââââââââââââ
â Configuring data? â
âââââââââââââââââââââââââââ
â â â
"postgres" â "mysql" â â "storage" / "S3" / "spaces"
(complex) â "mongo" â â
â "valkey" â â
â "kafka" â â
â "opensearch" â
â¼ â¼ â¼
âââââââââââââ âââââââââââââââââââââââ âââââââââââââ
â postgres â â managed-db-services â â spaces â
âââââââââââââ âââââââââââââââââââââââ âââââââââââââ
â
â¼
âââââââââââââââââââââââââââ
â AI inference needed? â
âââââââââââââââââââââââââââ
â
"gradient" / "LLM" / "inference"
â¼
âââââââââââââââ
â ai-services â
âââââââââââââââ
Workflow Chaining
The AI assistant should reason about the full workflow, not just route to a single skill.
Workflow Types
| Request Type | Workflow | Skills Chain |
|---|---|---|
| Full Greenfield | “Build a new app from scratch” | devcontainers â designer â planner â deployment |
| Migration | “Migrate from Heroku/AWS” | migration â (then full greenfield workflow) |
| Brownfield | “Deploy my existing app” | planner â deployment |
| Enhancement | “Add Kafka to my app” | managed-db-services â update app.yaml â deployment |
| Troubleshooting | “My app is broken” | troubleshooting (standalone) |
| AI Agent Execution | “Run code in isolation” | sandbox (standalone) |
| Specific Task | “Set up PostgreSQL” | postgres (standalone) |
Chaining Logic
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â UNDERSTAND THE GOAL â
â Is this a single task or a multi-phase workflow? â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â
âââââââââââââââââ´ââââââââââââââââ
â â
â¼ â¼
âââââââââââââââ âââââââââââââââ
â Single Task â â Workflow â
â â â â
â Route to â â Chain â
â one skill â â multiple â
âââââââââââââââ âââââââââââââââ
â â
â¼ â¼
troubleshooting migration â designer â
postgres planner â deployment
spaces
etc.
Examples
“I want to build a new event-driven app with Kafka”
- Start with designer â create
.do/app.yamlwith Kafka - Use managed-db-services for Kafka-specific bindable variables
- Use planner â generate staged Plan/ files
- Execute with deployment skill
“Migrate my Heroku app to DigitalOcean”
- Start with migration â Heroku deep chapter auto-routes based on intent (Q&A, Guided, Auto-Migrate)
- Parses Procfile, app.json, heroku.yml, maps add-ons, generates
.do/app.yaml - Use planner â plan the staged deployment
- Execute with deployment skill
“My deployed app keeps returning 502”
- Route directly to troubleshooting (single skill, no chaining)
- Use debug container, analyze logs, fix issue
“Add PostgreSQL to my existing app”
- Use postgres for schema/user setup
- Update
.do/app.yamlwith database binding - Redeploy with deployment skill
Key Principle
The AI assistant should:
- Understand the overall goal (not just the immediate request)
- Identify which skills are needed and in what order
- Chain skills together, passing artifacts between them
- Adapt based on what already exists (greenfield vs brownfield)
Trust the AI to reason. These skills provide domain knowledge, not rigid scripts.
Trigger Phrases Reference
| Route To | Trigger Phrases |
|---|---|
| devcontainers | “local dev”, “docker compose”, “run locally”, “devcontainer” |
| designer | “design my app”, “create app spec”, “new application”, “architect” |
| migration | “migrate”, “convert”, “move from Heroku”, “move from AWS”, “Heroku”, “Procfile”, “heroku.yml”, “dynos”, “Heroku add-ons”, “Heroku pipeline” |
| planner | “create a plan”, “plan this project”, “staged approach”, “plan deployment”, “how should I deploy” |
| deployment | “deploy”, “ship”, “release”, “GitHub Actions”, “CI/CD” |
| troubleshooting | “broken”, “failing”, “debug”, “logs”, “502”, “crash”, “error” |
| sandbox | “sandbox”, “isolated environment”, “execute code”, “code interpreter”, “run untrusted code”, “agent execution”, “hot pool” |
| postgres | “postgres”, “postgresql”, “schema isolation”, “multi-tenant database” |
| managed-db-services | “mysql”, “mongodb”, “mongo”, “valkey”, “redis”, “kafka”, “opensearch” |
| spaces | “object storage”, “S3”, “Spaces”, “file upload”, “bucket” |
| ai-services | “gradient”, “inference”, “LLM endpoint”, “AI platform” |
Third-Party Integrations (No Skill Needed)
For integrations not covered by dedicated skills (DataDog, Sentry, New Relic, Stripe, etc.):
- Get credentials from the vendor
- Add to GitHub Secrets (Repo â Settings â Secrets â Actions)
- Reference in app spec:
envs: - key: DATADOG_API_KEY scope: RUN_TIME value: ${DATADOG_API_KEY} # From GitHub Secrets - Follow vendor documentation for SDK/agent setup
â The agent’s training covers vendor-specific patterns â no skill required.
Credential Handling Philosophy
CRITICAL: These skills are designed to keep credentials out of agent hands.
Priority Order (Most to Least Preferred)
1. GITHUB SECRETS (RECOMMENDED DEFAULT)
âââ Agent never sees credentials
âââ User manually adds: Repo â Settings â Secrets â Actions
âââ Workflow references: ${{ secrets.DATABASE_URL }}
âââ Agent generates workflow, user handles secrets
2. APP PLATFORM BINDABLE VARIABLES
âââ For DO Managed Databases (Postgres, MySQL, MongoDB, etc.)
âââ Credentials injected via ${db.DATABASE_URL}
âââ Agent configures app spec, never sees credentials
âââ Best for: Apps using DO managed services
3. LOCAL .ENV + EPHEMERAL APP SPEC
âââ User maintains .env file locally
âââ Agent creates temp app spec with placeholders
âââ Substitutes values â Deploys â Deletes temp file
4. EXTERNAL SERVICES
âââ Same patterns as #1 or #3
âââ User responsible for credential management
Artifact Contracts
All skills produce and consume artifacts with consistent naming:
| Artifact | Filename | Producer | Consumer |
|---|---|---|---|
| App Spec | .do/app.yaml |
designer, migration | deployment, planner |
| Deploy Button | .do/deploy.template.yaml |
designer, migration | GitHub |
| Deployment Plan | Plan/0N-*.md |
planner | User, deployment |
| Dev Environment | .devcontainer/devcontainer.json |
devcontainers | VS Code, Cursor |
| Docker Compose | docker-compose.yml |
devcontainers | Docker Desktop |
| CI/CD Workflow | .github/workflows/deploy.yml |
deployment, planner | GitHub Actions |
| SQL Scripts | db-*.sql |
postgres | User (manual execution) |
| CORS Config | spaces-cors.json |
spaces | DO Console |
Handoff Protocol
When a skill completes, it should:
- State the artifact(s) produced: “Created
.do/app.yamlwith 3-component architecture” - Indicate the file path: Relative to project root
- Suggest next skill if applicable: “To deploy this, use the deployment skill“
Plugin/Tool Requirements
| Skill | Required | Optional |
|---|---|---|
| devcontainers | filesystem, docker, git | gh |
| designer | filesystem | â |
| migration | filesystem, doctl, git, python | gh, DigitalOcean MCP |
| deployment | filesystem, doctl, git, python | gh, GitHub MCP |
| troubleshooting | filesystem, python, doctl | â |
| sandbox | filesystem, python, doctl | â |
| postgres | filesystem, psql | â (scripts only) |
| managed-db-services | filesystem, doctl | â |
| spaces | filesystem | s3cmd (for bucket ops; doctl only manages keys) |
| ai-services | filesystem | â |
Sub-Skill Locations
app-platform-skills/
âââ SKILL.md # This file (router)
âââ skills/
â âââ devcontainers/SKILL.md
â âââ designer/SKILL.md
â âââ migration/SKILL.md
â âââ deployment/SKILL.md
â âââ planner/SKILL.md # Staged project plans (design to deployment)
â â âââ templates/ # Local + Tier 1, 2, 3 stage templates
â âââ troubleshooting/SKILL.md
â âââ sandbox/SKILL.md # Isolated containers for AI agent execution
â âââ postgres/SKILL.md
â âââ managed-db-services/SKILL.md # MySQL, MongoDB, Valkey, Kafka, OpenSearch
â âââ spaces/SKILL.md
â âââ ai-services/SKILL.md # Gradient AI
âââ shared/
âââ app-spec-schema.yaml
âââ artifact-contracts.md
âââ credential-patterns.md
Opinionated Defaults Summary
| Domain | Default | Override Trigger |
|---|---|---|
| Networking | VPC-only, internal routing | User explicitly requests public |
| CI/CD | GitHub + GitHub Actions | User specifies GitLab/Bitbucket |
| Secrets | GitHub Secrets | User has existing vault |
| Build | Dockerfile | User explicitly prefers buildpacks |
| Database | DO Managed + Bindable Variables | User has external DB |
| Monorepo | Supported by default (source_dir) | N/A |
| Python env | uv for package/venv management | User prefers pip/poetry |
| Node env | nvm for version management | User prefers n/volta |
Escalation
If a task doesn’t fit any skill or spans multiple skills ambiguously:
- Ask clarifying question to determine primary intent
- Suggest skill sequence if task is multi-phase
- For truly novel tasks, fall back to App Platform documentation: https://docs.digitalocean.com/products/app-platform/