Competitor Finder Skill

## Purpose

3,891 stars

Best use case

Competitor Finder Skill is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

## Purpose

Teams using Competitor Finder Skill should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/competitor-finder/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/adarshvmore/competitor-finder/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/competitor-finder/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Competitor Finder Skill Compares

Feature / AgentCompetitor Finder SkillStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

## Purpose

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Competitor Finder Skill

## Purpose
Identifies 3-5 competitors for a given brand by searching the web via SerpAPI and, as a last resort, falling back to a minimal OpenAI call. Returns competitor names, websites, and optionally the reason they are considered competitors. This collector feeds into the Marketing Audit Pipeline to populate the Competitor Landscape section of the final report.

## Input Schema
```typescript
// Function signature
collectCompetitors(brandName: string, domain?: string): Promise<CompetitorData>

// brandName: The brand name to find competitors for (e.g. "Gymshark")
// domain: Optional domain for additional context (e.g. "gymshark.com").
// Helps refine competitor search and filter out the brand itself from results.
```

## Output Schema
```typescript
interface CompetitorData {
 competitors: CompetitorEntry[]; // 3-5 competitor entries
 error?: string; // Present only when collector fails
}

interface CompetitorEntry {
 name: string; // e.g. "Nike"
 website: string; // e.g. "nike.com"
 reason?: string; // e.g. "Direct competitor in activewear market"
}
```

## API Dependencies

### Primary: SerpAPI
- **API Name:** SerpAPI (Google Search)
- **Endpoint:** `https://serpapi.com/search.json`
- **Auth:** `SERPAPI_KEY` environment variable
- **Cost estimate:** ~$0.005 per search
- **Rate limits:** Depends on plan; free tier allows 100 searches/month

### Secondary: DataForSEO
- **API Name:** DataForSEO Competitor Domain API
- **Endpoint:** `https://api.dataforseo.com/v3/dataforseo_labs/google/competitors_domain/live`
- **Auth:** `DATAFORSEO_LOGIN` + `DATAFORSEO_PASSWORD` environment variables
- **Cost estimate:** ~$0.01 per request
- **Rate limits:** Depends on plan; free tier allows 100 requests/month

### Fallback: OpenAI (minimal call)
- **API Name:** OpenAI API
- **Model:** `gpt-4.1-mini`
- **Auth:** `OPENAI_API_KEY` environment variable
- **Cost estimate:** ~$0.001 per call (minimal prompt)
- **Usage:** Only used when both SerpAPI and DataForSEO fail or return no results

## Implementation Pattern

### Data Flow
1. Receive `brandName` and optional `domain` from the pipeline
2. Attempt Method 1: SerpAPI search
3. If Method 1 fails or returns insufficient results, attempt Method 2: DataForSEO
4. If both fail, attempt Method 3: OpenAI fallback (minimal prompt)
5. Deduplicate and filter results (remove the brand itself)
6. Return 3-5 competitors mapped to `CompetitorData`

