session-memory

Manages cross-session learning and memory persistence. Use when user mentions 前回何をした, 履歴, 過去の作業, セッション記録, continue from before, session history. Do NOT load for: 実装作業, レビュー, 一時的な情報.

25 stars

Best use case

session-memory is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Manages cross-session learning and memory persistence. Use when user mentions 前回何をした, 履歴, 過去の作業, セッション記録, continue from before, session history. Do NOT load for: 実装作業, レビュー, 一時的な情報.

Teams using session-memory should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/session-memory/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/aiskillstore/marketplace/chachamaru127/session-memory/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/session-memory/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How session-memory Compares

Feature / Agentsession-memoryStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Manages cross-session learning and memory persistence. Use when user mentions 前回何をした, 履歴, 過去の作業, セッション記録, continue from before, session history. Do NOT load for: 実装作業, レビュー, 一時的な情報.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Session Memory Skill

セッション間の学習と記憶を管理するスキル。
過去の作業内容、決定事項、学んだパターンを記録・参照します。

---

## トリガーフレーズ

このスキルは以下のフレーズで自動起動します:

- 「前回何をした?」「前回の続きから」
- 「履歴を見せて」「過去の作業」
- 「このプロジェクトについて教えて」
- "what did we do last time?", "continue from before"

---

## 概要

このスキルは `.claude/memory/` に作業履歴を保存し、
セッション間での知識の継続を実現します。

あわせて、重要な情報は「どこに残すべきか」を明確にします(詳細: `docs/MEMORY_POLICY.md`)。

---

## メモリ構造

```
.claude/
└── memory/
    ├── session-log.md      # セッションごとのログ
    ├── decisions.md        # 重要な決定事項
    ├── patterns.md         # 学んだパターン
    └── context.json        # プロジェクトコンテキスト
```

### 推奨運用(SSOT/ローカル分離)

- **SSOT(共有推奨)**: `decisions.md` / `patterns.md`  
  - 「決定(Why)」と「再利用できる解法(How)」を集約する
  - 各エントリは **タイトル + タグ**(例: `#decision #db`)を付け、先頭に **Index** を置く
- **ローカル推奨**: `session-log.md` / `context.json` / `.claude/state/`  
  - ノイズ/肥大化しやすいため、基本は Git 管理しない(必要なら個別に判断)

---

## 自動記録される情報

### session-log.md

```markdown
## セッション: 2024-01-15 14:30

### 実行したタスク
- [x] ユーザー認証機能の実装
- [x] ログインページの作成

### 生成したファイル
- src/lib/auth.ts
- src/app/login/page.tsx

### 重要な決定
- 認証方式: Supabase Auth を採用

### 次回への引き継ぎ
- ログアウト機能が未実装
- パスワードリセットも必要
```

### decisions.md

```markdown
## 技術選定

| 日付 | 決定事項 | 理由 |
|------|---------|------|
| 2024-01-15 | Supabase Auth | 無料枠あり、セットアップ簡単 |
| 2024-01-14 | Next.js App Router | 最新のベストプラクティス |

## アーキテクチャ

- コンポーネント: `src/components/`
- ユーティリティ: `src/lib/`
- 型定義: `src/types/`
```

### patterns.md

```markdown
## このプロジェクトのパターン

### コンポーネント命名
- PascalCase
- 例: `UserProfile.tsx`, `LoginForm.tsx`

### API エンドポイント
- `/api/v1/` プレフィックス
- RESTful 設計

### エラーハンドリング
- try-catch で囲む
- エラーメッセージは日本語
```

### context.json

```json
{
  "project_name": "my-blog",
  "created_at": "2024-01-14",
  "stack": {
    "frontend": "next.js",
    "backend": "next-api",
    "database": "supabase",
    "styling": "tailwind"
  },
  "current_phase": "フェーズ2: コア機能",
  "last_session": "2024-01-15T14:30:00Z"
}
```

---

## 処理フロー

### セッション開始時

1. `.claude/memory/context.json` を読み込み
2. 前回のセッションログを確認
3. 未完了タスクを特定
4. コンテキストサマリーを生成

### セッション中

1. 重要な決定を `decisions.md` に記録
2. 新しいパターンを `patterns.md` に追加
3. ファイル生成を `session-log.md` に記録

### セッション終了時

1. セッションサマリーを生成
2. `context.json` を更新
3. 次回への引き継ぎ事項を記録

---

## 使用例

### 前回の続きから開始

```
ユーザー: 「前回の続きから」

Claude Code:
📋 前回のセッション(2024-01-15)

完了したタスク:
- ユーザー認証機能
- ログインページ

未完了:
- ログアウト機能
- パスワードリセット

「ログアウト機能を作って」と言えば続きを実装します。
```

