Use when you need to manage project deployments - analyzes project structure to detect deployment targets (Docker, npm, Vercel, etc.), creates .claude/popkit/deploy.json config, and sets up deployment infrastructure. Do NOT use for actual deployment execution - use /popkit-ops:deploy execute for that.
From popkit-opsnpx claudepluginhub jrc1883/popkit-ai --plugin popkit-opsThis skill uses the workspace's default tool permissions.
examples/deploy-config-example.jsonschemas/deploy-config.jsonscripts/create_deploy_config.pyscripts/detect_deploy_targets.pyDesigns and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Implements structured self-debugging workflow for AI agent failures: capture errors, diagnose patterns like loops or context overflow, apply contained recoveries, and generate introspection reports.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Initialize deployment configuration for your project. Detects available targets and creates .claude/popkit/deploy.json.
Trigger: /popkit-ops:deploy init or when setting up project deployments
Purpose: Analyze project structure to detect deployment capabilities, gather user preferences, and create a standardized deployment configuration.
| Step | When | Decision ID |
|---|---|---|
| 1 | After target detection | target_selection |
| 2 | Multiple targets | priority_target |
| 3 | CI/CD configuration | ci_trigger_mode |
| 4 | After config creation | run_setup |
Skipping these violates PopKit UX standard.
python scripts/detect_deploy_targets.py --dir .
This analyzes:
package.json / pyproject.toml for registry targets (npm/PyPI)Dockerfile / docker-compose.yml for Docker targetsvercel.json / netlify.toml for platform targets.github/workflows/ for existing CI/CDOutput JSON includes detected targets with confidence scores.
Present detected targets to user with confidence indicators:
Use AskUserQuestion:
- question: "Detected [targets]. Which deployment targets do you want to configure?"
- header: "Targets"
- multiSelect: true
- options: [Based on detection results, mark high-confidence as "(Detected)"]
Use AskUserQuestion:
- question: "Which target should be the primary deployment?"
- header: "Primary"
- options: [Selected targets from previous step]
Use AskUserQuestion:
- question: "How should deployments be triggered?"
- header: "CI/CD"
- options:
- "GitHub Actions (Recommended)" - Auto-deploy on push/tag
- "Manual only" - Deploy via CLI commands
- "Both" - CI/CD with manual override
Generate .claude/popkit/deploy.json:
{
"version": "1.0",
"project_name": "<detected>",
"targets": {
"docker": {
"enabled": true,
"primary": true,
"config": {
"image_name": "<project>",
"registry": "ghcr.io",
"build_context": ".",
"dockerfile": "Dockerfile"
}
},
"npm": {
"enabled": true,
"primary": false,
"config": {
"registry": "https://registry.npmjs.org",
"access": "public"
}
}
},
"ci": {
"provider": "github_actions",
"triggers": {
"push": ["main"],
"tag": ["v*"]
}
},
"history": []
}
Use AskUserQuestion:
- question: "Configuration created. Run setup to generate deployment files?"
- header: "Next Step"
- options:
- "Run setup now (Recommended)" - Generate Dockerfile, CI workflows
- "Setup later" - Save config only
Deployment Initialization
═════════════════════════
[1/5] Detecting targets... ✓ Found 3 targets
[2/5] Confirming selection... ✓ Docker, npm selected
[3/5] Setting primary... ✓ Docker (primary)
[4/5] Configuring CI/CD... ✓ GitHub Actions
[5/5] Creating config... ✓ .claude/popkit/deploy.json
Summary:
Targets: Docker (primary), npm
CI/CD: GitHub Actions (push to main, tags v*)
Config: .claude/popkit/deploy.json
Next: /popkit-ops:deploy setup
Detected when:
Dockerfile exists (high confidence)docker-compose.yml exists (high confidence)package.json has docker scripts (medium confidence)Configuration:
Detected when:
package.json exists with name field (high confidence)Configuration:
Detected when:
pyproject.toml exists (high confidence)[project] section with name (required)Configuration:
Detected when:
vercel.json exists (high confidence)package.json has Next.js dependency (high confidence).vercel/ directory exists (medium confidence)Configuration:
Detected when:
netlify.toml exists (high confidence)Configuration:
Detected when:
Configuration:
Called by:
/popkit-ops:deploy init commandTriggers:
Followed by:
pop-deploy-setup - Generate deployment filespop-deploy-validate - Pre-deployment validation| Component | Relationship |
|---|---|
deploy.md | Command documentation |
deployment-validator | Agent for validation |
rollback-specialist | Agent for rollback operations |
pop-deploy-setup | Generates deployment files |
See examples/ for:
docker-target.md - Docker deployment setupnpm-target.md - npm publishing setupmulti-target.md - Multiple target configuration