Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

task-bulk-ops

БесплатноБез исполняемых скриптовНе проверен

Batch taskwarrior operations without the ID-renumbering and stdin foot-guns. Use when closing/triaging/modifying many tasks in one pass, bulk `task done`…

laurigatesот laurigates★ 61 звезда на GitHub

Об этом скилле

/taskwarrior:task-bulk-ops

Operate on many taskwarrior tasks in one pass — queue cleanup, a PR-merge sweep, a project wrap-up — without hitting the four foot-guns that make the obvious for id in 1 2 3; do task $id done; done silently do the wrong thing. Every foot-gun fails invisibly: the loop reports success, the count looks right, and the wrong tasks (or no tasks) were touched.

When to Use This Skill

Use this skill when... Use a sibling skill instead when...
Closing / annotating / modifying many tasks in one pass Closing one task with a landing commit — use task-done
Running a bulk task done loop over a queue Retiring tasks whose GitHub issue/PR closed — use task-reconcile
Scripting a query over the queue (export | jq, tag/project filters) Reading a consolidated queue report — use task-status
Any state-changing op iterated over a set of tasks Filing / claiming / releasing a single task — use task-add / task-claim / task-release

Context

  • Task CLI available: !task --version
  • Pending task count: !task status:pending count

Parameters

Parse $ARGUMENTS as an optional taskwarrior filter that narrows the set to operate on (e.g. project:foo, +bulk status:pending, +gh). When empty, ask the user which set to target before mutating anything — never bulk-mutate an unfiltered queue by default.

Execution

Execute bulk operations under these four rules. They are not optional style preferences — skipping any one silently corrupts the batch.

Rule 1 — Address tasks by UUID, never numeric ID

Taskwarrior numeric IDs are a display index over pending tasks: the moment any task completes, every higher ID shifts down by one. A numeric ID is stale across any gap between reading and acting — a loop iteration, a later turn, a new session, or an unrelated task done in another session.

Resolve the immutable UUID at read time, then use only UUIDs for every later op:

# Loop over a set — capture UUIDs up front (they never shift)
UUIDS=$(task status:pending project:foo export | jq -r '.[] | .uuid')
for u in $UUIDS; do
  task "$u" done </dev/null            # (Rule 2: </dev/null)
done
# Acting later? Resolve the UUID the moment you know you'll act, not the number.
PROMOTE=$(task _get 169.uuid)          # 169 is valid RIGHT NOW, at read time
# ...any number of turns / unrelated closes later...
task "$PROMOTE" done </dev/null        # still the right task

If you only have a numeric ID and a gap has passed, re-derive it (re-run the export/list, re-match on description) before acting — do not trust the cached number. The same applies to annotate / modify / delete: any state-changing op iterated over a set references UUIDs.

The +LATEST _get trap. _get is a DOM accessor taking an <id>.<attribute> reference — given a filter (a tag like +LATEST) it silently returns empty (exit 0) and captures nothing. To grab the UUID of the task you just added, use the +LATEST-aware accessor or export | jq:

task +LATEST uuids                          # → UUID of the just-added task
task +LATEST export | jq -r '.[0].uuid'     # always exit-0, parallel-safe

Do not reach for the _get DOM accessor with a tag filter to grab that UUID — task +LATEST _get uuid silently returns empty (exit 0). _get needs an <id>.<attribute> reference: task _get <id>.uuid works for a known numeric id, but the just-added task's UUID comes from task +LATEST uuids.

Rule 2 — Redirect stdin and disable confirmation on every mutation

task done (and other mutating subcommands) read from stdin. Inside a shell for loop the loop's input is stdin, so task done eats the remaining iterations and the loop exits early after one or two — reporting "processed 15" while closing 1. Two safe forms:

# Form A — redirect stdin per inner command
for u in $UUIDS; do
  task "$u" annotate "swept in cleanup" </dev/null
  task "$u" rc.confirmation=no done </dev/null
done
# Form B — xargs runs each command in its own subshell, no stdin link (preferred one-liner)
echo "$UUIDS" | xargs -I {} sh -c 'task rc.confirmation=no {} done'

Always pass rc.confirmation=no to batch task done — without it taskwarrior may prompt "blocked by N other tasks, complete anyway?" and hang.

task config has the same confirmation hazard — and it's worse. task config <name> <value> prompts to confirm by default; non-interactively (a script, this Bash tool, a hook, chezmoi) the un-answered prompt makes it exit 0 without writing the value. The failure is invisible. The sharpest bite is declaring UDAs:

# WRONG — exits 0 but the UDA is NOT written; next `task add foo ghid:1417`
# appends the literal "ghid:1417" to the description instead of setting the UDA
task config uda.ghid.type numeric

# RIGHT — rc.confirmation=no makes the write happen; </de
Полный SKILL.md на GitHub

Установить task-bulk-ops в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash(task *)
Bash(jq *)
Bash(xargs *)
Read
TodoWrite

FAQ

Что делает скилл task-bulk-ops?

Batch taskwarrior operations without the ID-renumbering and stdin foot-guns. Use when closing/triaging/modifying many tasks in one pass, bulk `task done` loops, or scripting task queries.

Как установить скилл task-bulk-ops?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл task-bulk-ops запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить task-bulk-ops с