assembling-context

assembling-context is a skill for Claude Code, Codex from axiomantic/spellbook. It costs 56 tokens per session (1,068 once invoked), scanned A, original, MIT.

A method for selecting and organizing the information given to another coding agent or task. It keeps essential instructions, decisions, files, interfaces, and blockers within a fixed token budget.

In plain words
What is it for?
It is for preparing context packages for design, implementation, review, handoff, or subagent work.
Why use it?
It helps prevent important context from being lost or truncated when the available input space is limited. It also avoids sending irrelevant material to the next agent.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit It is for preparing context packages for design, implementation, review, handoff, or subagent work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/axiomantic/spellbook/assembling-context
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.

Any agent
npx skills add axiomantic/spellbook --skill assembling-context
Clone the repo
git clone --depth 1 https://github.com/axiomantic/spellbook

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for assembling-context

README.md
[![agentmods](https://agentmods.dev/badge/skills/axiomantic/spellbook/assembling-context/github.svg)](https://agentmods.dev/skills/axiomantic/spellbook/assembling-context)
Your own site
<a href="https://agentmods.dev/skills/axiomantic/spellbook/assembling-context"><img src="https://agentmods.dev/badge/skills/axiomantic/spellbook/assembling-context/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.

agentmods 80×15 button for assembling-context

Your own site · 80×15
<a href="https://agentmods.dev/skills/axiomantic/spellbook/assembling-context"><img src="https://agentmods.dev/badge/skills/axiomantic/spellbook/assembling-context.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,068 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00056 $0.01068
Opus 5.5 $0.00022 $0.00427
Sonnet 5.5 $0.00011 $0.00214
Haiku 4.5 $0.00006 $0.00107

Measured 1mo ago against content hash 60131fdbb354, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

assembling-context 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 1mo 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.

skills/assembling-context/SKILL.md · 105 lines

How it starts

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

Context Assembly

Invariant Principles

  1. Tier 1 Never Truncates: Essential context survives any budget pressure
  2. Budget Before Assembly: Calculate budget FIRST, then select
  3. Purpose Drives Selection: Design context differs from implementation differs from review
  4. Recency Over Completeness: Recent feedback beats historical context
  5. Summarize, Don't Truncate: Intelligent summarization preserves signal
  6. Integration Points are Tier 1: Interface contracts are essential

Inputs / Outputs

Input Required Description
purpose Yes design, implementation, review, handoff, subagent
token_budget Yes Maximum tokens available
source_context Yes Raw context to select from
Output Description
context_package Tiered context ready for injection
truncation_report What was excluded and why

Context Tiers

Over budget: remove Tier 3 first, then Tier 2. Never remove Tier 1.

Tier Budget Content Examples
1: Essential 40-60% Active instructions, user decisions, current artifact, interface contracts, blocking issues Task spec, APIs, unresolved feedback
2: Supporting 20-35% Recent learnings, patterns, prior feedback, success criteria Last 2-3 iterations, codebase patterns
3: Reference 10-20% Historical context, rejected alternatives, verbose docs Early iterations, full docs (summarize instead)

Purpose-Specific Packages

Purpose Tier 1 Focus Budget Split Use With
Design Requirements, decisions, constraints, integration points 50/30/20 design-exploration, writing-plans
Implementation Task spec, acceptance criteria, interfaces, test expectations 60/25/15 test-driven-development, executing-plans
Review Code diff, requirements traced, test results 55/30/15 code-review, fact-checking
Handoff Current position, pending work, active decisions, blocking issues 70/20/10 session boundaries, compaction
Subagent Task, constraints, expected output format 65/25/10 dispatching-parallel-agents

Read the full file on GitHub · 105 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. 1mo ago First seen · 105 lines · 56 tokens per session scan A 60131fdbb354

Subscribe to this mod's changes

assembling-context is a skill published in the GitHub repository axiomantic/spellbook (11 stars, last pushed yesterday), licensed MIT. It adds 56 tokens to every session and 1,068 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

batch

Execute batch operations on multiple files in parallel. Automatically discovers files, splits into chunks, and processes with parallel worker agents. Use /batch followed by operation and file pattern. For many independent single-turn transforms (translate/rewrite/extract each file into a new file) that can wait…

QwenLM/qwen-code · 102 tokens

batch-api

Prepare a many-file, single-turn transform (translate, rewrite, extract) as a plan and submit it to the asynchronous, half-price DashScope Batch API; results are delivered as new files hours later. Invoke explicitly with /batch-api.

QwenLM/qwen-code · 51 tokens

loop

Create a loop that runs a prompt now and follows up either on a fixed schedule or through self-paced wakeups. Usage - /loop check the build, /loop 5m check the build, /loop check the PR every 30m. /loop list to show jobs, /loop clear to cancel all.

QwenLM/qwen-code · 66 tokens

openrig-herdr

Use when opening OpenRig fleet terminals as a herdr wall — turning a rig, pod, mission, slice, or saved view into live interactive agent tiles via rig terminal, watching another rig read-only, or driving herdr on an agent's request ("open all my rigs + a mission as views"). Covers the rig terminal open|views|status…

mvschwarz/openrig · 132 tokens

mission-slice-sop

Use when starting, building, handing off, restoring, or closing a mission or slice under the default lightweight SDLC.

mvschwarz/openrig · 30 tokens

community

Use when building or running a persistent two-way community space — Discord, Telegram, Circle: platform choice, structure, onboarding, native→bot→human moderation, rituals, growth loops, health metrics. NOT churn of paying product customers (that is retention), NOT broadcast email (that is newsletter), NOT one live…

ericrisco/rsc-harness · 77 tokens