context-management

context-management is a skill for Claude Code from kitchen-engineer42/joharnessburg. It costs 48 tokens per session (1,831 once invoked), scanned A, original, MIT.

A skill for keeping long-running John sessions coherent across hours or days. It uses a saved goal, compact summaries, stored tool results, and controlled sub-agent context.

In plain words
What is it for?
Use it for extended knowledge-heavy projects that span multiple sessions, especially when work must continue after context is reduced.
Why use it?
It reduces the risk of losing the project's direction or important findings when the conversation becomes too large or a session is compacted.

Skill for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: reads .claude/ paths; mentions subagents; mentions Claude Code.

Part of the john plugin — 28 skills, 5 commands, 5 agents, 3 hooks shipped together

Good fit Use it for extended knowledge-heavy projects that span multiple sessions, especially when work must continue after context is reduced.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kitchen-engineer42/joharnessburg/context-management
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.

Any agent
npx skills add kitchen-engineer42/joharnessburg --skill context-management
Clone the repo
git clone --depth 1 https://github.com/kitchen-engineer42/joharnessburg

Made for: Claude Code.

Or install john, the plugin that ships this one along with the rest of its 28 skills, 5 commands, 5 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 context-management

README.md
[![agentmods](https://agentmods.dev/badge/skills/kitchen-engineer42/joharnessburg/context-management.svg)](https://agentmods.dev/skills/kitchen-engineer42/joharnessburg/context-management)
Your own site
<a href="https://agentmods.dev/skills/kitchen-engineer42/joharnessburg/context-management"><img src="https://agentmods.dev/badge/skills/kitchen-engineer42/joharnessburg/context-management.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,831 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00048 $0.01831
Opus 5 $0.00024 $0.00915
Sonnet 5 $0.00010 $0.00366
Haiku 4.5 $0.00005 $0.00183

Measured 8d ago against content hash 0cbe733d2bf0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

context-management 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 8d 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.

plugins/joharnessburg/skills/context-management/SKILL.md · 126 lines

How it starts

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

context-management

John sessions are designed to run long. A knowledge-heavy project might span 4-8 hours of focused work. The active coding agent's context window is large but not infinite. This skill is the five-part discipline that keeps you coherent across long runs and degrades you gracefully when context exhausts.

The five techniques

You should use all five. They compound.

1. Endurance goal pinned in system prompt

If the user has run /john:endurance <goal>, that goal is in <project>/.john/workspace.json and the SessionStart hook will inject it into your system prompt at the top of every session (and every post-compaction state). It survives compaction because the system prompt isn't windowed.

In Claude Code, set the goal with /john:endurance <goal> and inspect or clear it with /john:endurance or /john:endurance --clear. In Codex, invoke endurance-goal with the same intent.

What this gives you: even after compaction wipes most of conversation history, the endurance-race direction is still in front of you. You know what you're working toward.

If no endurance goal is set, the project's intent from PLAN.md's top section serves the same role — read it as step 1 of every loop iteration.

An endurance goal also changes one default: assume the session is workflow-configured (/effort ultracode, dynamic workflows available) and don't pause a long run to re-confirm config — see [[vertical-workflows]]. The user who set an endurance goal prepared the session; interrupting hours of autonomy to ask about a setting defeats the mode. If the Workflow tool is genuinely absent, fall back to inline dispatch and log it in PLAN.md instead of stopping.

Wording shapes behavior. Frame the goal as scope + discipline, not scope alone. A pure-scope goal — "complete the entire plan," "finish everything" — quietly biases toward checking phases off fast, and an "and verify carefully" tacked onto the same sentence gets read as decoration. Pair the scope with the bar it must clear: "complete phases 1-3, every done-criterion met before advancing" or "implement strictly from the skill references, quality over speed." Two genuinely-met phases beat five checked-off shells; the goal is a compass for direction, not a deadline that licenses cutting corners. (If you're setting the goal for the user, prefer this framing; if it's already set as pure scope, read it that way — as direction, not as permission to rush.)

Read the full file on GitHub · 126 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. 8d ago First seen · 126 lines · 48 tokens per session scan A 0cbe733d2bf0

Subscribe to this mod's changes

context-management is a skill published in the GitHub repository kitchen-engineer42/joharnessburg (9 stars, last pushed 2mo ago), licensed MIT. It adds 48 tokens to every session and 1,831 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.