🧠
AI EngineeringPython

Compact Memory Implementation

by simbajigege

Compact 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 Compact Memory Implementation
Copy Compact 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/compact-memory-implementation ~/.claude/skills/compact-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/compact-memory-implementation/SKILL.md in simbajigege/book2skills
Installs to
~/.claude/skills/compact-memory-implementation
Collection
One of 25 skills cataloged from this repository
Category
AI Engineering3670 skills

What Compact Memory Implementation does

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.

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

Documentation

README

compact-memory-implementation

A developer guide for building compact memory into an Agent: detect when to compress, fork a compactor sub-agent, produce a structured summary, and restore it in the next session.

Step 1 — Understand the setup

Before designing anything, clarify:

  • SDK / language: Claude Agent SDK? Direct Anthropic API? Python or TypeScript?
  • Agent architecture: single-agent loop, multi-agent, tool-calling?
  • Session model: one long-running session or multiple short sessions?
  • What must survive compaction: task state, decisions, tool results, conversation history?

This determines which pattern fits.


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

Frequently asked about Compact Memory Implementation

  • What else does simbajigege publish alongside Compact Memory Implementation?

    Compact 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 Compact 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 Compact Memory Implementation compare to other AI Engineering skills?

    Compact Memory Implementation ranks #3415 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 Compact Memory Implementation against them. Open each page to compare what they document and how they install.

More from simbajigege/book2skills

Compact 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

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
⚖️
1h ago

Contract Drafting And Review Guidance China Law

Contract Drafting And Review Guidance China Law applies 三观四步法 to contract review, drafting, deal-structure checks, and clause rewrites under a PRC-law lens. Use it when you need a structured checklist, risk review, or drafting framework for a China-law contract.
Writing
16130