### Method 1: SerpAPI Search
```typescript
// Query: "top competitors of {brandName}"
{
 api_key: process.env.SERPAPI_KEY,
 engine: "google",
 q: `top competitors of ${brandName}`,
 num: 10
}
```
- Parse organic results to extract competitor brand names and domains
- Look for listicle-style results ("Top 10 Gymshark competitors...")
- Extract domain names from result URLs
- Filter out non-competitor results (news articles, the brand's own site)

### Method 2: DataForSEO Competitor Domain
```typescript
[{
 target: domain, // e.g. "gymshark.com"
 language_code: "en",
 location_code: 2840, // United States
 limit: 5
}]
```
- Returns domains that compete for the same keywords
- More accurate than SERP search but requires the domain parameter

### Method 3: OpenAI Fallback (Minimal)
```typescript
// ONLY used when Methods 1 and 2 both fail
// This is a MINIMAL prompt -- keep token usage as low as possible
const response = await openai.chat.completions.create({
 model: 'gpt-4.1-mini',
 max_tokens: 200,
 temperature: 0.3,
 messages: [
 {
 role: 'system',
 content: 'You are a marketing analyst. Return only a JSON array of competitor objects.'
 },
 {
 role: 'user',
 content: `List 5 direct competitors of "${brandName}"${domain ? ` (${domain})` : ''}. Return JSON: [{"name":"...","website":"...","reason":"..."}]`
 }
 ]
});
```
- Parse the JSON response
- This call costs ~$0.001 and should only happen when SERP/DataForSEO APIs are unavailable
- Log a warning when this fallback is used so it can be monitored

### Result Filtering
- Remove entries where the name or website matches the input brand
- Deduplicate by website domain (normalize: strip www, trailing slashes)
- Ensure each entry has both `name` and `website` populated
- Limit to 5 results maximum; aim for at least 3

## Error Handling
- Entire function wrapped in `try/catch`
- On failure of all three methods, return `EMPTY_COMPETITOR_DATA` with `error` field set:
 ```typescript
 return { ...EMPTY_COMPETITOR_DATA, error: 'Competitor data unavailable: <reason>' };
 ```
- Never throw -- always return a valid `CompetitorData` object
- Log errors with Winston logger including brandName and method that failed:
 ```typescript
 logger.error('Competitor collector failed', { brandName, domain, method, err });
 ```
- Log warnings when falling back to secondary/tertiary methods:
 ```typescript
 logger.warn('Competitor finder: SerpAPI failed, falling back to DataForSEO', { brandName });
 logger.warn('Competitor finder: DataForSEO failed, falling back to OpenAI', { brandName });
 ```
- Common failure scenarios:
 - SerpAPI key invalid or quota exhausted
 - DataForSEO credentials invalid or out of credits
 - OpenAI API key invalid
 - No competitors found for niche or unknown brand
 - Network timeout on any API

## Example Usage
```typescript
import { collectCompetitors } from '../collectors/competitorCollector';

// Successful collection (via SerpAPI)
const data = await collectCompetitors('Gymshark', 'gymshark.com');
// Returns:
// {
// competitors: [
// { name: "Nike", website: "nike.com", reason: "Global leader in athletic apparel" },
// { name: "Lululemon", website: "lululemon.com", reason: "Premium activewear competitor" },
// { name: "Under Armour", website: "underarmour.com", reason: "Direct competitor in gym wear" },
// { name: "Alphalete", website: "alphalete.com", reason: "DTC fitness apparel brand" },
// { name: "Fabletics", website: "fabletics.com", reason: "Subscription-based activewear" },
// ],
// }

// Partial result (only OpenAI fallback worked)
const partial = await collectCompetitors('ObscureBrand');
// Returns:
// {
// competitors: [
// { name: "CompetitorA", website: "competitora.com", reason: "Similar product category" },
// { name: "CompetitorB", website: "competitorb.com", reason: "Same target market" },
// { name: "CompetitorC", website: "competitorc.com" },
// ],
// }

// Failed collection (graceful degradation)
const failedData = await collectCompetitors('UnknownBrand');
// Returns:
// {
// competitors: [],
// error: "Competitor data unavailable: All methods failed"
// }
```

## Notes
- This collector uses a three-tier fallback strategy to maximize data availability. SerpAPI is preferred because it provides real SERP data. DataForSEO provides keyword-overlap-based competitors. OpenAI is a last resort.
- The OpenAI fallback is the ONLY place outside of `reportGenerator.ts` where an AI model call is permitted. It must be minimal (max 200 tokens) and should be logged as a warning for cost monitoring.
- When the input type is `'instagram'` (no domain available), skip Method 2 (DataForSEO requires a domain) and rely on Methods 1 and 3.
- The `EMPTY_COMPETITOR_DATA` constant is defined in `src/types/audit.types.ts` and should be imported for fallback returns.
- Competitor data is inherently subjective. The report generator (GPT-4.1-mini) will contextualize the raw competitor list into strategic analysis.
- This collector must never block the pipeline. Even a complete failure returns valid typed data with an error flag.

Related Skills

Competitor Monitor

3891
from openclaw/skills

Tracks and analyzes competitor moves — pricing changes, feature launches, hiring, and positioning shifts

Data & Research

competitor-watch

3891
from openclaw/skills

Know what your competitors ship before their customers do. Automated monitoring of competitor websites, product pages, pricing, content, and social presence. Detects changes, extracts new features, tracks pricing updates, and alerts you with digestible summaries. Your agent watches the competition 24/7 so you can focus on building. Configure competitor tiers (fierce rivals get deep monitoring, adjacents get high-level), set check frequency, define alert thresholds, and receive smart diffs highlighting what actually matters. Use when setting up competitive intelligence, tracking product launches, monitoring pricing changes, or staying ahead of market moves.

expert-finder

3891
from openclaw/skills

Find domain experts, thought leaders, and subject-matter authorities on any topic. Searches Twitter and Reddit for people who demonstrate deep knowledge, frequent discussion, and above-average expertise in a specific field. Expert discovery, talent sourcing, researcher identification, and KOL (Key Opinion Leader) mapping.

ReferralCodes Referral & Referrals Finder

3891
from openclaw/skills

## Description

fzf-fuzzy-finder

3891
from openclaw/skills

Command-line fuzzy finder for interactive filtering and selection - integrates with shell, vim, and other tools.

citation-finder

3891
from openclaw/skills

Academic citation lookup and formatter. Given a fuzzy paper title (Chinese or English), searches CrossRef, Semantic Scholar, Baidu Scholar, and CNKI, then returns GB/T 7714, APA 7th, and MLA 9th formatted citations with source links.

dataset-finder

3891
from openclaw/skills

Use this skill when users need to search for datasets, download data files, or explore data repositories. Triggers include: requests to "find datasets", "search for data", "download dataset from Kaggle", "get data from Hugging Face", "find ML datasets", or mentions of data repositories like Kaggle, UCI ML Repository, Data.gov, or Hugging Face. Also use for previewing dataset statistics, generating data cards, or discovering datasets for machine learning projects. Requires OpenClawCLI installation from clawhub.ai.

edgefinder-cli

3891
from openclaw/skills

Use the EdgeFinder CLI for NFL and NBA analysis, schedules, standings, Polymarket odds, and portfolio lookups from the terminal.

competitor-alternatives

3891
from openclaw/skills

When the user wants to create competitor comparison or alternative pages for SEO and sales enablement. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' 'competitive landing pages,' 'switch from competitor,' or 'comparison content.' Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. Emphasizes deep research, modular content architecture, and varied section types beyond feature tables.

cross-disciplinary-bridge-finder

3891
from openclaw/skills

Use when identifying collaboration opportunities across fields, finding experts in complementary disciplines, translating methodologies between scientific domains, or building interdisciplinary research teams. Identifies synergies between scientific disciplines, matches researchers with complementary expertise, and facilitates cross-domain collaborations. Supports interdisciplinary grant applications and innovative research team formation.

competitor-trial-monitor

3891
from openclaw/skills

Monitor competitor clinical trial progress and alert on market risks

meow-finder

3891
from openclaw/skills

CLI tool to discover AI tools. Search 40+ curated tools by category, pricing, and use case.