>- Expand all TaskMaster tasks with deep research before coding begins. Reads tasks.json, launches parallel research agents per task in waves using the research-expander agent. Writes findings back to tasks.json. Part of the prd-taskmaster toolkit. Use after PRD is parsed and before implementation. Invoke with /expand-tasks.
npx skills add https://github.com/anombyte93/prd-taskmaster --skill expand-tasks
Expands TaskMaster tasks with research before coding begins.
Deterministic operations handled by script.py; AI handles judgment.
Script location: skills/expand-tasks/script.py (relative to plugin root)
Part of: prd-taskmaster plugin
Depends on: research-expander agent (parallel research worker), any research
provider configured via task-master models --set-research or registered as an
MCP research tool.
Activate when user says: expand tasks, research tasks, research before coding for all, expand subtasks.
Do NOT activate for: single task research (use /research-before-coding), PRD generation (use /prd:go).
Before launching agent waves, check the cheaper path: the native engine expands tasks
in parallel for free. Prefer python3 script.py expand — backend op expand (native api) —
or the expand_tasks MCP tool: it runs structured expand across pending tasks
concurrently (inheriting the engine's ThreadPoolExecutor) on economy-tier models /
keyless host CLIs and merges atomically.
Use THIS skill's agent waves when: no provider/CLI is available, native expand reports
failures for specific tasks (rerun just those here), or the research must be repo-grounded
(agents can read the codebase; native expand cannot).
tasks.json must exist (run /prd:go first)task-master models --set-research <model> --<provider> for any task-master provider family, or (b) an MCP research tool registered in ~/.claude.json that Claude Code can call directly (for example mcp__plugin_prd_go__* tools or an external search/reason MCP)tasks.jsonpython3 skills/expand-tasks/script.py read-tasks
Returns JSON: total, expanded, pending_expansion, tasks[].
If pending_expansion is 0: Report all tasks already expanded. Exit skill.
If research provider is not configured: Check via task-master models and verify a research role is set. If none, tell the user to configure one (task-master models --set-research <model> --<provider>) and exit. The skill does not assume any specific research backend — it uses whatever is configured.
Use AskUserQuestion:
AI judgment: Recommend "All tasks" for initial expansion, "By dependency level" for incremental work.
For each task to expand:
python3 skills/expand-tasks/script.py gen-prompt --task-id <ID>
Returns JSON with prompt field containing the full research agent prompt.
AI judgment: Review the auto-generated prompt. Customize research questions if the task needs domain-specific queries. Add project context from the PRD or session-context files if relevant.
Launch research agents in parallel waves. Each wave = up to 5 concurrent agents.
For each task, spawn a Task agent using the dedicated research-expander
subagent type (defined in agents/research-expander.md):
Task(
subagent_type: "research-expander",
description: "Research Task <ID>: <title>",
run_in_background: true,
prompt: <prompt from Step 3>
)
Wave strategy:
Wait for each wave to complete before launching the next. Parallel dispatch
only happens WITHIN a wave; waves themselves are serial.
As each research-expander agent completes, save its research output:
cat > /tmp/research-task-<ID>.md <<'EOF'
<agent output>
EOF
tasks.json: python3 skills/expand-tasks/script.py write-research --task-id <ID> --research /tmp/research-task-<ID>.md
python3 skills/expand-tasks/script.py status
AI judgment: Review each research result for quality. If a result is too thin (< 5 lines of useful content) or clearly failed, re-run that specific task's research through a fresh research-expander invocation.
The gen-prompt command generates prompts that follow the
research-before-coding pattern:
research-expander agent is tool-agnostic: it picks up whichever research tools are available in the current Claude Code session. This may be task-master research, an MCP search/reason tool from ~/.claude.json (including any mcp__plugin_prd_go__* tools registered by this plugin), WebSearch as a last resort, or whatever the user has bound. The skill does not hard-code any specific research MCP.Critical: prefer structured research tools (task-master research, MCP
search/reason tools) over raw WebSearch/WebFetch when available — they produce
cleaner outputs with citations.
| Error | Action |
|-------|--------|
| Research provider unreachable or rate-limited | Exit skill, tell user to verify task-master models research role is set and reachable |
| research-expander agent returns empty/failed | Re-run that specific task with different queries |
| tasks.json not found | Exit skill, tell user to run /prd:go first |
| Task already expanded | Skip silently unless user forces re-expansion |
| Agent timeout | Mark task as failed, continue with others |
After all tasks are expanded, the skill reports:
This skill fits between Step 8 (Parse & Expand Tasks) and Step 11 (Choose Next
Action) of the prd-taskmaster workflow. After PRD is parsed into tasks but
before execution begins.
/prd:go → generates PRD → parses into tasks
↓
/expand-tasks → research-expander agents run in Parallel waves → writes findings back to tasks.json
↓
Implementation begins (with research context in each task)
research_notes field of each task in tasks.jsonresearch-expander agent typically completes in ~30s depending on research backend and query depth; 15 tasks ≈ 3 waves ≈ 2-3 minutes totalAssists in writing high-quality content by conducting research, adding citations, improving hooks, iterating on outlines, and providing real-time feedback on each section. Transforms your writing process from solo effort to collaborative partnership.
Identifies high-quality leads for your product or service by analyzing your business, searching for target companies, and providing actionable contact strategies. Perfect for sales, business development, and marketing professionals.
Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.
Efficient database search tool for bioRxiv preprint server. Use this skill when searching for life sciences preprints by keywords, authors, date ranges, or categories, retrieving paper metadata, downloading PDFs, or conducting literature reviews.
Query and analyze scholarly literature using the OpenAlex database. This skill should be used when searching for academic papers, analyzing research trends, finding works by authors or institutions, tracking citations, discovering open access publications, or conducting bibliometric analysis across 240M+ scholarly works. Use for literature searches, research output analysis, citation analysis, and academic database queries.
Access USPTO APIs for patent/trademark searches, examination history (PEDS), assignments, citations, office actions, TSDR, for IP analysis and prior art searches.
Multiagent AI system for scientific research assistance that automates research workflows from data analysis to publication. This skill should be used when generating research ideas from datasets, developing research methodologies, executing computational experiments, performing literature searches, or generating publication-ready papers in LaTeX format. Supports end-to-end research pipelines with customizable agent orchestration.
Automated LLM-driven hypothesis generation and testing on tabular datasets. Use when you want to systematically explore hypotheses about patterns in empirical data (e.g., deception detection, content analysis). Combines literature insights with data-driven hypothesis testing. For manual hypothesis formulation use hypothesis-generation; for creative ideation use scientific-brainstorming.
Take anombyte93/expand-tasks from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.