next-group

A command for selecting and preparing the next context group in a project task file. A context group is a set of related tasks that an agent handles together within its available working context.

In plain words
What is it for?
Use it to locate the active or next pending group, mark it active, check completed tasks, and show the remaining work.
Why use it?
It removes the need to manually find the right task file, decide which group comes next, and update its progress status.

Command

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/sequenzia/claude-plugins/next-group
Clone the repo
git clone --depth 1 https://github.com/sequenzia/claude-plugins
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,128 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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.00008 $0.01128
Opus 5 $0.00004 $0.00564
Sonnet 5 $0.00002 $0.00226
Haiku 4.5 $0.00001 $0.00113

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

Security

Grade A, and why

next-group 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.

plugins/task-manager/commands/next-group.md · 161 lines

How it starts

The opening of the file, as written. The whole thing — 161 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Get the next context group that should be executed by an AI coding agent. This command helps with context window management by identifying which group to work on next.

Process

  1. Parse arguments

    • $1 = Project name (optional)
  2. Locate and read the task file

    • If project name provided: Read tasks/$1.tasks.json
    • If no project name: Find most recently modified .tasks.json
  3. Verify context groups exist

    • Check for context_groups array in task file
    • If not found, suggest running /task-manager:context-groups first
  4. Find active or next pending group

    • First, look for a group with status: "active" (already started)
    • If none active, find first group with status: "pending"
    • Skip groups with status: "completed"
  5. Check if current group is complete

    • If active group exists, verify all tasks are complete
    • If all complete, mark group as completed and move to next pending
  6. Mark next group as active

    • Update the group's status to "active"
    • Save the updated task file
  7. Calculate group progress

    • Count completed tasks in this group
    • Calculate percentage complete
    • Identify remaining tasks
  8. Display group information

Format output as:

## Next Context Group: CG-002

**Status:** Active
**Estimated Tokens:** 68,500 / 80,000 available

### Progress
- Tasks: 1 of 4 complete (25%)
- Phases Covered: 2, 3

### Tasks in This Group

| Order | Task | Status | Priority | Complexity | Est. Tokens |
|-------|------|--------|----------|------------|-------------|
| 1 | TASK-005: Setup auth module | complete | high | M | 4,200 |
| 2 | TASK-006: Implement login flow | not_started | high | L | 10,200 |
| 3 | TASK-007: Add session handling | not_started | medium | M | 4,200 |
| 4 | TASK-008: Create logout endpoint | not_started | medium | S | 1,700 |

### Dependencies Within Group
- TASK-006 depends on TASK-005 (complete)
- TASK-007 depends on TASK-006
- TASK-008 depends on TASK-005 (complete)

### Ready to Start
The following tasks have all dependencies satisfied:
- **TASK-006:** Implement login flow (high priority, L complexity)
- **TASK-008:** Create logout endpoint (medium priority, S complexity)

---

**Recommended:** Start with TASK-006 (high priority, unblocks TASK-007)

**Context Handoff Notes:**
Previous group (CG-001) completed:
- Auth configuration (TASK-004)
- Database schema (TASK-003)

These outputs are available for reference in this group.

---

When all tasks in this group are complete, run `/task-manager:next-group` to move to the next context group.

Read the full file on GitHub · 161 lines

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 · 161 lines · 8 tokens per session scan A a44eeab472b6

Subscribe to this mod's changes

next-group is a command published in the GitHub repository sequenzia/claude-plugins (2 stars, last pushed 7mo ago), licensed MIT. It adds 8 tokens to every session and 1,128 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.