add-subtask

A command for adding a smaller task beneath a larger parent task. A subtask is a focused piece of work that helps complete the parent task.

In plain words
What is it for?
Use it to create one or more subtasks from natural-language instructions, or to place an existing task under a parent task.
Why use it?
It breaks complex work into manageable pieces and keeps related tasks organised under the work they belong to.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/snarktank/code-editing-agent/add-subtask
Clone the repo
git clone --depth 1 https://github.com/snarktank/code-editing-agent

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 456 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00456
Opus 5 $0.00000 $0.00228
Sonnet 5 $0.00000 $0.00091
Haiku 4.5 $0.00000 $0.00046

Measured yesterday against content hash 6afcb2773455, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

add-subtask scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to add-subtask — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/tm/add-subtask/add-subtask.md · 76 lines

What it actually says

Add a subtask to a parent task.

Arguments: $ARGUMENTS

Parse arguments to create a new subtask or convert existing task.

Adding Subtasks

Creates subtasks to break down complex parent tasks into manageable pieces.

Argument Parsing

Flexible natural language:

  • "add subtask to 5: implement login form"
  • "break down 5 with: setup, implement, test"
  • "subtask for 5: handle edge cases"
  • "5: validate user input" → adds subtask to task 5

Execution Modes

1. Create New Subtask

task-master add-subtask --parent=<id> --title="<title>" --description="<desc>"

2. Convert Existing Task

task-master add-subtask --parent=<id> --task-id=<existing-id>

Smart Features

  1. Automatic Subtask Generation

    • If title contains "and" or commas, create multiple
    • Suggest common subtask patterns
    • Inherit parent's context
  2. Intelligent Defaults

    • Priority based on parent
    • Appropriate time estimates
    • Logical dependencies between subtasks
  3. Validation

    • Check parent task complexity
    • Warn if too many subtasks
    • Ensure subtask makes sense

Creation Process

  1. Parse parent task context
  2. Generate subtask with ID like "5.1"
  3. Set appropriate defaults
  4. Link to parent task
  5. Update parent's time estimate

Example Flows

/project:tm/add-subtask to 5: implement user authentication
→ Created subtask #5.1: "implement user authentication"
→ Parent task #5 now has 1 subtask
→ Suggested next subtasks: tests, documentation

/project:tm/add-subtask 5: setup, implement, test
→ Created 3 subtasks:
  #5.1: setup
  #5.2: implement  
  #5.3: test

Post-Creation

  • Show updated task hierarchy
  • Suggest logical next subtasks
  • Update complexity estimates
  • Recommend subtask order
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 76 lines · 0 tokens per session scan A 6afcb2773455

Subscribe to this mod's changes

add-subtask is a command published in the GitHub repository snarktank/code-editing-agent (24 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 456 tokens. A static security scan graded it A with 0 findings. It is 100% identical to add-subtask, differing in 0 lines, and is treated as a copy.