Foundation / System anatomy

Prompt vs. Skill vs. Memory vs. Agent

A prompt is the one thing you are supposed to throw away. It carries the request in front of you right now, and the moment the work repeats, that prompt is the wrong place to keep it. Skills hold the procedure, memory holds the durable facts, tools hold the capability, and the agent is the coordinator that assembles all four at run time. Put something in the wrong layer and you pay for it in one of four predictable ways.

01

Where does each layer live, and how long does it last?

Five nouns get used interchangeably in agent tooling, and every mix-up shows up later as work you redo. Each layer has a different lifespan, a different owner, and a different review process. The fastest way to keep them straight is to ask how long the thing should survive: one turn, one project, one business, or one permission grant.

LayerWhere it livesLifespanWhat does not belong in it
PromptThe message you typeOne turnStanding policy you retype every time
SkillA SKILL.md folderUntil the procedure changesClient records, keys, task status
MemoryA memory file the host loadsUntil the fact changesTranscripts, to-do lists, secrets
ToolAn MCP server or host permissionUntil access is revokedGuidance about when to use it
AgentThe running sessionThe sessionAnything you expected to persist
Layer roles as Monolith runs them across Claude Code, Hermes, and OpenClaw, September 2026.
02

How do you tell which layer a piece of knowledge belongs to?

Run four questions against the sentence you are about to write, in this order. The first yes wins and you stop.

  • Does it expire when this task ends? Then it is a prompt and it stays in the message.
  • Would a new hire need it to repeat the work? Then it is a skill, written as steps with a verification pass at the end.
  • Is it a stable fact about the business, the stack, or the people? Then it is memory.
  • Does it require reaching a system outside the model? Then it is a tool, and the real question becomes who approves the call.

Take a live example. A client wants a monthly report. The date range and the client name go in the prompt, because they change every run. The pull, clean, and format procedure goes in a skill, because it is identical every month. The fact that this client counts a booked call as a lead, not a form fill, goes in memory, because it stays true until they redefine it. The analytics connection is a tool, and publishing the finished report goes through a person.

03

What does this look like on disk?

The layers stop being abstract as soon as you can point at files. Three hosts, three sets of locations, the same four ideas underneath.

Layer locations by hosttext
Claude Code
  .claude/skills/<name>/SKILL.md      skill, this project
  ~/.claude/skills/<name>/SKILL.md    skill, every project
  ./CLAUDE.md                         memory, this project
  ~/.claude/CLAUDE.md                 memory, this user
  .mcp.json                           tools

Hermes
  ~/.hermes/skills/<name>/SKILL.md    skill
  memory file location                unconfirmed, check your install

OpenClaw
  <workspace>/skills/<name>/SKILL.md  skill, this workspace
  ~/.openclaw/skills/<name>/SKILL.md  skill, shared
  <workspace>/AGENTS.md               memory, startup context

Two behaviors matter more than the paths. Claude Code walks up the directory tree and concatenates every memory file it finds, so a forgotten file three levels above your project is still in context and still costs tokens on every single turn. Skills load in tiers instead: only the name and description sit in context at startup, and the body is read when that description matches the work in front of the agent. This is why a description that states what the skill does and when to use it earns more than a longer body does.

04

What does a layer mistake actually look like?

Misrouted knowledge does not throw an error. It shows up as a behavior you keep correcting by hand, and each symptom points at a specific layer.

  • Procedure stranded in prompts: output drifts between runs and nobody can say which version was correct.
  • Business facts buried in a skill: you edit one file to change a phone number, and every project using that skill inherits the edit.
  • Task status written into memory: the agent opens confident and works last month's priorities.
  • Credentials anywhere in context: they now live in a file you sync, back up, and paste into support threads.
05

How do you move something into the right layer?

The last station is the one people skip. Run the task again with the promoted instruction removed from your message. If the result changes, the skill or memory file is not carrying what you assumed it was carrying, and you found the gap while it was still cheap to fix.

Then version those files the way you version anything else that runs. A skill in a repository has a diff, a date, and an author, so a behavior change has a cause you can point at during a client call. A prompt that lived only in a chat window has none of that. Layering the knowledge is what buys you the audit trail.

Is a skill just a saved prompt?

No. A saved prompt is one block of text that loads whether or not it is relevant. A skill is a folder with a description the agent matches against the current task, so the body enters context only when the work calls for it, and that folder can carry templates and reference files a chat snippet cannot.

Should project rules go in memory or in a skill?

Split them. Memory answers what is true here, and a skill answers how we do this. Standing facts, naming conventions, and definitions go in the project memory file; anything that reads like a step in a sequence goes in the skill, even when it is a single short line.

Do these layers work the same across every agent host?

The four ideas are portable, the file locations are not. Claude Code, Hermes, and OpenClaw each read skills and memory from their own paths, and the MCP specification revision dated 2026-07-28 changed how tool servers connect rather than how skills get written. Confirm paths per host before assuming a copy landed.

Put it to work

Sort your layers with Agent Ready

Agent Ready is the free baseline: the layer map, the approval gates, and the file locations for the host you already run.

Agent Ready / Free beta
Continue the field manual

Related guides