If you're running orchestrator-worker agent systems and watching token costs compound as the orchestrator's trajectory gets replayed to every worker, this skill shows you how to share state at the KV cache level instead of text. It adapts Attention Matching compaction with task-guided queries and robust thresholding to keep only the positions the worker actually needs for its current subtask. The technique requires runtime access to KV tensors, so it won't work through standard APIs, but the documented results show material worker-token savings on long-document QA with low-single-digit-second overhead. It's a specialized primitive for systems where summarization is too lossy and full context replay is too expensive.

skills.sh installs
195
GitHub stars
18.3K
last updated
May 26, 2026

Install

$ npx -y skills add muratcankoylan/agent-skills-for-context-engineering --skill latent-briefing --agent claude-code

Installs into .claude/skills of the current project.

Files

Latent Briefing and KV Cache Memory Sharing

Hierarchical multi-agent systems often pay for the same context twice. The orchestrator accumulates a long reasoning trajectory, but each worker usually receives only a narrow text handoff such as a subtask prompt plus raw document slices. Passing the full trajectory fixes coverage but drives token cost up on every worker call. Summarization introduces latency and information loss. Retrieval helps with document access but does not preserve the orchestrator's evolving reasoning state.

Latent Briefing addresses this by sharing memory at the representation level rather than the text level. The core idea is to compact the orchestrator trajectory in the worker model's KV cache, keeping positions that are most relevant to the current worker task. The method builds on Attention Matching (AM) KV cache compaction and adapts it for inference-time multi-agent handoff with task-guided queries, a shared token mask across heads, and robust thresholding.

When to Activate

Activate this skill when:

Sponsors

Details

Repository
github.com/muratcankoylan/agent-skills-for-context-engineering
Categories
Backend & APIs, AI & Agent Building, Automation & Workflows
License
MIT
First seen
Jun 11, 2026

More from muratcankoylan/agent-skills-for-context-engineering

All 17
1charleswiltgen avataraxiom-cloudkit-refcharleswiltgen/axiomUse when implementing 'CloudKit sync', 'CKSyncEngine', 'CKRecord', 'CKDatabase', 'SwiftData CloudKit', 'shared database', 'public database', 'CloudKit zones', '194skills.sh installs
2iii-hq avatariii-workflow-orchestrationiii-hq/iiiOrchestrates durable multi-step workflow pipelines on the iii engine. Use when building order fulfillment, data pipelines, task orchestration, or any sequential194skills.sh installs
3prompt-security avatarclawsec-scannerprompt-security/clawsecAutomated vulnerability scanner for agent platforms. Performs dependency scanning (npm audit, pip-audit), multi-database CVE lookup (OSV, NVD, GitHub Advisory),194skills.sh installs
4charleswiltgen avataraxiom-ios-networkingcharleswiltgen/axiomUse when implementing or debugging ANY network connection, API call, or socket. Covers URLSession, Network.framework, NetworkConnection, deprecated APIs, connec193skills.sh installs
5lattifai avataromnicaptions-translatelattifai/omni-captions-skillsUse when translating captions/captions to another language. Supports bilingual output and context-aware translation. Default uses Claude native, Gemini API opti193skills.sh installs
6davila7 avatarsalesforce-developmentdavila7/claude-code-templatesExpert patterns for Salesforce platform development including Lightning Web Components (LWC), Apex triggers and classes, REST/Bulk APIs, Connected Apps, and Sal192skills.sh installs