Agent skill

Hipocampus Core

by kevin-hs-sohn in kevin-hs-sohn/hipocampus

3-tier agent memory system with 5-level compaction tree. An agent skill from kevin-hs-sohn/hipocampus.

MITAuto-check passedAgent Workflows

Install Hipocampus Core

skills CLI
$ npx skills add kevin-hs-sohn/hipocampus --skill hipocampus-core -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install kevin-hs-sohn/hipocampus hipocampus-core --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/kevin-hs-sohn/hipocampus.git skills-src && mkdir -p .claude/skills && cp -r skills-src/platforms/openclaw/core .claude/skills/hipocampus-core && rm -rf skills-src

Use ~/.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/

Facts

Skill name
hipocampus-core
GitHub stars
210
Token cost
~2.6k tokens
SKILL.md length
1,195 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

3-tier agent memory system with 5-level compaction tree. An agent skill from kevin-hs-sohn/hipocampus.

  • Works in 5 steps: DO NOT SKIP Read SCRATCHPAD.md — current… → DO NOT SKIP Read WORKING.md — active tasks → DO NOT SKIP Stale task recovery: If… → …
  • Tasks that involve Agent memory
  • SKILL.md covers Memory Architecture, Session Start (MANDATORY — run…, Memory Recall and Task Lifecycle (MANDATORY), plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Hipocampus Core is an agent skill from kevin-hs-sohn/hipocampus. 3-tier agent memory system with 5-level compaction tree. OpenClaw version. Defines session start protocol, end-of-task checkpoints, and memory file management. MUST be followed every session.

Its SKILL.md is about 2.6k 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, covering Agent memory and File organization. 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.

When your agent uses it

  • Tasks that involve Agent memory
  • Tasks that involve File organization

Example prompts

  • “/hipocampus-core”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. DO NOT SKIP Read SCRATCHPAD.md — current work state
  2. DO NOT SKIP Read WORKING.md — active tasks
  3. DO NOT SKIP Stale task recovery: If WORKING.md contains tasks with status: in-progress from a previous session, assess whether they…
  4. DO NOT SKIP Read TASK-QUEUE.md — pending items
  5. DO NOT SKIP DO NOT COMPROMISE Compaction maintenance (cooldown-gated)

What it can do on your machine

Read from SKILL.md and the folder at commit df88ca1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Hipocampus Core loads about 2.6k tokens when it runs. Until then it costs about 52 tokens; SKILL.md has 1,195 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~52
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from kevin-hs-sohn/hipocampus at commit df88ca1, republished under its MIT licence (© kevin-hs-sohn). 1,195 words, ~2,643 tokens.

Download SKILL.mdSave it as .claude/skills/hipocampus-core/SKILL.md (or your agent's skills folder).
name
hipocampus-core
description
3-tier agent memory system with 5-level compaction tree. OpenClaw version. Defines session start protocol, end-of-task checkpoints, and memory file management. MUST be followed every session.

Hipocampus — Agent Memory Protocol (OpenClaw)

Memory Architecture

Layer 1 (System Prompt — read at session start):
  MEMORY.md        ~50 lines   long-term memory (Core=frozen, Adaptive=compactable)
  USER.md          ~50 lines   user profile and preferences
  SCRATCHPAD.md    ~150 lines  active working state
  WORKING.md       ~100 lines  current tasks
  TASK-QUEUE.md    ~50 lines   task backlog
  memory/ROOT.md   ~100 lines  topic index of all memory (~3K tokens, via Compaction Root in MEMORY.md)

Layer 2 (On-Demand — read when needed):
  memory/YYYY-MM-DD.md         raw daily logs (permanent, never deleted)
  knowledge/*.md               detailed knowledge (searchable via qmd)
  plans/*.md                   task plans

Layer 3 (Search — via qmd + compaction tree):
  memory/daily/YYYY-MM-DD.md   daily compaction nodes
  memory/weekly/YYYY-WNN.md    weekly compaction nodes
  memory/monthly/YYYY-MM.md    monthly compaction nodes
  Tree traversal: ROOT → monthly → weekly → daily → raw

Session Start (MANDATORY — run on first user message)

FIRST RESPONSE RULE: On the very first user message of every session, before doing ANYTHING else: Run the Session Start protocol below FIRST (ALL steps. NO SKIP.) This takes priority over ANY user request — even if the user asks you to do something specific. Complete ALL steps below, ONLY THEN respond to the user.

MEMORY.md, USER.md, memory/ROOT.md (via Compaction Root section) are auto-loaded by the platform.

ALL 5 procedures must be completed before responding to the user NO MATTER WHAT

  1. DO NOT SKIP Read SCRATCHPAD.md — current work state

  2. DO NOT SKIP Read WORKING.md — active tasks

  3. DO NOT SKIP Stale task recovery: If WORKING.md contains tasks with status: in-progress from a previous session, assess whether they completed (check daily log, file state, git history). Update each to done, failed, or abandoned with a one-line outcome. Update SCRATCHPAD.md to match.

  4. DO NOT SKIP Read TASK-QUEUE.md — pending items

  5. DO NOT SKIP DO NOT COMPROMISE Compaction maintenance (cooldown-gated): Read memory/.compaction-state.json and hipocampus.config.json (compaction.cooldownHours, default 3).

    Compaction triggers (any ONE is sufficient):

    • Cooldown expired: cooldownHours since lastCompactionRun
    • Raw volume: rawLinesSinceLastCompaction > 300
    • Checkpoint count: checkpointsSinceLastCompaction > 5
    • State file missing or cooldownHours is 0

    If no trigger is met: skip compaction subagent. If any trigger is met: write memory/.compaction-state.json with { "lastCompactionRun": "<current ISO timestamp>", "rawLinesSinceLastCompaction": 0, "checkpointsSinceLastCompaction": 0 }, then dispatch a subagent to run hipocampus:compaction skill USING SUBAGENTS (chain: Daily→Weekly→Monthly→Root), then run hipocampus compact + qmd update + qmd embed.

    State file is written immediately on dispatch (fire-and-forget), not after subagent completion. The cooldown tracks "a compaction was initiated," not "a compaction succeeded."

    This step is MANDATORY every session. You MUST read the state file and make the judgment. The only thing that may be skipped is the subagent dispatch when no trigger is met. ALL 5 procedures must be completed before responding to the user NO MATTER WHAT

Note: HEARTBEAT.md also handles needs-summarization at every heartbeat (~30 min).

Memory Recall

When the user's question may relate to past memory, use the hipocampus-recall skill for structured retrieval. See skills/hipocampus-recall/SKILL.md.

Task Lifecycle (MANDATORY)

Every logical work unit follows a Task Start → Task End cycle. The main agent writes hot files directly — no subagent needed.

What Is a Task?

A logical work unit — bug fix, feature implementation, investigation, refactor.

New task if:

  • User requests new work (different goal from current)
  • Topic/objective changes

Same task (no new Task Start):

  • Follow-up messages on the same work
  • Clarifying questions within the same goal

Not a task (skip Task Start/End entirely):

  • Quick factual questions requiring no file changes or analysis
  • Simple clarifications about previous work
Task Start (MANDATORY)

When starting a new logical task, the main agent writes directly:

  1. Update WORKING.md — add entry:

    markdown
    ## [Task Name]
    - status: in-progress
    - started: YYYY-MM-DD HH:MM
    - goal: [one-line goal]

    Timestamp is best-effort. If wall-clock time is unavailable, use daily log date plus sequence number (e.g., 2026-03-23 #2).

  2. Update SCRATCHPAD.md — set current focus:

    markdown
    ## Current Focus
    [Task Name] — [what I'm doing now, next step]

    If SCRATCHPAD.md exceeds ~150 lines, prune stale content before adding.

Task End (MANDATORY)

When a task completes, fails, or is abandoned — in this order:

  1. Update WORKING.md — main agent directly:

    markdown
    ## [Task Name]
    - status: done | failed | abandoned
    - started: YYYY-MM-DD HH:MM
    - outcome: [one-line result or reason]
  2. Update SCRATCHPAD.md — main agent directly:

    • Remove completed/failed/abandoned items
    • Replace Current Focus with next task (or clear)
  3. Append to daily log — dispatch subagent:

    • memory/YYYY-MM-DD.md in checkpoint format (see End-of-Task Checkpoint below)

Order matters: Hot files first, daily log second. This guarantees hot state is captured even if subagent dispatch fails or session ends.

Concurrent Tasks

Multiple in-progress tasks in WORKING.md are allowed. Each gets its own entry and its own Task End. SCRATCHPAD.md Current Focus reflects whichever task is actively being worked on.

End-of-Task Checkpoint (MANDATORY)

This is step 3 of Task End — run AFTER updating hot files (WORKING.md, SCRATCHPAD.md).

Dispatch a subagent to append a structured log to memory/YYYY-MM-DD.md:

Append the following to memory/YYYY-MM-DD.md:

[Topic Name] [type]

  • request: [what the user asked]
  • analysis: [what you researched/analyzed]
  • decisions: [choices made with rationale]
  • outcome: [what was done, files changed]
  • references: [knowledge/ files, external sources]

Where type is: project | feedback | user | reference

For feedback entries, use:

[Feedback Topic] [feedback]

  • rule: [the behavioral rule]
  • why: [reason given]
  • how-to-apply: [when/where this applies]

The subagent needs the task summary you provide — it doesn't have access to the conversation.

After appending to the daily log, the subagent should also increment the checkpoint counter in memory/.compaction-state.json: read the file, increment checkpointsSinceLastCompaction by 1, write back. If the file or field is missing, start from 0.

Show full SKILL.md (463 more words)Show less
Source of Truth
  • Current task status: WORKING.md is authoritative
  • Completed task detail: daily log (memory/YYYY-MM-DD.md) is authoritative
  • Active working state: SCRATCHPAD.md is authoritative
Timeout-Imminent Priority

If session termination is imminent and no time for subagent:

  1. Write hot files directly (WORKING.md, SCRATCHPAD.md) — most critical
  2. Write daily log directly if time permits Hot files take priority — daily log can be reconstructed from context, stale hot files cannot.

Proactive Session Dump

Do not wait for task completion to write to the daily log. Proactively dispatch a subagent to append to memory/YYYY-MM-DD.md when:

  • The conversation has been going for ~20+ messages without a checkpoint
  • You sense the context is getting large
  • A significant decision or analysis was just completed, even if the overall task isn't done
  • You're switching between topics within the same task

Compose the subagent task with a summary of what to dump, same as the checkpoint format. The subagent writes the file; the main session stays clean.

This protects against context compression — if the platform compresses your conversation history, undumped details are lost forever. Write early, write often. The daily log is append-only, so multiple dumps in the same session are fine.

Proactive dumps do NOT trigger hot file updates (WORKING.md, SCRATCHPAD.md). Hot files are only updated at Task Start and Task End boundaries.

What NOT to Save

When composing checkpoint content for the subagent, exclude:

  • Secrets — API keys, tokens, passwords, credentials. If encountered, write [REDACTED].
  • Code snippets >5 lines — use file path + line range instead
  • git diff/log output — use commit hash instead
  • Debugging intermediate attempts — record final solution only
  • File tree / directory listings — derivable from project
  • Stack traces — compress to 1-line error message
  • Content already in SCRATCHPAD/WORKING/TASK-QUEUE — no duplication
  • Ephemeral task state — only useful within current session

File Size Targets

FileTargetWhen Exceeded
MEMORY.md Core~50 linesNever touch — frozen
MEMORY.md Adaptive~50 linesPrune oldest entries
ROOT.md~100 lines (~3K tokens)Automatic recursive self-compression
SCRATCHPAD~150 linesRemove completed items
WORKING~100 linesRemove completed tasks
TASK-QUEUE~50 linesArchive completed items

Rules

  • MEMORY.md Core section: FROZEN. Never compact, modify, or remove.
  • MEMORY.md Adaptive section: append-only within session, compactable across sessions.
  • Raw daily logs (memory/YYYY-MM-DD.md): permanent. Never delete or edit after session.
  • ROOT.md: managed by compaction process. Do not manually edit.
  • Write authority: Hot files (WORKING.md, SCRATCHPAD.md, TASK-QUEUE.md, MEMORY.md Adaptive) are written directly by the main agent. Layer 2+ files (daily logs, knowledge/) are written via subagent.
  • If this session ends NOW, the next session must be able to continue immediately.
  • Don't skip checkpoints — lost context means you forget.

Edge Cases

  • Midnight-spanning session: Use the session start date for the raw log file name. Do not split across dates.
  • Returning after long absence: "Most recent daily" means the latest file that exists, whether it's from yesterday or last week.

© 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

Files

Just SKILL.md in platforms/openclaw/core of kevin-hs-sohn/hipocampus.

Open the folder on GitHubat commit df88ca1

Compare with similar skills

Hipocampus Core 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.

Hipocampus Core compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Hipocampus Core this skillkevin-hs-sohn/hipocampus210—~2.6kAutomated safety check: PassMIT
Project ButlerJamesShi96/project-butler374—~3.9kAutomated safety check: PassMIT
Directory Managementawslabs/agent-plugins916—~426Automated safety check: PassApache-2.0
Memory Md Managementgiuseppe-trisciuoglio/developer-kit357—~2.4kAutomated safety check: NotesMIT
Project Docscoco-research/coco513—~3.6kAutomated safety check: PassCustom licence
Reflect on Session Learningscursor/plugins11k5 repos~1.2kAutomated safety check: PassNone

Similar skills

  • Project Butler

    JamesShi96/project-butler

    Project memory workflow for init/upgrade, profile-aware setup, end session, normal/full close, file organization, document archiving, language switching, versioned update logs, rule review, status…

    374 GitHub stars~3.9k tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check passed
  • Directory Management

    awslabs/agent-plugins

    Official

    Manages project directory setup and artifact organization. An agent skill from awslabs/agent-plugins.

    916 GitHub stars~426 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Memory Md Management

    giuseppe-trisciuoglio/developer-kit

    Provides comprehensive memory file management capabilities including auditing, quality assessment, and targeted improvements for files such as CLAUDE.md.

    357 GitHub stars~2.4k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check: notes
  • Project Docs

    coco-research/coco

    A skill your agent uses when starting a new project, onboarding to an existing product, or auditing an existing folder structure against the standard.

    513 GitHub stars~3.6k tokensUpdated yesterday
    Productivity & AutomationAuto-check passed
  • Official

    Starts three parallel reviewer subagents over the current conversation transcript, then turns their findings into concrete edits to existing skills.

    11k GitHub starsUsed in 5 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • Neat-Freak Knowledge Closeout

    KKKKhazix/khazix-skills

    Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.

    21k GitHub stars~1.9k tokensUpdated 10 days ago
    Agent WorkflowsAuto-check passed

More from kevin-hs-sohn/hipocampus

All 8 skills in this repo
  • Hipocampus Compaction

    kevin-hs-sohn/hipocampus

    Build 5-level compaction tree (daily/weekly/monthly/root) with smart thresholds and fixed/tentative lifecycle.

    210 GitHub stars~3.2k tokensUpdated 4 mo ago
    Auto-check passed
  • Hipocampus Core

    kevin-hs-sohn/hipocampus

    3-tier agent memory system with 5-level compaction tree. An agent skill from kevin-hs-sohn/hipocampus.

    210 GitHub stars~1.8k tokensUpdated 4 mo ago
    Auto-check passed
  • Hipocampus Core

    kevin-hs-sohn/hipocampus

    3-tier agent memory system with 5-level compaction tree. An agent skill from kevin-hs-sohn/hipocampus.

    210 GitHub stars~1.5k tokensUpdated 4 mo ago
    Auto-check passed
  • Hipocampus Core

    kevin-hs-sohn/hipocampus

    3-tier agent memory system with 5-level compaction tree. An agent skill from kevin-hs-sohn/hipocampus.

    210 GitHub stars~1.7k tokensUpdated 4 mo ago
    Auto-check passed
  • Hipocampus Recall

    kevin-hs-sohn/hipocampus

    Memory recall guide. An agent skill from kevin-hs-sohn/hipocampus.

    210 GitHub stars~719 tokensUpdated 4 mo ago
    Auto-check passed
  • Hipocampus Search

    kevin-hs-sohn/hipocampus

    Search memory using qmd (BM25 + optional vector) and compaction tree traversal.

    210 GitHub stars~956 tokensUpdated 4 mo ago
    Auto-check passed

Categories

Questions about Hipocampus Core

What does Hipocampus Core do?

3-tier agent memory system with 5-level compaction tree. An agent skill from kevin-hs-sohn/hipocampus. Hipocampus Core is an agent skill from kevin-hs-sohn/hipocampus. 3-tier agent memory system with 5-level compaction tree.

When should I use Hipocampus Core?

Hipocampus Core fits situations like: tasks that involve Agent memory; tasks that involve File organization.

How do I install Hipocampus Core in Claude Code?

Run `npx skills add kevin-hs-sohn/hipocampus --skill hipocampus-core -a claude-code`. Or copy the skill folder (platforms/openclaw/core in kevin-hs-sohn/hipocampus) into .claude/skills/hipocampus-core in your project. Claude Code loads it when a task matches its description.

How do I install Hipocampus Core in Codex?

Run `npx skills add kevin-hs-sohn/hipocampus --skill hipocampus-core -a codex`. Or copy the skill folder (platforms/openclaw/core in kevin-hs-sohn/hipocampus) into .agents/skills/hipocampus-core in your project. Codex loads it when a task matches its description.

Can I use Hipocampus Core in Cursor, Gemini CLI or GitHub Copilot?

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-core -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-core, .gemini/skills/hipocampus-core, .github/skills/hipocampus-core and .opencode/skills/hipocampus-core in your project.

What does Hipocampus Core need to run?

SKILL.md names no scripts, command-line tools or credentials: Hipocampus Core is instructions for the agent only.

Does Hipocampus Core access the network?

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.

Is Hipocampus Core safe to install?

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.

What licence does Hipocampus Core use?

Hipocampus Core is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Hipocampus Core use?

About 2.6k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Hipocampus Core?

Skills that share tags, products or a category with Hipocampus Core: Project Butler (JamesShi96/project-butler, 374 stars), Directory Management (awslabs/agent-plugins, 916 stars), Memory Md Management (giuseppe-trisciuoglio/developer-kit, 357 stars) and Project Docs (coco-research/coco, 513 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Hipocampus Core?

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.