用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/navraj007in/architecture-cowork-plugin --skill stack-swap-simulator命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | stack-swap-simulator |
| description | Estimates cost and effort to switch from one tech stack to another |
Estimates cost and effort to switch from one tech stack to another. Helps answer: "Can we migrate later if needed?"
Use this skill to understand:
Provide source and target stacks:
{
"from_stack": {
"backend": "Node.js",
"database": "MongoDB",
"deployment": "Vercel"
},
"to_stack": {
"backend": "Go",
"database": "PostgreSQL",
"deployment": "Kubernetes"
},
"codebase_size": 50000, // lines of code
"monthly_revenue": 50000,
"max_downtime_hours": 4
}
A migration impact report:
{
"from": "Node.js + MongoDB + Vercel",
"to": "Go + PostgreSQL + Kubernetes",
"feasibility": {
"effort_engineer_weeks": 8,
"cost_dollars": 50000,
"timeline_weeks": 10,
"downtime_hours": 4,
"risk_level": "high"
},
"cost_breakdown": {
"engineering_salaries": 40000, // 8 weeks × 4 engineers
"infrastructure_setup": 3000, // Kubernetes cluster setup
"testing_and_qa": 2000, // Migration testing
"consulting_fees": 5000 // Go/Kubernetes specialists
Example: Node.js → Go (both use PostgreSQL)
Effort: 2-3 engineer weeks
Cost: $10-15k
Downtime: 1-2 hours
Complexity: Low (database schema unchanged)
Steps:
Why easy: Database contract unchanged, can run both simultaneously
Example: Node.js + MongoDB → Go + PostgreSQL
Effort: 6-8 engineer weeks
Cost: $40-50k
Downtime: 2-4 hours
Complexity: Medium (schema mapping needed)
Steps:
Why harder: Must map MongoDB doc structure → PostgreSQL schema (not 1-to-1)
Example: Node.js + MongoDB + Vercel → Go + PostgreSQL + Kubernetes
Effort: 8-12 engineer weeks
Cost: $50-80k
Downtime: 4-8 hours
Complexity: High (infrastructure completely different)
Steps:
Why hard: Three different systems, all must work together correctly
When NOT to migrate:
Example: Live multiplayer game (can't take 4 hours downtime)
Formula:
migration_cost = engineering + infrastructure + consulting + opportunity_cost
annual_savings = current_cost - new_cost
payback_period_months = migration_cost / (annual_savings / 12)
worth_it = payback_period <= 18 months (typical 3-5 year horizon)
Example:
Current: Node.js + Vercel = $8k/month
New: Go + Kubernetes = $4k/month
Savings: $4k/month = $48k/year
Migration cost: $50k
Payback period: 50k / (48k/12) = 12.5 months ✅ Worth it
Running payoff calculation:
Month 0: -$50k (migration)
Month 12: -$50k + (4k × 12) = -$2k (still not paid back)
Month 13: -$50k + (4k × 13) = +$2k ✅ (now profitable)
High risk (10-20%):
Medium risk (3-5%):
Low risk (<2%):
Mitigation: Run both systems simultaneously for 1-2 weeks, verify data matches exactly
Factors:
Typical downtime estimates:
Simple backend swap: 1 hour
Backend + database: 2-4 hours
Everything including infra: 4-8 hours
Mitigation:
Common reasons for overruns:
Strategies to control:
Most migrations take 20-50% longer than estimated:
Realistic timeline:
Buffer to build in: 2-3 weeks (20-30%)
One day, flip switch from old to new system
Pros:
Cons:
Risk level: High
Start routing percentage of traffic to new system, increase over time
Pros:
Cons:
Risk level: Medium
1. Is the migration forced?
a) Yes (old tech no longer supported): DO IT
b) No (voluntary): go to step 2
2. How much will we save annually?
a) <$10k/year: Don't migrate (not worth effort)
b) $10-50k/year: Marginal (do if team capacity allows)
c) $50k+/year: Worth investigating
3. What's the payback period?
a) <12 months: ✅ DO IT (quick ROI)
b) 12-24 months: ⚠️ MAYBE (reasonable if business stable)
c) >24 months: ❌ DON'T (too long to justify)
4. Do we have team capacity?
a) Dedicated team (can pause feature work): ✅ Good
b) Shared capacity (features paused 2 months): ⚠️ Okay
c) No capacity (features continue): ❌ Too risky
5. Can we do gradual migration?
a) Yes (architecture supports parallel): ✅ Much safer
b) No (big bang required): ⚠️ Higher risk
→ Decision:
Forced migration OR (savings > $50k AND payback < 18 months AND team capacity available)
→ DO IT
Anything else: Wait (improve ROI or find different problem to solve)
From: Python → Python + Rust (for file syncing)
Cost: Estimated $5-10M over 2 years
Payoff: 40% reduction in sync latency, better battery life
ROI: Millions per month (core product improvement)
Lesson: Strategic migrations (improve product) have higher ROI than cost migrations
From: Heroku (managed) → AWS (self-managed)
Cost: $100k over 3 months (migration + consulting)
Savings: $500k/year (self-managing cheaper than Heroku premium)
Payback: 2.4 months ✅ (very quick ROI)
Timeline: 3 months (longer than estimated due to DevOps learning curve)
Lesson: Migrations from expensive managed → cheap self-managed always worth it
Problem: Python 2 end-of-life (no security patches)
Migration to: Python 3
Status: Still not done! (4 years overdue)
Cost: Estimated $1-2M to do now (would have been $100k in 2018)
Lesson: Don't delay forced migrations (cost grows exponentially)
/architect:recommend-stack// After recommending Go option:
if user_concerned_about_switching_later:
simulate_swap("Node.js", "Go")
show: "If you scale to 1M DAU and want Go, it costs $50k and 10 weeks"
help user: "Is Node.js cheaper for your growth path?"
/architect:blueprint-variants// For each variant:
if switching_cost_significant:
add_to_report: "Switching from baseline to this option later costs $X"
help_user: "Choose baseline now to keep switching options open"
/architect:simulate-migration/architect:simulate-migration --from node --to go
→ Estimates cost, timeline, risk, ROI of migration
constraint-solver/ — picks initial stack (reduces need to migrate)stack-compatibility/ — helps pick compatible stacks (easier to migrate between)cost-optimizer/ — estimates long-term costs (drives migration decisions)Identifies missing prerequisites (blockers) for each /architect: command based on _state.json field requirements
Tracks actual infrastructure costs against estimated costs and alerts when spend drifts from projection
Defines when and how commands must log architecture decisions to _state.json decisions[] for auditability