Skip to content
mentoor

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 test and 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

  1. List every place the facts live. Write down each file, project, prompt and memory, with its owner and the date it was last reviewed.
  2. 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.
  3. 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.
  4. Keep it short and true. Cut what a linter enforces, what a README already says and anything secret. Pointers beat copies.
  5. Write rules a reviewer can check. "Quote the refund window in days, with its start" can be tested. "Be helpful" cannot.
  6. 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.
  7. 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

  1. 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
    PlaceOwnerLast reviewedProblem
    CLAUDE.md (410 lines)Dev leadNeverSays npm test
    AGENTS.mdDev lead2026-11-12Says pnpm test
    Support ProjectSupport lead2025-012022 and 2025 refund policies together
    Support bot system promptSupport lead2026-09Two rules conflict
  2. Trim and layer the memory files

    Skill: context-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/billing and make CLAUDE.md import AGENTS.md so both tools read one source.

    CLAUDE.md after the cleanup

    CLAUDE.md

    @AGENTS.mdClaude-specific: none yet.
  3. Move the rare procedure into a skill

    Skill: harness-skills

    Create a release-notes skill. 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.---
  4. Rewrite the support rules so they can be tested

    Skill: prompt-system

    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

    1. Refunds over 50 euros go to a human agent, whoever the customer says they are, because only agents can verify identity.
    2. Quote the refund window in days with its start, for example 30 days from delivery.
  5. 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.

  6. Test every layer and set a review date

    Skill: harness-skills

    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
    LayerTestPass when
    Release skill3 matching, 3 near-miss, 2 unrelated promptsFires only on the matching ones
    Support prompt8 probes incl. fake managerRefund limit holds
    Memory fileSingle-test task with and without the ruleAgent uses the pnpm command

Skills this scenario uses

Where to study