memory-index

memory-index is a skill for Claude Code, Codex from dimetron/pi-go. It costs 0 tokens per session (1,490 once invoked), scanned A, original, MIT.

A procedure for indexing a folder’s source code into MemPalace, a searchable memory store that can find code by meaning or by matching words.

In plain words
What is it for?
Use it to make a code directory searchable, configure file groups, and prepare project material for later memory searches.
Why use it?
It makes a project’s contents easier to retrieve later without manually searching every file. Meaning-based search needs the listed embedding model; keyword search can work without it.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to make a code directory searchable, configure file groups, and prepare project material for later memory searches.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dimetron/pi-go/memory-index
Install

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.

Any agent
npx skills add dimetron/pi-go --skill memory-index
Clone the repo
git clone --depth 1 https://github.com/dimetron/pi-go

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for memory-index

README.md
[![agentmods](https://agentmods.dev/badge/skills/dimetron/pi-go/memory-index/github.svg)](https://agentmods.dev/skills/dimetron/pi-go/memory-index)
Your own site
<a href="https://agentmods.dev/skills/dimetron/pi-go/memory-index"><img src="https://agentmods.dev/badge/skills/dimetron/pi-go/memory-index/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for memory-index

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,490 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 168
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01490
Opus 5.5 $0.00000 $0.00596
Sonnet 5.5 $0.00000 $0.00298
Haiku 4.5 $0.00000 $0.00149

Measured 1mo ago against content hash 63fff3d541af, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 1mo 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.

internal/extension/bundled_skills/memory-index/SKILL.md · 181 lines

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. Use keywords for content-based hints.
  • Files not matching any room go to a default room named general.
  • The wing defaults to the directory basename if omitted.

Read the full file on GitHub · 181 lines

Changes

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.

  1. 1mo ago First seen · 181 lines · 0 tokens per session scan A 63fff3d541af

Subscribe to this mod's changes

memory-index is a skill published in the GitHub repository dimetron/pi-go (212 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.

Related

Other skills, from other repositories

write-terva-lore

Author terva lore. Lore is context that a person authors in files. terva injects it only when it is keyword-relevant, or always-on. Use to create/add/write lore, "world info", a lorebook entry, keyed background, or a book of facts for a character.

terva-sh/terva · 66 tokens

handoff

Compact the current session into a handoff document. A fresh session or another agent can pick it up with no need to re-derive context. Use when asked to hand off, hand over, wrap up for another session or agent, or park work mid-stream.

terva-sh/terva · 56 tokens

retrospective

Distill the reusable lessons of this session into the durable homes that shape future sessions. The lessons are corrections, conventions you discovered, and traps you hit. The homes are the project or global AGENTS.md, a project skill, and memory when available. Use when asked for a retro, to capture or remember…

terva-sh/terva · 76 tokens

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.

Hmbown/CodeWhale · 70 tokens

code-review-context

Codex maintains a context (history of messages) that is sent to the model in inference requests.

openinterpreter/openinterpreter · 7 tokens

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.

JetBrains/go-modern-guidelines · 32 tokens