In short:
ak-context-engineeringreads the measurements your runtime provides and keeps four things apart: context in use, total tokens for the job, usage limits and money. Then it helps you leave room, checkpoint at the right time and compare models by real results. When you need a new session, it hands off through the handoff skill you have installed. It never cuts scope or skips checks to save tokens, and it does not switch models on its own.
Disclosure: I maintain AgentKit and have an affiliate relationship with it: the AgentKit link in this post is an affiliate link; buying through it gets you 30% off.
Summary
Use it when a long session starts to slow down or forget constraints, when you are about to start a long job and want to know when to checkpoint, or when you wonder which model is really cheaper for a kind of task. You do not need it for a short job of a few steps: it just does the work, with no extra notes.
flowchart LR
A["Question about context, tokens, models"] --> B["ak-context-engineering"]
B --> C["Answer based on measurements"]
B --> D["Checkpoint, then compact"]
B --> E["Hand off with the installed handoff skill"]
C --> F["Back to the current work"]
D --> FFour ideas it rests on:
| Concept | Question | Example |
|---|---|---|
| Four different quantities | What does the number you are looking at measure? | The statusline shows 72%: that is the context window for the current turn, not 72% of your weekly limit, and not money spent |
| Context bands are only hints | When should you stop and write a checkpoint? | You are at 60%, but the next step reads a log bigger than the free space: checkpoint now, do not wait for Orange |
| A checkpoint good enough to resume | What does the next session need to continue without guessing? | Goals and constraints word for word, files and edits made, decisions with reasons, commands run and results, open items, the next safe step |
| Cost per first-try success | Which model is cheaper once failed attempts count? | Model A costs 0.2 USD per task but gets only half right on the first try, so each success costs 0.4 USD |
The Green, Yellow, Orange and Red bands are only defaults for reference: the free space and the size of the next step matter more. If the runtime gives no measurement, it writes "unknown" instead of guessing a percentage.
Sample prompt for a slow, forgetful session:
/ak-context-engineering This session has started rereading files it already read and forgot the constraint
"do not change the public API". Help me recover the right state, then compact safely.
Current plan: <plan path>.This skill has no flags.
Below is the detailed version: the run flow, 5 situations with prompts, the change history by ak release, and common pitfalls. The detailed version and the interactive page are for subscribers. Your agent can also search them through the portal's MCP.
Opens when your account has subscriber access
This guide is for subscribers
Once your account has access, the full piece, the interactive visual and the agent call all open.
- Sign in or create a modernEngineer accountReading access belongs to your account email.
- Choose a plan on the pricing page1, 3 or 12 months, paid by VietQR bank transfer. Access opens about a minute after the money arrives.
- Or redeem a Facebook subscriber codePeople supporting the page on Facebook get an activation code by message each month.
Already a subscriber? Sign in to read.
Use this piece in your agent
Get an API keyCopy the text below and paste it into Claude Code, Codex or whichever agent you use. The agent reads the piece and checks it against the repo you have open.
Read "ak-context-engineering: spend less context and tokens, still finish the job" on modernEngineer and apply it to this repo.
1. Call the content_get tool of the modernengineer MCP server with locale "en", slug "ak-context-engineering". If the modernengineer MCP server is not connected, stop and walk me through connecting it from https://modernengineer.dev/en/mcp.
2. Summarize the main steps of the piece and point out which apply to this repo.
3. Propose concrete changes and ask me before editing any file.Connect MCP in Claude Code (once)
claude mcp add --transport http modernengineer \
https://api.modernengineer.dev/mcp \
--header "Authorization: Bearer <API key>"Reading the full piece over MCP needs an API key from a subscriber account or one that bought this guide. Without access, the agent only gets the opening.
- Version
- v1.0.0
- Updated
- 22/10/2026
- Licence
- All rights reserved
- Slug
- ak-context-engineering


