Prerequisite Protocol
Environment Detection
PROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo "unknown")
BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
COMMIT=$(git rev-parse --short HEAD 2>/dev/null || echo "unknown")
echo "PROJECT: $PROJECT_ROOT"
echo "BRANCH: $BRANCH"
echo "COMMIT: $COMMIT"
Prerequisite Skill Check
# 检查前置工件
GOAL_ARTIFACT="memory/artifacts/goal-oriented/latest.json"
FP_ARTIFACT="memory/artifacts/first-principles/latest.json"
if [ -f "$GOAL_ARTIFACT" ]; then
echo "FOUND: goal-oriented artifact"
fi
if [ -f "$FP_ARTIFACT" ]; then
echo "FOUND: first-principles artifact"
fi
mkdir -p memory/artifacts/swot-analysis
Overview
SWOT analysis is a strategic planning tool that, by systematically analyzing the subject'sinternal strengthsandweaknesses, externalopportunitiesandthreats, helps make more informed decisions.
Core Value:
- Provides a panoramic assessment of the current situation, avoiding one-sided judgments
- Combines internal and external factors, balancing objective and subjective
- From analysis to strategy, directly produces actionable plans
- Widely applicable, from product planning to technology selection
Two-Phase Mode:
- Analysis Phase: Identify and fill in the four dimensions S, W, O, T
- Strategy Phase: Through TOWS matrix cross-analysis, generate four types of strategies: SO/WO/ST/WT
Key Difference:
- Simple list-style SWOT: only lists the four quadrants, with no follow-up action
- Strategic SWOT: analysis → strategy → action, forming a closed loop
When to Use
Applicable Scenarios:
- Project initiation or new feature planning (assessing feasibility and risk)
- Technology selection and architecture decisions (comparing multiple options)
- Competitive analysis and market entry strategy
- Problem diagnosis and bottleneck breakthrough
- Resource allocation and prioritization
- Strategic planning and business decisions
- The user explicitly requests "SWOT analysis" or "strengths and weaknesses analysis"
Inapplicable Scenarios:
- Simple and clear small decisions (using a sledgehammer to crack a nut)
- Pure technical problem debugging (requires debugging skill)
- Choices where a clear optimal option already exists
- Data-driven A/B testing (SWOT is qualitative analysis)
Quickly determine whether to use SWOT
是否需要决策?
├─ 否 → 不需要SWOT
└─ 是
└─ 问题是否复杂多因素?
├─ 否 → 简单决策框架即可
└─ 是
└─ 是否涉及内外部因素?
├─ 仅内部 → 考虑根因分析/5Whys
├─ 仅外部 → 考虑PESTEL/波特五力
└─ 内外都有 → ✅ 适合SWOT
The Process
digraph swot_analysis {
rankdir=TB;
"定义分析对象" [shape=box, style=filled, fillcolor="#e0e0e0"];
"收集信息" [shape=box, style=filled, fillcolor="#c8e6c9"];
"填充SWOT矩阵" [shape=box, style=filled, fillcolor="#bbdefb"];
"用户选择模式" [shape=diamond, style=filled, fillcolor="#fff9c4"];
"简洁输出" [shape=box, style=filled, fillcolor="#f8bbd0"];
"TOWS交叉分析" [shape=box, style=filled, fillcolor="#e1bee7"];
"生成策略建议" [shape=box, style=filled, fillcolor="#ffccbc"];
"输出完整报告" [shape=doublecircle, style=filled, fillcolor="#81c784"];
"定义分析对象" -> "收集信息";
"收集信息" -> "填充SWOT矩阵";
"填充SWOT矩阵" -> "用户选择模式";
"用户选择模式" -> "简洁输出" [label="简洁模式"];
"用户选择模式" -> "TOWS交叉分析" [label="详细模式"];
"TOWS交叉分析" -> "生成策略建议";
"生成策略建议" -> "输出完整报告";
"简洁输出" -> "输出完整报告";
}
Phase One: Analyze the Current Situation
Step 1: Define the Analysis Subject
- Clarify the analysis goal (product, project, technical solution, competitor, etc.)
- Determine the analysis scope and boundaries
- Clarify the analysis purpose and decision-making context
Step 2: Collect Information
- Internal information: team, resources, tech stack, processes, etc.
- External information: market, competition, trends, policies, etc.
- Data sources: documents, interviews, user feedback, industry reports
Step 3: Fill in the SWOT Matrix
- Strengths: Internal favorable factors (such as technological leadership, strong team, sufficient resources)
- Weaknesses: Internal unfavorable factors (such as lack of experience, limited resources, technical debt)
- Opportunities: External favorable factors (such as growing market demand, policy support)
- Threats: External unfavorable factors (such as intensified competition, technological change, policy restrictions)
Quality Standards:
- 3-7 key points per dimension
- Specific rather than general ("modernized tech stack" rather than "good technology")
- Verifiable rather than subjective conjecture
Quality Checklist:
- 3-7 key points per dimension
- S/W are both internal factors (team, resources, capabilities, processes)
- O/T are both external factors (market, competition, policy, technology trends)
- Key points should be specific and verifiable (supported by data or clear standards)
- Avoid repetition (the same factor should not appear twice)
- Consider the time dimension (short-term/long-term factors)
Phase 2: Generate strategies (detailed mode)
Step 4: TOWS matrix cross-analysis
Cross-match internal factors with external factors to generate four types of strategies:
SO strategies (growth-oriented) - Strengths + Opportunities
- Use internal strengths to seize external opportunities
- Example: Technological leadership (S) + growth in market demand (O) → rapidly expand market share
WO strategies (turnaround-oriented) - Weaknesses + Opportunities
- Use external opportunities to compensate for internal weaknesses
- Example: Growth in market demand (O) + limited resources (W) → seek external cooperation or financing
ST strategies (diversification-oriented) - Strengths + Threats
- Use internal strengths to resist or avoid external threats and pursue diversified development
- Example: Technological leadership (S) + intensifying competition (T) → build technological barriers or expand into new markets
WT strategies (defensive-oriented) - Weaknesses + Threats
- Reduce weaknesses and avoid threats, with the core being survival and defense
- Example: Limited resources (W) + intensifying competition (T) → focus on a niche market to avoid head-on competition
Step 5: Generate strategic recommendations
- Prioritization (based on impact and feasibility)
- Specific action plans (what, who, when)
- Resource requirements and risk assessment
- Key success indicators
Output format:
## SWOT分析报告
### 基本信息
- **分析对象**:[目标]
- **分析时间**:[日期]
- **分析目的**:[决策背景]
### SWOT矩阵
| 维度 | 内部因素 | 外部因素 |
|------|---------|---------|
| **有利** | **Strengths 优势**<br>• 要点1<br>• 要点2 | **Opportunities 机会**<br>• 要点1<br>• 要点2 |
| **不利** | **Weaknesses 劣势**<br>• 要点1<br>• 要点2 | **Threats 威胁**<br>• 要点1<br>• 要点2 |
### 策略建议(详细模式)
#### SO策略(增长型)
1. **[策略名称]**
- 组合因素:[S? + O?]
- 行动计划:[具体步骤]
- 优先级:[高/中/低]
- 资源需求:[人力/预算/时间]
- 关键指标:[如何衡量成功]
[WO/ST/WT策略同上]
### 决策建议
**优先执行**:[哪类策略]
**关键风险**:[主要风险]
**下一步行动**:[立即要做的事]
Use in combination with other tools
Combine with other analysis tools
SWOT + Porter's Five Forces - Competitive strategy analysis
- Use Porter's Five Forces to deeply analyze the competitive landscape in "Threats"
- Applicable to: market entry, competitor analysis
- Process: first use Porter's Five Forces to analyze the industry's competitive situation, then integrate it into the T dimension of SWOT
SWOT + PEST/PESTEL - Macro-environment analysis
- Use PESTEL to systematically identify "Opportunities" and "Threats"
- Applicable to: strategic planning, long-term decision-making
- Process: PESTEL analyzes the macro environment → extract key factors to fill the O and T quadrants
SWOT + VRIO - Resource and capability assessment
- Use VRIO to deeply analyze the core competitiveness in "Strengths"
- Applicable to: resource inventory, competitive advantage analysis
- Process: VRIO screens valuable resources → fill the S quadrant
TOWS matrix - A strategic extension of SWOT
- Built into detailed mode, a bridge from analysis to strategy
- Four-quadrant strategy output ensures the practicality of the analysis
Combine with other methodology skills
SWOT + first-principles - In-depth diagnosis
- Use first principles to question the assumptions and appearances in SWOT
- Applicable to: complex problem diagnosis, breakthrough solution design
- Scenario: SWOT lists "technological backwardness" (W); use first principles to ask "What is the essence of being behind? Is it really behind?"
SWOT + goal-oriented - Strategy execution
- SWOT provides a current-state assessment, while goal-oriented ensures strategy execution does not deviate from the goal
- Applicable to: implementation after strategic planning
- Scenario: after SWOT produces SO strategies, use goal-oriented to break down milestones and critical paths
SWOT + PDCA - Continuous optimization
- PDCA Cycle Validation and Optimization of SWOT Strategy
- Applicable to: Strategy execution and iteration
- Scenario: After executing the SWOT strategy, use PDCA Check for results, and Act to adjust the next round of SWOT
Recommended Order of Tool Combinations
Strategic Planning Scenario:
- PESTEL (macro environment) → 2. Porter's Five Forces (industry competition) → 3. SWOT (comprehensive analysis) → 4. VRIO (resource validation)
Product Decision Scenario:
- SWOT (rapid assessment) → 2. TOWS (strategy generation) → 3. goal-oriented (implementation execution)
Technology Selection Scenario:
- SWOT (solution comparison) → 2. first-principles (deep questioning) → 3. PDCA (validation and iteration)
Examples
Case 1: New Product Launch Decision (Business Scenario)
Analysis Subject: AI customer service product launch plan
Background: The company has developed an AI customer service product and needs to evaluate whether to promote it on a large scale
SWOT Matrix
| Dimension | Key Factors |
|---|---|
| Strengths | • Leading NLP technology, 95% accuracy• Experienced R&D team• Validated by early seed users |
| Weaknesses | • Low brand awareness• Small sales team• Limited customer service scenario coverage |
| Opportunities | • Surging demand for enterprise digital transformation• High prices of competitors• Policy support for AI applications |
| Threats | • Rapid follow-up by big tech companies• Customer concerns about data security• Economic downturn leading enterprises to cut budgets |
Strategic Recommendations (Detailed Mode)
SO Strategy (Growth-Oriented)
- Technological advantage + market demand → Rapidly expand into the SME market, focusing on cost-effectiveness
- Seed users + policy support → Apply for government projects to obtain endorsement and resources
WO Strategy (Turnaround-Oriented)
- Weak brand + market opportunity → Cooperate with industry leaders and leverage their influence to build the brand
- Weak sales + surging demand → Develop agent channels to quickly cover the market
ST Strategy (Diversification-Oriented)
- Technology leadership + big tech follow-up → Build patent barriers and maintain a technology generation gap
- Limited scenarios + security concerns → Focus on customer service scenarios and establish data security certification
WT Strategy (Defensive)
- Weak sales + economic downturn → Provide free trials to lower the customer decision threshold
- Weak brand + big tech competition → Avoid direct competition and deeply cultivate vertical niche areas
Recommended Strategy: Prioritize executing the SO strategy to quickly capture the SME market, while also laying out the ST strategy to build a moat.
Expected Results:
- Market share: Target a 15% share of the SME market within 6 months
- Revenue growth: Expected 30% revenue growth in Q3
- Brand awareness: Raise industry visibility to the top 5
Case 2: Technology Selection Decision (Technical Scenario)
Analysis Subject: Choosing a Web framework (React vs Vue vs Svelte)
Background: A new project is starting, and a front-end framework needs to be selected
SWOT Matrix (Using Svelte as an Example)
| Dimension | Key Factors |
|---|---|
| Strengths | • Compile-time optimization, best runtime performance• Gentle learning curve, less code• Small bundle size |
| Weaknesses | • Smaller ecosystem, fewer third-party libraries• Small community, slow problem resolution• Few large-scale project cases |
| Opportunities | • High project performance requirements• Team willing to learn new technology• Medium project scale, ecosystem is sufficient |
| Threats | • Difficult to recruit follow-up maintenance personnel• Niche tech stack affects team expansion• Uncertain direction of framework evolution |
Strategic Recommendations
SO Strategy: Leverage performance advantages + team willingness → Adopt Svelte to deliver high-performance products quickly
WT Strategy: Small ecosystem + difficult recruitment → Reserve React migration interfaces in key modules to reduce long-term risk
Decision Recommendation: Adopt Svelte in the short term to enjoy performance benefits, cultivate the team's Svelte capabilities in the medium term, and in the long term monitor ecosystem development to decide whether to continue investing.
Risk Contingency Plan:
- If the Svelte ecosystem does not improve significantly within 1 year → Initiate a React migration plan
- If Svelte team expansion is difficult → Consider a hybrid stack approach (React for core modules + Svelte for new features)
Common Pitfalls
Pitfall 1: Factors too general
Incorrect Example:
Strengths:技术好、团队强
Weaknesses:资源少、时间紧
Problem: Lacks specific information and cannot guide decisions. What exactly is "good technology"? How much is "few resources"?
Correct Approach:
Strengths:
• 技术栈现代化(React 18 + TypeScript),代码可维护性高
• 团队有3名资深工程师,平均5年前端经验
Weaknesses:
• 预算限制50万,无法招聘额外开发人员
• 项目周期仅2个月,时间紧张
Principle: Specific, verifiable, and quantifiable.
Pitfall 2: Confusing internal and external factors
Incorrect Example:
Strengths:市场需求增长快
Opportunities:团队执行力强
Problem: Market demand is an external opportunity (O), and team execution capability is an internal strength (S); the positions are reversed.
Correct Approach:
Strengths(内部):团队执行力强、技术领先
Weaknesses(内部):资源受限、经验不足
Opportunities(外部):市场需求增长、政策支持
Threats(外部):竞争加剧、技术变革
Principle: S/W are internal controllable factors, while O/T are external environmental factors.
Pitfall 3: Analysis without strategy
Incorrect Example:
分析完成,SWOT矩阵如下:
S:...
W:...
O:...
T:...
[结束]
Problem: Stays at describing the current situation and does not translate into executable strategies; the value of the SWOT analysis is not realized.
Correct Approach:
[SWOT矩阵]
基于SWOT分析,制定以下策略:
SO策略:...
WO策略:...
ST策略:...
WT策略:...
优先级排序:...
行动计划:...
Principle: SWOT is the means; strategy and action are the goal. Provide concise output by default, but must support a detailed mode to generate strategies.
Pitfall 4: Static analysis ignores dynamics
Incorrect Example:
Threats:竞争对手A推出新产品
[不考虑时间维度和变化趋势]
Problem: SWOT is a snapshot, but the market is dynamic. Ignoring the changing trends of factors can cause strategies to fail.
Correct Approach:
Threats:
• 竞争对手A推出新产品(短期威胁,3-6个月)
• 技术栈老化风险(长期威胁,1-2年)
策略建议:
短期:快速迭代保持竞争力
长期:规划技术升级路线
Principle: Mark the time dimension, distinguish short-term and long-term factors, and adjust strategies dynamically.
References
Classic Works:
- Learning to Learn by Laurence J. Peter - Theoretical foundation of SWOT analysis
- Strategic Management:A Stakeholder Approach by R. Edward Freeman - Strategic analysis framework
- The TOWS Matrix:A Tool for Situational Analysis by Heinz Weihrich - Original paper on the TOWS strategy matrix
Practical Guides:
- SWOT Analysis:A Guide to Using the Tool - Mind Tools practical guide
- The Essential Guide to SWOT Analysis by Justin G. Long - Complete process from analysis to strategy
Combination Tools:
- Porter's Five Forces - Michael Porter's competitive analysis framework
- PESTEL Analysis - Macro-environment analysis tool
- VRIO Framework - Strategic analysis tool of the resource-based view
- TOWS Matrix - Strategic extension of SWOT, proposed by Heinz Weihrich
Online Resources:
- Mind Tools SWOT Analysis:https://www.mindtools.com/pages/article/newTMC_05.htm
Chinese Resources:
- MBA智库:SWOT分析模型
- 知乎:SWOT分析实战案例集
Post-protocol
Artifact output
Save the SWOT analysis results to the artifact file:
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
ARTIFACT_FILE="memory/artifacts/swot-analysis/result-$TIMESTAMP.json"
cat > "$ARTIFACT_FILE" <<EOFJSON
{
"skill": "swot-analysis",
"version": "2.0.0",
"timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
"project": "$PROJECT_ROOT",
"branch": "$BRANCH",
"commit": "$COMMIT",
"input": {
"user_request": "用户的原始请求"
},
"output": {
"strengths": [],
"weaknesses": [],
"opportunities": [],
"threats": [],
"strategies": [
{
"type": "SO",
"action": ""
},
{
"type": "WO",
"action": ""
},
{
"type": "ST",
"action": ""
},
{
"type": "WT",
"action": ""
}
]
},
"next_skills": [
"mvp-first",
"pdca-cycle"
]
}
EOFJSON
echo "ARTIFACT SAVED: $ARTIFACT_FILE"
ln -sf "$ARTIFACT_FILE" memory/artifacts/swot-analysis/latest.json
Target file update
If the target file exists, record that the SWOT analysis is complete.
Suggested follow-up skills
## 后续建议
基于 SWOT 分析结果,建议继续执行:
**推荐技能链**:
1. /mvp-first - 进行 MVP 功能筛选
2. /pdca-cycle - 进入 PDCA 循环实施阶段
是否继续执行?
- A) 执行推荐的技能链
- B) 只执行第一个技能
- C) 不继续,结束当前任务