deployment-patterns
About
This Claude Skill helps developers plan feature deployments by first analyzing functionality requirements before recommending deployment strategies. It focuses on context-specific approaches rather than generic patterns, providing tailored deployment and rollback plans with examples. Use it proactively when planning feature releases to ensure deployment supports the intended functionality.
Documentation
Deployment Patterns - Functionality First, Context-Dependent
The Iron Law
NO DEPLOYMENT WITHOUT VERIFICATION FIRST
CRITICAL: Before planning deployment, understand functionality using context-dependent analysis. Verify deployment supports functionality at each step.
Functionality First Mandate
CRITICAL: Before planning deployment, understand functionality using context-dependent analysis.
Core Principle: Understand what functionality needs deployment (using universal questions and context-dependent flows), then plan deployment strategy to support that functionality. Deployment exists to enable functionality, not for its own sake.
Quick Start
Plan deployment by first understanding functionality, then creating deployment strategy.
Example:
- Understand functionality: File upload feature (User Flow: select → upload → confirm)
- Understand deployment patterns: Project uses Docker, staged deployment
- Plan strategy: Deploy to staging → verify functionality → deploy to production
- Rollback plan: If functionality broken, rollback to previous version
Result: Deployment strategy that enables functionality with rollback safety.
Quick Decision Tree
DEPLOYMENT NEEDED?
│
├─ Understand Functionality First
│ ├─ Context-dependent analysis complete? → Continue
│ └─ Not complete? → STOP, complete functionality analysis first
│
├─ Understand Project Patterns
│ ├─ Deployment method identified? → Continue
│ └─ Not identified? → Analyze project configs first
│
├─ Plan Deployment Strategy
│ ├─ Supports functionality flows? → Continue
│ └─ Generic patterns? → STOP, refocus on functionality
│
└─ Execute Deployment
├─ Verify functionality at each step? → Continue
└─ Skip verification? → STOP, add verification
When to Use
Use PROACTIVELY when:
- Planning feature deployments
- Creating rollback strategies
- Setting up monitoring
- Designing staged rollouts
Functionality-First Process:
- First: Understand functionality using context-dependent analysis (universal questions + context-dependent flows)
- Then: Understand project deployment patterns and conventions
- Then: Plan deployment strategy to support that functionality
- Then: Provide specific deployment strategies with examples
- Focus: Deployment that enables functionality, not generic deployment patterns
Core Process Overview
Step 1: Context-Dependent Functionality Analysis (MANDATORY FIRST STEP)
Reference: See Functionality Analysis Template for complete template.
Process:
- Detect Code Type: Identify if this is UI, API, Utility, Integration, Database, Configuration, CLI, or Background Job
- Universal Questions First: Answer Purpose, Requirements, Constraints, Dependencies, Edge Cases, Verification, Context
- Context-Dependent Flows: Answer flow questions based on code type (User Flow, System Flow, Integration Flow, etc.)
Step 2: Understand Project Deployment Patterns (BEFORE Planning)
CRITICAL: Understand how this project deploys before planning deployment strategy.
Project Context Analysis:
- Read Deployment Configuration:
package.jsonscripts,Dockerfile, CI/CD configs, infrastructure configs - Identify Deployment Patterns: Deployment method, rollback strategy, staging strategy, monitoring approach
- Understand Project Conventions: How features deployed, how rollbacks handled, how monitoring set up
Step 3: Plan Deployment Strategy (AFTER Functionality Understood)
⚠️ IMPORTANT: Only plan deployment AFTER you understand functionality and project deployment patterns.
Functionality-Focused Deployment Checklist:
Priority: Critical (Core Functionality):
- Deployment steps support functionality flows
- Deployment order supports functionality dependencies
- Rollback strategy supports functionality
- Monitoring supports functionality (tracks functionality metrics)
- Health checks verify functionality
Priority: Important (Supporting Functionality):
- Staged rollout tests functionality
- Feature flags support functionality
- Environment variables support functionality
- Database migrations support functionality
Deployment Strategies
CRITICAL: Provide specific, actionable deployment strategies with examples, not generic patterns.
Strategy 1: Deployment Steps
Plan deployment steps aligned with functionality flows. Deploy dependencies first, verify functionality at each step.
Reference: references/deployment-steps.md for detailed guidance with examples.
Strategy 2: Rollback Strategy
3-level rollback model: Feature Flag (< 5 min), Configuration Rollback (< 10 min), Code Rollback (< 15 min). All aligned with functionality.
Reference: references/rollback-strategies.md for detailed rollback patterns and triggers.
Strategy 3: Staged Deployment
Staged rollout that tests functionality at each stage (10% → 50% → 100%). Monitor functionality metrics, not just deployment success.
Reference: references/staged-deployment.md for detailed staged rollout patterns.
Strategy 4: Monitoring Setup
Monitor functionality metrics aligned with flows (User Flow, System Flow, Integration Flow). Set up alerts and rollback triggers based on functionality health.
Reference: references/monitoring-observability.md for detailed monitoring patterns and setup.
Red Flags - STOP
If you catch yourself thinking:
- "Just deploy it, we'll fix issues later"
- "Skip verification, deployment looks good"
- "Use generic deployment pattern, it works for others"
- "Monitor generic metrics, functionality will be fine"
- "Rollback later if needed, deploy now"
ALL of these mean: STOP. Return to Step 1 (Functionality Analysis).
Quick Reference
| Phase | Key Activities | Success Criteria |
|---|---|---|
| 1. Functionality Analysis | Context-dependent analysis, universal questions, flows | Functionality understood |
| 2. Project Patterns | Read configs, identify patterns, understand conventions | Deployment method identified |
| 3. Plan Strategy | Align deployment with functionality, plan rollback | Strategy supports functionality |
| 4. Execute | Deploy with verification, monitor functionality | Functionality works at each step |
Reference Files
For detailed deployment strategies, see:
references/deployment-steps.md: Detailed deployment steps aligned with functionality flows, deployment order, verification stepsreferences/rollback-strategies.md: 3-level rollback model, rollback triggers, functionality-based rollback decisionsreferences/staged-deployment.md: Staged rollout patterns (10% → 50% → 100%), functionality testing at each stagereferences/monitoring-observability.md: Functionality metrics, monitoring setup, alert configuration, rollback triggers
For additional patterns and reference materials, see:
- PATTERNS.md: Deployment Pattern Library (Blue-Green, Canary, Feature Flag) and Rollback-Ready Design Patterns
- REFERENCE.md: Deployment Strategy Decision Matrix, 5-Stage Deployment Sequence, Monitoring Metrics, Deployment Timing, Post-Rollback Procedure, Pre-Deployment Checklist, Decision Framework
Integration with Orchestrator
This skill is loaded by orchestrator workflows when deployment planning is detected. The orchestrator coordinates:
- Functionality analysis (Phase 0)
- Skill loading (Phase 2)
- Deployment planning execution
CRITICAL: Maintain functionality-first approach. Deployment planning must follow functionality analysis.
Troubleshooting
Common Issues:
-
Deployment planning without understanding functionality
- Symptom: Deployment strategy doesn't support functionality flows
- Cause: Skipped functionality analysis
- Fix: Complete functionality analysis first, then plan deployment
- Prevention: Always understand functionality before deployment planning
-
Generic deployment patterns instead of functionality-focused
- Symptom: Deployment follows generic patterns but doesn't support functionality
- Cause: Didn't map functionality flows to deployment needs
- Fix: Map flows to deployment strategy, design to support flows
- Prevention: Always map functionality to deployment needs first
-
Deployment strategy not aligned with project patterns
- Symptom: Deployment doesn't match project's deployment patterns
- Cause: Didn't understand project deployment patterns
- Fix: Understand project patterns, align deployment strategy
- Prevention: Always understand project patterns first
If issues persist:
- Verify functionality analysis was completed first
- Check that functionality flows were mapped to deployment needs
- Ensure deployment strategy aligns with project patterns
- Review PATTERNS.md and REFERENCE.md for detailed guidance
Priority Classification
Critical (Must Have):
- Deployment steps support functionality flows
- Deployment order supports functionality dependencies
- Rollback strategy supports functionality
- Monitoring supports functionality (tracks functionality metrics)
- Health checks verify functionality
Important (Should Have):
- Staged rollout tests functionality
- Feature flags support functionality
- Environment variables support functionality
- Database migrations support functionality
Minor (Can Defer):
- Perfect deployment pipeline (if functionality is supported)
- Ideal rollback strategy (if functionality is supported)
- Perfect monitoring setup (if functionality is supported)
Remember: Deployment exists to support functionality. Don't plan deployment for deployment's sake! Understand functionality first, understand project patterns second, then plan deployment to support functionality.
Quick Install
/plugin add https://github.com/romiluz13/cc10x/tree/main/deployment-patternsCopy and paste this command in Claude Code to install this skill
GitHub 仓库
Related Skills
subagent-driven-development
DevelopmentThis skill executes implementation plans by dispatching a fresh subagent for each independent task, with code review between tasks. It enables fast iteration while maintaining quality gates through this review process. Use it when working on mostly independent tasks within the same session to ensure continuous progress with built-in quality checks.
algorithmic-art
MetaThis Claude Skill creates original algorithmic art using p5.js with seeded randomness and interactive parameters. It generates .md files for algorithmic philosophies, plus .html and .js files for interactive generative art implementations. Use it when developers need to create flow fields, particle systems, or other computational art while avoiding copyright issues.
executing-plans
DesignUse the executing-plans skill when you have a complete implementation plan to execute in controlled batches with review checkpoints. It loads and critically reviews the plan, then executes tasks in small batches (default 3 tasks) while reporting progress between each batch for architect review. This ensures systematic implementation with built-in quality control checkpoints.
cost-optimization
OtherThis Claude Skill helps developers optimize cloud costs through resource rightsizing, tagging strategies, and spending analysis. It provides a framework for reducing cloud expenses and implementing cost governance across AWS, Azure, and GCP. Use it when you need to analyze infrastructure costs, right-size resources, or meet budget constraints.
