context-assembler

Assemble relevant context packages for agent spawns within token budgets.

Updated Nov 7, 2025
One-click install
npx skills add https://github.com/mehdic/CDC --skill context-assembler
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-assembler
Source: https://github.com/mehdic/CDC/tree/main/.claude/skills/context-assembler
Command: npx skills add https://github.com/mehdic/CDC --skill context-assembler

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill compiles the most relevant context packages for a given agent spawn, prioritizing by relevance and staying within token budgets.

Core Features & Use Cases

  • Retrieves context_packages, error_patterns, and reasoning data
  • Applies per-agent limits and token budgets
  • Returns a context block ready to embed in prompts

Quick Start

Assemble context for a Developer spawn in session bazinga_20250112_143022 and write results to bazinga/artifacts/{SESSION_ID}/skills/context.json.

Frequently Asked Questions about context-assembler

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I assemble relevant context within token budgets for agent prompts?

Context assembler retrieves and prioritizes relevant context packages for agent spawns while enforcing token budget limits. It ranks packages by relevance, applies per-agent retrieval limits, and outputs structured context blocks ready to embed in downstream prompts without exceeding your token allocation.

What's the best way to manage token limits when compiling context for multiple agent roles?

The Skill applies graduated token budget zones and per-agent limits loaded from configuration for developer, senior engineer, QA, tech lead, and investigator roles. Each role receives prioritized context packages up to its configured retrieval limit, ensuring balanced token distribution across agent spawns.

Can I rank context packages by relevance without full-text search dependencies?

Yes, context assembler uses FTS5-agnostic heuristic ranking to prioritize packages by relevance without requiring full-text search infrastructure. It applies configurable ranking logic and token budget calculations with safety margins, then outputs ranked context blocks for immediate use.

How does context assembler capture and learn from error patterns in agent reasoning?

The Skill retrieves error patterns alongside context packages and reasoning data during orchestrator-driven agent spawns. It captures error patterns for learning, enabling downstream agents to refine their reasoning based on historical failures and improving future context selection.

What input data and environment setup do I need before assembling context?

Provide context packages, error patterns, reasoning data, and per-agent configuration specifying retrieval limits and token budgets. The Skill processes these inputs during an orchestrator-driven agent spawn and outputs structured context blocks to a configurable artifact path.

Why use heuristic ranking over traditional search when retrieving context packages?

Heuristic ranking eliminates dependency on full-text search infrastructure while maintaining relevance prioritization and token budget enforcement. It scales efficiently for agent-driven workflows, applies configurable safety margins to token calculations, and outputs context blocks immediately without external indexing overhead.