jpicklyk/task-orchestrator/batch-complete
Claude Code and agent skill by jpicklyk/task-orchestrator
- community
Checking that the SKILL.md file is still in the repository.
Completes or cancels many items at once, closing out a feature subtree or cleaning up old work; use when a user says: close out this feature, complete everything under X, cancel this workstream, clean up old items, bulk complete, finish this feature, or archive completed work.
Install
npx vskill@latest install jpicklyk/task-orchestrator/batch-completeSKILL.md
batch-complete - Bulk Complete or Cancel Items
Close a feature subtree, cancel an abandoned workstream or clean up stale items in one call, with a preview first and a report of exactly what applied, was skipped or failed. Shapes are in `_generated/call-shapes.md` (items_write complete_tree); semantics are in current/docs/api-reference.md ("complete_tree"). Ids below are 8-hex shorts and any id field also takes the full UUID. The tool is orchestration-profile only.
Director mode
Director mode is the session state entered by /task-orchestrator:director (or by running as the hardened director agent). Nothing here runs inline except run control: closing a whole run is runs_write close on the director profile. Closing or cancelling items is delegated: SendMessage the run's coordinator when the items are members of an open or paused run, otherwise dispatch ONE background Agent (run_in_background: true, model set) that runs the steps below. The agent reports the counts applied, skipped and failed and the ids of any failed item, never note bodies. A background agent dispatched by a director is not in director mode: it runs the steps below.
Step 1 - Identify scope
Resolve $ARGUMENTS to an id with a search; if several match, show them via AskUserQuestion.
With no argument, classify the request from the conversation:
- Feature subtree: "everything under X" - find X and use
rootId. - Specific items: the user lists names or ids - collect each id and use
itemIds. - Cleanup: old or stale items - search by title or filter
items_readlist(role,modifiedBefore), collect the ids and useitemIds.
If the scope is still unclear, ask: "Which item (or items) do you want to complete? Give a root id, a title fragment or a list of ids."
Run-membership check
complete_tree runs every item through the normal transition path, so an item that belongs to an open or paused run is subject to that run's seat rules. List the root's runs (one status per call), then read each run's frontier; a non-terminal member is in ready, inFlight or waiting:
If any target (or any descendant of a rootId scope) is a non-terminal member, ask with AskUserQuestion:
Run members whose schema has no seats are protected only by this check; the server will not refuse them. A call from a kind: human credential is never seat-refused either.
Step 2 - Preview impact
data.childCounts is the direct children by role (zero roles omitted; lifecycle-free items are counted under no role and complete_tree leaves them out). Show a preview labelled by the trigger (complete or cancel):
childCounts covers direct children only; for a deeper tree read items_read list with ancestorId and count by role. For an itemIds scope, items_read get each item (use list for 10 or more).
If any item is in work or review, warn that active work will be force-completed (gates still apply) and ask:
Wait for the answer and record the trigger.
Add a blocked row to the preview. Under complete, blocked items fail invalid_transition (resume them first). Under cancel, list each awaiting_decision item with its decisionId (items_read blocked with ancestorId, or get per id) and warn that the decision stays open after the cancel; have it answered or withdrawn first (withdraw: the raiser or the run's coordinator token, director profile):
Step 3 - Gate pre-check
Skip this if cancel was chosen: it bypasses note gates (not claim ownership). For complete the definitive check runs at execution; a pre-check just surfaces problems early. Read each child's state:
complete checks the required notes of every phase, so gateStatus.missing for the current phase understates what is needed; the schema[] entries with required: true and filled: false are the full list. Display warnings, then ask:
For option 1, resolve each item's guidance with items_read schema (fields: ["guidance"]) and write the notes with notes_write. For option 2, switch to cancel.
Step 4 - Execute
Subtree. The descendants run in dependency order and the root runs last (includeRoot defaults to true; set it false to leave the root open):
Specific items (exactly one of rootId and itemIds):
Cancel (bypasses note gates):
Report from data.results[0]. items[] has one entry per item:
outcome | Meaning | |
|---|---|---|
applied | moved to terminal (previousRole, newRole) | |
skipped, reason: already_terminal | already done, or terminalized by a cascade earlier in this call; not a failure | |
skipped, reason: upstream_failed | an in-set blocker failed (blockedBy[] lists it); retry after fixing that item | |
failed | rejected; error.code says why (gate_blocked with detail.missing, dependency_unmet, not_claim_holder, resource_unavailable, invalid_transition, seat_forbidden, unauthenticated) |
A cascade entry can carry blocked: seat when a seat rule stopped the parent. summary is {total, applied, skipped, failed}. A per-item failure is data: the applied transitions still commit together. A store fault or unavailable fails the whole element and rolls it back. An element failure (a store fault, unavailable, or not_found/ambiguous_id on rootId) answers call-level partial_failure; its code is on data.results[0].error.
After a cancel, report every cancelled item whose decision is still open and who can withdraw it (the raiser, or the run's coordinator token).
Step 5 - Cleanup (optional)
To fully archive a workstream, confirm first (AskUserQuestion: delete everything under X, this cannot be undone), then delete the root with its subtree:
A parent without recursive: true fails invalid_request. The answer's deleted counts the item and its descendants.
Troubleshooting
Items failed the gate. Fill each item's missing notes with notes_write and rerun complete_tree; items already terminal are skipped as already_terminal. Or switch to cancel.
Items skipped as `upstream_failed`. Fix the upstream failure first (fill its notes), then rerun. The rerun processes every item not yet terminal, the formerly upstream_failed ones included; terminal ones skip as already_terminal.
`not_found` or `ambiguous_id` on `rootId`. The id matches nothing, or an 8-hex prefix matches several items. Look it up again with items_read get, or search by title, and use the full id.
Everything reports `already_terminal`. Expected: the workstream is already closed.
`forbidden`. The token's scope does not admit the whole tree, so nothing ran.
Examples
Close a completed feature. Preview shows 3 queue items and 1 terminal; no active items, all notes filled. complete_tree with rootId and trigger: complete answers summary {total: 5, applied: 4, skipped: 1, failed: 0} (the terminal child is already_terminal; the root completes last).
Cancel an abandoned workstream. "Cancel the Legacy API Migration feature." The preview shows active work; the user picks cancel. complete_tree with trigger: cancel moves every item to terminal, with no note gates enforced. Items cancelled directly get statusLabel: cancelled; an auto parent whose last child is cancelled is closed by the terminal cascade in the same call and keeps the cascade label (done by default), then reports skipped / already_terminal. That includes the root unless its lifecycle is manual or permanent, or the root is in review or blocked (a cascade does not complete either); includeRoot: false does not prevent it, it only leaves the root out of processing. Read the parents' labels before reporting the workstream as cancelled.
Mixed result. complete over an auth feature applies 3 items, fails Implement login (gate_blocked, missing implementation-notes) and skips its dependent test item as upstream_failed. Fill the note, rerun, and the two remaining items are processed.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingclaude-plugins/task-orchestrator/skills/batch-complete/SKILL.md
Popularity
- Repository stars
- 170
- Repository forks
- 18
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jpicklyk/task-orchestrator/batch-complete)