A Claude Code plugin that runs a weekly competitive intelligence pipeline — scrapes LinkedIn posts, scans news and sitemaps, writes a structured brief, and emails it to you every Monday morning.
Built with Claude Code, Apify, and Gmail.
claude plugin add github:KrishanuB26/competitive-intelThen follow the configuration steps below to add your API keys and competitors.
Every week it automatically:
- Scrapes your competitors' LinkedIn company pages for recent posts
- Searches Google News and checks competitor sitemaps for pages published in the last 7 days
- Crawls the most relevant pages for full content
- Writes a structured competitive brief with exec summary, competitor snapshots, opportunities & threats, and recommended actions
- Emails the brief to you with clean formatting
.claude/
agents/
linkedin-researcher.md # Scrapes LinkedIn posts, returns structured JSON
news-scanner.md # Google search + sitemap check + targeted crawl
brief-writer.md # Synthesizes findings into Markdown brief
commands/
run-intel.md # /run-intel — triggers the full pipeline
skills/
competitive-analysis.md # Auto-activates on competitor-related questions
settings.json # MCP server config
mcp/apify/
index.js # MCP server — exposes 5 tools to Claude
package.json
competitors.json # Your competitor list (edit this)
scripts/
weekly-run.sh # Cron script for automated Monday runs
| Tool | What it does |
|---|---|
linkedin_posts |
Scrapes a company's LinkedIn posts via Apify |
check_sitemap |
Fetches sitemap.xml and filters URLs by publish date — fast, no Apify |
crawl_website |
Full-page text extraction via Apify browser crawler |
google_search |
Google search via Apify or SerpAPI |
send_email |
Sends the brief as a styled HTML email via Gmail |
- Claude Code installed
- Apify account (free tier works)
- Gmail account with an App Password generated
git clone https://github.com/KrishanuB26/competitive-intel.git
cd competitive-intelcd mcp/apify && npm installAdd to your ~/.zshrc (or ~/.bashrc):
export APIFY_TOKEN="apify_api_your_token_here"
export GMAIL_USER="you@gmail.com"
export GMAIL_APP_PASSWORD="xxxx xxxx xxxx xxxx"Then reload: source ~/.zshrc
Gmail App Password: Go to myaccount.google.com/apppasswords → create one named "competitive-intel". Use this instead of your real password.
claude mcp add apify node "/absolute/path/to/competitive-intel/mcp/apify/index.js" \
-e APIFY_TOKEN=$APIFY_TOKEN \
-e GMAIL_USER=$GMAIL_USER \
-e GMAIL_APP_PASSWORD=$GMAIL_APP_PASSWORDEdit competitors.json:
{
"competitors": [
{
"name": "Acme Corp",
"domain": "acmecorp.com",
"linkedin": "https://www.linkedin.com/company/acme-corp"
}
]
}Find a company's LinkedIn URL by going to their LinkedIn page and copying the URL from the browser.
Open Claude Code in this directory and run:
/run-intel
# Make the script executable
chmod +x scripts/weekly-run.sh
# Add to crontab — runs every Monday at 9am
(crontab -l; echo "0 9 * * 1 /absolute/path/to/competitive-intel/scripts/weekly-run.sh") | crontab -Check logs at scripts/run.log.
In a Claude Code session in this directory:
/run-intel
Asks for time window, focus area, and output format then runs the full pipeline.
The skill activates automatically when you ask competitor-related questions:
What is HubSpot doing in AI this week?
What are our competitors announcing?
Compare Salesforce vs HubSpot on pricing
Once the cron job is set up, you'll receive a brief every Monday morning without doing anything.
The brief is saved to output/brief-YYYY-MM-DD-to-YYYY-MM-DD.md and emailed with this structure:
- Executive Summary — 3–5 specific, evidence-backed bullets
- Competitor Snapshots — activity level, positioning shift, notable moves, watch items
- Cross-Competitor Themes — category-level signals across all competitors
- Opportunities & Threats — grounded in the week's evidence
- Recommended Actions — this week and this quarter
- Sources — every URL cited
| Variable | Required | Description |
|---|---|---|
APIFY_TOKEN |
Yes | Apify API token — get one here |
GMAIL_USER |
Yes | Your Gmail address |
GMAIL_APP_PASSWORD |
Yes | Gmail App Password (not your real password) |
SERP_API_KEY |
No | SerpAPI key — improves Google search quality |
Anyone with Claude Code can install it with one command:
claude plugin add github:KrishanuB26/competitive-intelThen each person:
- Sets their own API keys (Apify + Gmail)
- Edits
competitors.jsonwith their companies - Runs
/run-intelor sets up the weekly cron
Or nominate one person to run it and forward the weekly email to the team.
- Claude Code — AI agents and orchestration
- Apify — LinkedIn scraping, website crawling, Google search
- harvestapi/linkedin-company-posts — LinkedIn actor (no cookies required)
- nodemailer — email delivery