Claude Code Agent Development
anthropics/claude-plugins-official
Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.
Build 5-level compaction tree (daily/weekly/monthly/root) with smart thresholds and fixed/tentative lifecycle.
$ npx skills add kevin-hs-sohn/hipocampus --skill hipocampus-compaction -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install kevin-hs-sohn/hipocampus hipocampus-compaction --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/kevin-hs-sohn/hipocampus.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/compaction .claude/skills/hipocampus-compaction && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "hipocampus-compaction" agent skill from https://github.com/kevin-hs-sohn/hipocampus/tree/main/skills/compaction into .claude/skills/hipocampus-compaction/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hipocampus-compaction", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/kevin-hs-sohn/hipocampus/tree/main/skills/compactionType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add kevin-hs-sohn/hipocampus --skill hipocampus-compaction -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install kevin-hs-sohn/hipocampus hipocampus-compaction --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/kevin-hs-sohn/hipocampus.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/compaction .agents/skills/hipocampus-compaction && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "hipocampus-compaction" agent skill from https://github.com/kevin-hs-sohn/hipocampus/tree/main/skills/compaction into .agents/skills/hipocampus-compaction/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hipocampus-compaction", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add kevin-hs-sohn/hipocampus --skill hipocampus-compaction -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install kevin-hs-sohn/hipocampus hipocampus-compaction --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/kevin-hs-sohn/hipocampus.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/compaction .cursor/skills/hipocampus-compaction && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "hipocampus-compaction" agent skill from https://github.com/kevin-hs-sohn/hipocampus/tree/main/skills/compaction into .cursor/skills/hipocampus-compaction/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hipocampus-compaction", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/kevin-hs-sohn/hipocampus.git --path skills/compaction--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add kevin-hs-sohn/hipocampus --skill hipocampus-compaction -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install kevin-hs-sohn/hipocampus hipocampus-compaction --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/kevin-hs-sohn/hipocampus.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/compaction .gemini/skills/hipocampus-compaction && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "hipocampus-compaction" agent skill from https://github.com/kevin-hs-sohn/hipocampus/tree/main/skills/compaction into .gemini/skills/hipocampus-compaction/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hipocampus-compaction", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install kevin-hs-sohn/hipocampus hipocampus-compactionInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add kevin-hs-sohn/hipocampus --skill hipocampus-compaction -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/kevin-hs-sohn/hipocampus.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/compaction .github/skills/hipocampus-compaction && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "hipocampus-compaction" agent skill from https://github.com/kevin-hs-sohn/hipocampus/tree/main/skills/compaction into .github/skills/hipocampus-compaction/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hipocampus-compaction", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add kevin-hs-sohn/hipocampus --skill hipocampus-compaction -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install kevin-hs-sohn/hipocampus hipocampus-compaction --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/kevin-hs-sohn/hipocampus.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/compaction .opencode/skills/hipocampus-compaction && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "hipocampus-compaction" agent skill from https://github.com/kevin-hs-sohn/hipocampus/tree/main/skills/compaction into .opencode/skills/hipocampus-compaction/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hipocampus-compaction", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
hipocampus-compactionBuild 5-level compaction tree (daily/weekly/monthly/root) with smart thresholds and fixed/tentative lifecycle.
Hipocampus Compaction is an agent skill from kevin-hs-sohn/hipocampus. Build 5-level compaction tree (daily/weekly/monthly/root) with smart thresholds and fixed/tentative lifecycle. Run at session start when triggers are met, or via external scheduler.
Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Agent Workflows. The repository describes itself as: Drop-in memory harness for AI agents — 3-tier memory, compaction tree, hybrid search. One command to set up. Works with Claude Code and OpenClaw. The licence is MIT.
8 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit df88ca1. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown, bash and yaml).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Hipocampus Compaction loads about 3.2k tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 1,421 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from kevin-hs-sohn/hipocampus at commit df88ca1, republished under its MIT licence (© kevin-hs-sohn). 1,421 words, ~3,167 tokens.
.claude/skills/hipocampus-compaction/SKILL.md (or your agent's skills folder).5-level hierarchical index over raw memory logs. Compaction nodes are search indices — originals are never deleted.
memory/
ROOT.md <- root node (topic index, ~3K tokens, Layer 1)
2026-03-15.md <- raw daily log (permanent, append-only)
daily/2026-03-15.md <- daily compaction node
weekly/2026-W11.md <- weekly compaction node
monthly/2026-03.md <- monthly compaction nodeCompaction chain: Raw → Daily → Weekly → Monthly → Root
Tree traversal (search): Root → Monthly → Weekly → Daily → Raw
Every compaction node has a status:
# Indicated in YAML frontmatter
---
type: weekly
status: tentative
period: 2026-W11
---Key: tentative nodes are created immediately — ROOT.md is usable from day one.
Called from hipocampus:core Session Start step 7, or directly by an external scheduler (e.g., OpenClaw heartbeat). Check trigger conditions below.
| Level | Tentative Create/Update | Fixed Transition |
|---|---|---|
| Raw → Daily | On each new raw addition | Date changes |
| Daily → Weekly | On daily add/change | ISO week ended + 7 days elapsed |
| Weekly → Monthly | On weekly add/change | Month ended + 7 days elapsed |
| Monthly → Root | On monthly add/change | Never (root accumulates forever) |
Below threshold: copy/concat verbatim (no information loss). Above threshold: generate LLM keyword-dense summary.
| Level | Threshold | Above | Below |
|---|---|---|---|
| Raw → Daily | ~200 lines | LLM keyword-dense summary | Copy raw verbatim |
| Daily → Weekly | ~300 lines combined | LLM keyword-dense summary | Concat dailies |
| Weekly → Monthly | ~500 lines combined | LLM keyword-dense summary | Concat weeklies |
| Monthly → Root | Always | Recursive recompaction | (N/A) |
Entries in daily logs are tagged: ## Topic [type]. Four types exist:
| Type | Compaction behavior |
|---|---|
user | Always preserve core content. Never compress to Historical Summary. |
feedback | Always preserve rule + why + how-to-apply structure. Never compress to Historical Summary. |
project | Completed → compress to Historical Summary. Active → keep in Active Context. |
reference | Preserve pointer + 1-line description. Mark [?] if >30 days unverified. |
Backward compat: Untagged entries (no [type] in heading) → treat as [project].
At every compaction level, extract topic keywords from content and write to frontmatter topics field:
## Topic [type]) for keywordstopics: [hipocampus [project], terse-responses [feedback]]When generating LLM summaries, strip:
→ filepath:linesCRITICAL — STRICT CHAIN ORDER: Steps 2→3→4→5 MUST execute in sequence. NEVER skip a level.
Each step feeds the next. Root reads from monthly. Monthly reads from weekly. Weekly reads from daily. If you skip a level, the chain breaks and data is lost or corrupted.
Raw → [Step 2] → Daily → [Step 3] → Weekly → [Step 4] → Monthly → [Step 5] → Root
↑ ↑ ↑ ↑
reads raw reads daily reads weekly reads monthly
writes daily/ writes weekly/ writes monthly/ writes ROOT.mdNEVER:
Before starting the compaction chain, preserve current working state:
WORKING.mdmemory/YYYY-MM-DD.md):## Working State Snapshot [project]
- context: pre-compaction automatic snapshot
- state: [copy WORKING.md content]Scan memory/ for raw files. Group by date, ISO week, and month. Check each group against trigger conditions.
Input: raw files (memory/YYYY-MM-DD.md)
Output: daily nodes (memory/daily/YYYY-MM-DD.md)
For each date where raw exists and daily needs create/update:
memory/YYYY-MM-DD.mdmemory/daily/YYYY-MM-DD.md---
type: daily
status: tentative
period: YYYY-MM-DD
source-files: [memory/YYYY-MM-DD.md]
topics: [keyword1, keyword2, keyword3]
---
## Topics
## Key Decisions
## Tasks Completed
## Lessons Learned
## Open Itemsstatus: fixedSecret scanning: The mechanical compaction (hipocampus compact) automatically redacts secrets in compaction nodes using regex patterns. When generating LLM summaries for above-threshold nodes, also avoid reproducing any API keys, tokens, passwords, or credentials from the source material. If you encounter a secret in the source, write [REDACTED] in its place.
CHECKPOINT: Verify memory/daily/ has the updated file before proceeding to Step 3.
Input: daily nodes (memory/daily/YYYY-MM-DD.md) — NEVER raw files
Output: weekly nodes (memory/weekly/YYYY-WNN.md)
STOP-CHECK: Did Step 2 produce or update a daily node? If not, skip Steps 3-5 entirely — there's nothing new to propagate.
For each ISO week where dailies exist and weekly needs create/update:
memory/daily/, NOT from memory/)memory/weekly/YYYY-WNN.md with frontmatterstatus: fixedCHECKPOINT: Verify memory/weekly/ has the updated file before proceeding to Step 4.
Input: weekly nodes (memory/weekly/YYYY-WNN.md) — NEVER daily or raw files
Output: monthly nodes (memory/monthly/YYYY-MM.md)
STOP-CHECK: Did Step 3 produce or update a weekly node? If not, skip Steps 4-5 — there's nothing new to propagate.
For each month where weeklies exist and monthly needs create/update:
memory/weekly/, NOT from memory/daily/)memory/monthly/YYYY-MM.md with frontmatterstatus: fixedCHECKPOINT: Verify memory/monthly/ has the updated file before proceeding to Step 5.
Input: monthly nodes (memory/monthly/YYYY-MM.md) — NEVER weekly, daily, or raw files
Output: memory/ROOT.md
STOP-CHECK: Did Step 4 produce or update a monthly node? If not, DO NOT touch ROOT.md.
When a monthly node is created or updated:
memory/ROOT.md (if exists)memory/monthly/, NOT from any other directory)root = recompact(existing_root + monthly_changes)memory/ROOT.mdcompaction.rootMaxTokens in config, default 3000 tokens / ~100 lines): self-compress — compress Historical Summary first, keep Active Context and Topics Index intact---
type: root
status: tentative
last-updated: YYYY-MM-DD
---
## Active Context (recent ~7 days)
- topic: current state, what's happening now
## Recent Patterns
- pattern: cross-cutting insight that emerged recently
## Historical Summary
- YYYY-MM~MM: high-level summary of that period
- YYYY-MM: key events
## Topics Index
- topic-keyword [type, Nd]: sub-keywords, references → knowledge/file.md
- topic-keyword [type]: sub-keywordsAge calculation: For each topic, find the most recent source-file date that mentions it. Compute days since that date. Write as Nd (e.g., 2d, 30d).
Type-specific root rules:
user/feedback topics: always in Topics Index, never in Historical Summary onlyproject topics: active → Active Context + Topics Index; completed >90d → Historical Summary only (remove from Topics Index if root exceeds size cap)reference topics: mark [?] if >30 days since last mentionOpenClaw only: Sync ROOT.md content into the "Compaction Root" section of MEMORY.md:
## Compaction Root section## Compaction Root and the next ## heading (or EOF) with the Active Context, Recent Patterns, and Topics Index sections from ROOT.mdAfter writing any compaction files:
qmd updateIf vector search is enabled (search.vector: true in hipocampus.config.json):
qmd embedIf memory/agents/compaction/AGENT.md exists, read it before starting compaction. Use learned patterns to inform decisions (e.g., typical raw log size, common threshold behavior).
After compaction completes, if you observed a new pattern worth remembering:
memory/agents/compaction/AGENT.mdIf no new patterns were observed, skip the update.
© kevin-hs-sohn, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/compaction of kevin-hs-sohn/hipocampus.
Open the folder on GitHubat commit df88ca1
Hipocampus Compaction next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Hipocampus Compaction this skillkevin-hs-sohn/hipocampus | 210 | — | ~3.2k | Automated safety check: Pass | MIT | |
| Claude Code Agent Developmentanthropics/claude-plugins-official | 38k | 7 repos | ~2.8k | Automated safety check: Pass | Apache-2.0 | |
| Copilot Session Failure Analysisdotnet/maui | 23k | — | ~3.4k | Automated safety check: Pass | MIT | |
| Mem0 CLI Memory Commandsmem0ai/mem0 | 67k | — | ~2k | Automated safety check: Notes | Apache-2.0 | |
| Create Agentvectorize-io/hindsight | 48k | — | ~1.1k | Automated safety check: Pass | MIT | |
| Google Antigravity SDKgoogle-antigravity/antigravity-sdk-python | 3.7k | — | ~2.1k | Automated safety check: Notes | Apache-2.0 |
anthropics/claude-plugins-official
Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.
dotnet/maui
Mines local Copilot CLI session logs for dotnet/maui to rank costly or failing runs, tag recurring failure modes, propose repo edits and emit guard evals.
mem0ai/mem0
Adds, searches, lists, updates and deletes memories on the Mem0 platform from the terminal with the mem0 command, including a JSON mode built for agents.
vectorize-io/hindsight
Create a new Hindsight-powered subagent with long-term memory.
google-antigravity/antigravity-sdk-python
Design, implement, and debug autonomous AI agents and multi-agent systems using the Google Antigravity (AGY) SDK.
yaojingang/yao-meta-skill
Create, improve, or evaluate an existing skill from workflows, prompts, SOPs, scripts.
kevin-hs-sohn/hipocampus
3-tier agent memory system with 5-level compaction tree. An agent skill from kevin-hs-sohn/hipocampus.
kevin-hs-sohn/hipocampus
3-tier agent memory system with 5-level compaction tree. An agent skill from kevin-hs-sohn/hipocampus.
kevin-hs-sohn/hipocampus
3-tier agent memory system with 5-level compaction tree. An agent skill from kevin-hs-sohn/hipocampus.
kevin-hs-sohn/hipocampus
3-tier agent memory system with 5-level compaction tree. An agent skill from kevin-hs-sohn/hipocampus.
kevin-hs-sohn/hipocampus
Memory recall guide. An agent skill from kevin-hs-sohn/hipocampus.
kevin-hs-sohn/hipocampus
Search memory using qmd (BM25 + optional vector) and compaction tree traversal.
Categories
Build 5-level compaction tree (daily/weekly/monthly/root) with smart thresholds and fixed/tentative lifecycle. Hipocampus Compaction is an agent skill from kevin-hs-sohn/hipocampus. Build 5-level compaction tree (daily/weekly/monthly/root) with smart thresholds and fixed/tentative lifecycle.
Hipocampus Compaction fits situations like: via external scheduler.
Run `npx skills add kevin-hs-sohn/hipocampus --skill hipocampus-compaction -a claude-code`. Or copy the skill folder (skills/compaction in kevin-hs-sohn/hipocampus) into .claude/skills/hipocampus-compaction in your project. Claude Code loads it when a task matches its description.
Run `npx skills add kevin-hs-sohn/hipocampus --skill hipocampus-compaction -a codex`. Or copy the skill folder (skills/compaction in kevin-hs-sohn/hipocampus) into .agents/skills/hipocampus-compaction in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add kevin-hs-sohn/hipocampus --skill hipocampus-compaction -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hipocampus-compaction, .gemini/skills/hipocampus-compaction, .github/skills/hipocampus-compaction and .opencode/skills/hipocampus-compaction in your project.
SKILL.md names no scripts, command-line tools or credentials: Hipocampus Compaction is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Hipocampus Compaction is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Hipocampus Compaction: Claude Code Agent Development (anthropics/claude-plugins-official, 38k stars), Copilot Session Failure Analysis (dotnet/maui, 23k stars), Mem0 CLI Memory Commands (mem0ai/mem0, 67k stars) and Create Agent (vectorize-io/hindsight, 48k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
kevin-hs-sohn (a GitHub user) maintains it in kevin-hs-sohn/hipocampus, which has 210 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on June 8, 2026.
Source: kevin-hs-sohn/hipocampus on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.