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.
npx skills add myths-labs/muse --skill layered-contextgit clone --depth 1 https://github.com/myths-labs/museWrote 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/skills/myths-labs/muse/layered-context)<a href="https://agentmods.dev/skills/myths-labs/muse/layered-context"><img src="https://agentmods.dev/badge/skills/myths-labs/muse/layered-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.
<a href="https://agentmods.dev/skills/myths-labs/muse/layered-context"><img src="https://agentmods.dev/badge/skills/myths-labs/muse/layered-context.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.00023 | $0.00931 |
| Opus 5.5 | $0.00009 | $0.00372 |
| Sonnet 5.5 | $0.00005 | $0.00186 |
| Haiku 4.5 | $0.00002 | $0.00093 |
Grade A, and why
layered-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.
How it starts
The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Layered Context Loading Protocol
Inspired by OpenViking (ByteDance) L0/L1/L2 architecture. Adapted for MUSE's on-demand Markdown context loading.
Why
Full-loading all .muse/*.md files during /resume wastes tokens when the Agent only needs one role's context. The layered approach loads minimum context first, then deepens on demand.
Three Layers
| Layer | Token Budget | Content | When to Load |
|---|---|---|---|
| L0 | ~100 tokens | One-line HTML comment at top of each .muse/*.md |
Always — scan ALL role files |
| L1 | ~2K tokens | Full role file content | On demand — only the CURRENT role's file |
| L2 | Unbounded | memory/*.md + code files + docs |
On demand — grep search when needed |
L0 Format
Every .muse/*.md file MUST have an L0 comment as the first line:
<!-- L0: v2.10.1 | P0=竞品技术吸收, P1/P2全清, QA PASS, S036已接收 -->
L0 Content Rules
- Max 120 characters (excluding
<!-- L0:and-->) - Must include: current version + top priority + blocking issues
- Pipe-separated sections:
version | priorities | status - Updated every /bye — when the role file is synced
L0 Examples
<!-- L0: v2.10.1 | P0=竞品技术吸收(mem0/OpenViking), P1全清, QA 10/10 PASS -->
<!-- L0: 9/9渠道已发, Show HN暂缓, S040梗图排期中, Stars=2 -->
<!-- L0: 最近QA全PASS(10/10 v2.3), 无待修FAIL, QA清洁状态 -->
Boot Sequence with Layered Loading
/resume [role]
│
├─① Read CLAUDE.md + MEMORIES.md (constitutional layer, always)
│
├─② Scan ALL .muse/*.md L0 lines (grep "<!-- L0:" .muse/*.md)
│ → Get one-liner status of every role in ~400 tokens total
│
├─③ Deep-read CURRENT role's .muse/*.md (L1, full file)
│ → Only the file matching /resume [role]
│
├─④ Scan memory/ for unfinished items (L2, on demand)
│ → grep 🔲 and [ ] in recent memory files
│
└─⑤ grep strategy.md for 🟡 directives (L2, on demand)
→ Only if non-strategy role
Decision Tree: When to Upgrade
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.
- 1mo ago Changed d1046d085764
- 1mo ago First seen · 96 lines · 23 tokens per session scan A e16b6ee61ee9
layered-context is a skill published in the GitHub repository myths-labs/muse (37 stars, last pushed 3d ago), licensed MIT. It adds 23 tokens to every session and 931 once invoked, about $0.0001 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-30.
Other skills, from other repositories
contextstream-coach
Coach this agent on work the person needs again and again, such as a weekly note, an article, a recap or an image series. Use it when the person starts a job for one of their workflows, reacts to a draft, or asks what was learned from earlier jobs. Goals, drafts and the person's own words are saved in their…
engram
Local-first personal AI identity and memory layer for MCP-compatible coding tools (Claude Code, Codex, Cursor, and others). Use this skill when the user wants to continue from a previous session ("continue from last session", "pick up where we left off"), recall a past decision ("what did we decide", "what was our…
context-receipts
Emit privacy-safe receipts for context selection, deferral, hydration, compaction, pruning, delegation, usage attribution, and boundary handoffs.
geminiignore-finops
Configure and optimize .geminiignore files for AI context window efficiency and token cost reduction (FinOps).
kiro-steering-custom
Create custom steering documents for specialized project contexts.
daily-journal
A passive daily work journal that Claude keeps FOR you so you never have to write it yourself. Append short entries after meaningful work (what was done, what you focused on, artifacts touched) to 01-daily/journal/YYYY-MM-DD.md. Run a guided reflection at night or in the morning. Use when you run /daily-journal, say…