Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
cleanexpo avatar

Context Partitioning

  • 1 installs
  • 1 repo stars
  • Updated June 17, 2026
  • cleanexpo/unite-hub

Helps with ai & agent building tasks.

About

context-partitioning is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • context-partitioning
  • AI & Agent Building
  • AI-coding skill

Context Partitioning by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #14,098 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/cleanexpo/unite-hub --skill context-partitioning

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
repo stars1
Last updatedJune 17, 2026
Repositorycleanexpo/unite-hub

What it does

Helps with ai & agent building tasks.

Files

SKILL.mdMarkdownGitHub ↗

Context Partitioning — Manifest-First Dispatch

The Problem

Without explicit context isolation, the main orchestrator context window accumulates:

  • Full file reads that were only needed once
  • Subagent outputs that are already committed to disk
  • Skill files that don't apply to the current task
  • Historical reasoning that compaction will destroy anyway

Result: context bloat → compaction → rule violations → wrong output.

The Solution: Manifest-First

Rule: Before dispatching ANY subagent, the orchestrator MUST produce a typed manifest. The manifest is the subagent's entire world — it reads NOTHING outside its manifest.

---

Manifest Format

{
  "agent": "frontend-specialist",
  "task": "Add persona avatar upload to SocialPersonasManager",
  "toolshed": "frontend",
  "token_budget": 60000,
  "files": {
    "must_read": [
      "src/components/social/SocialPersonasManager.tsx",
      "src/lib/businesses.ts"
    ],
    "reference_only": [
      "src/app/globals.css"
    ],
    "must_not_touch": [
      "src/lib/supabase/",
      "supabase/migrations/"
    ]
  },
  "skills": ["scientific-luxury", "react-best-practices"],
  "constraints": [
    "founder_id isolation — never workspace_id",
    "Scientific Luxury: #050505 bg, #00F5FF accent, rounded-sm only",
    "Framer Motion only — no CSS transitions"
  ],
  "success_criteria": "Avatar upload renders, persists to Supabase Storage, no TypeScript errors",
  "output_format": "edited_files_list + verification_tier_A_result",
  "verification_agent": "verification"
}

---

Orchestrator Rules (Hard Constraints)

What the Orchestrator MUST do:

1. Glob/Grep only — discover file paths, never read file contents in main context 2. Produce manifest first — before calling any Agent tool 3. Pass manifest as prompt — subagent's entire context = manifest + agent.md 4. Receive structured summary — subagent returns file list + verification output, not full code

What the Orchestrator MUST NOT do:

  • Read full file contents (use Grep for specific lines if truly needed)
  • Hold subagent working files in main context
  • Load skills that don't apply to the current routing decision
  • Re-read files the subagent has already handled

---

Token Budget Enforcement

Agent RoleHard CapConsequence of Breach
Orchestrator80,000Delegate immediately — do not read more files
Frontend Specialist60,000Scope to src/components/ + src/app/ only
Senior Fullstack60,000Scope to task-relevant src/app/api/ + src/lib/ files
Database Specialist40,000Scope to supabase/migrations/ + schema file only
Security Auditor50,000Scope to auth path + affected routes only
Bug Hunter40,000Failing file + direct imports one level deep only
Test Engineer50,000Test file + source file under test only
Verification30,000Verification output only — no source reads

---

Context Scope Definitions

Scope TokenResolves To
src/Full src directory — only for orchestrator planning
failing-file-onlyThe single file containing the error
direct-imports-one-levelFiles imported by the failing file (not transitive)
test-filessrc/**/*.test.ts, src/**/*.spec.ts, tests/
source-file-under-testThe exact file being tested
task-specificOrchestrator selects based on task decomposition

---

Manifest-First Dispatch Protocol

Step 1 — DISCOVER (Orchestrator, Glob/Grep only)
  → Identify affected files by pattern, not by reading
  → Check VAULT-INDEX.md for known asset locations
  → Load toolshed entry from toolsheds.json

Step 2 — MANIFEST (Orchestrator, write manifest)
  → Populate must_read, reference_only, must_not_touch
  → Select max 5-6 skills from toolshed
  → Set token_budget from toolsheds.json
  → Write success_criteria in verifiable terms

Step 3 — DISPATCH (Orchestrator → Agent tool)
  → Pass manifest as the agent's complete prompt
  → Agent reads ONLY manifest.files.must_read
  → Agent loads ONLY manifest.skills

Step 4 — RETURN (Subagent → Orchestrator)
  → Return: list of files modified + verification output
  → Do NOT return full file contents
  → Do NOT return intermediate reasoning

Step 5 — INTEGRATE (Orchestrator)
  → Accept structured summary
  → Route to verification agent
  → Main context stays lean

---

Anti-Patterns (Never Do)

Anti-PatternWhyFix
Read("src/") in orchestratorDumps entire codebase into contextGlob for paths only
Subagent reads files outside manifestContext bleed, token wasteManifest must_not_touch
Return full file content from subagentDoubles context usageReturn file path + diff summary
Load all P1 skills for every taskToken waste on irrelevant skillsLoad toolshed subset only
Re-verify work in orchestratorRedundant, wastes contextDelegate to verification agent

---

Integration with Toolsheds

This skill works in tandem with .claude/data/toolsheds.json:

  • Each toolshed entry defines token_budget, skills, and context_scope
  • Orchestrator selects toolshed by task domain → produces manifest → dispatches

Reference: .claude/AGENT_HARNESS.md Phase 4 for dispatch protocol.

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.