trellis mem whenever the user references past conversations, retrieve content from local Claude Code, Codex, OpenCode, and Pi session stores, and answer with session-id + verbatim quotation.
Trigger phrases include last time, we discussed, what did I tell <Claude/Codex>, find ... last week, 上次, 之前, and other references to prior dialogue.
Without the skill, the AI defaults to “I don’t have that context” or speculative answers. The skill’s frontmatter description field instructs the AI to run trellis mem in these cases, with a search → context two-step retrieval flow.
Prerequisites
| Tool | Purpose | Required |
|---|---|---|
| Trellis CLI 0.6.0-beta.0+ | Provides trellis mem | Required |
| Claude Code, Codex CLI, OpenCode, Pi | Source of past sessions | At least one |
Install
| Flag | Description |
|---|---|
-g | Install globally to ~/.claude/skills/ |
-a claude-code | Target a specific agent |
-y | Non-interactive mode |
mem-recall should appear in the list.
Trigger examples
No manual command needed. The following user messages trigger the skill:- last time how did we solve the wait_agent deadlock in #240?
- which project did I discuss the plugin design in?
- find what I told Claude about memory architecture last week
- 上次我们怎么处理 #240 的来着?
Retrieval flow
The skill instructs the AI to execute two steps. Step 1 — Candidate search(3 × user_hits + assistant_hits) / total_turns. User-turn hits are weighted ×3 because user wording reflects topic intent more strongly than AI elaboration.
Step 2 — Content extraction
--max-chars.
Cleaning before search
trellis mem strips the following before searching, so hits reflect actual dialogue:
- prompt injections:
<system-reminder>,<workflow-state>,<INSTRUCTIONS>,<environment_context>, etc. - Codex AGENTS.md preamble (first user message is dropped entirely)
- tool calls and tool results (only
textblocks retained) - pre-compaction history (Claude
isCompactSummary/ Codexcompactedevents replace older turns with a summary)
Data sources
Reads local files directly. No daemon, no index, no upload.| Platform | Storage |
|---|---|
| Claude Code | ~/.claude/projects/<sanitized-cwd>/*.jsonl |
| Codex | ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl |
| OpenCode | ~/.local/share/opencode/storage/{session,message,part}/... |
| Pi | ~/.pi/agent/sessions/<encoded-cwd>/<timestamp>_<id>.jsonl |
Out-of-scope use cases
| Need | Tool |
|---|---|
| Search code | Grep / Read |
| Search commit history | git log / gh |
| Search current-project files/docs | Read / Glob |
Performance
| Scope | Time |
|---|---|
| Project-scoped 3-week search | ~0.85s |
| Global, no time filter | ~3s |