In short:
ak-folder-contextwrites a shortCLAUDE.mdin the subfolder you name, plus anAGENTS.mdthat points to the same content. It records only the conventions and decisions an agent cannot work out from the code. There is no next skill: you review and edit the draft. It never touches theCLAUDE.mdorAGENTS.mdat the project root; that belongs toak-docs agent-context.
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 folder has its own rules that agents keep breaking because they do not know them, when you want to add to a context file you already wrote, or when you just edited that file and want it checked for contradictions. You do not need it when the folder only holds static files like icons or sample data, when you want to change the files at the project root, or when you are writing docs in docs/.
flowchart LR
A["Subfolder with its own conventions"] --> B["ak-folder-context"]
B --> C["CLAUDE.md + AGENTS.md in that folder"]
B --> D["Stop: folder needs no file"]
E["Project root folder"] --> F["ak-docs agent-context"]It keeps 4 principles:
| Principle | Question | Example |
|---|---|---|
| The gate | Does this folder really need a context file? | src/payments/ has the rule "never call the bank API directly, always go through the gateway layer", so it does. fixtures/ only holds static sample data, so it does not: an agent opens it when needed. |
| Only what has evidence | Where does the content come from? | From code, config, Markdown files in the folder, or decisions you state in the prompt. It does not invent constraints, never writes secrets, and drops any section with nothing to say. |
| Inherit from the root, do not copy | How does the folder file differ from the root file? | Project-wide rules already live at the root, so the folder file does not repeat them. Operational routes like how to deploy or where to read logs do not go here either; it only links to the runbook that owns them. |
| One content, two file names | Why both CLAUDE.md and AGENTS.md? | AGENTS.md is a symlink to CLAUDE.md, so you edit one place. If the machine cannot create a symlink, it writes a one-line AGENTS.md naming CLAUDE.md, and tells you. |
It writes the draft into the folder right away and hands it to you for review. It only stops to ask when existing user content conflicts or an overwrite needs a decision. If you edit the file afterwards, it points out contradictions and does not undo your edits.
Sample prompt for a module with its own rules:
/ak-folder-context src/payments
Record: every bank call must go through src/payments/gateway, never call the SDK directly.
Amounts are always stored as integers in the smallest unit, never as floats.
Decision on <date>: webhooks are processed idempotently by transaction ID only.This skill has no flags.
Below is the detailed version: the run flow, 5 situations with prompts, how to pass options when the skill has no flags, 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-folder-context: write local context for one subfolder" on modernEngineer and apply it to this repo.
1. Call the content_get tool of the modernengineer MCP server with locale "en", slug "ak-folder-context". 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-folder-context


