Use after pop-deploy-init to generate deployment infrastructure files - creates Dockerfiles, docker-compose configs, Kubernetes manifests, CI/CD pipeline workflows, and platform-specific configs based on deploy.json targets. 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.
scripts/generate_deploy_files.pyAutomatically extracts reusable patterns like error resolutions, workarounds, and debugging techniques from Claude Code sessions via Stop hook, saving them as learned skills for reuse.
Provides patterns for continuous autonomous agent loops with loop selection, quality gates, evals, recovery controls, and failure mitigation. Useful for production AI agent workflows.
Observes Claude Code sessions via hooks to create atomic project-scoped instincts with confidence scores, evolving them into skills, commands, or agents.
Generate deployment infrastructure files from your project's deploy.json configuration.
Trigger: /popkit-ops:deploy setup or after completing deploy-init
Purpose: Read .claude/popkit/deploy.json and generate all necessary deployment files: Dockerfiles, docker-compose configs, Kubernetes manifests, CI/CD workflows, and platform-specific configuration.
| Step | When | Decision ID |
|---|---|---|
| 1 | After config load | target_selection |
| 2 | Before generation | template_level |
| 3 | After generation | review_action |
Skipping these violates PopKit UX standard.
python scripts/generate_deploy_files.py --dir . --action load-config
Reads .claude/popkit/deploy.json and validates structure. Reports:
Use AskUserQuestion:
- question: "Deploy config loaded. Which targets should I generate files for?"
- header: "Targets"
- multiSelect: true
- options: [Based on deploy.json targets]
Use AskUserQuestion:
- question: "What level of deployment configuration?"
- header: "Template"
- options:
- "Minimal" - Basic configs, no extras
- "Standard (Recommended)" - Production-ready with health checks
- "Advanced" - Multi-stage, monitoring, secrets management
python scripts/generate_deploy_files.py --dir . --action generate --targets TARGET1,TARGET2 --template standard
Use AskUserQuestion:
- question: "Deployment files generated. How should I proceed?"
- header: "Review"
- options:
- "Accept all" - Keep generated files
- "Customize" - Review and modify
- "Run validation" - Validate before accepting
| Template | Files Generated |
|---|---|
| minimal | Dockerfile |
| standard | Dockerfile, docker-compose.yml, .dockerignore |
| advanced | Above + docker-compose.prod.yml, docker-compose.dev.yml, multi-stage Dockerfile |
| Template | Files Generated |
|---|---|
| minimal | .github/workflows/deploy.yml |
| standard | Above + .github/workflows/test.yml |
| advanced | Above + .github/workflows/release.yml, environment-specific deploy workflows |
| Template | Files Generated |
|---|---|
| minimal | k8s/deployment.yml, k8s/service.yml |
| standard | Above + k8s/ingress.yml, k8s/configmap.yml |
| advanced | Above + k8s/hpa.yml, k8s/pdb.yml, k8s/secrets.yml, Helm chart skeleton |
| Template | Files Generated |
|---|---|
| minimal | Platform config file only |
| standard | Config + environment setup |
| advanced | Config + preview environments + headers/redirects |
Deployment Setup
================
[1/4] Loading config... Found 2 targets (Docker, npm)
[2/4] Checking existing... 1 conflict (Dockerfile exists)
[3/4] Generating files...
- Dockerfile (created)
- docker-compose.yml (created)
- .dockerignore (created)
- .github/workflows/deploy.yml (created)
- .github/workflows/test.yml (created)
[4/4] Complete
Summary:
Generated: 5 files
Skipped: 0 (no conflicts)
Template: standard
Next: /popkit-ops:deploy validate
Called by:
/popkit-ops:deploy setup commandpop-deploy-init workflow (run_setup step)Triggers:
Followed by:
pop-deploy-validate - Validate generated deployment filespop-deploy-execute - Execute the deployment| Component | Relationship |
|---|---|
pop-deploy-init | Creates deploy.json config |
pop-deploy-validate | Validates generated files |
deployment-validator | Agent for validation |
deploy.json | Input configuration |