🧠
AI EngineeringPython

Folded Memory Implementation

by simbajigege

Folded Memory Implementation is an AI Engineering skill for Claude Code, published by simbajigege in book2skills.

161 stars30 forkson simbajigege/book2skillsAdded 2026/09/08+4% in starsRepository updated 2026/08/26
agent-skillsagentskillsanthropicanthropic-claudebook2skillsgrowth-investinginvestinginvesting-skillsskillsstock-analysis
Install in seconds
Install Folded Memory Implementation
Copy Folded Memory Implementation into your Claude Code skills folder. Run the command in your terminal, or review the source on GitHub before installing.
terminal
npx degit https://github.com/simbajigege/book2skills/tree/main/skills/folded-memory-implementation ~/.claude/skills/folded-memory-implementation

Requires Node.js. Downloads this skill only — not the rest of the repository — into your Claude Code skills folder.

Without Node.js

git clone https://github.com/simbajigege/book2skills.git

Clones the whole repository, then copy the skill’s own directory into your skills folder yourself.

In this catalog

Source file
skills/folded-memory-implementation/SKILL.md in simbajigege/book2skills
Installs to
~/.claude/skills/folded-memory-implementation
Collection
One of 25 skills cataloged from this repository
Category
AI Engineering3670 skills

What Folded Memory Implementation does

Folded Memory Implementation guides building three-tier memory for an agent: recent turns stay detailed, older interactions become episodes, and durable facts are distilled into semantic memory. Use it when a flat summary loses important context across long sessions.

Folded Memory Implementation is cataloged under AI Engineering on DirSkills. Folded Memory Implementation comes from a repository tagged agent-skills, agentskills, anthropic, anthropic-claude and book2skills.

Documentation

README

folded-memory-implementation

A developer guide for hierarchical memory: instead of replacing history with a single flat summary, maintain three memory layers at different levels of detail. Old content is compressed more aggressively — not discarded. Each layer is independently stored and selectively recalled.

Prerequisite: read compact-memory-implementation first. Folded memory builds on the same fork-agent and trigger concepts.


The core idea

L1 Working memory    [ turn 38..50 ] — raw turns, full detail, short window
L2 Episodic memory   [ turn 10..37 ] — compressed episodes, medium detail
L3 Semantic memory   [ turn 1..9  ] — abstract facts and decisions, sparse

This is the opening of the README. Read the full README on GitHub.

Frequently asked about Folded Memory Implementation

  • What else does simbajigege publish alongside Folded Memory Implementation?

    Folded Memory Implementation is one of 25 skills that DirSkills catalogs from simbajigege/book2skills, the repository it ships in. Its siblings there include Agent Memory Implementation, Agent Tool Builder and Business Adventures Analysis. Each one is a separate skill with its own page in this directory, installs the same way Folded Memory Implementation does, and is maintained by simbajigege in that same repository. The rest of the collection is listed on the simbajigege/book2skills page.

  • How does Folded Memory Implementation compare to other AI Engineering skills?

    Folded Memory Implementation ranks #3426 by stars among the 3670 AI Engineering skills in this catalog. The most-starred ones next to it are Architecture Decision Records, AI-First Engineering and Agentic OS. DirSkills ranks by the star count of the repository each skill ships in, so that order reflects how popular those repositories are rather than any review of Folded Memory Implementation against them. Open each page to compare what they document and how they install.

More from simbajigege/book2skills

Folded Memory Implementation is one of 25 skills cataloged on DirSkills from simbajigege/book2skills.

See all 25 skills
🧠
1h ago

Agent Memory Implementation

Agent Memory Implementation restructures a crowded MEMORY.md into a small pointer index plus on-demand topic files. Use it when MEMORY.md gets too long, mixes pointers with content, or needs stale memories corrected in place.
AI Engineering
16130
🛠️
1h ago

Agent Tool Builder

Agent Tool Builder helps define agent tools with a fail-closed pattern that keeps schema, security metadata, and execution together. Use it when creating a new tool or adding validation and permission checks to an existing one.
AI Engineering
16130
📘
1h ago

Business Adventures Analysis

Business Adventures Analysis uses John Brooks’s *Business Adventures* as a diagnostic lens for business failures, market panics, governance issues, and innovation questions. Use it to map a live situation to recurring patterns like hubris, incentive drift, and institutional fragility.
AI Engineering
16130
📈
1h ago

Common Sense Index Investing

Common Sense Index Investing applies Bogle's rules to fund selection, fees, asset allocation, and buy-and-hold discipline. Use it to compare index vs active funds, assess cost drag, and simplify a portfolio.
Data
16130
🧠
1h ago

Compact Memory Implementation

Compact Memory Implementation shows how to add memory compaction to an agent by triggering a forked compactor, generating a structured summary, and restoring it in later sessions. Use it when building context compression or persistence with Claude Agent SDK or the Anthropic API.
AI Engineering
16130
📣
1h ago

Contagious Viral Content Berger

Contagious Viral Content Berger applies Jonah Berger's STEPPS framework to diagnose why content spreads or stalls. Use it to engineer shareability with social currency, triggers, emotion, public visibility, practical value, and stories.
AI Engineering
16130