lembas

lembas is a skill for Claude Code, Codex from justinjdev/fellowship. It costs 45 tokens per session (988 once invoked), scanned A, original, Apache-2.0.

A conversation-summary tool that compresses a long working session into a structured record of the task, findings, files, current state, and next steps. It is intended to keep important context available as the conversation grows.

In plain words
What is it for?
Use it between workflow phases, after verbose investigations, before changing focus, or whenever the conversation has accumulated too much detail.
Why use it?
Long conversations can make it harder to find and use earlier details. A compact summary helps continue work without rereading every previous message or log.

Skill for Claude CodeCodex

Part of the fellowship plugin — 20 skills, 19 commands, 6 agents, 3 hooks shipped together

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.

agentmods
npx agentmods add skills/justinjdev/fellowship/lembas
Any agent
npx skills add justinjdev/fellowship --skill lembas
Clone the repo
git clone --depth 1 https://github.com/justinjdev/fellowship

Made for: Claude Code, Codex.

Or install fellowship, the plugin that ships this one along with the rest of its 20 skills, 19 commands, 6 agents, 3 hooks.

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 lembas

README.md
[![agentmods](https://agentmods.dev/badge/skills/justinjdev/fellowship/lembas.svg)](https://agentmods.dev/skills/justinjdev/fellowship/lembas)
Your own site
<a href="https://agentmods.dev/skills/justinjdev/fellowship/lembas"><img src="https://agentmods.dev/badge/skills/justinjdev/fellowship/lembas.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 988 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00045 $0.00988
Opus 5 $0.00023 $0.00494
Sonnet 5 $0.00009 $0.00198
Haiku 4.5 $0.00005 $0.00099

Measured 4d ago against content hash ed287fb8d463, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

lembas 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 4d 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.

plugin/skills/lembas/SKILL.md · 113 lines

How it starts

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

Lembas — Intentional Context Compression

Overview

Compresses the current conversation into a structured summary to keep the context window in the "smart zone." This is the intentional compaction pattern from context engineering — proactively trimming context between phases rather than waiting for overflow.

Reasoning quality degrades as a context window fills — well before it overflows. This skill is the mechanism for staying in the sweet spot by compacting early and often.

When to Use

  • Between phases of the quest workflow (invoked automatically by /quest)
  • After any stretch of verbose output you would not re-read (build logs, long file reads, exploratory searches, failed-attempt noise) — if in doubt, compact
  • Before switching focus within a session
  • Standalone via /lembas

Process

Step 1: Identify Current Phase

Determine what just completed:

  • Research: Understanding the system, identifying files
  • Plan: Outlining steps, getting approval
  • Implement: Writing code, running tests
  • Review: Checking against conventions
  • Ad hoc: No formal phase — general work

Step 2: Extract Essentials

Review the conversation and extract only what matters for the next phase. Be aggressive about discarding noise:

Keep:

  • Decisions made and their rationale
  • Files identified with specific line ranges
  • Constraints discovered
  • Open questions that still need answers
  • Test results (pass/fail, not full output)

Discard:

  • Raw grep/search output (keep only the conclusions)
  • Full file contents (keep only relevant line ranges)
  • Verbose build/test output (keep only the verdict)
  • Exploratory dead ends (keep only what was learned)
  • Repeated information

Step 3: Produce Compacted Context Block

Output in this exact format:

## Compacted Context

### Phase Completed: [Research | Plan | Implement | Review | Ad hoc]

### Task
[one-line description, carried forward from Session Context]

### Package(s)
[package name(s) and path(s), carried forward from Session Context]

### Key Findings
- [decisions made this phase]
- [constraints discovered]
- [patterns identified]

### Files
- [file:lines] — [what's relevant and why]
- [file:lines] — [what's relevant and why]

### Current State
- [what's been done so far]
- [what's working / what's broken]

### Next Phase
- [what needs to happen next]
- [open questions to resolve]

Read the full file on GitHub · 113 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. 4d ago First seen · 113 lines · 45 tokens per session scan A ed287fb8d463

Subscribe to this mod's changes

lembas is a skill published in the GitHub repository justinjdev/fellowship (5 stars, last pushed 21d ago), licensed Apache-2.0. It adds 45 tokens to every session and 988 once invoked, about $0.0002 per session on Opus 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-31.

Related

Other skills, from other repositories

continuous-learning

ProductionOS instinct-based learning system. Observes sessions via hooks, extracts patterns, creates atomic instincts with confidence scoring, and auto-promotes high-confidence patterns across projects.

ShaheerKhawaja/ProductionOS · 36 tokens

compress

Prompt-Studio memory compressor. Shrinks CLAUDE.md, todo lists, and preference files into Prompt-Studio's lean format to cut input tokens on every load. Preserves all technical substance, code, URLs, and structure. Compressed output overwrites the original; human-readable backup stored out-of-tree as FILE.original.md…

utk2103/Prompt-Studio · 98 tokens

ai-instruction-detox

AI 指令排毒與規則治理:把散落在 CLAUDE.md、AGENTS.md、skills、context、memory 的規則 原子化、查衝突、去重複、找過時、揪 Prompt Injection,產出可套用的精簡架構與回復方案。 觸發時機:用戶說「指令排毒」「規則太亂」「CLAUDE.md 太長」「規則互相矛盾」「上下文減肥」 「AI 設定治理」「多個 Agent 規則分裂」「context 膨脹」,或要求審查/清理 AI 指令檔。 不要觸發:一般程式重構、產品程式碼審查、單純想縮短一份文件(那是編輯不是治理)。.

mars-tw/ai-instruction-detox · 188 tokens

wrap

Use when ending a session, wrapping up, or saying "session end", "wrap up", "update files". Reviews the conversation and updates brain files, workflows, registry, and decisions log based on what happened.

ne11nn/cantos-plugin · 45 tokens

brain-uninstall

Use when users want to remove or disconnect the mybrain plugin's persistent memory layer. Handles teardown for all database strategies (Docker, local PostgreSQL, remote PostgreSQL), config file removal, and offers a disconnect-only option that preserves the database.

robertsfeir/atelier-pipeline · 53 tokens

brain-hydrate

Use when users want to bootstrap the brain with existing project knowledge -- reading ADRs, feature specs, UX docs, commit history, and error patterns to seed institutional memory on a project that already has artifacts on disk. Also use for incremental re-hydration after significant work outside the pipeline.…

robertsfeir/atelier-pipeline · 90 tokens