Skip to content
create-task logo

Create Task

create-task

Use when creating any beads task — auto-researches the codebase, links related tasks, and produces a rich self-contained description from a structured template. Accepts minimal intent and outputs a complete task ready for agent implementation.

ahrav/scratch-scanner-rs0installs2stars

SKILL.md

Full skill instructions

Create Task

Creates high-quality, self-contained beads tasks by researching the codebase and assembling a structured description. Every task produced by this skill should give an implementing agent 90% of the context it needs inline.

Core principle: Invest effort at creation time to save 10x at implementation time.

Invocation

/​create-task "Fix off-by-one in window boundary check" --type=bug --priority=1
/​create-task --quick "Add capacity hint to Vec in compile_rules" --type=task --priority=3
/​create-task --dry-run "Refactor transform chain error handling" --type=task --priority=2
/​create-task --from-plan docs/​plans/​2026-02-23-feature-v3.md --step=3

Input formats:

  • Positional string: "title text here"
  • Flags: --title, --type, --priority, --labels, --files-hint, --parent
  • Pasted paragraph with description

Flags:

FlagEffect
--quickSkip research (Phase 1). Apply template with available info only.
--dry-runPrint the full description without creating the beads task.
--from-plan <path> --step=NExtract task from a plan file step.
--type=<type>Task type: task, bug, feature, epic, question, docs (default: task)
--priority=<N>Priority 0-4 (default: 2)
--labels=<a,b>Comma-separated labels
--files-hint=<paths>Comma-separated file paths to seed research
--parent=<id>Parent epic beads ID

Phase 0 --- Parse Intent

  1. Extract from input:

    • Title (required): Clear imperative statement of what to do
    • Brief description: 1-2 sentence context (if provided)
    • Type: default task
    • Priority: default 2
    • Labels, files-hint, parent: if provided
  2. If only a title with no brief description, ask the user:

    What's the 1-2 sentence context for this task? (What problem does it solve or what need does it address?)

  3. If --from-plan is specified:

    • Read the plan file at the given path
    • Extract the step indicated by --step=N
    • Map plan fields: Problem Statement -> Context, Codebase Context -> Current State, step What -> Desired State, step Files -> Files to Modify, step Tests -> Testing Strategy, step Acceptance criteria -> Acceptance Criteria
    • Proceed to Phase 3 (skip research — plan already has codebase context)

Phase 1 --- Research (Explore Agent)

Skip when --quick is passed.

Spawn one subagent_type=general-purpose agent with the structured research prompt below. The agent performs up to ~30 tool calls across 6 steps.

Research Agent Prompt

You are a codebase researcher preparing context for a new task. Your job is to
gather specific, concrete information — NOT to implement anything.

## Task Being Created

**Title**: {TITLE}
**Brief**: {BRIEF_DESCRIPTION}
**Type**: {TYPE}
**Files hint**: {FILES_HINT or "none provided"}

## Research Steps (follow in order)

### Step 1: Find Affected Files
Use Grep and Glob to search for identifiers, types, functions, and concepts
mentioned in the title and brief. Search broadly:
- Exact names and keywords from the title
- Related concepts (synonyms, adjacent functionality)
- File paths mentioned in files-hint

List every file that is likely touched by this task.

### Step 2: Read Relevant Code
Read the specific functions, structs, and modules most relevant to this task.
- Maximum 8 files
- For each, extract the most relevant 5-20 line snippet with file:line header
- Note function signatures, struct definitions, trait impls

### Step 3: Trace Blast Radius
For the primary functions/​types affected:
- Grep for callers and call sites
- Note which modules depend on the affected code
- Identify downstream effects of changes

### Step 4: Find Reusable Patterns
Check for existing utilities that could be reused (per duplication prevention rules):
- Search `src/​stdx/` for related helpers
- Check sibling modules for similar patterns
- Note any existing abstractions that should be extended rather than duplicated

### Step 5: Search Related Beads Tasks
Run: `bd search "{keywords from title}" --limit 10`
For each result, classify the relationship:
- **blocks**: This new task cannot start until that task completes
- **blocked-by**: That task cannot start until this new task completes
- **relates-to**: Related but independent work
- **possible-duplicate**: May be the same task — FLAG THIS

### Step 6: Assess Scope
Based on your research, classify:
- **files_affected**: count of files that will be modified
- **modules_crossed**: count of distinct modules (top-level src/ directories)
- **touches_hot_path**: true/​false — does this touch engine/, scheduler/, or hot loop code?
- **has_unsafe**: true/​false — does affected code contain unsafe blocks?

