ワンクリックで
memory
Manages project-local long-term memory in SQLite for pi-web users. Use when storing, searching, correcting, or listing memories.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Manages project-local long-term memory in SQLite for pi-web users. Use when storing, searching, correcting, or listing memories.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | memory |
| description | Manages project-local long-term memory in SQLite for pi-web users. Use when storing, searching, correcting, or listing memories. |
Use this skill for project memory tasks. Every memory is scoped to a specific project (working directory) so facts stay relevant to the right context.
$PI_CODING_AGENT_DIR/pi-web-memory.sqlite (default ~/.pi/agent/) — primary memory database, auto-initialized on first use.pi/skills/memory/data/schema.sql — schema definition (shipped with the skill).pi/skills/memory/scripts/memory.py — CLI implementationMemories are associated with a project via --cwd and --project. This allows the same database to serve multiple projects without cross-polluting recall. When a pi session is active, also capture session info so you can trace which conversation produced a memory.
| Context field | Source | Example |
|---|---|---|
--cwd | pwd / pi session header cwd | /Users/setkyar/pi-web |
--project | basename of cwd | pi-web |
--session-id | pi session header id (8-char UUID) | a1b2c3d4 |
--session-name | /name or session_info entry | Refactor auth module |
Pi sessions are stored as JSONL trees in getSessionsDir() (default ~/.pi/agent/sessions/<encoded-cwd>/). Each session file has a header with id, cwd, timestamp, and optional parentSession. Entries form a tree via id/parentId; use /tree to navigate branches, /fork to split into a new session, and /name to set a display name.
When the user says "remember that" or "save this for later", record:
add-memory)--cwd of the current project--project (derived from cwd basename)# Optional: initialize explicitly (normal commands also auto-initialize)
python3 .pi/skills/memory/scripts/memory.py init
# Remember a project fact
python3 .pi/skills/memory/scripts/memory.py add-memory "Prefers tabs over spaces" \
--category preference --importance 4 --cwd /Users/setkyar/pi-web --project pi-web
# Remember with session context
python3 .pi/skills/memory/scripts/memory.py add-memory "Decided to use Go 1.25 for the backend" \
--category decision --importance 5 --cwd /Users/setkyar/pi-web --project pi-web \
--session-id a1b2c3d4 --session-name "pi-web backend refactor"
# Search across all projects or filter by project
python3 .pi/skills/memory/scripts/memory.py search "tabs" --project pi-web
--cwd and --project when adding a memory. Derive --project from the basename of cwd.--session-id and --session-name so memories are traceable to the conversation that produced them.schema-change for schema updates.Memories are point-in-time snapshots. A memory recorded three months ago may no longer reflect reality — the codebase changed, the decision was reversed, or the preference shifted.
When recalling memories:
created_at tells you when the memory was recorded. Older memories carry less weight.read, bash, rg to confirm a memory still reflects the current codebase before acting on it.add-memory with updated info (the new memory naturally supersedes the old one in search recency). Optionally archive the old entry if needed.