git:20260426.c9a5892 to git:20260709.44c221e

159 added, 179 removed. Audit A to A.

---
name: competitors-analysis
- description: Analyze competitor repositories with evidence-based approach. Use when tracking competitors, creating competitor profiles, or generating competitive analysis. CRITICAL - all analysis must be based on actual cloned code, never assumptions. Triggers include "analyze competitor", "add competitor", "competitive analysis", or "竞品分析".
+ description: >-
+ Discover, clone, update, and analyze competitor repositories with evidence-based
+ competitive intelligence. Use when tracking competitors, reviewing competitor
+ source code, adding a competitor repository, comparing product capabilities,
+ building a competitor landscape, checking whether competitor code changed, or
+ when the user says "竞品分析", "竞品", "competitor scan", "latest competitor code",
+ "analyze competitor", or "compare with X". Repository-backed findings must come
+ from local cloned code with file:line citations; market-landscape claims must
+ cite their source and volatility.
context: fork
agent: general-purpose
- argument-hint: "[product-name] [competitor-url]"
+ argument-hint: "[product-name] [competitor-url-or-search-query]"
---
# Competitors Analysis
- Evidence-based competitor tracking and analysis. **All analysis must be based on actual code, never assumptions.**
-
- ## CRITICAL: Evidence-Based Analysis Only
-
- **在开始分析之前,必须完成以下检查:**
-
- ### Pre-Analysis Checklist
-
- - [ ] 仓库已克隆到本地 `~/Workspace/competitors/{product}/`
- - [ ] 可以 `ls` 查看目录结构
- - [ ] 可以 `cat package.json` (或等效配置文件) 读取版本信息
- - [ ] 可以 `git log -1` 确认代码是最新的
+ Build competitor intelligence that can be shared, re-run, and audited later. This
+ skill has two layers:
- **如果以上任何一项未完成,停止分析,先完成克隆操作。**
+ 1. **Repository evidence**: clone or update the competitor code under the durable
+ competitors workspace, then cite facts from actual files and commits.
+ 2. **Landscape synthesis**: summarize positioning, pricing, strengths, weaknesses,
+ gaps, and opportunities, but only after separating sourced facts from judgment.
- ### Forbidden Patterns (禁止的表述)
+ This skill intentionally subsumes lightweight "competitor scan" workflows. A scan
+ is useful for the landscape table, but it is not enough for technical conclusions.
- | 禁止 | 原因 |
- |------|------|
- | "推测..."、"可能..."、"应该..." | 没有证据支持 |
- | "架构图(推测版)" | 必须基于实际代码 |
- | "未公开"、"未披露" | 如果不知道就不要写 |
- | 不带来源的技术细节 | 无法验证 |
+ ## Entry Router
- ### Required Patterns (必须的表述)
+ If the user's request is missing the product/market or target customer segment,
+ ask for that context before synthesizing positioning or opportunity claims. Known
+ competitors are optional; if absent, use Discover mode.
- | 正确格式 | 示例 |
- |----------|------|
- | 技术细节 + (来源: 文件:行号) | "使用 better-sqlite3 (来源: package.json:88)" |
- | 直接引用 + 来源 | `> "description text" (README.md:3)` |
- | 版本号 + 来源 | "版本 1.3.3 (package.json:2)" |
+ Use the user's wording to choose the path:
- ---
+ | User intent | Mode | What to do |
+ |---|---|---|
+ | "find competitors", "竞品有哪些", broad market query | Discover | Search GitHub and web sources, shortlist candidates, clone only relevant repositories |
+ | "add competitor <url>" | Ingest | Clone the repository, record remote + commit, then produce a first profile |
+ | "analyze competitor", "review this repo" | Profile | Update or clone locally, read code, write a cited technical profile |
+ | "compare", "landscape", "opportunities" | Landscape | Ensure each competitor has a profile, then synthesize gaps and opportunities |
+ | "latest code", "有没有更新" | Update | Pull/fetch existing competitors and report changed commits before analysis |
- ## Analysis Workflow
+ ## Durable Source Layout
- ### Step 1: Clone Repository (必须)
+ Use a durable workspace, not `/tmp`. The default base is:
```bash
- # 创建产品竞品目录
- mkdir -p ~/Workspace/competitors/{product-name}
-
- # 克隆竞品仓库 (SSH,失败则重试)
- cd ~/Workspace/competitors/{product-name}
- git clone git@github.com:org/repo.git
+ COMPETITORS_BASE="${COMPETITORS_BASE:-$HOME/workspace/competitors}"
```
- **网络问题处理**: 中国网络环境可能需要多次重试。
-
- ### Step 2: Gather Facts (收集事实)
+ Directory convention:
- 按顺序读取以下文件,记录关键信息:
+ ```text
+ $COMPETITORS_BASE/
+ └── {product-slug}/
+ ├── {owner-repo}/
+ └── ...
+ ```
- **2.1 项目元数据**
- ```bash
- # Node.js 项目
- cat package.json | head -20 # name, version, description
- cat package.json | grep -A50 dependencies
+ Use `owner-repo` for GitHub repositories so forks and similarly named projects do
+ not collide. If the user's machine already has a product directory, use it as the
+ source of truth and do not re-clone elsewhere.
- # Python 项目
- cat pyproject.toml # 或 setup.py, requirements.txt
+ ## Preflight
- # Rust 项目
- cat Cargo.toml
- ```
+ Before analysis, establish these facts from commands, not memory:
- **2.2 项目结构**
```bash
- ls -la # 根目录结构
- ls src/ # 源码目录
- find . -name "*.md" -maxdepth 2 # 文档文件
+ repo="$COMPETITORS_BASE/{product-slug}/{owner-repo}"
+ test -d "$repo/.git"
+ git -C "$repo" remote -v
+ git -C "$repo" fetch --all --prune
+ git -C "$repo" log -1 --format='%H%x09%cI%x09%s'
```
- **2.3 核心模块**
- ```bash
- # 找到入口文件
- cat main.js | head -50 # 或 index.js, app.py, main.rs
- # 找到核心 helpers/utils
- ls src/helpers/ 2>/dev/null || ls src/utils/ 2>/dev/null
- ```
+ If the repository is missing, clone it first. Prefer SSH for GitHub when possible:
- **2.4 README 和文档**
```bash
- cat README.md | head -100 # 官方描述
- cat CHANGELOG.md | head -50 # 版本历史
+ mkdir -p "$COMPETITORS_BASE/{product-slug}"
+ git clone --depth 1 <git-ssh-url> "$COMPETITORS_BASE/{product-slug}/{owner-repo}"
```
- ### Step 3: Deep Dive (深入分析)
+ 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
- ```bash
- # 示例:分析 ASR 实现
- cat src/helpers/whisper.js # 读取完整文件
- grep -n "class.*Manager" src/helpers/*.js # 找到核心类
- ```
+ Use `gh search repos` for GitHub repository discovery. Search multiple query
+ phrases; do not trust one keyword.
- **记录格式**:
- ```
- | 文件 | 行号 | 发现 |
- |------|------|------|
- | whisper.js | 33-35 | 使用 WhisperServerManager |
+ ```bash
+ gh search repos "product keywords" \
+ --limit 30 \
+ --archived=false \
+ --json fullName,url,description,stargazersCount,forksCount,openIssuesCount,language,pushedAt,updatedAt,defaultBranch
```
- ### Step 4: Write Profile (撰写分析)
-
- 使用 [references/profile_template.md](references/profile_template.md) 模板,确保每个技术细节都有来源标注。
+ For each candidate, record:
- ### Step 5: Post-Analysis Verification (分析后验证)
+ | Field | Source |
+ |---|---|
+ | Repository name and URL | `gh search repos` / `gh repo view` |
+ | Description | GitHub API or README line citation after clone |
+ | Activity | `pushedAt`, latest commit, release notes if present |
+ | Stars/forks/issues | GitHub API with retrieval date |
+ | Why it is relevant | user's product scope + repository evidence |
- **自检清单**:
+ 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.
- - [ ] 所有版本号都有来源标注?
- - [ ] 所有技术栈都来自 package.json/Cargo.toml?
- - [ ] 架构描述基于实际代码结构?
- - [ ] 没有"推测"、"可能"等词汇?
- - [ ] 对比表中的竞品数据都有来源?
+ ## Repository Fact Gathering
- ---
+ Read files in this order and capture exact sources:
- ## Directory Structure
+ 1. Project metadata: `package.json`, `pyproject.toml`, `Cargo.toml`, `go.mod`, or
+ equivalent.
+ 2. README and docs: positioning, screenshots, installation, pricing links.
+ 3. Entry points: `main`, `bin`, `scripts`, `src/`, `app/`, `packages/`.
+ 4. Core implementation: renderer, parser, storage, export, sync, auth, API, or
+ domain-specific modules.
+ 5. Tests and fixtures: they often reveal supported data structures and edge cases.
+ 6. Releases/changelog: current direction and recent changes.
- ```
- ~/Workspace/competitors/
- ├── flowzero/ # Flowzero 的竞品
- │ ├── openwhispr/ # git clone 的仓库
- │ └── ...
- └── {product-name}/ # 其他产品
+ Use `nl -ba <file>` or an editor with line numbers before citing. Every technical
+ claim about implementation needs `file:line` evidence.
- {project}/docs/competitors/
- ├── README.md # 索引(标注分析状态)
- ├── profiles/
- │ └── {competitor}.md # 基于代码的分析
- ├── landscape/
- ├── insights/
- └── updates/2026/
- ```
+ ## Report Structure
- ---
+ For a single competitor, use `references/profile_template.md`.
- ## Templates and Checklists
+ For a landscape summary, use this structure:
- | 文档 | 用途 |
- |------|------|
- | [references/profile_template.md](references/profile_template.md) | 竞品分析报告模板 |
- | [references/analysis_checklist.md](references/analysis_checklist.md) | 分析前/中/后检查清单 |
+ ```markdown
+ # {Product} Competitor Landscape
- **关键要求**:
- 1. 顶部必须标注数据来源路径和 commit hash
- 2. 每个技术细节必须有 (来源: 文件:行号)
- 3. 引用 README 内容必须标注行号
- 4. 无法验证的标记为"待验证"并说明原因
- 5. 分析完成后运行检查清单中的验证命令
+ ## Source Register
+ | Competitor | Local path | Remote | Commit | Retrieved |
+ |---|---|---|---|---|
- ---
+ ## Positioning
+ | Competitor | User segment | Primary promise | Source |
+ |---|---|---|---|
- ## Tech Stack Analysis Guide
+ ## Product And Technical Comparison
+ | Dimension | Competitor A | Source | Competitor B | Source | Our product | Source |
+ |---|---|---|---|---|---|---|
- ### Node.js / JavaScript
+ ## Strengths
+ | Competitor | Strength | Evidence | Why it matters |
+ |---|---|---|---|
- | 信息 | 来源文件 | 关键字段 |
- |------|----------|----------|
- | 版本 | package.json | `version` |
- | 依赖 | package.json | `dependencies`, `devDependencies` |
- | 入口 | package.json | `main`, `scripts.start` |
- | 框架 | package.json | electron, react, vite 等 |
+ ## Weaknesses And Gaps
+ | Competitor | Gap | Evidence | Opportunity |
+ |---|---|---|---|
- ### Python
+ ## Opportunities
+ | Opportunity | Evidence base | Product implication | Confidence |
+ |---|---|---|---|
- | 信息 | 来源文件 | 关键字段 |
- |------|----------|----------|
- | 版本 | pyproject.toml | `[project].version` |
- | 依赖 | pyproject.toml / requirements.txt | `dependencies` |
- | 入口 | pyproject.toml | `[project.scripts]` |
+ ## Risks And Assumptions
+ | Item | What is known | What still needs verification | Next check |
+ |---|---|---|---|
+ ```
- ### Rust
+ ## Evidence Rules
- | 信息 | 来源文件 | 关键字段 |
- |------|----------|----------|
- | 版本 | Cargo.toml | `[package].version` |
- | 依赖 | Cargo.toml | `[dependencies]` |
+ ### Required
- ---
+ | Claim type | Required evidence |
+ |---|---|
+ | Dependency/framework/version | Config file line citation |
+ | Feature support | README/docs line citation plus code citation when technical |
+ | Parser/export/storage behavior | Code line citation |
+ | Pricing/cloud-hosted claim | Official page citation with retrieval date |
+ | Popularity/activity | GitHub API/page citation with retrieval date |
+ | Opportunity judgment | Evidence rows it derives from plus explicit confidence |
- ## Common Mistakes to Avoid
+ ### Forbidden
- ### 1. 跳过克隆直接分析
+ Do not write unsupported technical claims. Avoid these patterns unless they appear
+ inside an explicit "bad example" block:
- ❌ 错误: 从 GitHub 网页或 WebFetch 获取信息后直接写分析
- ✅ 正确: 必须 `git clone` 到本地,用 `Read` 工具读取文件
+ | Pattern | Why |
+ |---|---|
+ | "推测", "可能", "应该", "大概", "似乎" | Blurs evidence and judgment |
+ | "未公开", "未披露" | Pretends to know disclosure status |
+ | "architecture, inferred from UI" | Technical architecture must come from code |
+ | Unsourced numbers | Cannot be audited later |
- ### 2. 混合事实和推测
+ When evidence is unavailable, write `待验证` and state the exact next check that
+ would verify it.
- ❌ 错误:
- ```markdown
- ## 技术栈
- - Electron (推测基于桌面应用特征)
- - 可能使用了 React
- ```
+ ## Output Quality Bar
- ✅ 正确:
- ```markdown
- ## 技术栈 (来源: package.json)
- | 依赖 | 版本 | 来源 |
- |------|------|------|
- | electron | 36.9.5 | package.json:68 |
- | react | 19.1.0 | package.json:96 |
- ```
+ Before finishing, run the checks in `references/analysis_checklist.md`:
- ### 3. 使用过时信息
+ - Local repository exists under `$COMPETITORS_BASE/{product-slug}/`.
+ - Remote URL and latest commit are recorded.
+ - Each technical claim has a file:line citation.
+ - Market facts have a source and retrieval date.
+ - Landscape judgments are separated from facts.
+ - The final answer names gaps, opportunities, and risks without pretending they
+ are code facts.
- ❌ 错误: 分析时不检查 git log,使用过时的代码
- ✅ 正确: 分析前运行 `git pull`,记录分析时的 commit hash
+ ## Script
- ### 4. 对比表中竞品数据无来源
+ Use `scripts/update-competitors.sh` as the starting point for durable competitor
+ repository management:
- ❌ 错误:
- ```markdown
- | 维度 | 竞品 | 我们 |
- |------|------|------|
- | 支持语言 | 25种 | 58种 |
- ```
+ ```bash
+ COMPETITORS_BASE="$HOME/workspace/competitors" \
+ PRODUCT_NAME="{product-slug}" \
+ ./scripts/update-competitors.sh status
- ✅ 正确:
- ```markdown
- | 维度 | 竞品 | 来源 | 我们 |
- |------|------|------|------|
- | 支持语言 | 25种 | modelRegistryData.json:9-35 | 58种 (FunASR 官方文档) |
+ ./scripts/update-competitors.sh discover "claude code viewer"
+ ./scripts/update-competitors.sh clone-url https://github.com/org/repo
+ ./scripts/update-competitors.sh pull
```
- ---
-
- ## Scripts
+ 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.
- See [scripts/update-competitors.sh](scripts/update-competitors.sh) for repository management.
+ ## Relationship To Product Analysis
- ```bash
- ./scripts/update-competitors.sh clone # 克隆所有竞品
- ./scripts/update-competitors.sh pull # 更新所有竞品
- ./scripts/update-competitors.sh status # 检查状态
- ```
+ `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.