产品分析
- 作者仓库星标 0
- 作者更新于 2026年8月24日 07:33
- 作者仓库 claude-code-skills
- 领域
- 工程开发
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @daymade · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- macOS · Linux · Windows
- 运行环境要求
- Node.js · Python
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 命令执行
- 读取环境变量
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
第 0 步:自动检测可用工具
在启动任何代理之前,请检测可用的工具: 决策逻辑:如果找到 `codex`:通知用户 —“检测到 Codex CLI(版本 X)。将运行跨模型分析以获得更丰富的视角。”如果未找到`codex`:仅使用 Claude Code 代理以静默方式继续。不要要求用户安装任何东西。还可以检测项目类型以定制代理提示:
第一阶段:并行探索
使用任务工具(后台模式)同时启动所有探索代理。
第 2 阶段:竞争基准(仅比较范围)
当范围为`compare`时,调用每个竞争对手的竞争对手分析技能:这将委托给正交的`competitors-analysis`技能,该技能处理: 存储库克隆和验证 基于证据的代码分析(文件:行引用) 竞争对手配置文件生成
第三阶段:合成
所有代理完成后,综合主要对话上下文中的发现。
# Product Analysis
Multi-path parallel product analysis that combines **Claude Code agent teams** and **Codex CLI** for cross-model test-time compute scaling.
**Core principle**: Same analysis task, multiple AI perspectives, deep synthesis.
## How It Works
```
/product-analysis full
│
├─ Step 0: Auto-detect available tools (codex? competitors?)
│
┌────┼──────────────┐
│ │ │
Claude Code Codex CLI (auto-detected)
Task Agents (background Bash)
(Explore ×3-5) (×2-3 parallel)
│ │
└────────┬──────────┘
│
Synthesis (main context)
│
Structured Report
```
## Step 0: Auto-Detect Available Tools
Before launching any agents, detect what tools are available:
```bash
# Check if Codex CLI is installed
which codex 2>/dev/null && codex --version
```
**Decision logic**:
- If `codex` is found: Inform the user — "Codex CLI detected (version X). Will run cross-model analysis for richer perspectives."
- If `codex` is not found: Silently proceed with Claude Code agents only. Do NOT ask the user to install anything.
Also detect the project type to tailor agent prompts:
```bash
# Detect project type
ls package.json 2>/dev/null # Node.js/React
ls pyproject.toml 2>/dev/null # Python
ls Cargo.toml 2>/dev/null # Rust
ls go.mod 2>/dev/null # Go
```
## Scope Modes
Parse `$ARGUMENTS` to determine analysis scope:
| Scope | What it covers | Typical agents |
|-------|---------------|----------------|
| `full` | UX + API + Architecture + Docs (default) | 5 Claude + Codex (if available) |
| `ux` | Frontend navigation, information density, user journey, empty state, onboarding | 3 Claude + Codex (if available) |
| `api` | Backend API coverage, endpoint health, error handling, consistency | 2 Claude + Codex (if available) |
| `arch` | Module structure, dependency graph, code duplication, separation of concerns | 2 Claude + Codex (if available) |
| `compare X Y` | Self-audit + competitive benchmarking (invokes `/competitors-analysis`) | 3 Claude + competitors-analysis |
## Phase 1: Parallel Exploration
Launch all exploration agents simultaneously using Task tool (background mode).
### Claude Code Agents (always)
For each dimension, spawn a Task agent with `subagent_type: Explore` and `run_in_background: true`:
**Agent A — Frontend Navigation & Information Density**
```
Explore the frontend navigation structure and entry points:
1. App.tsx: How many top-level components are mounted simultaneously?
2. Left sidebar: How many buttons/entries? What does each link to?
3. Right sidebar: How many tabs? How many sections per tab?
4. Floating panels: How many drawers/modals? Which overlap in functionality?
5. Count total first-screen interactive elements for a new user.
6. Identify duplicate entry points (same feature accessible from 2+ places).
Give specific file paths, line numbers, and element counts.
```
**Agent B — User Journey & Empty State**
```
Explore the new user experience:
1. Empty state page: What does a user with no sessions see? Count clickable elements.
2. Onboarding flow: How many steps? What information is presented?
3. Prompt input area: How many buttons/controls surround the input box? Which are high-frequency vs low-frequency?
4. Mobile adaptation: How many nav items? How does it differ from desktop?
5. Estimate: Can a new user complete their first conversation in 3 minutes?
Give specific file paths, line numbers, and UX assessment.
```
**Agent C — Backend API & Health**
```
Explore the backend API surface:
1. List ALL API endpoints (method + path + purpose).
2. Identify endpoints that are unused or have no frontend consumer.
3. Check error handling consistency (do all endpoints return structured errors?).
4. Check authentication/authorization patterns (which endpoints require auth?).
5. Identify any endpoints that duplicate functionality.
Give specific file paths and line numbers.
```
**Agent D — Architecture & Module Structure** (full/arch scope only)
```
Explore the module structure and dependencies:
1. Map the module dependency graph (which modules import which).
2. Identify circular dependencies or tight coupling.
3. Find code duplication across modules (same pattern in 3+ places).
4. Check separation of concerns (does each module have a single responsibility?).
5. Identify dead code or unused exports.
Give specific file paths and line numbers.
```
**Agent E — Documentation & Config Consistency** (full scope only)
```
Explore documentation and configuration:
1. Compare README claims vs actual implemented features.
2. Check config file consistency (base.yaml vs .env.example vs code defaults).
3. Find outdated documentation (references to removed features/files).
4. Check test coverage gaps (which modules have no tests?).
Give specific file paths and line numbers.
```
### Codex CLI Agents (auto-detected)
If Codex CLI was detected in Step 0, launch parallel Codex analyses via background Bash.
Each Codex invocation gets the same dimensional prompt but from a different model's perspective:
```bash
codex -m o4-mini \
-c model_reasoning_effort="high" \
--full-auto \
"Analyze the frontend navigation structure of this project. Count all interactive elements visible to a new user on first screen. Identify duplicate entry points where the same feature is accessible from 2+ places. Give specific file paths and counts."
```
Run 2-3 Codex commands in parallel (background Bash), one per major dimension.
**Important**: Codex runs in the project's working directory. It has full filesystem access. The `--full-auto` flag (or `--dangerously-bypass-approvals-and-sandbox` for older versions) enables autonomous execution.
## Phase 2: Competitive Benchmarking (compare scope only)
When scope is `compare`, invoke the competitors-analysis skill for each competitor:
```
Use the Skill tool to invoke: /competitors-analysis {competitor-name} {competitor-url}
```
This delegates to the orthogonal `competitors-analysis` skill which handles:
- Repository cloning and validation
- Evidence-based code analysis (file:line citations)
- Competitor profile generation
## Phase 3: Synthesis
After all agents complete, synthesize findings in the main conversation context.
### Cross-Validation
Compare findings across agents (Claude vs Claude, Claude vs Codex):
- **Agreement** = high confidence finding
- **Disagreement** = investigate deeper (one agent may have missed context)
- **Codex-only finding** = different model perspective, validate manually
### Quantification
Extract hard numbers from agent reports:
| Metric | What to measure |
|--------|----------------|
| First-screen interactive elements | Total count of buttons/links/inputs visible to new user |
| Feature entry point duplication | Number of features with 2+ entry points |
| API endpoints without frontend consumer | Count of unused backend routes |
| Onboarding steps to first value | Steps from launch to first successful action |
| Module coupling score | Number of circular or bi-directional dependencies |
### Structured Output
Produce a layered optimization report:
```markdown
## Product Analysis Report
### Executive Summary
[1-2 sentences: key finding]
### Quantified Findings
| Metric | Value | Assessment |
|--------|-------|------------|
| ... | ... | ... |
### P0: Critical (block launch)
[Issues that prevent basic usability]
### P1: High Priority (launch week)
[Issues that significantly degrade experience]
### P2: Medium Priority (next sprint)
[Issues worth addressing but not blocking]
### Cross-Model Insights
[Findings that only one model identified — worth investigating]
### Competitive Position (if compare scope)
[How we compare on key dimensions]
```
## Workflow Checklist
- [ ] Parse `$ARGUMENTS` for scope
- [ ] Auto-detect Codex CLI availability (`which codex`)
- [ ] Auto-detect project type (package.json / pyproject.toml / etc.)
- [ ] Launch Claude Code Explore agents (3-5 parallel, background)
- [ ] Launch Codex CLI commands (2-3 parallel, background) if detected
- [ ] Invoke `/competitors-analysis` if `compare` scope
- [ ] Collect all agent results
- [ ] Cross-validate findings
- [ ] Quantify metrics
- [ ] Generate structured report with P0/P1/P2 priorities
## References
- [references/analysis_dimensions.md](references/analysis_dimensions.md) — Detailed audit dimension definitions and prompts
- [references/synthesis_methodology.md](references/synthesis_methodology.md) — How to weight and merge multi-agent findings
- [references/codex_patterns.md](references/codex_patterns.md) — Codex CLI invocation patterns and flag reference
章节与文件索引
按说明文件中的顺序排列。
第 0 步:自动检测可用工具
范围模式
第一阶段:并行探索
克劳德·代码特工(始终)
Codex CLI 代理(自动检测)
文件/命令 -> $ARGUMENTS · full · arch · compare X Y · /competitors-analysis · subagent_type: Explore · run_in_background: true · --full-auto
内容校验值 -> 7aa7b3eb52c3
当前原文的自动摘译,尚未人工审校。
范围模式
解析
$ARGUMENTS以确定分析范围: 范围 · 涵盖内容 · 典型代理full· UX + API + 架构 + 文档(默认) · 5 Claude + Codex(如果有)ux· 前端导航、信息密度、用户旅程、空状态、入门 · 3 Claude + Codex(如果有)api· 后端 API 覆盖范围、端点健康、错误处理、一致性 · 2 Claude + Codex(如果有)克劳德·代码特工(始终)
对于每个维度,使用
subagent_type: Explore和run_in_background: true生成一个任务代理: 代理 A — 前端导航和信息密度 代理 B — 用户旅程和空状态 代理 C — 后端 API 和运行状况 代理 D — 架构和模块结构(仅限完整/架构范围)Codex CLI 代理(自动检测)
如果在步骤 0 中检测到 Codex CLI,则通过后台 Bash 启动并行 Codex 分析。每个 Codex 调用都会获得相同的维度提示,但从不同的模型角度来看:并行运行 2-3 个 Codex 命令(后台 Bash),每个主要维度一个。重要提示:Codex 在项目的工作目录中运行。它具有完整的文件系统访问权限。
--full-auto标志(或旧版本的--dangerously-bypass-approvals-and-sandbox)可以实现自主执行。