Agent skill

Memory Index

by dimetron in dimetron/pi-go

Index a folder's contents into the MemPalace semantic memory for search and retrieval.

MITAuto-check passedAI & LLM Engineering

Install Memory Index

skills CLI
$ npx skills add dimetron/pi-go --skill memory-index -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dimetron/pi-go memory-index --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dimetron/pi-go.git skills-src && mkdir -p .claude/skills && cp -r skills-src/internal/extension/bundled_skills/memory-index .claude/skills/memory-index && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
memory-index
GitHub stars
207
Token cost
~1.5k tokens
SKILL.md length
524 words
Files
1
Skills in repo
21
Repo updated
First seen
Licence
MIT

At a glance

Index a folder's contents into the MemPalace semantic memory for search and retrieval.

  • Works in 5 steps: Verify the model is ready → Configure rooms (optional but recommended) → Mine the folder → …
  • The user asks to index a folder
  • SKILL.md covers Prerequisites, Workflow, Re-indexing and Tips
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Memory Index is an agent skill from dimetron/pi-go. Index a folder's contents into the MemPalace semantic memory for search and retrieval. Use this skill whenever the user asks to "index a folder", "index a directory", "index memory", "mine a project into memory", "make a folder searchable", "embed a folder", "ingest code into the palace", or "index this directory for semantic search". Covers the full flow: model download, mempalace.yaml room configuration, mining, and verification via search. Also trigger when the user says "memory index", "index memory of…

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Embeddings. The repository describes itself as: Go implementation of AI coding agent. The licence is MIT.

When your agent uses it

  • The user asks to index a folder
  • Index a directory
  • Mine a project into memory
  • Make a folder searchable

Example prompts

  • “index a folder”
  • “index a directory”
  • “index memory”
  • “/memory-index”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Verify the model is ready
  2. Configure rooms (optional but recommended)
  3. Mine the folder
  4. Verify with search
  5. Check status

What it can do on your machine

Read from SKILL.md and the folder at commit 24d1f2b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash and yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Memory Index loads about 1.5k tokens when it runs. Until then it costs about 155 tokens; SKILL.md has 524 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~155
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from dimetron/pi-go at commit 24d1f2b, republished under its MIT licence (© dimetron). 524 words, ~1,469 tokens.

