hindsight-coding-agent
Skill này làm gì
Skill này giải thích cách bộ nhớ dự án dài hạn của một coding agent hoạt động, dùng máy chủ Hindsight. Skill dành cho lập trình viên muốn biết bộ nhớ lưu những gì, được thiết lập ra sao và cách sửa khi nó hoạt động sai.
Khi nào nên dùng
- ✓Khi bạn muốn lưu điều gì đó vào bộ nhớ dự án trong Hindsight để các phiên lập trình sau dùng lại.
- ✓Khi bạn muốn đổi cài đặt bộ nhớ cho một repository, chẳng hạn tắt nó hoặc đổi tên bank của nó.
- ✓Khi bộ nhớ dự án có vẻ lỗi hoặc không xuất hiện trong một phiên.
Liên kết skill
https://github.com/vectorize-io/hindsight/blob/main/hindsight-integrations/coding-agents/skill/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi muốn lưu quyết định này về việc versioning API vào Hindsight để các phiên lập trình sau nhớ nó.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Plugin tạo một bank bộ nhớ cho mỗi repository và cập nhật nó liên tục từ các commit và cuộc trò chuyện. Agent có thể tìm kiếm trong bộ nhớ đó và thêm nội dung vào trong một phiên.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Có lệnh nào để xây dựng bộ nhớ không?
Không. Skill cho biết bank tự xây dựng khi được mở lần đầu và tự cập nhật ở nền, nên không có lệnh ingest để chạy.
Bản ghi phiên làm việc có được lưu không?
Skill cho biết bản ghi phiên được lưu vào bank một cách tự động.
Tôi có thể tắt bộ nhớ cho một repository không?
Có. Skill liệt kê việc tắt bộ nhớ theo từng repo là một cài đặt bạn có thể thay đổi.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 58k
- Vị trí xếp hạng
- #3261
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
figure
58kGiúp agent của bạn vẽ một sơ đồ động thành một file SVG duy nhất cho README GitHub, pull request hoặc bài blog, thể hiện luồng của một quy trình.
Hindsight Memory
58kDạy agent của bạn lưu và tra cứu bộ nhớ dài hạn trong ứng dụng Hindsight, thay vì dùng các công cụ bộ nhớ tích hợp sẵn.
hindsight-memory
58kGiúp agent của bạn gợi lại bối cảnh cũ liên quan trước khi trả lời, lưu các sự thật bền vững khi học được, và suy luận trên bộ nhớ của nó.
hindsight-recall
58kGiúp agent của bạn tìm trong bộ nhớ dài hạn các quyết định, bối cảnh dự án và sở thích trước đây khi bạn hỏi về công việc đã làm.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.