mcpbeat Sign in

Tiered Memory Agent Skill

Three-tier agent memory model (hot/cold/wiki) for context reduction per spawn

2k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
2939
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/microsoft/Generative-AI-for-beginners-dotnet --skill tiered-memory

The instruction itself

22 sections, as written by the author

Skill: Tiered Agent Memory

> Status (v0.10.0): This skill describes a design proposal, not a shipped runtime. Skill files install via squad init/upgrade, but the underlying tier scaffolding (.squad/memory/hot/, cold/, wiki/), Scribe promotion logic, and spawn-template tier-aware reads are tracked in bradygaster/squad#1264. Until those land, agents continue to load full history.md + decisions.md on every spawn.

Overview

Squad agents today load their full context history on every spawn, which grows unboundedly across sessions. The Tiered Agent Memory model proposes a three-tier separation so agents only load the bytes that are actually relevant to the current task, with older context kept available on demand.


Memory Tiers

๐Ÿ”ฅ Hot Tier โ€” Current Session Context

  • Size target: keep small (~2โ€“4KB typical)
  • Load policy: Always loaded. Every spawn includes hot memory by default.
  • Contents: Current task description, active decisions made this session, immediate blockers, last 3โ€“5 actions taken, who you are talking to right now.
  • Lifetime: Current session only. Discarded after session ends (Scribe promotes relevant parts to Cold).
  • Purpose: Provide immediate task context without any latency or load decision.

โ„๏ธ Cold Tier โ€” Summarized Cross-Session History

  • Size target: larger summary, not full transcript (~8โ€“12KB typical)
  • Load policy: Load on demand. Include only when the task explicitly needs history.
  • Contents: Summarized past sessions (compressed by Scribe), cross-session decisions, recurring patterns, unresolved issues from prior work.
  • Lifetime: Rolling window (default proposal: 30 days). Eligible entries are then promoted to Wiki.
  • Purpose: Answer "what have we tried before?" and "what was decided?" without replaying full transcripts.
  • How to include: Pass --include-cold in spawn template or add ## Cold Memory section.

๐Ÿ“š Wiki Tier โ€” Durable Structured Knowledge

  • Size target: variable, structured reference docs
  • Load policy: Async write, selective read. Load only when task requires domain knowledge.
  • Contents: Architecture decisions (ADRs), agent charters, routing rules, stable conventions, external API contracts, known platform constraints.
  • Lifetime: Permanent until explicitly deprecated.
  • Purpose: Authoritative reference. Not history โ€” structured facts.
  • How to include: Pass --include-wiki or reference specific wiki doc paths in spawn template.

When to Load Each Tier

| Situation | Hot | Cold | Wiki |

|-----------|-----|------|------|

| New task, no prior context needed | โœ… | โŒ | โŒ |

| Resuming interrupted work | โœ… | โœ… | โŒ |

| Debugging a recurring issue | โœ… | โœ… | โŒ |

| Implementing against a spec/ADR | โœ… | โŒ | โœ… |

| Onboarding to unfamiliar subsystem | โœ… | โŒ | โœ… |

| Post-incident review | โœ… | โœ… | โœ… |


Spawn Template Pattern

The default spawn prompt should include Hot tier only:

## Memory Context

### Hot (current session)
{hot_context}

Add --include-cold when the task needs history:

## Memory Context

### Hot (current session)
{hot_context}

### Cold (summarized history โ€” load on demand)
See: .squad/memory/cold/{agent-name}.md

Add --include-wiki when the task needs domain knowledge:

## Memory Context

### Hot (current session)
{hot_context}

### Wiki (durable reference)
See: .squad/memory/wiki/{topic}.md

Integration with Scribe Agent (design โ€” not yet implemented)

Scribe is the proposed memory coordinator for this system. Once the runtime lands, Scribe will:

  • End of session: Compress Hot โ†’ Cold summary (target: ~10% of session verbosity)
  • Aged cold entries: Promote Cold โ†’ Wiki for decisions/facts that aged into stable knowledge
  • On-demand wiki writes: Any agent can request Scribe to write a wiki entry mid-session

Until then, see the Scribe charter for current behavior: .squad/agents/scribe/charter.md


Implementation Checklist (tracked in #1264)

  • [ ] Scribe writes Hot context file at session start (.squad/memory/hot/{agent}.md)
  • [ ] Scribe compresses and writes Cold summary at session end
  • [ ] Spawn templates default to Hot-only
  • [ ] Coordinators add --include-cold / --include-wiki flags as needed
  • [ ] Wiki entries stored in .squad/memory/wiki/
  • [ ] Cold entries stored in .squad/memory/cold/ with rolling TTL

References


Spawn Template

Spawn Template: Agent with Tiered Memory

Use this template when spawning any Squad agent. By default it loads Hot tier only. Add optional sections as needed.


Task

{task_description}

WHY

{why_this_matters}

Success Criteria

  • [ ] {criterion_1}
  • [ ] {criterion_2}

Memory Context

๐Ÿ”ฅ Hot (always included)

> Paste current session context here (~2โ€“4KB target):

Current task: {task_description}
Active decisions: {decisions_this_session}
Last actions: {last_3_to_5_actions}
Blockers: {current_blockers_or_none}
Talking to: {current_interlocutor}

โ„๏ธ Cold (include when task needs history โ€” add --include-cold)

> Load on demand. Do not inline unless specifically needed.

Summarized cross-session history is at:

.squad/memory/cold/{agent-name}.md

Include when:

  • Resuming interrupted work
  • Debugging a recurring issue
  • "What have we tried before?"

To load cold memory, add this section and fetch the file before spawning:

## Cold Memory Summary
{contents_of_.squad/memory/cold/{agent-name}.md}

๐Ÿ“š Wiki (include when task needs domain knowledge โ€” add --include-wiki)

> Load on demand. Reference specific wiki docs by path.

Wiki entries are at: .squad/memory/wiki/

Include when:

  • Implementing against an ADR or spec
  • Onboarding to unfamiliar subsystem
  • Need stable conventions or API contracts

To load wiki, add this section and reference the specific doc:

## Wiki Reference
{contents_of_.squad/memory/wiki/{topic}.md}

Escalation

If blocked or uncertain:

  • Architecture questions โ†’ @picard
  • Security concerns โ†’ @worf
  • Infrastructure/deployment โ†’ @belanna
  • Memory/history questions โ†’ @scribe

Notes

  • Hot tier is always included; keep it focused
  • Cold adds a summary; only include when history is relevant
  • Wiki adds variable size; only include specific relevant docs
  • Runtime backing is tracked in bradygaster/squad#1264 โ€” until those changes land, this skill is design-only and agents continue to load full history.md + decisions.md on every spawn

Other skills for the same job

different authors, same section of the catalogue
Skill Creator
by anthropics
vendor ร—10

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

56k tokens scripts
Skill Creator
by vercel-labs
vendor ร—10

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

12k tokens scripts
Skill Creator
by JayZeeDesign
ร—9

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

10k tokens scripts
Template Skill
by JayZeeDesign
ร—7

Replace with description of the skill and when Claude should use it.

35 tokens
Dispatching Parallel Agents
by ZhanlinCui
ร—5

Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies

2k tokens
Skill Development
by anthropics
vendor ร—4

This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.

9k tokens
Find Skills
by sanity-io
vendor ร—4

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

1k tokens
Writing Skills
by ZhanlinCui
ร—4

Use when creating new skills, editing existing skills, or verifying skills work before deployment

26k tokens scripts

How to use it

Copy the folder

Take microsoft/tiered-memory from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side โ€” one of them will be ignored.