Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/dimetron/pi-go/memory-indexnpx skills add dimetron/pi-go --skill memory-indexgit clone --depth 1 https://github.com/dimetron/pi-goWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/dimetron/pi-go/memory-index)<a href="https://agentmods.dev/skills/dimetron/pi-go/memory-index"><img src="https://agentmods.dev/badge/skills/dimetron/pi-go/memory-index.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.01490 |
| Opus 5 | $0.00000 | $0.00745 |
| Sonnet 5 | $0.00000 | $0.00298 |
| Haiku 4.5 | $0.00000 | $0.00149 |
Grade A, and why
memory-index scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Index a Folder into MemPalace
This skill walks through indexing a folder's source code into pi-go's MemPalace — the 4-layer semantic memory system with SQLite storage and embedding-based search.
Once indexed, the agent can search the folder's contents by meaning, not just keywords,
using the palace-search tool or pi memory search CLI.
Prerequisites
The embedding model (all-MiniLM-L6-v2) must be downloaded. Check with:
pi memory model status
If not downloaded:
pi memory model download
This fetches ~90 MB of ONNX model files to ~/.pi-go/models/. It auto-selects the
optimal ONNX variant for the platform (quantized ARM64 on Apple Silicon, base on x86_64).
The model is optional. Without it, search falls back to FTS5 keyword matching. Semantic search requires the model; keyword search works without it.
Workflow
1. Verify the model is ready
pi memory model status
Output should show Model: all-MiniLM-L6-v2 with a path and size. If it says
Model: not downloaded, run pi memory model download first.
2. Configure rooms (optional but recommended)
Create a mempalace.yaml at the repo root to map file patterns to semantic "rooms".
This narrows the search space before embeddings fire, improving retrieval significantly
(benchmark: 60.9% recall unfiltered → 94.8% with wing+room filtering).
wing: my-project # top-level name (defaults to directory basename)
rooms:
- name: api
patterns:
- "internal/api/**"
- "internal/handler/**"
keywords:
- http
- handler
- route
- name: models
patterns:
- "internal/models/**"
keywords:
- schema
- struct
- database
- name: tests
patterns:
- "**/*_test.go"
keywords:
- test
- mock
- fixture
Rules for good rooms:
- 3–8 rooms is the sweet spot. Too few = no filtering power. Too many = sparse drawers.
- Use
patterns(glob) for path-based assignment. Usekeywordsfor content-based hints. - Files not matching any room go to a default room named
general. - The
wingdefaults to the directory basename if omitted.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 181 lines · 0 tokens per session scan A 63fff3d541af
memory-index is a skill published in the GitHub repository dimetron/pi-go (151 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,490 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
learn-from-history
审计近期对话历史,提炼重复失败、成功模式、稳定规则和 skill 改进。用户要求总结历史对话、 回顾近期 agent 表现、从历史中学习或寻找可自动化改进时使用。.
code-review-context
Codex maintains a context (history of messages) that is sent to the model in inference requests.
qa-testing
Verify your work by actually operating the app or website you changed, instead of assuming it works. Strongly recommended whenever you build, modify, or debug a web app, website, or desktop GUI app. Drive real browsers with the agent-browser CLI and native desktop apps with the cua-driver CLI. These are installed on…
handoff
Write a compact, decision-ready handoff so the next session (or the user) can continue without reconstructing the current one. Use when the session is ending, context is running low, the user asks for a handoff / "pass the baton" / "hand off", or a long-running operation needs a durable state checkpoint.
use-modern-go
Use the Modern Go Guidelines CLI whenever writing, modifying, fixing, or refactoring Go code. Apply its version-specific guidance to generated changes.
create-notes
Write a note to {shareddir}/notes/ that future agents can actually act on. Use after every coral eval, when a heartbeat (reflect / consolidate / pivot) asks for a note, or when you discover a grader / build / runtime issue that future agents will hit. Covers 4 note variants (experiment / infra / focus / synthesis)…