# Skill

> Claude Code Autodeploy Skill

- Skill: `kartalops/skill` (Agent Skill, multi-file: 13 files)
- Install (CLI): `npx skillmds@latest add kartalops/skill`
- Raw SKILL.md: https://api.skillmd.com/api/skills/kartalops/skill/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Kartalops (https://skillmd.com/u/kartalops)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/kartalops/skill

---

# Claude Code Autodeploy Skill

## Purpose

This skill teaches Claude Code how to safely deploy applications to Coolify or Dokploy by:

1. **Inspecting** a local project to understand its structure
2. **Inferring** deployment requirements from project files
3. **Generating** a `deploy.intent.yaml` manifest
4. **Selecting** the appropriate deployment platform
5. **Executing** MCP tool calls in safe order
6. **Verifying** deployment success and reporting results

## Supported Platforms

| Platform | MCP Server | Skill Prefix |
|----------|-----------|--------------|
| Coolify | `coolify-mcp` | `coolify_` |
| Dokploy | `dokploy-mcp` | `dokploy_` |

Both platforms support:
- Git-based source deployments (nixpacks, dockerfile)
- Prebuilt Docker images
- Docker Compose stacks
- Custom domains with SSL
- Environment variables and secrets
- Health checks

## How Claude Should Consume This Skill

### When Claude Receives a Deployment Request

1. **Acknowledge** the request and ask clarifying questions if needed
2. **Inspect** the local project (never deploy blind)
3. **Analyze** project files to determine requirements
4. **Generate** a `deploy.intent.yaml` manifest
5. **Select** platform based on decision criteria
6. **Plan** the deployment steps
7. **Execute** MCP calls in correct order
8. **Verify** deployment health
9. **Report** results to user

### Skill Invocation

This skill is automatically available to Claude Code. No explicit invocation needed.

Claude should follow the instructions in this skill whenever the user asks to:
- "deploy this app"
- "set up CI/CD"
- "push to production"
- or uses any deployment-related commands

## What This Skill Expects

### From the User

| Input | Description | Required |
|-------|-------------|----------|
| Project path | Path to the codebase to deploy | Yes |
| Target platform | coolify or dokploy | No (auto-detect) |
| Environment | production, staging, development | No (default: production) |
| Domain | Custom domain for the deployment | No |
| Secrets | Any secret values needed | No (but warnings given if missing) |

### From the Project

Claude will inspect these files:

| File | What Claude Looks For |
|------|----------------------|
| `package.json` | Runtime language, package manager, scripts, dependencies |
| `Dockerfile` | Custom build instructions, exposed ports |
| `docker-compose.yml` | Multi-container setup, services, ports |
| `.env.example` | Required environment variables |
| `nixpacks.toml` | Build configuration |
| `Procfile` | Build/start commands |

## What This Skill Produces

### Primary Output: deploy.intent.yaml

A normalized deployment manifest that describes:
- Project metadata (name, version, owner)
- Repository source (provider, repo, branch)
- Runtime (language, version, package manager)
- Build strategy (nixpacks, dockerfile, prebuilt)
- Runtime config (port, health check, resources)
- Domains (FQDN, HTTPS settings)
- Environment variables
- Secrets placeholders
- Deployment targets (coolify/dokploy)

### Secondary Outputs

1. **MCP Tool Calls**: Sequenced API calls to the chosen platform
2. **Deployment Status**: Success/failure with logs
3. **Verification Results**: Health check outcomes

## Core Principles

### Never Deploy Blindly

Claude MUST:
- ✅ Inspect the project before any deployment action
- ✅ Read `package.json`, Dockerfile, compose files
- ✅ Identify exposed ports from code and config
- ✅ Check for required env vars in documentation
- ✅ Warn about missing secrets before deploying

Claude MUST NOT:
- ❌ Trigger deployment without inspecting project
- ❌ Assume default ports (e.g., always 3000)
- ❌ Skip health check verification
- ❌ Deploy with known missing secrets

### Prefer Explicit Configuration

Claude SHOULD:
- ✅ Use explicit `buildCommand` and `startCommand` when available
- ✅ Read port from `package.json` scripts or Dockerfile `EXPOSE`
- ✅ Detect static vs dynamic app type
- ✅ Warn when implicit defaults are used

### Safety First

Claude SHOULD:
- ✅ Warn when secrets are referenced but not configured
- ✅ Warn when domain/SSL configuration is incomplete
- ✅ Verify health endpoint after deployment
- ✅ Provide rollback instructions on failure

## Skill Structure

```
skill/
├── SKILL.md                    # This file - overview and principles
├── instructions/               # Step-by-step guides
│   ├── project-analysis.md    # How to inspect a project
│   ├── deploy-planning.md     # How to create deploy intent
│   ├── platform-selection.md   # How to choose Coolify vs Dokploy
│   └── post-deploy-verification.md
├── checklists/                 # Pre-deployment checks
│   ├── preflight-checklist.md
│   └── security-checklist.md
├── playbooks/                  # Deployment workflows by type
│   ├── node-app.md
│   ├── static-site.md
│   ├── dockerfile-app.md
│   └── compose-stack.md
└── examples/                   # Claude workflow examples
    └── node-to-deploy.yaml
```

## Quick Reference

### Claude Deployment Workflow

```
1. Receive deploy request
2. Read project files (package.json, Dockerfile, etc.)
3. Detect project type (static/source/dockerfile/compose)
4. Generate deploy.intent.yaml
5. Select platform (or ask user)
6. Create application via MCP
7. Set environment variables
8. Configure domain (if provided)
9. Trigger deployment
10. Poll for completion
11. Verify health endpoint
12. Report success/failure with logs
```

### MCP Tool Sequences

**Coolify**:
```
list_projects → create_application_* → bulk_set_envs → assign_domain → trigger_deploy → get_deployment_status
```

**Dokploy**:
```
list_projects → create_application → bulk_set_envs → assign_domain → trigger_deploy → get_logs
```

## See Also

- [project-analysis.md](instructions/project-analysis.md)
- [deploy-planning.md](instructions/deploy-planning.md)
- [platform-selection.md](instructions/platform-selection.md)
- [post-deploy-verification.md](instructions/post-deploy-verification.md)
- [decision-tree.md](../docs/decision-tree.md)
- [failure-recovery.md](../docs/failure-recovery.md)