Download SKILL.mdSave it as .claude/skills/memory-index/SKILL.md (or your agent's skills folder).
name
memory-index
description
Index a folder's contents into the MemPalace semantic memory for search and retrieval. Use this skill whenever the user asks to "index a folder", "index a directory", "index memory", "mine a project into memory", "make a folder searchable", "embed a folder", "ingest code into the palace", or "index this directory for semantic search". Covers the full flow: model download, mempalace.yaml room configuration, mining, and verification via search. Also trigger when the user says "memory index", "index memory of folder", or asks how to make a project's code semantically searchable with pi-go's MemPalace.

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:

bash
pi memory model status

If not downloaded:

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

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

yaml
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.
3. Mine the folder
bash
pi memory mine .

This command:

  • Walks the directory recursively
  • Respects .gitignore and skips node_modules/, vendor/, .git/, dist/, build/, etc.
  • Chunks each supported file into semantic units
  • Embeds each chunk with all-MiniLM-L6-v2 (384-dim vectors)
  • Stores drawers in .pi-go/palace.db (SQLite + FTS5 + embedding BLOBs)
  • Detects and skips near-duplicate content (cosine similarity > threshold)

Flags:

bash
pi memory mine .                    # mine source files (default)
pi memory mine                      # same as above — defaults to current directory
pi memory mine . --wing myapp       # override wing name
pi memory mine . --convos            # mine conversation files (.jsonl, .txt, .md) instead of source

Supported file extensions (source mode): .go, .py, .js, .ts, .tsx, .jsx, .java, .c, .cpp, .h, .hpp, .rs, .rb, .php, .swift, .kt, .scala, .md, .txt, .json, .yaml, .yml, .toml, .xml, .html, .css, .scss, .sql, .sh, .bash, .zsh, .fish.

File size limit: 512 KB per file. Larger files are skipped silently.

Progress: The command shows a live spinner with phase-aware progress (scan → embed → insert), per-file counts, chunk counts, elapsed time, and a final summary with palace status:

 ✓  done     [████████████████████████████████]  142/142 files, 138 chunks  3m12s

Mining complete:
  Processed: 142
  Added:     138
  Skipped:   4 (duplicates)
  Errors:    0

Palace status:
  Drawers: 138
  Wings:   1
  Rooms:   5
Show full SKILL.md (165 more words)Show less

Search the indexed content semantically:

bash
pi memory search "authentication flow" --limit 5
pi memory search "database connection pool" --wing myapp --room models

Or from within an agent session, the palace-search tool is available automatically when a palace database exists at .pi-go/palace.db.

5. Check status
bash
pi memory status

Shows drawer counts per wing/room, database size, and model status.

Re-indexing

Mining is idempotent for identical content — duplicates are detected by embedding similarity and skipped. To re-index after significant changes:

bash
pi memory mine .

Changed files will be re-embedded; unchanged files will be skipped as duplicates. For a full clean re-index, delete the database first:

bash
rm .pi-go/palace.db
pi memory mine .

Tips

  • Index at the repo root so .gitignore and mempalace.yaml are picked up.
  • Run from the project directory — the palace database is created at .pi-go/palace.db relative to the mined directory.
  • Index conversations separately with --convos to search past agent sessions.
  • Search with filters — --wing and --room dramatically improve recall by narrowing the search space before similarity ranking.
  • No model? Still works. If the embedding model isn't loaded, search falls back to FTS5 keyword matching automatically. Semantic search is better, keyword is the floor.

© dimetron, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in internal/extension/bundled_skills/memory-index of dimetron/pi-go.

Open the folder on GitHubat commit 24d1f2b

Compare with similar skills

Memory Index next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Memory Index compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Memory Index this skilldimetron/pi-go207—~1.5kAutomated safety check: PassMIT
Chroma Vector DatabaseOrchestra-Research/AI-Research-SKILLs13k8 repos~2.3kAutomated safety check: PassMIT
CLIP Image-Text MatchingOrchestra-Research/AI-Research-SKILLs13k8 repos~1.7kAutomated safety check: PassMIT
SageMaker Serving Image Selectionhuggingface/skills11k1 repos~4.6kAutomated safety check: PassApache-2.0
Codebase Managementgiancarloerra/SocratiCode3.3k1 repos~1.8kAutomated safety check: PassAGPL-3.0
Sentence-Transformers Training Routerhuggingface/skills11k1 repos~2.6kAutomated safety check: PassApache-2.0

Similar skills

  • Chroma Vector Database

    Orchestra-Research/AI-Research-SKILLs

    Shows how to store documents and embeddings in Chroma, query them by similarity with metadata filters, and persist them to disk for RAG and semantic search projects.

    13k GitHub starsUsed in 8 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed
  • CLIP Image-Text Matching

    Orchestra-Research/AI-Research-SKILLs

    Explains OpenAI's CLIP model for zero-shot image classification, image-text similarity, semantic image search and content moderation, with install steps and code patterns.

    13k GitHub starsUsed in 8 repos~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Official

    Chooses the right serving container and current image URI for deploying a Hugging Face model to a SageMaker endpoint, preferring Hugging Face images over generic ones.

    11k GitHub starsUsed in 1 repo~4.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Codebase Management

    giancarloerra/SocratiCode

    Set up, index, and manage SocratiCode codebase indexing. An agent skill from giancarloerra/SocratiCode.

    3.3k GitHub starsUsed in 1 repo~1.8k tokens
    AI & LLM EngineeringAuto-check passed
  • Official

    Routes a sentence-transformers training task to the right model type and required reference docs and example scripts, covering bi-encoders, rerankers, sparse and multi-vector models.

    11k GitHub starsUsed in 1 repo~2.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Mashup Mods

    rehan-remade/universal-modder

    Build cross-game mashups and total conversions, the "Minecraft inside Elden Ring" or "skateboarding in MW2" kind.

    5.3k GitHub stars~3.3k tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from dimetron/pi-go

All 21 skills in this repo
  • Vhs E2E Gif

    dimetron/pi-go

    Record a test run, a TUI session, or any terminal command as a GIF with VHS and attach it to a GitHub PR as a release-hosted asset, never a repo commit.

    207 GitHub stars~1.7k tokensUpdated 7 days ago
    Auto-check passed
  • Agents Md

    dimetron/pi-go

    Generate AGENTS.md files for Go, Rust, TypeScript, and Java projects.

    207 GitHub stars~1.7k tokensUpdated 7 days ago
    Auto-check passed
  • Bubbletea Testing

    dimetron/pi-go

    A skill your agent uses whenever writing tests for Bubble Tea (charmbracelet/bubbletea) TUI applications in Go.

    207 GitHub stars~3.6k tokensUpdated 7 days ago
    Auto-check passed
  • Nightly Session Watch

    dimetron/pi-go

    Nightly sweep of the last 24h of pi-go sessions — anomalous runs, loop aborts, tool error rates, token waste, real prompt-token spend, and whether the observation and palace pipelines are still…

    207 GitHub stars~1.5k tokensUpdated 7 days ago
    Auto-check passed
  • Osx Tuning

    dimetron/pi-go

    Tune macOS resource limits and sysctls for best performance with Go development, Docker/OrbStack, and Linux VMs.

    207 GitHub stars~1.6k tokensUpdated 7 days ago
    Auto-check: notes
  • Pgo

    dimetron/pi-go

    Profile-guided optimization (PGO) for the pi binary. An agent skill from dimetron/pi-go.

    207 GitHub stars~1.4k tokensUpdated 7 days ago
    Auto-check passed

Questions about Memory Index

What does Memory Index do?

Index a folder's contents into the MemPalace semantic memory for search and retrieval. Memory Index is an agent skill from dimetron/pi-go. Index a folder's contents into the MemPalace semantic memory for search and retrieval.

When should I use Memory Index?

Memory Index fits situations like: the user asks to index a folder; index a directory; mine a project into memory; make a folder searchable.

How do I install Memory Index in Claude Code?

Run `npx skills add dimetron/pi-go --skill memory-index -a claude-code`. Or copy the skill folder (internal/extension/bundled_skills/memory-index in dimetron/pi-go) into .claude/skills/memory-index in your project. Claude Code loads it when a task matches its description.

How do I install Memory Index in Codex?

Run `npx skills add dimetron/pi-go --skill memory-index -a codex`. Or copy the skill folder (internal/extension/bundled_skills/memory-index in dimetron/pi-go) into .agents/skills/memory-index in your project. Codex loads it when a task matches its description.

Can I use Memory Index in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dimetron/pi-go --skill memory-index -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/memory-index, .gemini/skills/memory-index, .github/skills/memory-index and .opencode/skills/memory-index in your project.

What does Memory Index need to run?

SKILL.md names no scripts, command-line tools or credentials: Memory Index is instructions for the agent only.

Does Memory Index access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Memory Index safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Memory Index use?

Memory Index is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Memory Index use?

About 1.5k tokens (SKILL.md is roughly 5.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Memory Index?

Skills that share tags, products or a category with Memory Index: Chroma Vector Database (Orchestra-Research/AI-Research-SKILLs, 13k stars), CLIP Image-Text Matching (Orchestra-Research/AI-Research-SKILLs, 13k stars), SageMaker Serving Image Selection (huggingface/skills, 11k stars) and Codebase Management (giancarloerra/SocratiCode, 3.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Memory Index?

dimetron (a GitHub user) maintains it in dimetron/pi-go, which has 207 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 1, 2026.

Source: dimetron/pi-go on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.