Competitors Analysis
Build competitor intelligence that can be shared, re-run, and audited later. This skill has two layers:
- Repository evidence: clone or update the competitor code under the durable competitors workspace, then cite facts from actual files and commits.
- Landscape synthesis: explain which product choices the evidence changes, including trade-offs and what would overturn the judgment. Keep positioning, pricing, strengths and gaps as supporting evidence.
This skill intentionally subsumes lightweight "competitor scan" workflows. A scan is useful for the landscape table, but it is not enough for technical conclusions.
Resolve the analysis target (read this first)
The executing agent resolves two separate inputs: the repository to analyze and the our-product context used for comparison. A repository URL identifies the first; a separately typed product name is not required to profile it.
- Honor the current request's explicit product/market and exclusions first. If the caller requests a standalone profile, do not add an our-product comparison.
- Otherwise, read the current project's
AGENTS.md/CLAUDE.mdand follow its product-contract or research entry to confirm the product and analysis scope. The caller's current project is valid context for this invocation. A directory basename alone is not enough; record the authoritative file used to identify it. A delegated caller should pass the project path and relevant entry when available. - A supplied repository URL without a confirmed our-product context selects a standalone Profile. Continue repository analysis; omit comparison and opportunities specific to our product. A missing customer segment does not block code facts or sourced positioning from the repository's own docs.
- For Discover or Landscape, use the explicit request or confirmed current project to establish the scope. If comparison context remains unknown, complete any supplied repository profiles and report the exact missing context to the caller. An interactive host may ask only for the unresolved comparison input; a noninteractive fork reports it without blocking independent profiles.
Stop only when neither an analysis target nor an actionable current-project
scope is available. Report that missing input to the caller. Do not invent a
task, browse $COMPETITORS_BASE to choose an unrelated product, or start discovery
from a self-generated market. A fork receiving neither a task request nor
caller-bound project scope must stop; its inability to ask is not a reason to
reject a supplied repository URL.
Entry Router
Resolve scope above before selecting a mode. A bare repository URL selects Profile, using the confirmed current project for comparison when available. Known competitors are optional for a scoped Discover request.
Use the user's wording to choose the path:
Durable Source Layout
Use a durable workspace, not /tmp. The default base is:
Directory convention:
Use owner-repo for GitHub repositories so forks and similarly named projects do
not collide. Derive product-slug from the explicitly named or authoritatively
confirmed current product. If neither applies, use standalone for a supplied
repository URL; this is a storage namespace, not an invented market.
Reuse the matching product directory and clone after checking its remote.
Do not browse other product directories to manufacture the analysis scope.
Preflight
For first ingestion or an explicit freshness/update request, establish these facts from commands, not memory:
For synthesis or continuation, reuse verified profiles and their pinned commits. Confirm the matching remote and required objects locally; do not fetch or repeat unchanged checks merely because the context was compressed. Refresh only for requested freshness, changed inputs, missing evidence, or an unresolved concern. Record the analyzed commit rather than describing it as current upstream.
If the repository is missing, clone it first. Prefer SSH for GitHub when possible:
If SSH fails for a public repository, report the failure and retry with the repository's HTTPS URL only when that keeps the work moving.
Discovery Workflow
Use gh search repos for GitHub repository discovery. Search multiple query
phrases; do not trust one keyword.
For each candidate, record:
Clone only candidates that are relevant to the user's product or analysis goal. For broad markets, first present a shortlist with evidence and then analyze the strongest set.
Repository Fact Gathering
Read files in this order and capture exact sources:
- Project metadata:
package.json,pyproject.toml,Cargo.toml,go.mod, or equivalent. - README and docs: positioning, screenshots, installation, pricing links.
- Entry points:
main,bin,scripts,src/,app/,packages/. - Core implementation: renderer, parser, storage, export, sync, auth, API, or domain-specific modules.
- Tests and fixtures: they often reveal supported data structures and edge cases.
- Releases/changelog: current direction and recent changes.
Use nl -ba <file> or an editor with line numbers before citing. Every technical
claim about implementation needs file:line evidence.
Landscape Workflow
Before synthesizing existing profiles, read
references/landscape_synthesis.md [blocked]. Follow
its evidence → causal explanation → product choice → counterexample/falsifier
chain and its project-document continuation contract. A capability matrix or a
list of features to borrow does not satisfy Landscape. A supported conclusion
that no change is warranted is valid; do not manufacture a new direction.
Report Structure
For a single competitor, use references/profile_template.md. Record the current
project's authoritative scope source when used. Without our-product context,
omit its comparison section and keep opportunity judgments repository-specific.
For a landscape summary, use this structure:
Evidence Rules
Required
Forbidden
Do not present unsupported technical claims as repository facts. Strategic inference is allowed when labeled and supported by the Landscape chain; words such as “可能 / likely” do not by themselves make a claim valid or invalid. Check what the sentence claims and its evidence, rather than banning a word:
When an implementation or market fact is unavailable, write 待验证 and state
the exact next check that would verify it. Do not promote an unresolved assumption
into a requirement, claimed competitive advantage, or implementation authorization.
Output Quality Bar
Before finishing, run the checks in references/analysis_checklist.md:
- Local repository exists under
$COMPETITORS_BASE/{product-slug}/. - Remote URL and analyzed commit are recorded; freshness is explicit.
- Each technical claim has a file:line citation.
- Market facts have a source and retrieval date.
- Landscape judgments explain a concrete choice, its trade-off and falsifier; facts and inference remain separate.
- For project-backed analysis, new understanding is saved in the existing project research entry before a stage ends or context handoff; unchanged evidence is reused on continuation.
- The final answer names gaps, opportunities, and risks without pretending they are code facts.
Script
Use scripts/update-competitors.sh as the starting point for durable competitor
repository management:
The script is a template. For a long-running product, copy it into that product's own repo or operations directory and fill the persistent competitor list.
Relationship To Product Analysis
product-analysis may invoke this skill for compare mode. Keep this skill focused
on competitor discovery, repository evidence, and competitive synthesis. Do not
turn it into a general product audit orchestrator.