## Output Format

Return a structured markdown document with these sections:

### Affected Files
| File | Relevance | What Changes |
|------|-----------|-------------|

### Code Snippets
For each relevant snippet:
```rust
// {file_path}:{start_line}-{end_line} — {brief description}
{actual code}

Blast Radius

Caller/​DependentFileRelationship

Reusable Utilities

UtilityLocationHow to Reuse
(or "None found")

Related Tasks

Task IDTitleRelationshipNotes
(or "None found")

Scope Assessment

  • files_affected: {N}
  • modules_crossed: {N}
  • touches_hot_path: {true/​false}
  • has_unsafe: {true/​false}

IMPORTANT: Be concrete. Every file path must be real. Every code snippet must be copied from the actual codebase, not invented. Every task ID must come from bd search output.


---

## Phase 2 --- Link Related Tasks

Process the Related Tasks output from the research agent:

1. **Possible duplicates**: Present to the user with details. Ask before proceeding.
   > Found a possible duplicate: {task_id} "{title}". Should I:
   > (a) Skip creating this task (it's already covered)
   > (b) Create anyway (different scope)
   > (c) Show me more details

   **Never silently create a duplicate.**

2. **Blocking relationships**: After the task is created (Phase 4), run:
   ```bash
   bd dep add <new-id> <blocker-id>
  1. Relates-to: Include in the Related Work section of the description.

Phase 3 --- Compose Description

Assemble the full task description from the template below, filling sections with explore agent output (Phase 1) or available information (if --quick).

Complexity Scaling

ComplexityCriteriaSectionsExpected Length
Trivial1 function, clear fixMandatory only30-60 lines
Standard1-3 files, 1 moduleAll mandatory80-150 lines
Complex3+ files, multi-moduleAll mandatory + conditionals200-400 lines

Determine complexity from the scope assessment (Phase 1) or from the brief description (if --quick).

Mandatory Sections (ALL Tasks)

## Context
{Why this task exists. What problem or need it addresses. What symptom prompted it.}

## Current State
{What exists today with code snippets and file:line references.}

```rust
// src/​engine/​core.rs:142-158 — current boundary check
{actual code from research}

Desired State

{What should exist after. Specific behavior, interface, or structure.}

Implementation Guidance

Files to Modify

FileChangeRationale

Patterns to Follow

{Existing patterns to mirror, with file:line refs. "None" if nothing specific.}

Utilities to Reuse

{From src/​stdx/ or siblings. "None found" if nothing applies.}

Blast Radius

{Callers, downstream effects, call sites needing updates.}

Code References

{3-5 inline snippets of the most relevant current code, each 5-20 lines. Each snippet has a file:line header.}

Related Work

Task IDTitleRelationship
{Or "None found" — section must always be present.}

Acceptance Criteria

  • {Specific verifiable condition}
  • All existing tests pass: cargo test
  • Code compiles clean: cargo fmt --all && cargo check && cargo clippy --all-targets --all-features -- -D warnings

Pointers

{Where to look for the remaining ~10%: docs, related commits, design docs, files to read.}


### Conditional Sections

Include these based on scope assessment:

| Section | Include When | Content |
|---------|-------------|---------|
| **Design Notes** | modules_crossed >= 2 or multiple valid approaches | Trade-offs, alternatives considered, rationale for chosen approach |
| **Risk Analysis** | priority <= 1 or has_unsafe | What could go wrong, mitigation strategies, rollback plan |
| **Performance Considerations** | touches engine/, stdx/, scheduler/ | Hot path impact, allocation concerns, benchmark expectations |
| **Testing Strategy** | files_affected > 1 | What tests to add/​modify, test types (unit, property, integration), coverage goals |

Place conditional sections between "Code References" and "Related Work".

### Handling Missing Information

If the research agent didn't find enough for a section, include the section
with a `[NEEDS ENRICHMENT]` marker:

```markdown
### Blast Radius
[NEEDS ENRICHMENT] — Could not trace all callers. The implementing agent should
grep for usages of `FunctionName` before making changes.

