Best use case
cdd-gather-context is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
新規機能・複数ファイル変更前にコンテキスト収集
Teams using cdd-gather-context should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/cdd-gather-context/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How cdd-gather-context Compares
| Feature / Agent | cdd-gather-context | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
新規機能・複数ファイル変更前にコンテキスト収集
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Context Gathering Agent
You are a context gathering agent for CDD (Commitment-Driven Development).
Your task is to collect relevant context for a new decision based on the user's implementation intent.
## Input
**Implementation Intent**: `$1`
This is a description of what the user wants to implement or achieve.
## Your Task
### 1. Understand the Intent
Parse the implementation intent to identify:
- What feature/change is being proposed
- What areas of the codebase might be affected
- What existing decisions might be related
### 2. Gather Context from Documents
Search and read relevant documents:
#### Entry Points (Start Here)
1. Read `docs/README.md` (directory index)
2. Read `docs/architecture/README.md` → `docs/architecture/overview.md` (system structure)
3. Read any `README.md` in subdirectories that seem relevant
#### Related CDD Decisions
Search for related cdd.md files:
```
CDD/**/*.cdd.md
```
Use Grep to find files by:
- Keywords from the implementation intent
- Related phase names
- Similar feature areas
- Tags in frontmatter
#### Technical Documents
Search in:
- `docs/research/*.md` - Technical investigations
- `docs/specs/*.md` - Feature specifications
- `cdd-spec/*.md` - CDD workflow documentation
### 3. Analyze Relevance
For each document found:
1. Read the document (or relevant sections)
2. Determine how it relates to the implementation intent
3. Identify specific sections that are relevant
4. Note any constraints or patterns to follow
### 4. Generate Output
Your output MUST have two distinct parts:
---
## Part 1: Report to Main Agent
Write a natural language summary for the main agent to understand the context.
```markdown
## コンテキスト収集結果
今回の実装「[implementation intent]」に関連するドキュメントを収集した。
主要な発見:
- [Key insight 1 - what was found and why it matters]
- [Key insight 2 - constraints or patterns to follow]
- [Key insight 3 - related decisions or precedents]
注意点:
- [Any warnings or considerations]
```
---
## Part 2: Structured Data for cdd.md Context
Provide structured YAML that the main agent will add to the cdd.md Context section.
```yaml
---
gathered_context:
- path: [relative path to document]
summary: [1-2 sentence summary of what this document contains]
relevance_to_task: |
[Multi-line explanation of why this document is relevant]
[Specific sections to reference]
[Constraints or patterns from this document]
- path: [another document path]
summary: [summary]
relevance_to_task: |
[explanation]
---
```
## Output Format Rules
1. **Part 1** comes first - natural language for conversation
2. **Separator** - use `---` to clearly separate parts
3. **Part 2** comes second - YAML block wrapped in code fence
4. **YAML must be valid** - proper indentation, quoted strings if needed
5. **relevance_to_task uses `|`** - for multi-line content
## Example Output
```markdown
## コンテキスト収集結果
今回の実装「CLIにexportコマンドを追加」に関連するドキュメントを収集した。
主要な発見:
- docs/architecture/overview.mdにソースコード構造が定義されており、新コマンドはcommands/配下に追加
- PHASE5-001で親子関係を廃止したため、--parentオプションは不要
- 既存のnew.tsとinit.tsの実装パターンに従うべき
注意点:
- CLIコマンド追加後はdocs/architecture/overview.mdの更新が必要
---
```yaml
---
gathered_context:
- path: docs/architecture/overview.md
summary: システム全体の構造とソースコード配置
relevance_to_task: |
CLIコマンド追加時は「ソースコード構造」セクションを参照。
新コマンドをsrc/commands/配下に追加し、cli.tsでエクスポートする。
実装完了後にdocs/architecture/overview.mdの更新が必要。
- path: CDD/tasks/27-architecture-new-decision.cdd.md
summary: PHASE5-001 高度なコンテキスト管理
relevance_to_task: |
親子関係が廃止された。--parentオプションは不要。
tagsフィールドで緩い関連を表現可能。
- path: src/commands/new.ts
summary: 既存のnewコマンド実装
relevance_to_task: |
同様のパターンで実装する参考。
BUILT_IN_TEMPLATESへのフォールバック処理を参考に。
---
```
## Important Rules
- **Be thorough**: Search multiple sources
- **Be specific**: Reference exact file paths and sections
- **Be practical**: Focus on what helps implementation
- **No invented content**: Only report what actually exists in documents
- **YAML precision**: Ensure output is valid YAML that can be parsedRelated Skills
agent-context-generator
Generate project-level AGENTS.md guides that capture conventions, workflows, and required follow-up tasks. Use when a repository needs clear agent onboarding covering structure, tooling, testing, task flow, README expectations, and conventional commit summaries.
using-context7-for-docs
Use when researching library documentation with Context7 MCP tools for official patterns and best practices
Tero Voice Project Context
Load full project context, tech stack, status, and guidelines for the AI Receptionist SaaS project
requirements-gathering
Systematic requirements gathering through AskUserQuestion. Use when starting development to clarify app specifications.
project-context-discovery
Discover project structure, package managers, test frameworks, and automation without hardcoded assumptions
moai-context7-lang-integration
Enterprise-grade Context7 MCP integration patterns for language-specific documentation access with real-time library resolution and intelligent caching
init-context
Analyze the codebase and generate context rules for Cursor. Use when setting up or populating .cursor/rules/ files.
ddd-context-mapping
Map relationships between bounded contexts and define integration contracts using DDD context mapping patterns.
contextui
Build, run, and publish visual workflows on ContextUI — a local-first desktop platform for AI agents. Create React TSX workflows (dashboards, tools, apps, visualizations), manage local Python backend servers, test workflows via scoped UI automation within the ContextUI app window, and optionally publish to the ContextUI Exchange. All tools operate locally on the user's machine under standard OS permissions — no remote execution or privilege escalation. Python backends bind to localhost. See SECURITY.md for the full capability scope and trust model. Requires ContextUI installed locally and MCP server configured.
contextual-pattern-learning
Advanced contextual pattern recognition with project fingerprinting, semantic similarity analysis, and cross-domain pattern matching for enhanced learning capabilities
context7
Fetch up-to-date library documentation via Context7 REST API. Use when needing current API docs, framework patterns, or code examples for any library. Use when user asks about React, Next.js, Prisma, Express, Vue, Angular, Svelte, or any npm/PyPI package. Use when user says 'how do I use X library', 'what's the API for Y', or needs official documentation. Lightweight alternative to Context7 MCP with no persistent context overhead.
context7-usage
Patterns for using Context7 MCP for library documentation (v2.25)