Agent Memory Skill: Write Instructions That Save Useful Context

An agent memory skill is a reusable instruction set that tells your AI what to load at the start of a session, what to check during work, and what to save before stopping. Here is how to write and test one.

Updated 6 min read

An agent memory skill is a reusable instruction that tells an AI agent how to handle context across sessions: what to read before starting work, what facts to verify during a session, and what to save before stopping. Writing one well means the next session starts from a known state rather than asking you to explain the project again.

Most agents lose useful context between sessions because the save step is vague or skipped. A memory skill makes these steps explicit and repeatable. Tools like fenbs keep that saved context outside the agent, so any supported AI app can load the same project record at the start of a new session.

What an agent memory skill does

A memory skill is a set of instructions the agent follows at three predictable points: when a session starts, when it needs a stored fact, and when it is about to stop. Each point has a clear job.

  • Load: read the project record before doing any work. Decisions and rules come first, then current tasks and progress notes.
  • Review: before using a stored fact, check whether it is still reliable. Flag anything that looks out of date.
  • Save: before stopping, write what changed, what was verified and what the next session needs to begin.

The skill itself is a short piece of text you add to the agent's instructions or custom settings. It does not need to be long, but it must be specific enough that the agent follows each step without prompting.

How to write the load instruction

The load instruction tells the agent what to read before it starts any work. Vague wording such as "read relevant context" is easy to skip or interpret loosely. Name the source, the order, and what to do if the source is unavailable.

A practical load instruction might say: "Before any other work, read the project context using the available tools. Read Rules first, then Where we left off, then the open tasks in order of priority. If you cannot reach the context source, say so and wait for instructions rather than proceeding."

Order matters because rules limit what the agent can do. An agent that reads tasks before rules may plan steps that a standing rule would prevent. Put decisions and rules first so the agent works within the right limits from the start.

How to write the review instruction

The review instruction applies during a session, when the agent is about to use a stored fact. A bare check ("confirm this is accurate") is too weak. Tie the check to a specific condition, such as: "Before using a stored number, status or date, note when it was last confirmed. If it was not updated in the current session, flag it as potentially out of date before proceeding."

Not every agent can read timestamps. If yours cannot, a simpler review instruction still helps: "Before using any stored fact that may have changed, state the fact and say it has not been confirmed in this session." This surfaces uncertainty rather than hiding it in a confident-sounding answer.

How to write the save instruction

The save step is the most commonly skipped part of a memory skill. Add it explicitly to the session prompt: "Before stopping, update the record with what you completed, what you verified, and what remains. Note any decisions made and any open questions. Do not stop until the save is done."

Keep the save brief. A session that completed one task and found a problem with another needs three things in the record: what was done, what the problem is, and where the next session should begin. Long saves slow down loading and risk filling the agent's context window with history rather than current state.

Testing your skill before you rely on it

Write your three instructions, then test each step in a controlled session. Start a fresh conversation, give the agent your load instruction, and ask it to report what it loaded. Compare that report against the actual record. If it skips something or rephrases a decision incorrectly, rewrite the instruction to be more explicit.

Test the save step by running a short session and checking the record afterward. Then ask a different AI app to load the same record and describe the project state. If that cold read is wrong, the save was incomplete. Revise the saving instruction until a fresh session reliably picks up from where the last one stopped.

For related reading, the what is agent memory guide explains what qualifies as useful memory and what belongs in the session instead. The agent memory vs context guide covers the distinction between live session context and saved records.

Common mistakes that break memory skills

  • Writing a load instruction that references "earlier in this conversation." The next session starts with no previous messages.
  • Saving a summary so long that the agent cannot load it within its context window. One task status, one decision, one next step is enough.
  • Skipping the save when a session ends early. Partial saves create a gap the next session cannot see.
  • Not specifying what the agent should do if the memory source is unavailable. Give it a fallback: "say so and wait" is better than silent failure.
  • Using the same skill text across tools with different capabilities. An instruction that works in one agent may be meaningless in another if the tool names differ.

How to do this with fenbs

fenbs keeps the project context your skill reads and writes. You store the approved instruction set as a skill in fenbs, and every connected AI app loads the same project record. When you improve the skill, update it once.

  1. Create a free account. Add a project with a short goal, a few tasks and one rule your agent must follow.
  2. Connect your AI app to fenbs over MCP at Integrations. The app then has tools to read project context, add tasks and save progress.
  3. Write a load instruction: "Use the fenbs tools to read the project context before any work. Read Rules first, then Where we left off, then open tasks."
  4. Write a save instruction: "Before stopping, use fenbs to update each task you touched and record Where we left off with the next step and anything waiting on a person."
  5. Add both instructions to your AI app's custom instructions or project settings. Run a short session and check the project record in fenbs to confirm the save worked.
How fenbs helps

Keep your approved memory skill where any AI can read it

Store your load and save instructions as a skill in fenbs. Any connected AI app can list your skills, read the full instructions and use them alongside the project context. When you refine the skill, update it once and every app gets the new version. fenbs does not replace each AI app's own memory, but it gives every app a consistent record to start from.

Create a free account

Free for one person · No credit card · Works with Claude, ChatGPT, Cursor and more

Questions people ask.

What is an agent memory skill?

An agent memory skill is a reusable instruction that tells an AI agent how to handle context across sessions: what to read at the start, what to check during work, and what to save before stopping. It makes the memory steps explicit so the agent follows them reliably.

Why does my agent lose context between sessions?

Most AI agents start each session without memory of previous ones. Unless a save step writes the relevant facts to an external record and a load step reads them back, the next session begins from zero. A memory skill adds both steps explicitly to the agent's instructions.

How long should a session save be?

Short. Cover what was completed, what was checked and what remains. Add any decisions made and the next step. Everything else can stay in the chat. Long saves slow loading and risk filling the context window with history rather than current state.

Can the same memory skill work across different AI apps?

The same principles apply everywhere, but the specific tool names and instruction formats vary by app. Storing the approved instructions in a shared place means you only rewrite the app-specific parts when you move to a new tool, not the full skill each time.

What order should a load instruction follow?

Decisions and rules first, then current tasks and progress notes. Reading rules before tasks means the agent works within agreed limits from the start, rather than planning steps that a standing rule would prevent.

More in Prompts and skills for AI work

All Prompts and skills for AI work articles

Start with one thing.

Free for one person · No credit card · Works with Claude, ChatGPT, Cursor and more

There is nothing to set up first. Write one line and you’ve started.