Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Strategy Skill

Agentic market research → strategy document with citations. Scrapes 9 real sources, extracts signals, clusters themes, synthesizes a Playing-to-Win strategy, scores it on two layers, and generates a professional HTML report.

Built as a Claude Code skill (/strategy). Turns "give me a strategy for X" into a citation-backed 5-section strategy document in ~10-15 minutes.


What it does

Input: a topic (e.g., ai_agents, fintech_payments, pg_affiliate_program) + optional business context.

Output: a self-contained HTML file with:

  • Dashboard — sources scraped, raw items fetched, signals extracted, themes/cited
  • Dual-layer score — Layer A (objective verification, 8 metrics) + Layer B (expert panel simulation, 7 dimensions)
  • Strategy tab — full Playing to Win strategy with inline [N] citations
  • Evidence tab — every cited theme with source quotes, URLs, and backlinks
  • Interactive drawer — click any citation → see the underlying evidence

Pipeline (7 steps)

[1] INTAKE    → clarify topic, keywords, target subreddits/repos
[2] SCRAPE    → 9 sources via WebSearch + WebFetch + gh CLI
[3] EXTRACT   → Claude reads raw items, extracts structured signals
[4] CLUSTER   → group signals into themes by semantic similarity
[5] SYNTHESIZE → write full strategy using Playing to Win with [N] citations
[6] SCORE     → Layer A (objective) + Layer B (expert panel)
[7] GENERATE  → assemble HTML report with evidence panel + interactive drawer

9 Source Adapters

Source Method What it captures
Reddit WebSearch + WebFetch Practitioner pain, workarounds, sentiment
GitHub Issues gh search issues Technical failures, framework bugs
Stack Overflow WebSearch + WebFetch Integration problems, doc gaps
Clutch WebSearch + WebFetch Service buyer expectations, reviews
Job postings (Indeed/LinkedIn) WebSearch + WebFetch Hiring demand, skill gaps, market investment
Hugging Face Forum WebSearch + WebFetch ML/AI community needs
YouTube WebSearch + WebFetch Content trends, practitioner education
OpenAI Forum WebSearch + WebFetch Production reliability, model feedback
Custom URLs WebFetch Competitor pages, reports, user-provided

Strategy Framework: Playing to Win

5-section adaptation of A.G. Lafley & Roger Martin's framework:

  • WHERE TO PLAY — customer segment, problem space, geography, value chain, scope
  • HOW TO WIN — value proposition, capability system, pricing, differentiation
  • WHAT MUST BE TRUE — falsifiable assumptions with tripwires + review dates
  • THE FLYWHEEL — reinforcing loop with named nodes, mechanisms, and break conditions
  • STRATEGIC CHOICES LOG — decisions, rejected alternatives, rationale

See docs/playing-to-win-framework.md for the full template.

Scoring

Layer A — Objective Verification (programmatic)

cross_source_validation · source_coverage · recency · counter_signal_ratio · specificity · citation_verifiability · citation_chain · signal_saturation

Layer B — Expert Panel (Claude-as-evaluator)

where_to_play · how_to_win · what_must_be_true · coherence · flywheel · falsifiability · competitor_test

See skill/scoring.md for thresholds, weights, and rubrics.

Repo structure

strategy-skill-repo/
├── README.md                                # This file
├── LICENSE
├── skill/
│   ├── SKILL.md                             # Main skill: full pipeline orchestration
│   ├── framework.md                         # Playing to Win template
│   └── scoring.md                           # Layer A + Layer B rubrics
├── templates/
│   └── report_template.html                 # HTML output template with tabs + drawer
├── examples/
│   └── pg_affiliate_program-strategy.html   # Sample strategy for Cashfree PG affiliate program
└── docs/
    ├── pipeline-architecture.md             # Full pipeline design notes
    └── playing-to-win-framework.md          # Framework adaptation notes

Install (as a Claude Code skill)

# 1. Clone this repo
git clone https://github.com/mothivenkatesh/strategy-skill.git

# 2. Copy the skill into your Claude Code skills directory
cp -r strategy-skill/skill ~/.claude/skills/strategy

# 3. Copy the HTML template
mkdir -p ~/strategy-agent
cp strategy-skill/templates/report_template.html ~/strategy-agent/report_template.html

# 4. Register the skill in ~/.claude/CLAUDE.md:
cat >> ~/.claude/CLAUDE.md <<'EOF'

# strategy
- **strategy** (`~/.claude/skills/strategy/SKILL.md`) - Agentic market research → strategy document with citations. Trigger: `/strategy`
When the user types `/strategy`, invoke the Skill tool with `skill: "strategy"` before doing anything else.
EOF

Usage

In any Claude Code session:

/strategy ai_agents
/strategy pg_affiliate_program
/strategy developer_tools

Claude will:

  1. Clarify the topic, keywords, target subreddits/repos
  2. Scrape 9 sources (~5-10 minutes)
  3. Extract signals, cluster into themes
  4. Write the strategy document with citations
  5. Score it on both layers
  6. Generate the HTML report at ~/strategy-agent/output/{topic}-strategy.html

State is saved to ~/strategy-agent/state/{topic}/ — so you can resume from any step if interrupted.

Example output

See examples/pg_affiliate_program-strategy.html — a full strategy for scaling Cashfree Payments' PG affiliate program, covering:

  • 5 partner segments (agencies P0, SaaS platforms, freelancers, influencers, accelerators)
  • Tiered commission structure (0.25% → 0.40%)
  • 30-day activation sprint
  • Multi-product upsell flywheel (payouts, international, one-click checkout)
  • Counter-Razorpay flanking via Tier 2/3 cities
  • 7 falsifiable assumptions with tripwires
  • 20 cited evidence themes with source URLs

Layer A score: 0.72 · Layer B score: 0.71

Design principles

  1. Claude IS the analyzer — no separate scraping infrastructure. WebSearch + WebFetch + gh CLI are the scrapers; Claude does the synthesis.
  2. Every claim cites evidence — no hand-waving. Full audit trail from claim → citation → theme → signal → source URL.
  3. Falsifiable assumptions — strategy only works if it can be proven wrong. Every assumption has a tripwire.
  4. Self-contained output — single HTML file with inlined CSS/JS. Shareable, printable, works offline.
  5. State is resumable — raw/signals/themes/strategy/scores saved at each step.

Acknowledgements

  • Strategy framework: A.G. Lafley & Roger Martin, Playing to Win
  • Reference document: strategy.html from an earlier agentic research pipeline
  • Built with Claude Code

License

MIT — see LICENSE.

About

Agentic market research → strategy document with citations. Claude Code skill that scrapes 9 sources, clusters signals, synthesizes a Playing-to-Win strategy, scores it, and generates a professional HTML report.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages