hindsight-coding-agent
它能做什么
这个技能说明编程智能体的长期项目记忆是如何借助 Hindsight 服务器工作的。适合想了解记忆保存什么、如何设置、以及出现异常时如何修复的开发者。
适用场景
- ✓当你想把某些内容保存到 Hindsight 的项目记忆中,供之后的编程会话使用的时候。
- ✓当你想更改某个仓库的记忆设置,例如关闭记忆或重命名其记忆库的时候。
- ✓当项目记忆似乎失效,或在会话中没有显示出来的时候。
技能链接
https://github.com/vectorize-io/hindsight/blob/main/hindsight-integrations/coding-agents/skill/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我把这条关于 API 版本管理的决定保存到 Hindsight 中,让以后的编程会话也能记住它。”
每周 5 个新技能,1 分钟读完。
工作原理
插件为每个仓库建立一个记忆库,并根据提交记录和对话内容持续更新它。智能体可以在会话中搜索这些记忆,也可以向其中添加内容。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Hindsight Coding-Agent Memory
This machine runs the hindsight-coding-agents plugin: long-term project memory for coding
sessions, backed by a Hindsight server. You (the agent) are already wired into it — this skill
explains what happens automatically, which tools you have, and how to configure or debug it.
What happens automatically (no action needed)
- Per-repo memory bank: each repository resolves to a bank (shown in the session banner:
↳ memory bank “coding-agent::<repo>”). Worktrees share the main repo's bank. - Ingestion builds itself: on first open, the bank is seeded from recent commit messages and a read-only codebase survey; every session start, a background engine tops it up (new commits, new conversations) and keeps 5 knowledge pages current. There is NO ingest command to run.
- Session synthesis: by default, the first prompt of a session triggers one deep memory
synthesis (
reflect) injected into context.autoInjectswitches the source:pages(knowledge page search hits),recall(recalled observations), ornone(nothing injected; the agent searches the knowledge pages first and reflects only when they are too shallow). - Write-back: the session transcript is retained into the bank automatically at session end (per-turn on opencode). The user never needs to "save" a conversation.
Storing things deliberately
When the user says "store this in hindsight" / "remember this":
- The current conversation is captured automatically at session end — say so; no tool needed.
- An external document, notes, or durable findings →
hindsight_ingest_document(title, content). - A new feature/initiative being started →
hindsight_capture_initiative(title, summary), right after the plan is agreed and before code is written. - A plan that materially changed (goal, scope, or rationale — including mid-implementation) →
call
hindsight_capture_initiativeagain withrelates_to_page_idset to that initiative's page id, summarising the current intent. Same page, updated plan — never a second page. Trivial course-corrections don't count.
Retrieving
hindsight_search_knowledge_pages(query)— FIRST STOP for project questions (components, conventions, past decisions, initiatives). Server-side hybrid search, fast.hindsight_read_knowledge_page(page_id)/hindsight_list_knowledge_pages— read pages fully.hindsight_reflect(query)— deep reasoning over the whole memory for WHY questions and exact decided values; slower (seconds), use deliberately.- Credit visibly whenever memory informs an answer: start that part with
🧠 From Hindsight memory (<page>): …— and never credit memory that didn't contribute.
Correcting wrong or stale memory
If you verify that something Hindsight served is wrong or outdated (the code, git, or an external
source contradicts it), FIX THE RECORD — don't just ignore it. Call
hindsight_ingest_document with:
- title:
Correction: <topic>(e.g.Correction: retry policy 4xx set) - content: (1) what memory claimed, (2) what is verifiably true now, (3) the evidence you checked (file/commit/output). Quote exact values verbatim.
Newer facts supersede older ones in retrieval, so one clear correction permanently outranks the stale memory. Do this whenever you catch a wrong injected memory, a stale knowledge-page claim, or an outdated decision — silent disregard leaves the trap armed for the next session.
Install / update
npx @vectorize-io/hindsight-coding-agents install all # every detected agent, wired natively
npx @vectorize-io/hindsight-coding-agents install claude-code # or just one
npx @vectorize-io/hindsight-coding-agents uninstall all # removes exactly what install added
npx @vectorize-io/hindsight-coding-agents update # refresh the runtime only, no rewiring
npx @vectorize-io/hindsight-coding-agents stats # how often each agent uses Hindsight
install takes an explicit target — all, or one or more harness names. A bare
npx @vectorize-io/hindsight-coding-agents install changes nothing and prints the choice, so wiring every agent on
the machine is never something that happens by accident. Updating is the same install
command again — it re-copies the runtime in place.
Day to day you
常见问题
有没有命令来建立记忆?
没有。该技能说明,记忆库会在首次打开时自动建立,并在后台更新,因此无需运行任何导入命令。
会话记录会被保存吗?
该技能说明,会话记录会自动保存到记忆库中。
我可以只为一个仓库关闭它吗?
可以。该技能列出了禁用单个仓库记忆的设置,你可以更改它。
详情
作者的原始描述
How this machine's Hindsight coding-agent memory works — the plugin behind the 🧠 banner. Use when the user says "store/remember this in hindsight", asks what the memory/knowledge pages are, wants to configure per-repo memory (disable, rename banks, git depth), or something memory-related looks broken.
repo: vectorize-io/hindsight
热度
- GitHub 星标
- 58k
- 排名
- #3261
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
figure
58k帮你的智能体把流程画成一个动画示意图,保存为单个 SVG 文件,可用于 GitHub README、拉取请求或博客文章。
Hindsight Memory
58k教你的智能体把长期记忆保存并查找在 Hindsight 应用中,而不是使用它自带的记忆工具。
hindsight-memory
58k帮你的智能体在回答前回忆相关的过往背景,在学到持久事实时将其保存,并基于记忆进行推理。
hindsight-recall
58k帮你的智能体在你询问早先工作时,搜索长期记忆中的过往决定、项目背景和偏好。