mk:context-engineering

mk:context-engineering is a skill for Claude Code from ngocsangyem/MeowKit. It costs 144 tokens per session (2,067 once invoked), scanned A, original, MIT.

A runtime guide for deciding how much project context a coding agent should read during a task. It covers choosing, compressing, isolating, or stopping context so the agent can stay focused.

In plain words
What is it for?
Use it when a task has many possible files to inspect, the session is nearing its context limit, or the agent begins drifting or losing quality.
Why use it?
It helps avoid loading too much irrelevant material, losing important information in a long session, or continuing to read after enough context is available. It is for decisions during one task, not a permanent configuration audit.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions subagents.

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/ngocsangyem/meowkit/context-engineering
Any agent
npx skills add ngocsangyem/MeowKit --skill context-engineering
Clone the repo
git clone --depth 1 https://github.com/ngocsangyem/MeowKit

Made for: Claude Code.

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 mk:context-engineering

README.md
[![agentmods](https://agentmods.dev/badge/skills/ngocsangyem/meowkit/context-engineering.svg)](https://agentmods.dev/skills/ngocsangyem/meowkit/context-engineering)
Your own site
<a href="https://agentmods.dev/skills/ngocsangyem/meowkit/context-engineering"><img src="https://agentmods.dev/badge/skills/ngocsangyem/meowkit/context-engineering.svg" alt="Measured on agentmods" height="20"></a>
Per session 144 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,067 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.1 $0.00144 $0.02067
Opus 5 $0.00072 $0.01033
Sonnet 5 $0.00029 $0.00413
Haiku 4.5 $0.00014 $0.00207

Measured 2d ago against content hash 5065abbd592c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

mk:context-engineering 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 2d 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.

.claude/skills/context-engineering/SKILL.md · 163 lines

How it starts

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

mk:context-engineering — Runtime Context Router

Decide the next context move for the task in front of you: read more, stop, ask, assume, or delegate — then load at most one pattern reference to execute it. This skill routes decisions; it does not preload a knowledge library.

Boundary vs mk:context-audit: that skill audits structural .claude/ overhead (what is statically loaded every session). This skill decides runtime context moves for one task. Structural question → context-audit. Runtime question → here. If a request is ambiguous between the two (e.g. "this project's context is messy"), ask ONE question — structural .claude/ setup or this session's runtime context? — then route.

When to Use

  • Context is near its working ceiling and phases remain — decide what to keep.
  • A long session is drifting or output quality is slipping.
  • You must choose the minimal read-set before a task (Plan/Build/Review).
  • You are choosing between /compact, /clear, and spawning a sub-agent.
  • A known pattern applies (lost-in-middle, RAG dump, few-shot drift) and you want the routing.

When NOT to Use

  • Auditing .claude/ token overhead → mk:context-audit.
  • Persisting a learning or reading memory topic files → mk:memory.
  • Finding where code lives → mk:scout (or Read for one known file).
  • USD run cost → mk:budget.
  • A trivial 1–2 file task — no routing needed; just do it.

Four Operations

The whole surface reduces to four moves. Name the one you need, then triage.

  • Write — push durable state out of the window (memory file, scratchpad, handoff brief) so it survives compaction. Route via the persistence patterns.
  • Select — load the smallest high-signal set; extract the function, not the file. Default stance for every read.
  • Compress — summarize essential state and restart when the window degrades; re-ground the summary against sources.
  • Isolate — give a sub-agent its own focused window for an independent slice; return a distilled result, not raw context.

Read the full file on GitHub · 163 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 163 lines · 144 tokens per session scan A 5065abbd592c

Subscribe to this mod's changes

mk:context-engineering is a skill published in the GitHub repository ngocsangyem/MeowKit (14 stars, last pushed 1mo ago), licensed MIT. It adds 144 tokens to every session and 2,067 once invoked, about $0.0007 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-09-03.