Deep research to eliminate all assumptions before implementation. Use when user wants thorough, verified planning.
Conducts systematic research to verify all assumptions before implementation.
/plugin marketplace add nrempel/claude-research/plugin install nrempel-research@nrempel/claude-researchThis skill inherits all available tools. When active, it can use any tool Claude has access to.
You are entering deep research mode. Your job is to eliminate ALL assumptions through systematic research before any implementation begins. Don't guess - verify.
Before doing anything else, check for an existing research session:
# Get current branch (sanitized)
git branch --show-current 2>/dev/null || echo "no-git"
# Check for existing state files
ls .claude/research/<branch>-*.md 2>/dev/null
If state file exists AND there are unverified assumptions:
If no state file:
/research <task> → Start new research session/research (no args) → Continue existing OR prompt for task/research status → Show goal, assumptions, and progress/research cancel → Delete state file, clear todos, stopWhen starting a new research session:
mkdir -p .claude/research
Filename: .claude/research/<branch>-<timestamp>.md
-, truncate to 50 chars20260113-213000.claude/research/main-20260113-213000.mdFor detached HEAD: Use detached-<short-hash>
For no git repo: Use no-git
Before extracting assumptions, draft a rough approach:
---
started: 2026-01-13T21:30:00Z
branch: main
---
# Goal
[The user's task in their words]
## Current Approach
[Your initial plan - technologies, patterns, architecture]
## Assumptions
### Verified ✅
(none yet)
### Unverified ❓
(to be extracted)
### Refuted ❌
(none yet)
## Research Log
(findings will be logged here)
Scan your approach ruthlessly. Flag EVERYTHING that isn't verified fact:
Technology assumptions:
Codebase assumptions:
Behavior assumptions:
External service assumptions:
For each assumption, create a todo:
TodoWrite:
- [ ] Verify: React 18 is used in this project
- [ ] Verify: Postgres supports JSONB columns
- [ ] Verify: Stripe API allows partial refunds
When you have multiple unverified assumptions, launch agents in parallel to speed up research:
Categorize assumptions:
web-researcher agentcodebase-explorer agentLaunch parallel agents:
Use the Task tool to launch multiple agents in a single message:
Task(subagent_type="research:web-researcher", prompt="Verify: Stripe supports metered billing")
Task(subagent_type="research:codebase-explorer", prompt="Verify: Project has webhook infrastructure")
Task(subagent_type="research:web-researcher", prompt="Verify: Postgres 14 supports JSONB")
Launch up to 3-5 agents concurrently for independent assumptions.
Collect results:
If agents aren't available or for complex assumptions requiring context:
For external tools/services/libraries:
For codebase questions:
Update the state file with your finding:
## Research Log
### 2026-01-13 21:35
**Assumption:** Postgres supports JSONB columns
**Research:** WebSearch "postgres jsonb support version"
**Finding:** JSONB supported since Postgres 9.4. Project uses Postgres 14 (verified in docker-compose.yml)
**Result:** ✅ Verified
Move the assumption to the appropriate section:
When an assumption is refuted:
Don't stop. Don't ask. Pick the next unverified assumption and research it.
After processing all assumptions:
Research is done when:
When complete:
## Research Complete
### Goal
[Original goal]
### Verified Approach
[Final approach with all assumptions verified]
### Key Findings
- [Important discovery 1]
- [Important discovery 2]
### Verified Facts
- ✅ [Fact 1 - how verified]
- ✅ [Fact 2 - how verified]
### Refuted Assumptions (approach adjusted)
- ❌ [Original assumption] → [What's actually true]
# Check for existing plan file
ls ~/.claude/plans/*.md 2>/dev/null | head -1
If a plan file exists, update it with the verified plan:
This integrates your research directly into plan mode's plan file.
rm .claude/research/<branch>-<timestamp>.md
| Type | How to Verify |
|---|---|
| Library exists | Find it on npm/pypi/crates.io |
| Library does X | Find in official docs |
| API behavior | Official API documentation |
| Codebase pattern | Find actual code using Grep/Read |
| Version compatibility | Check docs, changelogs, compatibility matrices |
| Service limits | Official documentation or pricing page |
| Performance | Benchmarks, documentation, or reasoning from first principles |
NOT verification:
User: /research Add Stripe subscription billing to the app
[Check for existing session]
→ No state file found, starting new session
[Initialize]
→ Create .claude/research/main-20260113-213000.md
→ Goal: Add Stripe subscription billing
→ Draft approach: Use Stripe Billing API, webhooks for events, store subscription status in DB
[Extract assumptions]
TodoWrite:
- [ ] Verify: Stripe Billing API supports usage-based billing
- [ ] Verify: Webhooks can be configured per-event type
- [ ] Verify: Project has webhook endpoint infrastructure
- [ ] Verify: DB schema can store subscription metadata
[Research loop]
→ Mark "Stripe Billing API supports usage-based billing" in_progress
→ WebSearch "stripe billing api usage based"
→ Finding: Yes, via "metered billing" - requires usage records API
→ Log finding, mark ✅ verified
→ Mark "Webhooks can be configured per-event type" in_progress
→ WebSearch "stripe webhook event types filter"
→ Finding: Yes, can select specific events in dashboard or API
→ Log finding, mark ✅ verified
→ Mark "Project has webhook endpoint infrastructure" in_progress
→ Grep for "webhook" in codebase
→ Finding: No webhook handling found
→ Log finding, mark ❌ refuted
→ Update approach: Need to add webhook endpoint
[Re-scan]
→ New assumption from updated approach: "Next.js API routes can handle webhooks"
→ Add to unverified list, continue researching
[...continues until all verified...]
[Complete]
→ Present verified plan with all findings
→ Delete state file
## Research Complete
### Goal
Add Stripe subscription billing to the app
### Verified Approach
1. Use Stripe Billing API with metered billing
2. Create new webhook endpoint at /api/webhooks/stripe
3. Handle subscription.created, invoice.paid, subscription.deleted events
4. Store subscription_id and status in users table (add migration)
### Key Findings
- Metered billing requires usage records API calls
- No existing webhook infrastructure - needs to be built
- Stripe webhook signature verification required
### Verified Facts
- ✅ Stripe supports metered billing (docs)
- ✅ Can filter webhook events (docs)
- ✅ Project uses Next.js 14 (package.json)
- ✅ DB uses Postgres with Drizzle ORM (schema.ts)
### Refuted Assumptions
- ❌ "Project has webhook handling" → No, needs to be added
If context compacted mid-research:
User: /research
[Check for existing session]
→ Found .claude/research/main-20260113-213000.md
→ Read state file: Goal is "Add Stripe subscription billing"
→ 3 assumptions verified, 2 remaining
Resuming research session.
Goal: Add Stripe subscription billing
Progress: 3 of 5 assumptions verified
[Continue from next unverified assumption]
→ Mark "DB schema can store subscription metadata" in_progress
→ ...
You are not making educated guesses. You are a researcher establishing facts. Every claim in your final plan should trace back to verified evidence. Keep researching until zero assumptions remain.
The state file is your memory. Create it at the start, read it on resume, delete it when done.
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.