### プロジェクトの状況確認

```
ユーザー: 「このプロジェクトについて教えて」

Claude Code:
📁 プロジェクト: my-blog

技術スタック:
- Next.js + Tailwind CSS + Supabase

現在のフェーズ: コア機能開発
進捗: 40% 完了

最近の決定:
- Supabase Auth を採用
- App Router を使用
```

---

## 注意事項

- **自動保存**: `hooks/Stop` により、セッション終了時に `session-log.md` へ要約を自動追記する運用を推奨(未導入の場合は手動運用でOK)
- **プライバシー**: 機密情報は記録しない
- **Git方針**: `decisions.md`/`patterns.md`は共有推奨、`session-log.md`/`context.json`/`.claude/state/`はローカル推奨(詳細: `docs/MEMORY_POLICY.md`)
- **容量管理**: ログが大きくなったら「セッションログを整理して」を推奨

Related Skills

memory-merger

25
from ComeOnOliver/skillshub

Merges mature lessons from a domain memory file into its instruction file. Syntax: `/memory-merger >domain [scope]` where scope is `global` (default), `user`, `workspace`, or `ws`.

session-logs

25
from ComeOnOliver/skillshub

Search your complete conversation history stored in session JSONL files. Use this when a user references older/parent conversations or asks what was said before.

terminal-session

25
from ComeOnOliver/skillshub

tmux 持久化终端会话控制。通过向 tmux 发送按键、读取输出,管理 Claude Code、Codex、SSH 等长时间运行的交互式进程。跨多轮对话保持进程状态。需预装 tmux(Linux/macOS 默认提供;Windows 用户需 WSL2)。

memory-init

25
from ComeOnOliver/skillshub

在当前目录下初始化记忆系统,生成 CLAUDE.md(可选 AGENT.md 给 Cursor 用)、MEMORY.md 和 memory/ 目录。当用户说"初始化记忆"、"搭建记忆"、"memory init"、"/memory-init"时触发。

session-handoff

25
from ComeOnOliver/skillshub

Creates comprehensive handoff documents for seamless AI agent session transfers. Triggered when: (1) user requests handoff/memory/context save, (2) context window approaches capacity, (3) major task milestone completed, (4) work session ending, (5) user says 'save state', 'create handoff', 'I need to pause', 'context is getting full', (6) resuming work with 'load handoff', 'resume from', 'continue where we left off'. Proactively suggests handoffs after substantial work (multiple file edits, complex debugging, architecture decisions). Solves long-running agent context exhaustion by enabling fresh agents to continue with zero ambiguity.

memory-forensics

25
from ComeOnOliver/skillshub

Master memory forensics techniques including memory acquisition, process analysis, and artifact extraction using Volatility and related tools. Use when analyzing memory dumps, investigating incidents, or performing malware analysis from RAM captures.

conversation-memory

25
from ComeOnOliver/skillshub

Persistent memory systems for LLM conversations including short-term, long-term, and entity-based memory Use when: conversation memory, remember, memory persistence, long-term memory, chat history.

agent-memory-systems

25
from ComeOnOliver/skillshub

Memory is the cornerstone of intelligent agents. Without it, every interaction starts from zero. This skill covers the architecture of agent memory: short-term (context window), long-term (vector stores), and the cognitive architectures that organize them. Key insight: Memory isn't just storage - it's retrieval. A million stored facts mean nothing if you can't find the right one. Chunking, embedding, and retrieval strategies determine whether your agent remembers or forgets. The field is fragm

agent-memory-mcp

25
from ComeOnOliver/skillshub

A hybrid memory system that provides persistent, searchable knowledge management for AI agents (Architecture, Patterns, Decisions).

ai-runtime-memory

25
from ComeOnOliver/skillshub

AI Runtime分层记忆系统,支持SQL风格的事件查询、时间线管理,以及记忆的智能固化和检索,用于项目历史追踪和经验传承

memory-orchestration

25
from ComeOnOliver/skillshub

Analyze context management, memory systems, and state continuity in agent frameworks. Use when (1) understanding how prompts are assembled, (2) evaluating eviction policies for context overflow, (3) mapping memory tiers (short-term/long-term), (4) analyzing token budget management, or (5) comparing context strategies across frameworks.

memory-management

25
from ComeOnOliver/skillshub

Context tracking and decision logging patterns for intentional memory management in Claude Code Waypoint Plugin. Use when you need to remember user preferences, track decisions, capture context across sessions, learn from corrections, or maintain project-specific knowledge. Covers when to persist context, how to track decisions, context boundaries, storage mechanisms, and memory refresh strategies.