一键导入
absorb
Distill session knowledge into persistent memory — project intent, domain understanding, architectural decisions, and vision. The learning ritual.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Distill session knowledge into persistent memory — project intent, domain understanding, architectural decisions, and vision. The learning ritual.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | absorb |
| description | Distill session knowledge into persistent memory — project intent, domain understanding, architectural decisions, and vision. The learning ritual. |
| user_invocable | true |
| version | 1.0.0 |
| tags | ["memory","learning","distillation"] |
"What did this session teach us that no file in the repo can?"
Extract project understanding from the current session and persist it to memory. Not code patterns — those live in the code. This captures intent, direction, vision, domain knowledge, and decisions that would otherwise evaporate when context clears.
By default, this skill writes to ~/.claude/memory/. To use a different location, set the CLAUDE_MEMORY_DIR environment variable:
export CLAUDE_MEMORY_DIR="$HOME/my-claude-memory"
Throughout this skill, $MEMORY refers to that directory (${CLAUDE_MEMORY_DIR:-$HOME/.claude/memory}).
/compact or session end to preserve understanding/absorb — Full session distillation
/absorb @project:name — Scope to a specific project
/absorb @dry — Show what would be saved without writing
Scan the entire conversation for knowledge that is NOT derivable from code, git history, or existing docs.
For each insight, classify into exactly one type:
| Type | What it captures | Persists to |
|---|---|---|
| intent | Why a project exists, who it serves, what problem it solves | project_{name}.md |
| direction | Where the project is heading, roadmap, phases, priorities | project_{name}.md |
| domain | Business/domain concepts, taxonomies, terminology, rules | project_{name}.md or dedicated topic file |
| decision | Architectural choices with rationale (the why) | project_{name}.md |
| vision | Long-term aspiration, philosophy, design principles | project_{name}.md |
| person | Stakeholder context, roles, preferences, relationships | project_{name}.md or user_*.md |
| feedback | How the user wants to work, corrections, validated approaches | feedback_*.md |
| reference | External resources, APIs, accounts, credentials context | Existing memory or new reference_*.md |
| infrastructure | Services, ports, configs, deployment topology | MEMORY.md (infrastructure section) |
For each finding, capture:
- insight: [one-line statement]
type: [from table above]
evidence: [what in the session proves this — quote or reference]
novelty: [new | extends | contradicts | duplicate]
weight: [critical | important | useful | noise]
Drop anything classified as noise or duplicate.
Read the current memory state:
cat $MEMORY/MEMORY.md
Then check each relevant topic file:
# If project-scoped, read the project memory
cat $MEMORY/project_{name}.md 2>/dev/null
For each insight:
| Novelty | Action |
|---|---|
| new | Create new entry |
| extends | Merge into existing entry (append detail, don't duplicate) |
| contradicts | Replace old entry with new truth + rationale |
| duplicate | Skip entirely |
Key rule: Real observations from this session beat prior assumptions. If we learned something contradicts an old memory, the new learning wins.
For project-scoped insights, organize into a project_{name}.md file with this structure:
---
name: Project Name
description: One-line — what this project is
type: project
---
## Intent
[Why this project exists. The problem it solves. Who it serves.]
## Direction
[Current phase. What's being built now. Near-term priorities.]
## Vision
[Long-term aspiration. What it becomes when "done".]
## Domain Knowledge
[Business concepts, taxonomies, terminology, rules that aren't in the code.]
## Key Decisions
[Architectural choices with WHY. Format: "Decision — because Reason."]
## Stakeholders
[Who's involved, their role, their preferences.]
Only include sections that have content. Don't create empty sections.
For workflow preferences, create or update feedback_{topic}.md:
---
name: Feedback topic
description: One-line rule
type: feedback
---
[Rule statement]
**Why:** [reason from session]
**How to apply:** [when/where this kicks in]
After creating/updating topic files, update the MEMORY.md index:
- [Title](file.md) -- one-line hookIf insights are project-specific instructions (not observations but directives), consider updating the project's CLAUDE.md instead:
CLAUDE.md = instructions for Claude. Memory = observations about the world.
Use Write/Edit tools to persist each insight to the correct file. Create new topic files when a project doesn't have one yet.
After writing:
flight(), Clearing()) are functions/commands, misclassified under form='energy'"ABSORBED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Project: {project name or "cross-project"}
Insights captured:
+ {insight 1} [{type}]
+ {insight 2} [{type}]
~ {merged with existing} [{type}]
- {skipped — duplicate/noise}
Files updated:
{path} [{N} changes]
{path} [created]
Understanding depth: {shallow | moderate | deep}
shallow = facts only, no vision/intent captured
moderate = intent + direction + some domain knowledge
deep = full picture: intent, vision, domain, decisions, stakeholders
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The test: "Would a future session benefit from knowing this, AND can't discover it from the codebase?" If both yes, absorb it.
| Skill | Relationship |
|---|---|
/handoff | /absorb captures understanding; /handoff captures task state. Complementary. |
/pickup | Future sessions benefit from what /absorb persisted |
/compact | Run /absorb before /compact to preserve understanding before context compression |