Phase 4 --- Create Task

  1. Write the composed description to a temp file:

    TMPFILE=$(mktemp /​tmp/​task-desc-XXXXXX.md)
    

    Write the description content to the temp file.

  2. Create the beads task:

    bd create --title="{TITLE}" --type={TYPE} --priority={PRIORITY} --body-file="$TMPFILE"
    

    Add --labels={LABELS} if provided. Add --parent={PARENT} if provided.

  3. Register dependencies (from Phase 2):

    bd dep add <new-id> <blocker-id>
    
  4. Clean up temp file:

    rm "$TMPFILE"
    
  5. Show the created task:

    bd show <new-id>
    
  6. Present summary to user:

    Created task: {id}
    Title: {title}
    Type: {type} | Priority: P{priority}
    Sections: {count} mandatory + {count} conditional
    Related tasks linked: {count}
    Dependencies added: {count}
    

Dry Run Mode

If --dry-run is passed, skip step 2-4. Instead, print the full description to the user with a header:

--- DRY RUN: Task Description Preview ---
Title: {title}
Type: {type} | Priority: P{priority}

{full description}

--- End Preview (no task created) ---

Anti-Patterns

Anti-PatternWhy It's WrongDo This Instead
Creating a task with no descriptionAgent wastes time rediscovering contextAlways use this skill or follow the template
Writing "see review for details"External reference will rot; agent can't work itInline all context in the description
Code references without file:lineAgent can't find the codeAlways include file path and line numbers
Acceptance criteria like "it works"Not verifiableSpecific conditions: "function returns X when given Y"
Skipping Related Work searchCreates duplicates, misses dependenciesAlways run bd search
Research agent reading 20+ filesDiminishing returns, bloats contextCap at 8 files, focus on most relevant
Silently creating a duplicateWastes implementation effortAlways present possible duplicates to user

Related Skills

  • /​plan-forge — creates implementation plans; use --create-tasks to auto-generate tasks from plan steps
  • /​execute-review-findings — converts review findings to tasks (uses compatible template)
  • /​review-dispatch — produces findings that may become tasks

More skills from ahrav

execute-review-findings logo
ahrav/scratch-scanner-rs

execute-review-findings

Use when you have code review findings, PR comments, or review reports that need to be systematically addressed — especially when there are multiple findings across different files and severities

2 0
View
deep-research logo
ahrav/scratch-scanner-rs

deep-research

Deep research before design — 3-5 parallel research agents survey papers, production systems, failure modes, and prior art, then a synthesizer compiles evidence, and an integrator maps findings to a concrete codebase plan with citations

2 0
View
perf-regression logo
ahrav/scratch-scanner-rs

perf-regression

Performance regression testing workflow for hot path changes

2 0
View
safe-over-unsafe logo
ahrav/scratch-scanner-rs

safe-over-unsafe

Use when designing safe public APIs that wrap unsafe Rust code, adding unsafe blocks to existing types, reviewing unsafe code for soundness, or creating new types backed by raw pointers, MaybeUninit, or FFI

2 0
View
linux-perf-profile logo
ahrav/scratch-scanner-rs

linux-perf-profile

Deep Linux perf profiling — PMU counters, topdown analysis, flamegraphs, and annotated hotspot drill-down on ARM/Graviton

2 0
View
doc-rigor logo
ahrav/scratch-scanner-rs

doc-rigor

Write-then-verify documentation pipeline. Use when a user asks to

2 0
View
sqlite-review logo
ahrav/scratch-scanner-rs

sqlite-review

Review and tune SQLite schemas, queries, indexes, and pragmas. Connects to the actual database to gather concrete evidence (EXPLAIN QUERY PLAN, page counts, table stats) before recommending changes.

2 0
View
review-dispatch logo
ahrav/scratch-scanner-rs

review-dispatch

Parallel specialist code review — 6 focused agents (correctness, design, performance, safety, docs, complexity) diverge independently, then a single ranker merges findings into an importance-ranked report with confidence scores

2 0
View
sim-run logo
ahrav/scratch-scanner-rs

sim-run

Run deterministic simulation tests with progressive difficulty levels (sunny/stormy/radioactive) inspired by TigerBeetle VOPR — orchestrates seed management, workload selection, and invariant verification

2 0
View
archive-src logo
ahrav/scratch-scanner-rs

archive-src

Use when the user wants a minimal source-only archive for upload or checkpoint. Creates a tar.gz with just src/ and tests/ directories.

2 0
View
security-reviewer logo
ahrav/scratch-scanner-rs

security-reviewer

Audit memory safety and security in unsafe code blocks, buffer handling, and security-sensitive operations

2 0
View
sim-scaffold logo
ahrav/scratch-scanner-rs

sim-scaffold

Scaffold simulation-testable modules with sans-IO pattern, proptest state machine tests, and fault injection points — prevents retrofitting costs by making code DST-ready from the start

2 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View