generate-prd について
要件やプロジェクトの背景をもとに PRD を作成する、プロダクト・プロジェクトチーム向けの COG スキルです。チームまたは個人モードで情報を集め、承認後に保存や公開を行います。
主な機能
- 01チームまたは個人モードで情報収集
- 02構成化された PRD 草案の作成
- 03プロジェクトと連携設定の確認
- 04承認後の PRD 保存・公開
活用シーン
- 01新機能の要件文書の作成
- 02既存 PRD と関連資料の整理
- 03承認済み PRD のプロジェクト保管庫への保存
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ huytieu/ cog-second-brain --skill generate-prdインストール後、Claude Code で/generate-prdを入力して読み込まれたか確認します。
詳細
COG PRD 生成スキル
呼び出すタイミング
- ユーザーが PRD、製品仕様書、または要件定義書の作成を希望している
- ユーザーが「PRD を生成」「PRD を作成」「製品要件」「仕様書」「機能仕様」と言っている
- 開発前に正式な文書が必要な機能やプロジェクトがある
エージェントモードの確認
00-inbox/MY-PROFILE.md のフロントマターで agent_mode を確認します:
agent_mode: teamの場合 — 作成中に、既存の PRD、関連する課題、競合調査など、複数の情報源からコンテキストを収集するために並列エージェントを使用しますagent_mode: soloの場合 — メインの会話でコンテキストを収集し、順番に作成します
コマンド:/generate-prd
事前確認
-
00-inbox/MY-INTEGRATIONS.mdを読み込み、公開先の選択肢を確認します:- Confluence — PRD をチームの Wiki に公開できます
- Notion — PRD を Notion ワークスペースに公開できます
- HackMD — PRD を共有 Markdown ドキュメントとして公開できます
- いずれも有効でない場合、PRD は Vault 内にのみ保存されます(それでも十分に役立ちます)
-
00-inbox/MY-PROFILE.mdを読み込み、以下を確認します:- 進行中のプロジェクト
- PRD の作成者欄に記載するユーザーの名前と役職
-
現在のタイムスタンプを取得します: Bash で
date '+%Y-%m-%d %H:%M'を実行し、フロントマターのcreated:フィールドに使用します
実行手順
フェーズ 1:要件の収集
以下についてユーザーに尋ねます(すでに提示されている項目は省略します)。
必須:
- 機能/製品名
- 問題の説明 — どのような問題を解決するのか
- 対象ユーザー — 誰を対象とするのか
- 大まかな解決策 — 何を構築するのか
任意(提示されていない場合は妥当な初期値を生成します):
- 成功指標 — 成功をどのように測定するのか
- 制約 — 技術、時間、予算、規制上の制約
- 依存関係 — 何に依存しているのか
- 関連ドキュメント — 設計、調査、先行事例へのリンク
- 目標スケジュール — いつリリースする必要があるのか
フェーズ 2:コンテキストの収集
チームモード(並列エージェント)
run_in_background: true を指定して Task ツールを使い、コンテキスト収集エージェントを起動します:
エージェント:「existing-prd-scanner」
Scan the vault for existing PRDs and related documents.
1. Glob for PRDs: 04-projects/*/PRDs/*.md
2. Glob for related project files: 04-projects/[project]/**/*.md
3. Read recent PRDs to understand the user's preferred format and level of detail
4. Look for any existing docs related to the feature being specified
Return: relevant existing content, user's PRD style preferences, and any related docs
エージェント:「issue-context-gatherer」
Gather related issues and feature requests from active trackers.
Check 00-inbox/MY-INTEGRATIONS.md for active trackers, then:
If Linear is active:
1. Use ToolSearch to load Linear tools
2. Search for issues related to [feature keywords]
3. Check current initiatives and projects for context
If GitHub is active:
1. gh search issues "[feature keywords]" --repo [CUSTOMIZE: your-org/your-repo] --json number,title,body,labels --limit 15
2. Check for related discussions or feature requests
Return: related issues, existing feature requests, and any prior discussion context
ソロモード
同じコンテキスト収集を順番に実行します。
フェーズ 3:PRD の生成
以下のテンプレートを使用して PRD を作成します:
---
type: prd
project: [project-name]
feature: [feature-name]
status: draft
author: [user name]
created: [YYYY-MM-DD HH:MM]
last_updated: [YYYY-MM-DD]
version: "1.0"
approvers: [CUSTOMIZE: list of approvers]
tags: ["#prd", "#product", "#[project-name]"]
---
# PRD: [Feature Name]
## Overview
| Field | Value |
|-------|-------|
| **Author** | [Name] |
| **Status** | Draft |
| **Created** | [Date] |
| **Target Release** | [Timeline or TBD] |
| **Priority** | [High/Medium/Low] |
---
## 1. Problem Statement
[Clear description of the problem being solved. Include data or evidence where available.]
### Who is affected?
[Target users and how they're impacted]
### What is the current experience?
[How users currently deal with this problem]
### Why now?
[Why this is important to solve at this time]
---
## 2. Goals & Success Metrics
### Goals
1. [Primary goal]
2. [Secondary goal]
3. [Tertiary goal]
### Success Metrics
| Metric | Current Baseline | Target | Measurement Method |
|--------|-----------------|--------|-------------------|
| [Metric 1] | [Current] | [Target] | [How to measure] |
| [Metric 2] | [Current] | [Target] | [How to measure] |
### Non-Goals
- [What this project explicitly does NOT aim to solve]
- [Scope boundaries]
---
## 3. User Stories
### Primary User: [User Type]
**Story 1:** As a [user type], I want [goal] so that [benefit].
**Story 2:** As a [user type], I want [goal] so that [benefit].
### Secondary User: [User Type] (if applicable)
**Story 3:** As a [user type], I want [goal] so that [benefit].
---
## 4. Proposed Solution
### 4.1 Solution Overview
[High-level description of the proposed solution]
### 4.2 Key Features
1. **[Feature 1]** — [Description]
2. **[Feature 2]** — [Description]
3. **[Feature 3]** — [Description]
### 4.3 User Flow
[Step-by-step description of the primary user flow]
1. User [action]
2. System [response]
3. User [action]
4. System [response]
### 4.4 Edge Cases & Error Handling
| Scenario | Expected Behavior |
|----------|------------------|
| [Edge case 1] | [How the system handles it] |
| [Edge case 2] | [How the system handles it] |
---
## 5. Technical Considerations
### Architecture Impact
[How this fits into the existing system architecture]
### Dependencies
- [Dependency 1] — [Status: available/needs work]
- [Dependency 2] — [Status: available/needs work]
### Technical Risks
| Risk | Likelihood | Impact | Mitigation |
|------|-----------|--------|------------|
| [Risk 1] | [H/M/L] | [H/M/L] | [Mitigation plan] |
### Performance Requirements
- [Performance requirement 1]
- [Performance requirement 2]
---
## 6. Design & UX
[Link to designs or describe UX requirements]
### Key UX Principles
- [Principle 1]
- [Principle 2]
### Accessibility Requirements
- [Requirement 1]
- [Requirement 2]
---
## 7. Release Strategy
### Rollout Plan
- **Phase 1:** [Description] — [Timeline]
- **Phase 2:** [Description] — [Timeline]
### Feature Flags
- [Feature flag 1] — [Purpose]
### Rollback Plan
[How to roll back if issues arise]
---
## 8. Open Questions
- [ ] [Question 1] — Owner: [Name]
- [ ] [Question 2] — Owner: [Name]
- [ ] [Question 3] — Owner: [Name]
---
## 9. References
- [Link to related PRDs]
- [Link to designs]
- [Link to research]
- [Link to related issues/tickets]
---
## Changelog
| Version | Date | Author | Changes |
|---------|------|--------|---------|
| 1.0 | [Date] | [Author] | Initial draft |
フェーズ 4:レビュー確認
生成した PRD をユーザーに提示します:
PRD draft is ready for review.
Sections generated:
1. Problem Statement
2. Goals & Success Metrics
3. User Stories
4. Proposed Solution
5. Technical Considerations
6. Design & UX
7. Release Strategy
8. Open Questions
9. References
Would you like to:
a) Review the full PRD (I'll display it)
b) Save as-is to the vault
c) Make changes to specific sections
d) Publish to [active wiki platform] (requires your approval)
自動で公開してはいけません。必ずユーザーの明示的な承認を待ちます。
フェーズ 5:Vault への保存
PRD を次の場所に保存します:04-projects/[project]/PRDs/prd-[feature-slug]-YYYY-MM-DD.md
存在しない場合はディレクトリー構造を作成します:
mkdir -p "04-projects/[project]/PRDs"
フェーズ 6:公開(任意、承認が必要)
ユーザーが公開を明示的に承認した場合にのみ続行します。
Confluence
Use WebFetch to publish via Confluence REST API:
- POST /wiki/rest/api/content
- Space: [CUSTOMIZE: YOUR-SPACE-KEY]
- Parent page: [CUSTOMIZE: PRDs-parent-page-id]
- Title: "PRD: [Feature Name]"
- Body: [converted to Confluence storage format]
Note: Convert markdown to Confluence XHTML storage format before publishing.
Notion
1. Use ToolSearch to load Notion tools
2. Use mcp__claude_ai_Notion__notion-create-pages to create the PRD page
3. Place under [CUSTOMIZE: PRDs database or parent page]
HackMD
Use WebFetch to publish via HackMD API:
- POST to create a new note
- Set permissions as configured
公開後、公開 URL を Vault 内のコピーに追記します:
published_url: [URL]
published_at: [timestamp]
フォールバック動作
| シナリオ | 動作 |
|---|---|
| 有効な Wiki プラットフォームがない | Vault にのみ保存します — PRD はローカルドキュメントとして十分に役立ちます |
| 公開 API に失敗した | Vault に保存し、手動で公開できるよう整形済みの内容を提供します |
| ユーザーがプロジェクトを指定していない | MY-PROFILE.md にある進行中のプロジェクトを一覧表示して尋ねます |
| 提供された情報が最小限 | ユーザーが記入できるよう、[TODO] マーカー付きの PRD の骨子を生成します |
| 同じ機能の既存 PRD が見つかった | 更新/改訂か、新規 PRD かを尋ねます |
エラー処理
- コンテキスト超過:既存のドキュメントから収集したコンテキストが多すぎる場合は、全文を含めずに要約します
- API の失敗:必ず最初に Vault に保存し、その後、別の手順として公開を試みます
- 大規模な PRD:PRD が一般的な Wiki ページの上限を超える場合は、サブページへの分割を提案します