Research company
Company discovery and deep research skill. Researches a company's product and ICP, discovers target companies to sell to using Serper.dev (Google SERP) for search and browser-use (Playwright) for page extraction, deeply researches each using a Plan→Research→Synthesize pattern, and scores ICP fit — compiled into a scored research report and CSV. Supports depth modes (quick/deep/deeper) for balancing scale vs intelligence. Falls back to Claude's built-in WebSearch+WebFetch when local tooling isn't available.From its SKILL.md
npx -y skills add tosi-n/research-company --skill research-companyAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
19.7 KB, as published. Nobody here has run it
Company Research
Discover and deeply research companies to sell to. Uses Serper.dev for Google-grade search and browser-use (Playwright under the hood) for page extraction — including JS-rendered SPAs. Outputs a scored research report and CSV.
Required for the primary path:
- Python 3.10+
browser-usePython package (pip install -r requirements.txt)- Chromium binary (
python3 -m playwright install chromium) SERPER_API_KEYset in~/.config/research-company/.env
If any of these is missing, the skill falls back to Claude's built-in WebSearch + WebFetch + Write tools — see Fallback Path: Web Tools at the bottom.
Configuration file: API keys live in ~/.config/research-company/.env so the skill stays portable when deployed elsewhere. See .env.example at the skill root for the format and one-liner setup. The Node loader is scripts/_env.mjs; the Python equivalent is inlined in scripts/extract_page_browser_use.py. Existing shell environment variables always override the file.
First-run setup: On the first run you'll be prompted to approve python3, node, cat, mkdir, rm, etc. Select "Yes, and don't ask again for: python3:*" (or equivalent) for each to auto-approve for the session. To permanently approve, add these to your ~/.claude/settings.json under permissions.allow:
"Bash(node:*)", "Bash(python3:*)", "Bash(curl:*)",
"Bash(cat:*)", "Bash(mkdir:*)", "Bash(rm:*)", "Bash(head:*)", "Bash(tr:*)", "Bash(sed:*)"
Path rules: Always use the full literal path in all Bash commands — NOT ~ or $HOME (both trigger "shell expansion syntax" approval prompts). Resolve the home directory once and use it everywhere. When constructing subagent prompts, replace {SKILL_DIR} with the full literal path.
Output directory: All research output goes to ~/Desktop/{company_slug}_research_{YYYY-MM-DD}/. This directory contains one .md file per researched company plus a final .csv. The user gets both the scored spreadsheet and the full research files on their Desktop.
CRITICAL — Tool restrictions (applies to main agent AND all subagents on the primary path):
- All web searches:
node {SKILL_DIR}/scripts/search_serper.mjs "..." --num-results N --output FILE. NEVER use WebSearch (unless on the Fallback Path). - All page content extraction:
node {SKILL_DIR}/scripts/extract_page.mjs "<url>"(this is a Node shim that forwards toextract_page_browser_use.py— browser-use + Playwright). It returns a structuredURL/FETCH_OK/TITLE/META_DESCRIPTION/.../BODYblock. NEVER use WebFetch (unless on the Fallback Path). - All research output: subagents write one markdown file per company to
{OUTPUT_DIR}/{company-slug}.mdusing bash heredoc. NEVER use the Write tool (unless on the Fallback Path). Seereferences/example-research.mdfor the file format. - Report + CSV compilation: use
node {SKILL_DIR}/scripts/compile_report.mjs {OUTPUT_DIR} --open— generates HTML report and CSV in one step, opens overview in browser. - URL deduplication: use
node {SKILL_DIR}/scripts/list_urls.mjs /tmpafter discovery. - Subagents must use ONLY the Bash tool. No other tools allowed (unless on the Fallback Path).
- Main agent NEVER reads raw discovery JSON batch files. Use
list_urls.mjsfor dedup.
CRITICAL — Anti-hallucination rules (applies to main agent AND all subagents):
- NEVER infer
product_description,industry, ortarget_audiencefrom a site's fonts, framework (Framer/Next.js/React), design system, or typography. These are cosmetic and say nothing about what the company sells. - NEVER let the user's own ICP leak into a target's description. If you don't know what the target does, write
Unknown— do not pattern-match them onto the ICP. product_descriptionMUST quote or paraphrase a specific phrase fromextract_page.mjsoutput (TITLE, META_DESCRIPTION, OG_DESCRIPTION, HEADINGS, or BODY). If none of those fields yield a recognizable product statement, writeUnknown — homepage content not accessible.- If
product_descriptionisUnknown, capicp_fit_scoreat 3 and seticp_fit_reasoningtoInsufficient evidence — homepage returned no readable content.
CRITICAL — Minimize permission prompts:
- Subagents MUST batch ALL file writes into a SINGLE Bash call using chained heredocs. One Bash call = one permission prompt.
- Batch ALL searches and ALL fetches into single Bash calls using
&&chaining.
Pipeline Overview
Follow these 5 steps in order. Do not skip steps or reorder.
- Company Research — Deeply understand the user's company, product, and who they sell to
- Depth Mode Selection — Choose research depth based on how many targets they want
- Discovery — Find target companies using diverse search queries
- Deep Research & Scoring — Research each company, score ICP fit
- Report & CSV — Present findings, compile scored CSV
Run Step 0.5 (Preflight) before Step 1 to detect which adapters are available.
Step 0: Setup Output Directory
Before starting, create the output directory on the user's Desktop:
OUTPUT_DIR=~/Desktop/{company_slug}_research_{YYYY-MM-DD}
mkdir -p "$OUTPUT_DIR"
Replace {company_slug} with the user's company name (lowercase, hyphenated) and {YYYY-MM-DD} with today's date. Pass {OUTPUT_DIR} (as a full literal path, not with ~) to all subagent prompts so they write research files there.
Also clean up discovery batch files from prior runs:
rm -f /tmp/company_discovery_batch_*.json
Step 0.5: Preflight Check (detects which path to take)
Before Step 1, run the preflight script. It loads ~/.config/research-company/.env, probes for bash, node, python3, browser-use, SERPER_API_KEY, and the validity of cwd, then prints a JSON capability map.
node {SKILL_DIR}/scripts/preflight.mjs
Sample output:
{
"node_version": "v22.14.0",
"bash_works": true,
"python3_works": true,
"python3_version": "Python 3.12.4",
"cwd_valid": true,
"browser_use_installed": true,
"serper_api_key_set": true,
"recommended_path": "primary",
"reasons": []
}
recommended_path values (priority order, best first):
| Path | When | Adapter |
|---|---|---|
primary | Python + browser-use + SERPER_API_KEY all available | Canonical pipeline: search_serper.mjs for search, extract_page.mjs (→ extract_page_browser_use.py) for fetch+browse. |
web_tools | Bash works but stack incomplete (e.g., missing Serper key, no browser-use) | Subagents use WebSearch + WebFetch + Write. See references/fallback-research.md. |
write_only | Bash unusable (cwd missing or permission lockdown) OR node unavailable | Don't spawn Bash. Use Read + Write + WebSearch + WebFetch only. See references/fallback-research.md for research and references/fallback-compile.md for compile. |
It is the main agent's job to inspect preflight output and announce which path it is taking before Step 1. This produces a deterministic experience: when one path can't run, the user gets the same artifacts via the next-best path, not a stuck session.
Step 1: Deep Company Research
This is the most important step. The quality of everything downstream depends on deeply understanding the user's company.
-
Ask the user for their company name or URL
-
Check for an existing profile:
- List files in
{SKILL_DIR}/profiles/(ignoreexample.json) - If a matching profile exists → load it, present to user: "I have your profile from {researched_at}. Still accurate?" If yes → skip to Step 2.
- If no profile exists → proceed with deep research below.
- List files in
-
Run a full deep research on the user's company using the Plan→Research→Synthesize pattern. See
references/research-patterns.mdfor sub-question templates and research methodology.Key research steps:
- Search:
node {SKILL_DIR}/scripts/search_serper.mjs "{company name}" --num-results 10 - Fetch homepage:
node {SKILL_DIR}/scripts/extract_page.mjs "{company website}" - Discover site pages via sitemap (do NOT hardcode paths like
/aboutor/customers):curl -sL "{company website}/sitemap.xml"— sitemap is a small XML file, plain HTTP fetch is fine- Scan for URLs with keywords:
customer,case-stud,pricing,about,use-case,industry,solution - Optionally also
curl -sL "{company website}/llms.txt"for page descriptions - Pick 3-5 most relevant URLs and extract with
extract_page.mjs(NOT rawcurl)
- Search for external context and competitors
- Accumulate findings with confidence levels
Synthesize into a profile: Company, Product, Existing Customers, Competitors, Use Cases. Do NOT include ICP or sub-verticals — those are per-run decisions.
- Search:
-
Present the profile to the user for confirmation. Do not proceed until confirmed.
-
Save the confirmed profile to
{SKILL_DIR}/profiles/{company-slug}.json -
Ask clarifying questions using
AskUserQuestionwith checkboxes:- "Which segments are you targeting?" with options derived from the company research
- "Company stage?" — Startups, Mid-market, Enterprise, All
- "How many companies / depth?" — Quick (~100), Deep (~50), Deeper (~25)
- This is the ONLY user interaction. After this, execute silently until results are ready.
Step 2: Depth Mode Selection
| Mode | Research per company | Best for |
|---|---|---|
quick | Homepage + 1-2 searches | ~100 companies, broad scan |
deep | 2-3 sub-questions, 5-8 tool calls | ~50 companies, solid research |
deeper | 4-5 sub-questions, 10-15 tool calls | ~25 companies, full intelligence |
Step 3: Discovery
Formula: ceil(requested_companies / 35) search queries needed. Over-discover by ~2-3x because filtering typically drops 50-70%.
Generate search queries with these patterns:
- Industry + company stage + geography ("fintech startups series A Bay Area")
- Technology stack + use case ("companies using Selenium for web scraping")
- Competitor adjacency ("alternatives to {known company in ICP}")
- Buyer persona + pain point ("engineering teams struggling with browser automation")
Process:
- Launch ALL discovery subagents at once (up to ~6 per message). Each runs its queries in a SINGLE Bash call:
node {SKILL_DIR}/scripts/search_serper.mjs "{query}" --num-results 25 --output /tmp/company_discovery_batch_{N}.json - After all waves complete, deduplicate:
node {SKILL_DIR}/scripts/list_urls.mjs /tmp - Filter the URL list — remove:
- Blog posts, news articles (globenewswire.com, techcrunch.com, etc.)
- Directories/aggregators (tracxn.com, crunchbase.com, g2.com)
- The user's own competitors and existing customers (from profile) Keep only company homepages.
See references/workflow.md for subagent prompt templates and wave management.
Step 4: Deep Research & Scoring
Launch subagents to research companies in parallel. See references/workflow.md for the enrichment subagent prompt template. See references/research-patterns.md for the full research methodology.
Process:
-
Split filtered URLs into groups per subagent (quick: ~10, deep: ~5, deeper: ~2-3)
-
Launch ALL enrichment subagents at once (up to ~6 per message)
-
Each subagent uses ONLY Bash — for each company:
Phase A — Plan (skip in quick mode): Decompose into 2-5 sub-questions based on ICP and enrichment fields.
Phase B — Research Loop: Search and fetch pages, extract findings. Respect step budget (quick: 2-3, deep: 5-8, deeper: 10-15).
Phase C — Synthesize: Score ICP fit 1-10 with evidence. Fill enrichment fields from findings.
-
Subagents write ALL markdown files in a SINGLE Bash call using chained heredocs to
{OUTPUT_DIR}/ -
After ALL subagents complete, proceed to Step 5
Critical: Include the confirmed ICP description verbatim in every subagent prompt. Pass the full literal {OUTPUT_DIR} path to every subagent.
Step 5: Report & CSV
-
Generate HTML report + CSV (opens overview in browser automatically):
node {SKILL_DIR}/scripts/compile_report.mjs {OUTPUT_DIR} --openThis generates:
{OUTPUT_DIR}/index.html— overview page with scored table (opens in browser){OUTPUT_DIR}/companies/*.html— individual company pages (linked from overview){OUTPUT_DIR}/results.csv— scored spreadsheet for import into sheets/CRM
-
Present a summary in chat too:
## Company Research Complete
- **Total companies researched**: {count}
- **Depth mode**: {mode}
- **Score distribution**:
- Strong fit (8-10): {count}
- Partial fit (5-7): {count}
- Weak fit (1-4): {count}
- **Report opened in browser**: ~/Desktop/{company_slug}_research_{date}/index.html
- Show the top companies sorted by ICP score in a table:
| Company | Score | Product | Industry | Fit Reasoning |
|---------|-------|---------|----------|---------------|
| Acme | 9 | AI inventory management | E-commerce SaaS | Series A, uses Selenium, expanding to EU |
- For the top 3-5 companies, show a brief research summary — key findings, why they're a good fit, and what specific angle to approach them with.
Offer to dig deeper into specific companies, adjust scoring criteria, or re-run discovery with different queries.
Fallback Path: Web Tools (when the local stack is incomplete)
Trigger: preflight.mjs reports recommended_path: "web_tools".
The pipeline shape stays the same. Only the adapters change. Steps 0, 1, 2, 3, 4, 5 still run in order. The main agent and its subagents swap their tool calls as follows:
| Primary path | Web-tools fallback |
|---|---|
node search_serper.mjs "..." | WebSearch tool with the same query |
curl -sL URL (sitemap.xml, robots.txt, llms.txt) | WebFetch with a prompt asking for the raw text |
node extract_page.mjs URL | WebFetch with a prompt extracting (1) product description, (2) target audience, (3) key features, (4) funding/employees/HQ, (5) any pain signals — quote real text |
Bash heredoc to write .md files | Write tool, one call per file |
node compile_report.mjs OUTPUT_DIR --open | See Fallback Compile below |
See references/fallback-research.md for the fallback subagent prompt that uses WebSearch + WebFetch + Write. The anti-hallucination rules are the same. The output file format (.md with YAML frontmatter) is identical.
When subagents are launched on the web-tools fallback:
- Each subagent must be given explicit permission in its prompt to use
WebSearch,WebFetch, andWrite. Do NOT tell them "use only Bash" — that constraint comes from the primary path. - If a subagent reports that
WebFetchwas permission-denied for a target domain, instruct it to fall back toWebSearchwith the company name + relevant keywords and quote findings from search-result snippets. Capicp_fit_scoreat 5 if no real homepage content was retrieved.
Fallback Path: Write-Only (when Bash is unavailable)
Trigger: preflight.mjs reports recommended_path: "write_only", OR any Bash call returns Working directory ... no longer exists. Please restart Claude from an existing directory., OR node is unavailable.
In this mode the main agent does not spawn Bash and does not invoke node. It uses only Read, Write, WebSearch, WebFetch, and the Agent tool to spawn subagents that themselves use only Read, Write, WebSearch, WebFetch.
Setup:
- Skip
mkdir -p— instead, the firstWritecall against~/Desktop/{company_slug}_research_{YYYY-MM-DD}/{slug}.mdcreates the directory implicitly.
Discovery:
- Use
WebSearchdirectly. Skiplist_urls.mjs(it requires Node + Bash). Instead, dedupe URLs in your own context as you accumulate them.
Research:
- Use the
references/fallback-research.mdsubagent prompt. Subagents useWebSearch+WebFetchfor input andWritefor each.mdfile.
Compile:
- Skip
compile_report.mjs. Followreferences/fallback-compile.md: read every.mdfile withRead, parse the YAML frontmatter, sort byicp_fit_scoredescending, thenWritetwo files —index.html(using thereferences/report-template.htmltemplate with{{TABLE_ROWS}}substituted) andresults.csv. Per-company sub-pages are optional — generate them only if the user asks, since they require reading every full body.
The deliverables on disk are identical to the primary path: index.html, companies/*.html (optional in this mode), results.csv, and one .md per company.
Adapter contract (for tool swaps)
Any search/fetch backend that satisfies this contract can drop into the pipeline without rewriting subagent prompts:
| Capability | Input | Output |
|---|---|---|
search(query, num_results) | string, int | array of {url, title, snippet?} (matched by search_serper.mjs) |
fetch_text(url) | string | string (visible body text, ≤ 3000 chars by default) |
fetch_meta(url) | string | object {title, meta_description, og_title, og_description, headings[]} |
browse_rendered(url) | string | string (markdown of fully-rendered page; only required when fetch_text returns thin content) |
Reference implementations included in this skill:
| Backend | Search | Fetch + Browse |
|---|---|---|
| browser-use + Serper (primary) | scripts/search_serper.mjs | scripts/extract_page_browser_use.py (Playwright, always renders) |
| Claude built-ins (fallback 1) | WebSearch tool | WebFetch (LLM extraction) |
| Read+Write only (fallback 2) | n/a — discovery skipped | Read-existing files only |
Future swap-ins (Tavily, Brave, Exa, Puppeteer direct, Stagehand) only need to satisfy the search / fetch_text / fetch_meta / browse_rendered shape.
File map
{SKILL_DIR}/
├── SKILL.md (this file)
├── .env.example (template — copy to ~/.config/research-company/.env)
├── requirements.txt (Python deps for the primary path)
├── references/
│ ├── example-research.md (per-company .md template)
│ ├── report-template.html (HTML report template, used by compile)
│ ├── research-patterns.md (Plan→Research→Synthesize methodology)
│ ├── workflow.md (subagent prompts + wave management)
│ ├── fallback-research.md (web-tools subagent prompt)
│ └── fallback-compile.md (manual compile via Read+Write)
├── scripts/
│ ├── _env.mjs (loads ~/.config/research-company/.env into Node env)
│ ├── preflight.mjs (capability detection — picks the recommended_path)
│ ├── search_serper.mjs (Serper.dev adapter)
│ ├── extract_page.mjs (Node shim that forwards to the Python script)
│ ├── extract_page_browser_use.py (page extraction via browser-use / Playwright)
│ ├── list_urls.mjs (discovery URL dedup)
│ └── compile_report.mjs (HTML+CSV compile via Node)
└── profiles/
└── example.json (profile schema)