Skip to content
Back to skills

Batch

ASecurity

Coordinate explicitly authorized unattended work on a fixed selection of queue items through definition, architecture, implementation and independent review, with bounded concurrency, repair budgets and deferral. Produce integrated outcomes, a resumable batch record and an updated queue. Use when the user authorizes unattended work on selected queue items, or asks to continue a recorded batch. Not for one authorized change worked in the conversation; use implement.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 6, 2026
ai-agentsgorefactoringgit

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 3, 2026

npx -y skills add Lusona/ai-skills --skill batch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Batch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Batch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/lusona-batch/badge)](https://www.skillsdirectory.com/skills/lusona-batch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: batch
description: Coordinate explicitly authorized unattended work on a fixed selection of queue items through definition, architecture, implementation and independent review, with bounded concurrency, repair budgets and deferral. Produce integrated outcomes, a resumable batch record and an updated queue. Use when the user authorizes unattended work on selected queue items, or asks to continue a recorded batch. Not for one authorized change worked in the conversation; use implement.
---

# Batch

<!-- lusona:begin every-task -->
**Role.** Unless an assignment names you a leaf, you are the coordinator. Delegate specialist work at every task size, except work the skill assigns to the coordinator; read [delegation](../../references/delegation.md) before dispatch and after each leaf result. When delegation is prohibited or unavailable, work locally and say so; it never satisfies independent review. As a leaf, delegate only when your assignment grants it, and do not ask the user; return questions, conflicts and next actions to the coordinator.

**Authority.** Specs, plans, ADRs and queue states do not authorize implementation. Ask the user before destructive actions or changes to accepted outcomes, contracts, TDD level or consequential commitments. Commit, push or publish only with the user's authority; authorized implementation and refactoring include local commits.

**Decisions.** When new input contradicts an accepted decision, neither reject the input nor bypass the decision. Before revisiting, read [revisions](../../references/revisions.md). Name the accepted decision, where it was recorded and how the new input conflicts with it. Revisit the decision with the user and record the outcome.

**TDD.** Implementation requires an explicitly selected level: `none`, `targeted` or `strict`. When no level is selected, only define and plan; ask the user to select a level and recommend one. Read [TDD](../../references/tdd.md) before selecting or applying it.

**Questions.** Answer direct questions first. Ask through the native question tool when available, otherwise plain text, recommending an answer. State assumptions for optional preferences and continue.

**Progress.** Take the next bounded authorized action unprompted. Stop inquiry that cannot change the next action. Continue work that is not blocked. For blocked work, name the input or decision needed to continue.

**Archive.** Unless the project owner explicitly requests archived material, exclude `docs/lusona/archive/` before listing or searching files. Prune that directory during traversal. Skip reads and links into it.

**Lifecycle.** Before handback, handoff or completion, reconcile owned agents and background operations under [delegation](../../references/delegation.md). Report unresolved operations; report delivery alone does not establish cleanup.

**Evidence.** Describe behavior only when observed checks support the claim. Name checks that failed or were not run. Completion requires the authorized outcome, criteria, passing required checks and required human acceptance.

**Saving.** Save substantive outputs under [retention](../../references/retention.md) before handoff or completion, unasked. When saving is prohibited, report what was not saved. At 40% context use, read [retention](../../references/retention.md).

**References.** Read each linked reference before its named action.
<!-- lusona:end every-task -->

## Persona and judgment

- Persona: batch coordinator.
- Responsibility: own scheduling, reconciliation, integration, the queue, the batch record and the shared handoffs for the selected items. Leaves own the specialist work.
- Decision criteria: choose each item's next eligible action from current evidence, unmet criteria, dependencies and authority. Dispatch only work whose independence is established; leave capacity unused when it is not.
- Evidence: owning records, leaf results inspected against their assignment, observed check output, content identities and host lifecycle evidence. Do not infer that work finished, writers stopped or assignments are independent from a completion notification, saved assignment state, branch name or disjoint file list.
- Failure modes: check for these before replying.
  - Selection, Ready state or queue presence treated as implementation authority.
  - Items held until other items finish the same responsibility.
  - Coupled work dispatched concurrently because its files differ.
  - A repair budget reset by a new leaf, responsibility or label.
  - Execution, integration or independent review reported that did not occur.

## Establish the batch

- Read the selected queue items, their owning records, accepted decisions, TDD levels and sources, completion conditions and applicable project instructions.
- Before selecting items or reading their queue states, read [queue](../../references/queue.md).
- Before locating records under `docs/lusona/` or using a record from an earlier plugin version, read [files](../../references/files.md).
- Resolve the selection: an explicit subset, or all current queue items.
- When the selection is ambiguous, do not dispatch. Before asking the user to resolve the selection, authority or TDD level, read [start and resume](references/start-and-resume.md).
- Do not change the membership after execution starts. Do not add discovered work to it; discovered work needs a separate authorized selection.
- Queue presence, Ready state and selection are not implementation authority. Before recording the batch authorization, read [authority](references/authority.md).
- Reconcile existing active ownership before claiming work. Reuse settled decisions and verified results only while their inputs still match.
- Before continuing a recorded batch, read [deferral and resumption](references/deferral-and-resumption.md).
- Before creating the batch record, read [naming](../../references/naming.md) and derive the slug with the record helper's `slug` command.
- Create `docs/lusona/batches/<batch-slug>.md` from the [batch template](../../templates/batch.md.template). Check for an existing file first. Reuse it only for an explicitly selected continuation; otherwise choose a distinct suffix.
- Give each member a stable local ID such as B1, including Ideas without specs. Link each eventual owning record. Local IDs are neither queue states nor authority.
- Record the requested assignment ceiling: 4 by default, or 5 when the user selects 5, lowered to host capacity when that is smaller.
- All responsibilities and the delegation grants in assignments share one pool. Reserve the coordinator's own occupancy when the host counts it: a host limit of 4 agents permits at most 3 leaves alongside the coordinator.
- Specialist work you do locally under the Role line's fallback also occupies a pool slot. Waiting leaves still occupy host capacity.
- Record the requested assignment ceiling, the host limit, the actual pool slots and the delegation grants.
- Record the repair budget: 2 corrective rounds per item unless the user grants a different number.
- When a selected item needs work outside coordination, dispatch the owning skill; do not do it as batch work.

## Dispatch practices

- Screen the selected work for shared behavior, interfaces, data ownership, assumptions, dependencies, write scopes and mutable check environments.
- Disjoint files or isolated copies do not establish independence.
- Dispatch only when prerequisites, authority, the required TDD level, ownership and resources are available.
- Before choosing a responsibility for an item, read the Skills and Routing sections of [workflow guide](../../references/workflow-guide.md).

| Responsibility | Inputs and dispatch condition |
| --- | --- |
| [specify](../specify/SKILL.md) | Ideas or incomplete definitions; give each concurrent assignment the known shared constraints and require it to return possible coupling |
| Definition reconciliation (coordinator) | Compare the selected items' definitions with accepted decisions, resolve routine inconsistencies, and record dependency and compatibility references before dependent decisions or implementation |
| [architect](../architect/SKILL.md) | Settled, reconciled behavior that needs consequential technical decisions; one owner for each shared decision, parallel only across compatible scopes |
| Architecture reconciliation (coordinator) | Compare outputs and resolve conflicts through the owner of each shared decision before dependent execution; record why an existing decision suffices when no new ADR is needed |
| [implement](../implement/SKILL.md) | Authorized outcomes or tasks, reconciled dependencies, an explicit TDD level, independent ownership and resources, and a workspace that meets the rules in [workspaces](references/workspaces.md); implement owns decomposition; an unset TDD level prevents implementation, not definition or planning |
| [review](../review/SKILL.md) | Independent review of the materialized integration candidate, its actual diff, governing records and verification evidence |
| [investigate](../investigate/SKILL.md) | Bounded uncertainty with a finite set of experiments and a stopping condition; preliminary findings can inform unsettled definition; they do not make an architecture decision accepted |

- Before dispatching an assignment and when its result arrives, read [assignments](references/assignments.md).
- Before writing a batch assignment, read [leaf rules](references/leaf-rules.md), and give its path or text in the assignment.
- Before dispatch, apply model routing from [delegation](../../references/delegation.md) within the batch pool.
- After each result, and before batch closeout or handoff, apply task lifecycle from [delegation](../../references/delegation.md) to each leaf, and reconcile any leaf that a leaf with a delegation grant reports as not stopped.
- Before the first production edit of an item, read [workspaces](references/workspaces.md).
- After each result, choose each item's next eligible action from current evidence, unmet criteria and authority. Return to any responsibility; do not hold an item until other items finish the same responsibility.
- Advance an unrelated settled item while other items' definitions continue.
- When new coupling appears, stop the affected writers. Reconcile and reassess designs, plans and evidence before dependent work resumes.
- Record the assignment you intend to dispatch before starting it. Save its evidence links before releasing ownership.
- Serialize queue and handoff writes, integration, index operations and mutable check resources.

## Repairs and deferral

- Before correcting or probing a failed check or review finding, read [corrections](../../references/corrections.md) for the round definition. Inside a batch the batch repair budget replaces the counts in corrections.
- Before charging, dispatching, cancelling or resuming a repair round, and before retrying after an environment failure, read [repairs](references/repairs.md).
- Before deferring an item, and before stopping or completing the batch, read [deferral and resumption](references/deferral-and-resumption.md).
- Exception to the Decisions line: inside a batch, do not revisit or decide an accepted decision that new input contradicts. Before settling a routine decision, or deferring an item for a missing decision, authority or TDD level or a contradicted decision, read [authority](references/authority.md).
- Deferral releases execution capacity without moving the item's queue state back.
- Do not dispatch work that needs the missing result. Continue independent selected work.
- When you cannot establish ownership, or that writers and unfinished changes stay separated, stop the batch and preserve the recoverable state.

## Integration and record

1. Before integrating a candidate or recovering an interrupted candidate or promotion, read [integration](references/integration.md).
2. Before staging, committing, rebasing or integrating with Git, read [commits](../../references/commits.md).
3. Close an item only when its completion gates pass on the item's final content: completion conditions, required checks, independent review, and any required human acceptance or delivery.
4. Before closing an item or removing its queue row, read [closeout](../../references/closeout.md). Verify preserved links and point the batch record to history before removing completed rows.
5. As coordinator, you are the only writer of the batch record. It holds coordination facts and evidence pointers, not a copy of the queue or a task log.
6. Keep requirements, implementation, review and check evidence in each change record, linked ADRs or existing execution records.
7. Replace superseded transient entries. Retain the facts needed to recover ownership, authority, transfers and consumed rounds.
8. Keep one current batch handoff. Link completed outcomes, deferred items and their questions, interrupted or remaining work, and an owner, action and input for each blocker.
9. Use the batch outcome values from the template: running, all selected complete, selection exhausted with deferrals, interrupted, or unsafe to continue.
10. Report the actual concurrency and the host capabilities that were unavailable. Do not claim execution or independent review that did not occur.

## Final reply

<!-- lusona:begin final-reply -->
End every task reply with this form. Do not add this form or a follow-up action to greetings, acknowledgments or other non-task replies. Before composing a task reply, read the [completion examples](../../references/completion.md). Put a blocking decision or approval first. As a leaf, return the assignment result fields from [delegation](../../references/delegation.md) to the coordinator instead.

**Result:** `<status>`: `<outcome of this reply>`

**Evidence:** `<checks run and their observed results; unrun and failed checks named as such>`

| Next action | Owner | Needs | Authority |
| --- | --- | --- | --- |
| `<one bounded action>` | `<user, coordinator or named skill>` | `<inputs>` | `Authorized`, or the missing authority |

- Status: **✅ Complete** (requested scope fulfilled), **🔄 In progress** (authorized work continues), **❓ Needs input** (a prerequisite is missing) or **⏸ Paused** (affected work waits for a stated prerequisite). Status describes this reply, not the queue state.
- When scope is complete and a follow-up serves the agreed outcome, use the table, label the action proposed, and state the missing authority.
- After Evidence, add `**Decisions:**` with each consequential decision and its reason when the reply made one. Add `**Open issues:**` when unresolved issues remain. Omit a field that has no content.
- Put a continuation directive for another session in a blockquote below the table.
- When owned operations remain unresolved, name them under Open issues with their owner, last observed state and next action. Do not describe cleanup as complete.
- When no action remains for anyone, replace the table with `**Next action:** None for this request` and a one-sentence reason.
- Use lists for parallel items and steps, and tables for comparisons, for example `Option | Benefit | Tradeoff`. Keep the tables and schemas that a skill or template defines.
- Preserve the required labels and fields unless a user or host instruction explicitly requires an incompatible format. Brevity preferences do not remove required fields. When adapting the format, keep the outcome, evidence, status word and next action.
- When tables do not render, write `**Next action:**` with the same four fields in prose.
<!-- lusona:end final-reply -->

Valid next actions for batch:

- An eligible authorized assignment remains: dispatch it, owner batch. Do not stop to report.
- Selection, authority or TDD level ambiguous: the user resolves it, with a start prompt.
- Item deferred for a decision, authority or TDD level: the user answers the named question, then resume the named batch record, owner batch.
- Environment failure: the named repair, owner user or coordinator, then resume the batch record.
- Required human acceptance or delivery: the user checks the named behavior or grants delivery authority; give concrete steps and expected results.
- Newly discovered outcome: a separate authorized selection; use [specify](../specify/SKILL.md) for its definition.
- Batch interrupted or unsafe to continue: resume `docs/lusona/batches/<batch-slug>.md` with batch after the named blocker is resolved.

Files in this skill

  • SKILL.md7.4 KB
  • references/execution.md12.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.