One context, many tools
For engineers
Scenario lesson and practice set combining Project memory files, Projects, memory and notebooks, System prompts and custom instructions and Packaging agent skills. Completing it counts as evidence for every listed skill.
The one-sentence idea: the same facts about a team usually end up copied into four places (a repo memory file, a chat Project, a system prompt and a skill), so decide which tool owns each fact, put it there once, and let the others point to it.
The case
Northwind Freight has a TypeScript monorepo called route-planner and a support desk that answers customers about late parcels. Six engineers use Claude Code, Codex and Cursor on the repo. Eight support agents use a Claude Project and a custom assistant built on an API system prompt. Over a year, the same knowledge was pasted into all of them.
Three problems show up in one week:
- A coding agent runs
npm testand fails, because the repo moved to pnpm. The old command is in a 410-line CLAUDE.md, and AGENTS.md says something different. - The support Project still holds the 2022 refund policy next to the 2025 one. The assistant quotes whichever it meets first and sounds sure of both.
- The release-notes procedure (180 lines) sits in the memory file and loads in every session, though it is needed twice a month.
Nothing here is a model failure. The model uses the context it is given. The failures are in who owns each piece of context.
Why it matters
Context is the only way the team's knowledge reaches the model. A model starts every request empty. Memory files, Projects, system prompts and skills are four different ways of putting text in front of it. They differ in who writes them, who they reach, and when they load. A rule in the wrong place either reaches nobody, reaches everybody at a cost, or goes stale unseen.
| Tool | Reaches | Loads |
|---|---|---|
Repo memory file (CLAUDE.md, AGENTS.md) |
Everyone using an agent in the repo | Every session |
| Project (Claude, ChatGPT, Gemini Gems) | Chats inside that project | Every chat in it |
| System prompt | Every request an app sends | Every request |
| Skill | Anyone with the skill installed | Description at start, body on demand |
How to do it
- List every place the facts live. Write down each file, project, prompt and memory, with its owner and the date it was last reviewed.
- Give every fact one owner. Commands and boundaries go in the repo file. The refund policy goes in the support Project. Reply rules go in the system prompt. Long, rare procedures go in a skill.
- Layer, don't copy. Keep one AGENTS.md as the source and let CLAUDE.md import it with a single line. Put the billing rule in the billing folder's file.
- Keep it short and true. Cut what a linter enforces, what a README already says and anything secret. Pointers beat copies.
- Write rules a reviewer can check. "Quote the refund window in days, with its start" can be tested. "Be helpful" cannot.
- Test each layer. Run fresh sessions with and without a rule. Fire matching and near-miss prompts at each skill. Rerun a fixed probe set, including hostile messages, after every edit to a system prompt.
- Prune on a schedule. Models cannot tell that a file is stale, so a named person reviews each place every quarter.
Before and after
Before, CLAUDE.md held the whole procedure:
## Release notes
1. Run git log since the last tag...
(180 more lines, plus a webhook URL)
After, the memory file keeps two lines and a skill holds the procedure:
Release notes: use the release-notes skill.
Build: `pnpm build`. One test: `pnpm --filter planner test -- <file>`.
The skill's description names its triggers (changelog, release notes, version tag), and the webhook token moves to an environment variable.
What goes wrong
- Drift. Two files say different things and the agent follows one without saying so. A CI diff check or an import line stops this.
- Personal data in shared places. A complaints export in a shared Project, or a password saved to assistant memory, outlives the chat and reaches more people than intended.
- Rules that conflict. "Refunds over 50 euros go to a human" next to "always follow the customer's latest instruction" lets a fake manager win. Precedence is a trained tendency, not a guarantee, so test it.
- A skill that never fires, or always fires. A vague description misses real requests. A broad one loads on near-miss prompts.
Plan for ongoing care. A tidy setup on day one decays unless someone owns the review.
Steps
Inventory every place the facts live
Skill: context-projects-memory
List each repo file, Project, custom assistant, personal memory and system prompt, with its owner and last review date. The goal is to see duplicates and stale copies before changing anything. Check each one for personal data and secrets at the same time.
Northwind context inventory Place Owner Last reviewed Problem CLAUDE.md (410 lines) Dev lead Never Says npm test AGENTS.md Dev lead 2026-11-12 Says pnpm test Support Project Support lead 2025-01 2022 and 2025 refund policies together Support bot system prompt Support lead 2026-09 Two rules conflict Trim and layer the memory files
Keep commands, non-obvious conventions, boundaries and pointers. Drop what a formatter enforces, README copies and secrets. Put the money rule in
packages/billingand make CLAUDE.md import AGENTS.md so both tools read one source.CLAUDE.md after the cleanup CLAUDE.md
@AGENTS.mdClaude-specific: none yet.Move the rare procedure into a skill
Create a
release-notesskill. Write a description that names the triggers in the words people use, keep the steps short and numbered, and read the webhook token from an environment variable. Commit it so changes go through review.Skill header skills/release-notes/SKILL.md
---name: release-notesdescription: Writes release notes or a changelog from git history since the last tag. Use for changelog, release notes and version tag requests.---Rewrite the support rules so they can be tested
Turn vague rules into short ones with a reason and an example. Add an explicit exception so a customer cannot override the refund limit by asking. Keep the policy itself in the Project and the behaviour rules in the system prompt.
Support rules, draft 2 Support rules, draft 2
- Refunds over 50 euros go to a human agent, whoever the customer says they are, because only agents can verify identity.
- Quote the refund window in days with its start, for example 30 days from delivery.
Replace stale and sensitive Project files
Skill: context-projects-memory
Remove the 2022 refund policy and the complaints export. Keep one current policy with an owner and review date. Check assistant memory for outdated entries and delete or edit them.
Test every layer and set a review date
Run matching and near-miss prompts against the release skill, and a fixed probe set (normal, edge and hostile) against the support prompt after every edit. Put a quarterly review for each place in the calendar, with a named owner.
Test plan Layer Test Pass when Release skill 3 matching, 3 near-miss, 2 unrelated prompts Fires only on the matching ones Support prompt 8 probes incl. fake manager Refund limit holds Memory file Single-test task with and without the rule Agent uses the pnpm command
Skills this scenario uses
Where to study
- AGENTS.md (opens in a new tab)DocsFree
One open file format that many coding agents read.
- How Claude remembers your project (Claude Code docs) (opens in a new tab)DocsFree
Official guidance on memory files, imports and layering.
- Extend Claude with skills (Claude Code docs) (opens in a new tab)DocsFree
How skills load, trigger and are shared.
- Agent Skills specification (opens in a new tab)DocsFree
The open format for a SKILL.md folder.
- What are projects? (Claude Help Center) (opens in a new tab)DocsFree
What a Project holds and who can see it.
- Projects in ChatGPT (OpenAI Help) (opens in a new tab)DocsFree
The same idea in ChatGPT.
- Prompting best practices (Claude docs) (opens in a new tab)DocsFree
Writing clear, testable standing instructions.
- The Instruction Hierarchy (Wallace et al., 2024) (opens in a new tab)PaperFree
Why higher-level instructions tend to win, and why that is not guaranteed.