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.
git clone --depth 1 https://github.com/sequenzia/claude-pluginsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/sequenzia/claude-plugins/context-groups)<a href="https://agentmods.dev/commands/sequenzia/claude-plugins/context-groups"><img src="https://agentmods.dev/badge/commands/sequenzia/claude-plugins/context-groups/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/sequenzia/claude-plugins/context-groups"><img src="https://agentmods.dev/badge/commands/sequenzia/claude-plugins/context-groups.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00010 | $0.01741 |
| Opus 5.5 | $0.00004 | $0.00696 |
| Sonnet 5.5 | $0.00002 | $0.00348 |
| Haiku 4.5 | $0.00001 | $0.00174 |
Grade A, and why
context-groups 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 3mo ago.
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.
How it starts
The opening of the file, as written. The whole thing — 246 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Generate context groups from an existing task list, organizing tasks into batches that fit within AI context window limits.
Process
-
Parse arguments
$1= Project name (optional)--max-tokens=N= Maximum context window tokens (default: 100000)--reserve=N= Reserved tokens for agent responses (default: 20000)
-
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
- If project name provided: Read
-
Load token configuration
- Read defaults from
skills/spec-task-management/references/context-defaults.json - Apply any command-line overrides
- Read defaults from
-
Calculate token estimates for each task
Use complexity-based estimation:
Complexity Base Tokens XS 500 S 1,500 M 4,000 L 10,000 XL 25,000 Add overhead:
- Base per task: 200 tokens
- Per hard dependency: 100 tokens
-
Build dependency graph
- Create adjacency list from hard dependencies
- Detect any cycles (should already be handled)
- Calculate in-degree for each task
-
Topological sort by execution phase
- Order tasks by their execution_phase first
- Within phase, order by dependency depth (tasks that unblock more come first)
- Break ties by priority (critical > high > medium > low)
-
Bin-pack tasks into context groups
effective_limit = max_tokens - reserve_tokens current_group = new group current_tokens = 0 for each task in sorted_order: # Calculate tokens needed for task + any hard deps not yet assigned task_tokens = estimate_tokens(task) unassigned_dep_tokens = sum(estimate_tokens(d) for d in task.hard_deps if not d.assigned) total_needed = task_tokens + unassigned_dep_tokens # Check if task exceeds effective limit (oversized) if task_tokens > effective_limit: # Close current group if not empty if current_group.tasks.length > 0: mark_group_end(current_group.tasks.last) save_group(current_group) # Create dedicated group for oversized task oversized_group = new group with oversized_warning=true add_task(oversized_group, task) mark_group_start(task) mark_group_end(task) save_group(oversized_group) current_group = new group current_tokens = 0 continue # Check if adding task exceeds limit if current_tokens + total_needed > effective_limit: # Close current group mark_group_end(current_group.tasks.last) save_group(current_group) # Start new group current_group = new group current_tokens = 0 # Add unassigned hard dependencies first (in order) for dep in task.hard_deps: if not dep.assigned: if current_group.tasks.length == 0: mark_group_start(dep) add_task(current_group, dep) current_tokens += estimate_tokens(dep) # Add the task if current_group.tasks.length == 0: mark_group_start(task) add_task(current_group, task) current_tokens += task_tokens # Close final group if current_group.tasks.length > 0: mark_group_end(current_group.tasks.last) save_group(current_group) -
Handle dependency chains exceeding limit
- If a chain of hard dependencies exceeds limit, split at minimum-cut points
- Add
context_handoffmetadata to indicate split - Document which outputs from previous group are needed
-
Update task file
- Add
context_group_idto each task - Set
context_group_starton first task of each group - Set
context_group_endon last task of each group - Add
estimated_tokensto each task - Add
context_groupsarray at root level - Update
metadata.context_configwith configuration used - Set
metadata.total_context_groups
- Add
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.
- 3mo ago First seen · 246 lines · 0 tokens per session scan A 7e2c825253d7
context-groups is a command published in the GitHub repository sequenzia/claude-plugins (2 stars, last pushed 10mo ago), licensed MIT. It adds 10 tokens to every session and 1,741 once invoked, about $0.0000 per session on Opus 5.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.
context-groups compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| context-groupssequenzia/claude-plugins | Command | 2 | 10mo ago | MIT | A | 10 | Claude Code |
| checklistgithub/spec-kit | Command | 153k | today | MIT | A | 13 | Claude Code |
| clarifygithub/spec-kit | Command | 153k | today | MIT | A | 27 | Claude Code |
| specifygithub/spec-kit | Command | 153k | today | MIT | A | 13 | Claude Code |
| analyzegithub/spec-kit | Command | 153k | today | MIT | A | 26 | Claude Code |
| convergegithub/spec-kit | Command | 153k | today | MIT | A | 35 | Claude Code |
| implementgithub/spec-kit | Command | 153k | today | MIT | A | 14 | Claude Code |