agentleFS
letsloose501letsloose501/sqs-agent-memory/skills/vault-index/SKILL.md

vault-index

Skill2 starsChanged 9 days agoApache-2.0View on GitHub

Fills the MemPalace index of the Obsidian vault in batches: finds notes that have no summary card yet, reads each and writes a card that says what question the note answers, so semantic search finds it by the words someone would actually ask. Use on "index my vault", "fill the palace", "the search does not find my notes", "card the notes", after importing an existing vault, or from a scheduled task. One run = one batch.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not commit anything.

    line 86

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Fill the vault index

The MemPalace index is summary cards, one per note: name, path, what it answers, terms, links. It exists to find a note when the exact word is unknown: grep will never find "where was the thing about the agent getting dumber on long tasks", because the note does not contain "dumber".

  • Vault: ${user_config.vault_dir}
  • Script: ${CLAUDE_PLUGIN_ROOT}/scripts/vault_index.py (runs on any Python; it re-launches itself in the MemPalace tool environment, where chromadb and the embedder live)

Do not fill it with mempalace mine. Measured on a real 1100-note vault: mine added 1043 drawers of raw text, including an inbox with a list of films, and eight test queries returned byte-identical results before and after those drawers were removed. The index is made by the summary, not by volume.

Do not depend on the mempalace_* MCP tools here. The server starts with the app; when it did not connect, a task waiting for its tools hangs. The script writes directly, with the palace's own embedder (a different embedder silently breaks search for the whole palace).

Steps

1. Take a batch.

uv run --no-project "${CLAUDE_PLUGIN_ROOT}/scripts/vault_index.py" gaps --vault "${user_config.vault_dir}"
uv run --no-project "${CLAUDE_PLUGIN_ROOT}/scripts/vault_index.py" gaps --vault "${user_config.vault_dir}" --batch 40

30 to 50 notes per batch. More, and the quality of summaries drops faster than speed grows. Stubs (a title and empty headings) are neither listed nor counted in coverage.

2. Read every note. Actually read the file; do not guess from its name.

3. Write the cards into a JSON file in the scratchpad and add them in one call:

[
  {"path": "Programming/Git.md",
   "summary": "how to keep history, branch and merge without losing work; what a remote is",
   "terms": "repository, commit, branch, hash, staging",
   "links": "[[Terminal]], [[Databases]]"}
]
uv run --no-project "${CLAUDE_PLUGIN_ROOT}/scripts/vault_index.py" add --vault "${user_config.vault_dir}" --from-json "<scratchpad>/batch.json" --agent vault-index

The script skips notes already carded and paths that do not exist, and prints what it added.

4. The summary is the line that matters: a symptom and a question, not a table of contents. A card "Index types" summarised as "B-tree and selectivity" is found by "types of database indexes" but not by "a database query takes forever", because the summary has no words about a slow query.

  • bad: "sections: definition, types, examples"
  • good: "how keyset differs from offset and why offset slows down on deep pages"

Think: in what words will the user ask about this in six months, having forgotten the title?

Spell notation out in words. An embedder does not connect O(1) with "constant time" or WAL with "write-ahead log". Write "in O(1), that is, constant time" and "write-ahead log (WAL)".

Never copy phrasing from test queries. Putting an evaluation query into a card raises the number without improving anything: the summary is written from the note, never from the test.

5. Check the palace after a large write, since the vector index can drift from sqlite:

uv run --no-project "${CLAUDE_PLUGIN_ROOT}/skills/notes/scripts/mempalace_doctor.py"

"Healthy" or "within flush lag": done. Anything else: follow its instructions.

Limits

  • Do not edit the vault. This task only reads notes and writes to the index.
  • Do not commit anything.
  • Blocked on a permission prompt: do not wait silently; finish the run and say where it stopped.

Report

One block: how many cards were added, which sections, coverage before and after (from gaps), what is left.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.