
Competitive Analysis
- 192 installs
- 145 repo stars
- Updated April 2, 2026
- guia-matthieu/clawfu-skills
Benchmark rival positioning, pricing, features, and go-to-market motion to clarify differentiation, avoid commodity traps, and narrow MVP scope before major build investment.
About
Competitive-analysis skill guides structured research into rival products, pricing, positioning, and distribution. Use it during ideation to document who serves the same job-to-be-done, where gaps exist, and which claims or capabilities should shape your initial product narrative and roadmap priorities.
- Landscape map of direct and indirect rivals
- Feature and pricing comparison matrices
- Positioning and messaging gap analysis
- GTM and channel pattern extraction
- Differentiation hypotheses for MVP scope
Competitive Analysis by the numbers
- 192 all-time installs (skills.sh)
- Ranked #1,067 of 3,282 Productivity & Planning skills by installs in the Skillselion catalog
- Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/guia-matthieu/clawfu-skills --skill competitive-analysisAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 192 |
|---|---|
| repo stars | ★ 145 |
| Last updated | April 2, 2026 |
| Repository | guia-matthieu/clawfu-skills ↗ |
What it does
Benchmark rival positioning, pricing, features, and go-to-market motion to clarify differentiation, avoid commodity traps, and narrow MVP scope before major build investment.
Files
Competitive Analysis
Analyze your competitive landscape using Porter's Five Forces and modern frameworks—understand industry dynamics, identify strategic opportunities, and position your business for sustainable advantage.
When to Use This Skill
Use this skill when you need to:
- Evaluate an industry before entering or investing
- Understand competitive dynamics in your market
- Identify strategic opportunities based on industry structure
- Assess threats from competitors, new entrants, or substitutes
- Develop positioning strategy relative to competition
- Prepare investor pitches with market analysis
- Plan product launches in competitive markets
- Make pricing decisions based on competitive forces
This skill is particularly valuable for:
- Founders evaluating market opportunities
- Strategy teams assessing competitive position
- Investors analyzing industry attractiveness
- Product managers planning market entry
- Business development professionals identifying partners/threats
---
Methodology Foundation
Source: Michael Porter - Harvard Business School (1979-present) + modern competitive intelligence best practices
Core Principle: Industry structure, together with a company's relative position within the industry, are the two basic drivers of company profitability. Understand the five competitive forces to anticipate shifts, shape industry evolution, and find better strategic positions.
"The essence of strategy formulation is coping with competition."
---
What Claude Does vs What You Decide
| Claude Does | You Decide |
|---|---|
| Structures production workflow | Final creative direction |
| Suggests technical approaches | Equipment and tool choices |
| Creates templates and checklists | Quality standards |
| Identifies best practices | Brand/voice decisions |
| Generates script outlines | Final script approval |
What This Skill Does
When invoked, I will guide you through comprehensive competitive analysis:
1. Define your competitive arena - Identify industry boundaries and key players 2. Analyze the Five Forces - Evaluate each competitive force systematically 3. Map competitor landscape - Profile direct and indirect competitors 4. Assess industry attractiveness - Determine profit potential 5. Identify strategic opportunities - Find positioning gaps and advantages 6. Monitor competitive dynamics - Set up ongoing intelligence gathering
---
How to Use
Provide information about your competitive situation:
Example prompts:
- "Analyze the competitive landscape for [industry/market]"
- "Apply Porter's Five Forces to my [business type]"
- "Create a competitor analysis for [company/product]"
- "Assess the threat of new entrants in [market]"
- "Evaluate supplier/buyer power in [industry]"
- "Help me find competitive positioning opportunities"
Information that helps:
- Your industry or market
- Key competitors you're aware of
- Your product/service category
- Geographic scope
- Target customer segment
- Current market position
---
Instructions
The Five Forces Framework
Overview
Porter's Five Forces determine the competitive structure of an industry and its profitability.
Threat of
New Entrants
↓
Supplier → COMPETITIVE ← Buyer
Power RIVALRY Power
↑
Threat of
Substitutes| Force | Key Question | High = |
|---|---|---|
| Rivalry | How intense is competition? | Lower profits |
| New Entrants | How easy to enter? | More competition |
| Supplier Power | Can suppliers dictate terms? | Higher costs |
| Buyer Power | Can customers dictate terms? | Lower prices |
| Substitutes | Are alternatives available? | Less pricing power |
---
Force 1: Competitive Rivalry
Analyze the intensity of competition among existing players.
Assessment Questions
| Factor | Questions to Ask |
|---|---|
| Number of competitors | How many significant players exist? |
| Market concentration | Is it dominated by few or fragmented? |
| Industry growth | Growing, stable, or declining? |
| Product differentiation | Are products similar or distinct? |
| Switching costs | How hard is it for customers to switch? |
| Exit barriers | Can companies easily leave? |
| Fixed costs | Do high fixed costs drive price competition? |
Rivalry Intensity Scale
| Level | Characteristics | Profit Impact |
|---|---|---|
| Low | Few competitors, differentiated products, high growth | Higher margins |
| Medium | Several competitors, some differentiation, stable growth | Moderate margins |
| High | Many competitors, commodity products, slow/negative growth | Thin margins |
Red Flags (High Rivalry)
- Frequent price wars
- Heavy advertising spending
- Constant product launches
- Difficulty maintaining margins
- High customer churn
---
Force 2: Threat of New Entrants
Analyze how easy or difficult it is for new players to enter your market.
Barriers to Entry Assessment
| Barrier | Low Threat | High Threat |
|---|---|---|
| Capital requirements | Low startup costs | High investment needed |
| Economies of scale | Small players viable | Must be large to compete |
| Brand loyalty | Weak brands | Strong incumbent brands |
| Switching costs | Easy to try new | Locked-in customers |
| Distribution access | Open channels | Controlled by incumbents |
| Regulatory | Few requirements | Heavy licensing/compliance |
| Technology/IP | Accessible tech | Patents, proprietary tech |
| Network effects | Weak | Strong winner-take-all |
Entry Threat Signals
- Venture capital flowing into your space
- Adjacent companies expanding into your market
- International competitors entering
- Technology reducing traditional barriers
- Regulatory changes opening markets
---
Force 3: Supplier Power
Analyze the leverage suppliers have over industry participants.
Supplier Power Assessment
| Factor | Low Power | High Power |
|---|---|---|
| Number of suppliers | Many alternatives | Few/sole source |
| Uniqueness | Commodity inputs | Proprietary/specialized |
| Switching costs | Easy to change | Expensive/difficult |
| Forward integration | Unlikely | Credible threat |
| Importance to supplier | Major customer | Small customer |
| Substitute inputs | Available | None |
High Supplier Power Examples
- Specialized software vendors (few alternatives)
- Rare material suppliers (limited sources)
- Highly skilled labor markets (talent scarcity)
- Platform dependencies (AWS, Shopify, etc.)
---
Force 4: Buyer Power
Analyze the leverage customers have over your business.
Buyer Power Assessment
| Factor | Low Power | High Power |
|---|---|---|
| Buyer concentration | Many small buyers | Few large buyers |
| Purchase volume | Small orders | Large orders |
| Standardization | Differentiated products | Commodity products |
| Switching costs | High costs to change | Easy to switch |
| Price sensitivity | Value-focused | Price-focused |
| Information | Limited knowledge | Well-informed |
| Backward integration | Unlikely | Credible threat |
Managing Buyer Power
- Differentiate your offering
- Create switching costs (integrations, training, data)
- Target less price-sensitive segments
- Build brand loyalty
- Diversify customer base
---
Force 5: Threat of Substitutes
Analyze alternatives that meet the same customer need differently.
Substitute Threat Assessment
| Factor | Low Threat | High Threat |
|---|---|---|
| Price-performance | Worse value | Better value |
| Switching costs | High | Low |
| Buyer propensity | Loyal to current | Open to alternatives |
| Functional similarity | Different experience | Similar outcome |
Common Substitute Patterns
| Your Category | Potential Substitutes |
|---|---|
| Physical stores | E-commerce |
| Air travel | Video conferencing |
| Newspapers | Social media, podcasts |
| Cable TV | Streaming services |
| Taxis | Ride-sharing, bikes, public transit |
| Hotels | Airbnb, corporate housing |
| Consultants | Software, DIY templates |
Defending Against Substitutes
- Improve price-performance ratio
- Create switching costs
- Add unique value substitutes can't match
- Acquire or partner with substitutes
- Position as premium alternative
---
Industry Attractiveness Assessment
After analyzing all five forces, determine overall industry attractiveness:
| Profile | Characteristics | Strategic Implication |
|---|---|---|
| Attractive | Weak forces across the board | Enter/invest, potential for strong profits |
| Moderately Attractive | Mixed forces | Selective entry, focus on positioning |
| Unattractive | Strong forces across the board | Avoid or find niche, low profit potential |
Profitability Spectrum
ATTRACTIVE UNATTRACTIVE
(Higher profits) (Lower profits)
| |
Commercial aircraft ←―――――――――――――――→ Fast food
Pharmaceuticals ←―――――――――――――――→ Retail grocers
Enterprise SaaS ←―――――――――――――――→ Commodity trading---
Competitor Profiling
Beyond industry forces, analyze specific competitors:
Competitor Profile Template
| Dimension | Questions |
|---|---|
| Overview | Who are they? Size, history, ownership? |
| Products/Services | What do they offer? Key features? |
| Target Market | Who do they serve? Segments? |
| Positioning | How do they position? Messaging? |
| Pricing | Price points? Model? |
| Strengths | What are they great at? |
| Weaknesses | Where do they struggle? |
| Strategy | What's their apparent strategy? |
| Recent Moves | New products, partnerships, hires? |
Competitive Intelligence Sources
| Source Type | Examples |
|---|---|
| Public filings | Annual reports, SEC filings, press releases |
| Website/content | Pricing pages, blog, case studies |
| Job postings | Reveals priorities, tech stack, expansion |
| Social media | Company pages, employee posts |
| Reviews | G2, Capterra, Glassdoor, Trustpilot |
| Customer interviews | Win/loss analysis, churned customers |
| Industry reports | Analyst reports, market research |
| Events/conferences | Presentations, booth messaging |
---
Strategic Positioning Options
Based on your analysis, consider positioning strategies:
| Strategy | Description | Best When |
|---|---|---|
| Cost Leadership | Lowest cost producer | Scale advantages, commodity market |
| Differentiation | Unique value proposition | Can sustain uniqueness |
| Focus (Cost) | Low cost in niche segment | Niche has distinct needs |
| Focus (Differentiation) | Unique value in niche | Niche underserved |
Finding Positioning Gaps
Look for areas where:
- Customer needs are unmet
- Competitors have weaknesses
- Your strengths align with opportunity
- Forces are favorable
---
Examples
Example 1: SaaS Project Management Tool
Context: Startup considering entering project management software market
Industry Definition: Cloud-based project management software for SMBs
Five Forces Analysis:
| Force | Assessment | Rating |
|---|---|---|
| Rivalry | Extremely high—Asana, Monday, Notion, ClickUp, etc. Constant feature releases, price competition | HIGH |
| New Entrants | Moderate—Low capital requirements but network effects and switching costs protect incumbents | MEDIUM |
| Supplier Power | Low—Cloud infrastructure (AWS, GCP) is commoditized | LOW |
| Buyer Power | High—Many alternatives, low switching costs, free tiers available | HIGH |
| Substitutes | High—Spreadsheets, email, Slack, Trello (freemium) | HIGH |
Overall Industry Attractiveness: LOW - Very competitive with strong buyer power and many substitutes
Strategic Implications:
- General PM market is unattractive
- Need differentiated positioning to succeed
- Options:
1. Vertical focus: PM for specific industry (construction, agencies, healthcare) 2. Unique capability: AI-native, specific methodology (Agile, OKRs) 3. Integration play: Deep integration with specific ecosystem
Recommended Positioning: Focus on underserved vertical (e.g., "Project management built for creative agencies") where:
- Buyer power is lower (fewer alternatives serve niche needs)
- Differentiation is sustainable (industry-specific features)
- Word-of-mouth is concentrated (industry networks)
---
Example 2: Direct-to-Consumer Coffee Brand
Context: Evaluating market entry for premium DTC coffee subscription
Industry Definition: Direct-to-consumer specialty coffee subscription (US market)
Five Forces Analysis:
| Force | Assessment | Rating |
|---|---|---|
| Rivalry | High—Blue Bottle, Trade, Atlas, Driftaway, plus local roasters | HIGH |
| New Entrants | High threat—Low barriers, minimal capital, e-commerce accessible | HIGH |
| Supplier Power | Moderate—Quality beans require relationships, but multiple origins | MEDIUM |
| Buyer Power | High—Many options, easy cancellation, price-sensitive | HIGH |
| Substitutes | Very high—Supermarket coffee, local cafes, instant coffee | VERY HIGH |
Overall Industry Attractiveness: LOW - Highly competitive commodity market
Competitor Landscape:
| Competitor | Positioning | Strength | Weakness |
|---|---|---|---|
| Blue Bottle | Premium, artisanal | Brand, quality | Price, accessibility |
| Trade Coffee | Discovery, variety | Selection, tech | Generic brand |
| Atlas Coffee | World exploration | Unique experience | Niche appeal |
| Local roasters | Authentic, local | Community, freshness | Scale, convenience |
Positioning Gap Identified:
- Underserved need: Busy professionals who want premium coffee but zero effort
- Current options: Either require grinding/brewing skill OR sacrifice quality
Recommended Positioning: "Autopilot premium" - Ultra-convenient premium coffee for busy professionals
- Pre-ground for specific brewing methods (not beans)
- Optimal freshness timed delivery
- Simple subscription (one choice, auto-adjusted)
- Position against: "You don't need to be a coffee snob to drink great coffee"
---
Checklists & Templates
Five Forces Analysis Template
INDUSTRY: ____________________
DATE: ____________________
FORCE 1: COMPETITIVE RIVALRY
━━━━━━━━━━━━━━━━━━━━━━━━━━━
Key competitors:
1. ____________________
2. ____________________
3. ____________________
Assessment:
□ Number of competitors: Few / Several / Many
□ Industry growth: High / Stable / Declining
□ Product differentiation: High / Moderate / Low
□ Exit barriers: Low / Moderate / High
□ Fixed costs: Low / Moderate / High
RIVALRY INTENSITY: □ Low □ Medium □ High
FORCE 2: THREAT OF NEW ENTRANTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Barriers to entry:
□ Capital requirements: High / Moderate / Low
□ Economies of scale: Strong / Moderate / Weak
□ Brand loyalty: Strong / Moderate / Weak
□ Switching costs: High / Moderate / Low
□ Distribution access: Difficult / Moderate / Easy
□ Regulatory barriers: High / Moderate / Low
ENTRY THREAT: □ Low □ Medium □ High
FORCE 3: SUPPLIER POWER
━━━━━━━━━━━━━━━━━━━━━━━
Key suppliers/inputs:
1. ____________________
2. ____________________
Assessment:
□ Number of suppliers: Many / Several / Few
□ Uniqueness of inputs: Commodity / Specialized / Unique
□ Switching costs: Low / Moderate / High
□ Forward integration threat: Low / Moderate / High
SUPPLIER POWER: □ Low □ Medium □ High
FORCE 4: BUYER POWER
━━━━━━━━━━━━━━━━━━━━
Key buyer segments:
1. ____________________
2. ____________________
Assessment:
□ Buyer concentration: Fragmented / Moderate / Concentrated
□ Purchase volume: Small / Moderate / Large
□ Product differentiation: High / Moderate / Low
□ Switching costs: High / Moderate / Low
□ Price sensitivity: Low / Moderate / High
BUYER POWER: □ Low □ Medium □ High
FORCE 5: THREAT OF SUBSTITUTES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Key substitutes:
1. ____________________
2. ____________________
Assessment:
□ Price-performance of substitutes: Poor / Comparable / Better
□ Switching costs: High / Moderate / Low
□ Buyer willingness to switch: Low / Moderate / High
SUBSTITUTE THREAT: □ Low □ Medium □ High
OVERALL INDUSTRY ATTRACTIVENESS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
□ Attractive (weak forces)
□ Moderately attractive (mixed forces)
□ Unattractive (strong forces)
KEY STRATEGIC IMPLICATIONS:
1. ____________________
2. ____________________
3. ____________________Competitor Profile Template
COMPETITOR: ____________________
LAST UPDATED: ____________________
OVERVIEW
━━━━━━━━
Company type: ____________________
Founded: ____________________
Size (employees/revenue): ____________________
Funding/ownership: ____________________
PRODUCT/SERVICE
━━━━━━━━━━━━━━━
Core offering: ____________________
Key features: ____________________
Pricing: ____________________
Target market: ____________________
POSITIONING
━━━━━━━━━━━
Tagline/messaging: ____________________
Key differentiator: ____________________
Brand perception: ____________________
SWOT SUMMARY
━━━━━━━━━━━━
Strengths:
• ____________________
• ____________________
Weaknesses:
• ____________________
• ____________________
RECENT ACTIVITY
━━━━━━━━━━━━━━
□ New product launches: ____________________
□ Partnerships: ____________________
□ Key hires: ____________________
□ Funding/acquisitions: ____________________
STRATEGIC IMPLICATIONS FOR US
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Opportunity: ____________________
Threat: ____________________
Action: ____________________Quick Industry Assessment Checklist
Before deep analysis, quick gut-check:
- [ ] Can you name 5+ significant competitors?
- [ ] Have new players entered in the last 2 years?
- [ ] Are prices stable or declining?
- [ ] Do customers frequently switch providers?
- [ ] Are there major technology shifts affecting the industry?
- [ ] Do a few large buyers dominate purchasing?
- [ ] Are there obvious substitutes customers use?
If most answers are "yes," expect a challenging competitive environment.
---
Skill Boundaries
What This Skill Does Well
- Structuring audio production workflows
- Providing technical guidance
- Creating quality checklists
- Suggesting creative approaches
What This Skill Cannot Do
- Replace audio engineering expertise
- Make subjective creative decisions
- Access or edit audio files directly
- Guarantee commercial success
References
Primary Sources:
- Porter, Michael E. "How Competitive Forces Shape Strategy." Harvard Business Review, 1979.
- Porter, Michael E. "Competitive Strategy." Free Press, 1980.
- Porter, Michael E. "On Competition." Harvard Business Review Press, 2008.
Additional Resources:
- Harvard Business School Institute for Strategy and Competitiveness
- "Understanding Michael Porter" by Joan Magretta
---
Related Skills
- competitive-moats - Building sustainable competitive advantages (7 Powers)
- value-proposition-canvas - Designing customer value fit
- positioning-dunford - Positioning your product effectively
- pricing-strategy - Pricing based on competitive dynamics
- category-design - Creating new market categories
#!/usr/bin/env python3
"""
Competitive Analysis Toolkit - Porter's Five Forces & Competitor Profiler.
Based on Michael Porter's competitive strategy frameworks.
Usage:
python main.py five-forces --interactive
python main.py profile --name "Competitor" --pricing 99 --features "A,B,C"
python main.py matrix competitors.json
"""
import click
import json
from dataclasses import dataclass, field
from typing import Optional
@dataclass
class FiveForces:
"""Porter's Five Forces analysis results."""
supplier_power: int # 1-5
buyer_power: int # 1-5
threat_of_substitutes: int # 1-5
threat_of_new_entrants: int # 1-5
competitive_rivalry: int # 1-5
overall_attractiveness: float
recommendations: list[str] = field(default_factory=list)
@dataclass
class CompetitorProfile:
"""Competitor profile data."""
name: str
positioning: str
target_market: str
pricing: str
features: list[str]
strengths: list[str]
weaknesses: list[str]
differentiator: str
def calculate_industry_attractiveness(forces: FiveForces) -> float:
"""Calculate overall industry attractiveness score (1-5)."""
# Lower forces = more attractive (invert the scale)
total = (
(6 - forces.supplier_power) +
(6 - forces.buyer_power) +
(6 - forces.threat_of_substitutes) +
(6 - forces.threat_of_new_entrants) +
(6 - forces.competitive_rivalry)
)
return total / 5
def get_force_label(score: int) -> str:
"""Convert numeric score to label."""
labels = {1: "Very Low", 2: "Low", 3: "Medium", 4: "High", 5: "Very High"}
return labels.get(score, "Unknown")
def get_attractiveness_label(score: float) -> str:
"""Get attractiveness interpretation."""
if score >= 4:
return "Highly Attractive"
elif score >= 3:
return "Moderately Attractive"
elif score >= 2:
return "Challenging"
else:
return "Unattractive"
@click.group()
def cli():
"""Competitive Analysis Toolkit - Porter's Five Forces & Profiling."""
pass
@cli.command('five-forces')
@click.option('--interactive', '-i', is_flag=True, help='Interactive mode with prompts')
@click.option('--supplier', '-sp', type=int, help='Supplier power (1-5)')
@click.option('--buyer', '-bp', type=int, help='Buyer power (1-5)')
@click.option('--substitutes', '-sub', type=int, help='Threat of substitutes (1-5)')
@click.option('--entrants', '-ent', type=int, help='Threat of new entrants (1-5)')
@click.option('--rivalry', '-riv', type=int, help='Competitive rivalry (1-5)')
def five_forces(
interactive: bool,
supplier: Optional[int],
buyer: Optional[int],
substitutes: Optional[int],
entrants: Optional[int],
rivalry: Optional[int]
):
"""Run Porter's Five Forces analysis.
Rate each force from 1 (low) to 5 (high).
Lower forces = more attractive industry.
"""
if interactive:
click.echo("\n Porter's Five Forces Analysis")
click.echo(" " + "=" * 50)
click.echo("\n Rate each force from 1 (Low) to 5 (High)")
click.echo(" Higher = stronger force = less attractive")
click.echo("")
# Supplier Power
click.echo(" SUPPLIER POWER")
click.echo(" (Ability of suppliers to raise prices or reduce quality)")
click.echo(" Factors: # of suppliers, switching costs, uniqueness")
supplier = click.prompt(" Score (1-5)", type=int, default=3)
# Buyer Power
click.echo("\n BUYER POWER")
click.echo(" (Ability of buyers to negotiate lower prices)")
click.echo(" Factors: # of buyers, switching costs, price sensitivity")
buyer = click.prompt(" Score (1-5)", type=int, default=3)
# Threat of Substitutes
click.echo("\n THREAT OF SUBSTITUTES")
click.echo(" (Availability of alternative solutions)")
click.echo(" Factors: Alternative products, switching costs, buyer propensity")
substitutes = click.prompt(" Score (1-5)", type=int, default=3)
# Threat of New Entrants
click.echo("\n THREAT OF NEW ENTRANTS")
click.echo(" (Ease of entering the market)")
click.echo(" Factors: Capital requirements, regulations, brand loyalty")
entrants = click.prompt(" Score (1-5)", type=int, default=3)
# Competitive Rivalry
click.echo("\n COMPETITIVE RIVALRY")
click.echo(" (Intensity of competition among existing firms)")
click.echo(" Factors: # of competitors, industry growth, differentiation")
rivalry = click.prompt(" Score (1-5)", type=int, default=3)
# Validate inputs
if not all([supplier, buyer, substitutes, entrants, rivalry]):
click.echo("Error: All five forces must be provided")
return
for name, val in [("supplier", supplier), ("buyer", buyer),
("substitutes", substitutes), ("entrants", entrants),
("rivalry", rivalry)]:
if not 1 <= val <= 5:
click.echo(f"Error: {name} must be between 1 and 5")
return
forces = FiveForces(
supplier_power=supplier,
buyer_power=buyer,
threat_of_substitutes=substitutes,
threat_of_new_entrants=entrants,
competitive_rivalry=rivalry,
overall_attractiveness=0
)
forces.overall_attractiveness = calculate_industry_attractiveness(forces)
# Generate recommendations
recommendations = []
if forces.supplier_power >= 4:
recommendations.append("Diversify suppliers or develop alternatives")
if forces.buyer_power >= 4:
recommendations.append("Increase switching costs or differentiate")
if forces.threat_of_substitutes >= 4:
recommendations.append("Emphasize unique value vs. substitutes")
if forces.threat_of_new_entrants >= 4:
recommendations.append("Build barriers: brand, patents, scale")
if forces.competitive_rivalry >= 4:
recommendations.append("Differentiate or find niche positioning")
# Display results
click.echo("\n " + "=" * 55)
click.echo(" FIVE FORCES ANALYSIS RESULTS")
click.echo(" " + "=" * 55)
click.echo(f"\n {'Force':<30} {'Score':<10} {'Level':<15}")
click.echo(" " + "-" * 55)
click.echo(f" {'Supplier Power':<30} {forces.supplier_power:<10} {get_force_label(forces.supplier_power):<15}")
click.echo(f" {'Buyer Power':<30} {forces.buyer_power:<10} {get_force_label(forces.buyer_power):<15}")
click.echo(f" {'Threat of Substitutes':<30} {forces.threat_of_substitutes:<10} {get_force_label(forces.threat_of_substitutes):<15}")
click.echo(f" {'Threat of New Entrants':<30} {forces.threat_of_new_entrants:<10} {get_force_label(forces.threat_of_new_entrants):<15}")
click.echo(f" {'Competitive Rivalry':<30} {forces.competitive_rivalry:<10} {get_force_label(forces.competitive_rivalry):<15}")
click.echo("\n " + "-" * 55)
click.echo(f" Industry Attractiveness: {forces.overall_attractiveness:.1f}/5.0")
click.echo(f" Assessment: {get_attractiveness_label(forces.overall_attractiveness)}")
if recommendations:
click.echo("\n Strategic Recommendations:")
for rec in recommendations:
click.echo(f" - {rec}")
# Visual representation
click.echo("\n Force Strength Visualization:")
for name, val in [("Suppliers", forces.supplier_power),
("Buyers", forces.buyer_power),
("Substitutes", forces.threat_of_substitutes),
("Entrants", forces.threat_of_new_entrants),
("Rivalry", forces.competitive_rivalry)]:
bar = "*" * val + "." * (5 - val)
click.echo(f" {name:<12} [{bar}] {val}/5")
@cli.command('profile')
@click.option('--name', '-n', required=True, help='Competitor name')
@click.option('--positioning', '-pos', default='', help='Positioning statement')
@click.option('--target', '-t', default='', help='Target market')
@click.option('--pricing', '-p', default='', help='Pricing info')
@click.option('--features', '-f', default='', help='Key features (comma-separated)')
@click.option('--strengths', '-s', default='', help='Strengths (comma-separated)')
@click.option('--weaknesses', '-w', default='', help='Weaknesses (comma-separated)')
@click.option('--differentiator', '-d', default='', help='Key differentiator')
@click.option('--output', '-o', type=click.Path(), help='Save to JSON file')
def profile(
name: str,
positioning: str,
target: str,
pricing: str,
features: str,
strengths: str,
weaknesses: str,
differentiator: str,
output: Optional[str]
):
"""Create a competitor profile."""
profile = CompetitorProfile(
name=name,
positioning=positioning,
target_market=target,
pricing=pricing,
features=[f.strip() for f in features.split(',') if f.strip()],
strengths=[s.strip() for s in strengths.split(',') if s.strip()],
weaknesses=[w.strip() for w in weaknesses.split(',') if w.strip()],
differentiator=differentiator
)
click.echo("\n " + "=" * 50)
click.echo(f" COMPETITOR PROFILE: {profile.name.upper()}")
click.echo(" " + "=" * 50)
if profile.positioning:
click.echo(f"\n Positioning: {profile.positioning}")
if profile.target_market:
click.echo(f" Target Market: {profile.target_market}")
if profile.pricing:
click.echo(f" Pricing: {profile.pricing}")
if profile.features:
click.echo("\n Key Features:")
for f in profile.features:
click.echo(f" - {f}")
if profile.strengths:
click.echo("\n Strengths:")
for s in profile.strengths:
click.echo(f" + {s}")
if profile.weaknesses:
click.echo("\n Weaknesses:")
for w in profile.weaknesses:
click.echo(f" - {w}")
if profile.differentiator:
click.echo(f"\n Key Differentiator: {profile.differentiator}")
if output:
data = {
'name': profile.name,
'positioning': profile.positioning,
'target_market': profile.target_market,
'pricing': profile.pricing,
'features': profile.features,
'strengths': profile.strengths,
'weaknesses': profile.weaknesses,
'differentiator': profile.differentiator
}
with open(output, 'w') as f:
json.dump(data, f, indent=2)
click.echo(f"\n Saved to: {output}")
@cli.command('matrix')
@click.argument('competitors_file', type=click.Path(exists=True), required=False)
@click.option('--feature', '-f', multiple=True, help='Features to compare')
def matrix(competitors_file: Optional[str], feature: tuple):
"""Generate competitive comparison matrix.
Provide a JSON file with array of competitor profiles.
"""
if not competitors_file:
click.echo("\n Competitive Matrix Template")
click.echo(" " + "=" * 50)
click.echo("\n Create a JSON file with this structure:")
click.echo("""
{
"competitors": [
{
"name": "Competitor A",
"pricing": "$99/mo",
"features": ["Feature 1", "Feature 2"],
"rating": 4.2
},
{
"name": "Competitor B",
"pricing": "$149/mo",
"features": ["Feature 1", "Feature 3"],
"rating": 4.5
}
],
"compare_features": ["Feature 1", "Feature 2", "Feature 3"]
}
""")
return
with open(competitors_file) as f:
data = json.load(f)
competitors = data.get('competitors', [])
compare_features = list(feature) if feature else data.get('compare_features', [])
if not competitors:
click.echo("No competitors found in file")
return
click.echo("\n " + "=" * 60)
click.echo(" COMPETITIVE COMPARISON MATRIX")
click.echo(" " + "=" * 60)
# Header
names = [c['name'][:15] for c in competitors]
header = f" {'Feature':<20}" + "".join(f"{n:<16}" for n in names)
click.echo(f"\n{header}")
click.echo(" " + "-" * (20 + 16 * len(competitors)))
# Pricing row
pricing_row = f" {'Pricing':<20}"
for c in competitors:
pricing_row += f"{c.get('pricing', 'N/A'):<16}"
click.echo(pricing_row)
# Feature rows
if compare_features:
for feat in compare_features:
row = f" {feat[:18]:<20}"
for c in competitors:
has_feature = feat in c.get('features', [])
row += f"{'Yes' if has_feature else 'No':<16}"
click.echo(row)
# Rating row if available
if any('rating' in c for c in competitors):
rating_row = f" {'Rating':<20}"
for c in competitors:
rating = c.get('rating', 'N/A')
rating_row += f"{rating:<16}"
click.echo(rating_row)
if __name__ == "__main__":
cli()
click>=8.0