trellis-session-insight
它能做什么
该技能使用 Trellis 记忆命令搜索你保存的 AI 聊天记录。适合希望回想自己以前如何解决某个问题的人。
适用场景
- ✓当你询问上次是如何解决某个问题,或是否讨论过它的时候。
- ✓当你开始一项与早先工作有所重叠的任务的时候。
- ✓当你在调试一个感觉似曾相识的错误的时候。
技能链接
https://github.com/mindfold-ai/Trellis/blob/main/.agents/skills/trellis-session-insight/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我们之前讨论过这个缓存问题吗?请找出上次我们做出的决定。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会使用 trellis mem 命令,列出、搜索并读取保存在你电脑上的过去会话中经过清理的对话内容。然后它会用找到的信息来回答问题,或为当前工作提供参考。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Trellis Session Insight
This skill teaches an AI how to call trellis mem — the project's cross-session memory feedstock — and when reaching for it is the right move.
It is intentionally a capability skill, not a workflow. There is no fixed output file, no required write-back step, no "always run after finish-work" rule. What to do with what mem returns is a judgement call made in the moment of the conversation. The skill exists so the AI knows the capability is there and can decide.
What trellis mem is
A local CLI that indexes the user's past Claude Code, Codex, Devin CLI, Grok, OpenCode, Pi Agent, and ZCode conversation logs and lets you list, search, slice by Trellis task boundaries, and dump cleaned dialogue from them. Claude and Codex use ~/.claude/projects/ and ~/.codex/sessions/. Devin CLI (Cognition terminal agent, not trellis init --devin Desktop) uses ~/.local/share/devin/cli/sessions.db. Grok uses ~/.grok/sessions/. OpenCode uses ~/.local/share/opencode/opencode.db (zero-dependency SQLite reader). Pi uses its default or environment-configured session root, global ~/.pi/agent/settings.json, and the scoped project's .pi/settings.json; relative sessionDir values resolve from the settings file directory. Project-local Pi settings require project-scoped lookup through the current cwd or --cwd. ZCode uses ~/.zcode/cli/db/db.sqlite.
Nothing in mem is uploaded. All reads are local.
When to reach for it
The bar is "would a senior teammate ask 'didn't we already talk about this?'" — those are the moments. Some concrete patterns:
- Brainstorm rerun risk. Starting a new task that touches an area the user has been in before, and you want to check whether a decision was already made — before re-asking the user.
- Familiar-bug debugging. The current bug pattern feels like one the user reported / fixed before. Pulling the relevant past session can save a full debugging loop.
- Cross-session continuation. The user resumes work after a gap and says "where were we" / "继续上次的" without being specific.
- Decision retrieval. The user references "the decision we made about X" but the decision lives in an old brainstorm, not in any
prd.md/spec/. - Finish-work retrospective. When the user explicitly asks for a wrap-up of what was decided / what hurt / what surprised them in this task — not as a forced step on every finish-work.
- Pattern-spotting across past work. The user asks "do I keep making the same mistake on X" / "我每次都踩这个坑吗" — search across sessions answers that.
If none of these apply, don't call mem. It is a tool, not a ceremony.
When NOT to reach for it
- The relevant context is already in the current turn,
prd.md,design.md, recentgit log, or the open files.memis for stuff that has fallen out of immediate reach. - The user is asking about a fact in the code, not a fact from a past conversation.
git log -p/grep/ reading the file directly is faster and more authoritative. - You are in a sub-agent (
trellis-implement/trellis-check) whose dispatch prompt already includes the curatedimplement.jsonl/check.jsonlcontext. Addingmemon top usually just clutters. - The user has explicitly said "don't dig through history, just answer what I asked".
What to do with what mem returns
Treat the output as raw material, not a deliverable. Once you have it, decide based on the live conversation:
- Quote inline in your reply if a specific past exchange answers the user's current question — and cite the session-id / phase so the user can verify.
- Update
<task>/prd.mdor<task>/design.mdifmemsurfaced a load-bearing decision that should have been written down but wasn't. Surface the proposed edit to the user first. - Append to a task-local notes file (e.g.
<task>/notes.mdor extending an existing one) if the finding belongs to the current task's record but doesn't fit the PRD. - Update
.trellis/spec/if the finding is a project-wide convention or gotcha that would help future tasks. Run thetrellis-update-specskill for that —session-insightends at the discovery. - Just absorb it for the next few turns and answer better, without writing anything. This is often the right move for one-off recall.
Trellis does not prescribe a single destination. Forcing every recall into a fixed file makes the file grow into noise. Let the situation decide.
How to call it
Full CLI
常见问题
它会从哪些 AI 工具读取历史?
它会读取保存在你电脑上的多个工具的日志,例如 Claude Code、Codex 和 Grok。
它会上传我的聊天吗?
不会。记忆工具只读取磁盘上已有的文件,不上传任何内容。
它会在每次会话后保存笔记吗?
不会。没有必需的回写步骤,保留什么内容由智能体在当时决定。
详情
作者的原始描述
Reach into past AI conversation history through the `trellis mem` CLI. Use whenever the user asks 'how did we solve X last time', 'have we discussed this before', 'what was the decision on X', 'remind me what we did in this task', '上次怎么解的', '之前讨论过吗', '想起一段对话', or when starting a brainstorm that overlaps prior work, debugging a familiar bug, continuing a task across sessions, or doing a finish-work review. Returns raw past dialogue; decide for the moment whether to update spec, append to task notes, quote inline in the answer, or just internalize.
repo: mindfold-ai/Trellis
热度
- GitHub 星标
- 15k
- 排名
- #11032
- 许可证
- AGPL-3.0
- 更新时间
- 2026/9/29
评论
- …
同一仓库的更多技能
first-principles-thinking
15k帮你的智能体把计划或设计拆解为基本事实,再由此向上推理来检验它,而不是依赖习惯或惯例。
python-design
15k帮你的智能体编写和审阅 Python 命令行脚本,使其模块清晰、接口简单,并减少隐藏的复杂性。
trellis-before-dev
15k帮你的智能体在开始编写代码之前,阅读项目的编码指南和任务说明,使其遵循团队的惯例。
trellis-brainstorm
15k帮你的智能体每次提出一个有价值的问题、检查代码并就狭窄的范围达成一致,从而厘清新功能或不明确的任务。