Claude Skill

vaultr-index-knowledge

Builds and refreshes domain-based index files for the Vaultr knowledge base. Use this skill whenever the user wants to build, rebuild, refresh, or update the knowledge index, create domain indexes, organize knowledge by domain, or index the knowledge base. Triggers on phrases lik

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download skoowoo-vaultr-notes-skills_vaultr-index-knowledge-6cd8ad6.zip · 2 KB
Part of skoowoo/vaultr-notes — 7 skills

Install

skills CLI npx skills add https://github.com/skoowoo/vaultr-notes/tree/main/skills/vaultr-index-knowledge
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install skoowoo-vaultr-notes@llmmart
Git git clone https://github.com/skoowoo/vaultr-notes.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole skoowoo/vaultr-notes collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Vaultr Index Knowledge

Scans the knowledge directory, finds units not yet in any index, and adds them. Running this skill repeatedly is safe and always converges — it only ever adds missing entries, never rewrites existing ones.

Domain index files live at <knowledge-dir>/_indexes/<Domain>.md. The compile skill matches a note to a domain by the index filename alone (e.g. AI.md, Business.md).

A unit may appear in at most 2 indexes: one primary domain, one secondary only when the unit genuinely straddles two.

Run all steps to completion without stopping. Only speak at the end (Step 4 summary).


Inputs

  • Knowledge directory — default: _knowledge/ (relative to cwd, which is always the vault root)

The index directory is always <knowledge-dir>/_indexes/. Create it if it does not exist.


Step 1 — Find unindexed units

Scan all knowledge units:

find <knowledge-dir> -name "*.md" -not -path "*/_indexes/*" | sort

Scan all existing index files and collect every Path value from their tables:

find <index-dir> -name "*.md" | sort

A unit is unindexed if its vault-absolute path (e.g. /_knowledge/Vertical Agent.md) does not appear in any index table. Build a list of only these units.

If all units are already indexed, report and stop.


Step 2 — Read unindexed units

For each unindexed unit, read its YAML front matter and first non-heading paragraph. Build an internal list:

references/extract.md documents partial-read commands — vaultr extract tag retrieves front-matter tags directly; vaultr extract segment --head N retrieves the opening lines. Use them instead of a full vaultr read when only these fragments are needed.

title          | entity_type | tags          | summary (≤80 chars)                              | vault-absolute path
Vertical Agent | concept     | [ai, agent]   | AI product focused on a specific vertical domain | /_knowledge/Vertical Agent.md
Jane Smith     | person      | [founder, ai] | Founder of SophiaPro, AI startup                 | /_knowledge/Jane Smith.md

Step 3 — Assign and update indexes

For each unindexed unit, determine domain assignment:

  1. Match existing domains first by semantic understanding of the domain name (from existing index filenames) against the unit's title, entity_type, tags, and summary. Assign the strongest match.

  2. Secondary domain only when the unit genuinely belongs to two domains — passing relevance is not enough. When in doubt, assign one.

  3. New domain when no existing domain fits. Create a new domain if the topic is broad and stable enough to plausibly accumulate more units over time (e.g. Physics, History, Health, Law). The test is domain breadth, not how many unindexed units are present right now — a single unit can justify a new domain. Only fall back to "General" when the topic is genuinely narrow or one-off and unlikely to grow.

  4. Domain names should be broad and stable (e.g. AI, Business, Science, People, Philosophy). Don't name a domain after a single entity unless it anchors a large cluster.

For each affected domain index, append the new rows and update unit_count and updated in the frontmatter. If the index file does not exist yet, create it:

---
kind: index
domain: <Domain>
unit_count: <N>
updated: <YYYY-MM-DD>
---

# <Domain>

| Title          | Type    | Tags          | Summary                                          | Path                          |
| -------------- | ------- | ------------- | ------------------------------------------------ | ----------------------------- |
| Vertical Agent | concept | [ai, agent]   | AI product focused on a specific vertical domain | /_knowledge/Vertical Agent.md |
| Jane Smith     | person  | [founder, ai] | Founder of SophiaPro, AI startup                 | /_knowledge/Jane Smith.md     |

Keep rows sorted alphabetically by Title within each index file.


Step 4 — Report

  • How many units were already indexed vs. newly added
  • Which index files were updated or created, and how many entries were added to each
Files (vaultr-notes)
  • references
    • extract.md 1.3 KB
      # Extract — Partial Note Reading
      
      `vaultr extract` reads parts of a note without loading the full content. Use it whenever the full note is not needed.
      
      ## Subcommands
      
      **Outline** — heading structure only:
      ```bash
      vaultr extract outline <path-or-name>
      ```
      
      **Section** — one named section and its content (ends at the next heading of equal or higher level):
      ```bash
      vaultr extract section <path-or-name> "<heading>"   # case-insensitive
      vaultr extract section today.md "## meeting notes"
      ```
      
      **Segment** — line range:
      ```bash
      vaultr extract segment <path-or-name> --head 20        # first N lines
      vaultr extract segment <path-or-name> --tail 10        # last N lines
      vaultr extract segment <path-or-name> --start 5 --end 30  # specific range (1-based, inclusive)
      ```
      
      **Tags** — front-matter tags only:
      ```bash
      vaultr extract tag <path-or-name>
      ```
      
      **Code blocks** — all fenced code blocks:
      ```bash
      vaultr extract code <path-or-name>
      ```
      
      **Lists** — all bullet and numbered lists:
      ```bash
      vaultr extract list <path-or-name>
      ```
      
      **Links** — all links (wikilinks and markdown links); each result shows type and target:
      ```bash
      vaultr extract link <path-or-name>
      ```
      
      ## Path rules
      
      Same as `vaultr read`: accepts vault-absolute paths (`/journal/today.md`) or bare filenames (resolves to most recently updated match).
      
  • SKILL.md 4.6 KB
    ---
    name: vaultr-index-knowledge
    description: "Builds and refreshes domain-based index files for the Vaultr knowledge base. Use this skill whenever the user wants to build, rebuild, refresh, or update the knowledge index, create domain indexes, organize knowledge by domain, or index the knowledge base. Triggers on phrases like 'build knowledge index', 'rebuild index', 'refresh knowledge index', 'update domain indexes', 'index my knowledge base', 'regenerate index', or any request to create or maintain the knowledge index files."
    ---
    
    # Vaultr Index Knowledge
    
    Scans the knowledge directory, finds units not yet in any index, and adds them. Running this skill repeatedly is safe and always converges — it only ever adds missing entries, never rewrites existing ones.
    
    Domain index files live at `<knowledge-dir>/_indexes/<Domain>.md`. The compile skill matches a note to a domain by the index filename alone (e.g. `AI.md`, `Business.md`).
    
    A unit may appear in **at most 2** indexes: one primary domain, one secondary only when the unit genuinely straddles two.
    
    **Run all steps to completion without stopping. Only speak at the end (Step 4 summary).**
    
    ---
    
    ## Inputs
    
    - **Knowledge directory** — default: `_knowledge/` (relative to cwd, which is always the vault root)
    
    The index directory is always `<knowledge-dir>/_indexes/`. Create it if it does not exist.
    
    ---
    
    ## Step 1 — Find unindexed units
    
    Scan all knowledge units:
    
    ```bash
    find <knowledge-dir> -name "*.md" -not -path "*/_indexes/*" | sort
    ```
    
    Scan all existing index files and collect every `Path` value from their tables:
    
    ```bash
    find <index-dir> -name "*.md" | sort
    ```
    
    A unit is **unindexed** if its vault-absolute path (e.g. `/_knowledge/Vertical Agent.md`) does not appear in any index table. Build a list of only these units.
    
    If all units are already indexed, report and stop.
    
    ---
    
    ## Step 2 — Read unindexed units
    
    For each unindexed unit, read its YAML front matter and first non-heading paragraph. Build an internal list:
    
    `references/extract.md` documents partial-read commands — `vaultr extract tag` retrieves front-matter tags directly; `vaultr extract segment --head N` retrieves the opening lines. Use them instead of a full `vaultr read` when only these fragments are needed.
    
    ```
    title          | entity_type | tags          | summary (≤80 chars)                              | vault-absolute path
    Vertical Agent | concept     | [ai, agent]   | AI product focused on a specific vertical domain | /_knowledge/Vertical Agent.md
    Jane Smith     | person      | [founder, ai] | Founder of SophiaPro, AI startup                 | /_knowledge/Jane Smith.md
    ```
    
    ---
    
    ## Step 3 — Assign and update indexes
    
    For each unindexed unit, determine domain assignment:
    
    1. **Match existing domains first** by semantic understanding of the domain name (from existing index filenames) against the unit's title, entity_type, tags, and summary. Assign the strongest match.
    
    2. **Secondary domain** only when the unit genuinely belongs to two domains — passing relevance is not enough. When in doubt, assign one.
    
    3. **New domain** when no existing domain fits. Create a new domain if the topic is broad and stable enough to plausibly accumulate more units over time (e.g. `Physics`, `History`, `Health`, `Law`). The test is domain breadth, not how many unindexed units are present right now — a single unit can justify a new domain. Only fall back to "General" when the topic is genuinely narrow or one-off and unlikely to grow.
    
    4. **Domain names** should be broad and stable (e.g. `AI`, `Business`, `Science`, `People`, `Philosophy`). Don't name a domain after a single entity unless it anchors a large cluster.
    
    For each affected domain index, append the new rows and update `unit_count` and `updated` in the frontmatter. If the index file does not exist yet, create it:
    
    ```markdown
    ---
    kind: index
    domain: <Domain>
    unit_count: <N>
    updated: <YYYY-MM-DD>
    ---
    
    # <Domain>
    
    | Title          | Type    | Tags          | Summary                                          | Path                          |
    | -------------- | ------- | ------------- | ------------------------------------------------ | ----------------------------- |
    | Vertical Agent | concept | [ai, agent]   | AI product focused on a specific vertical domain | /_knowledge/Vertical Agent.md |
    | Jane Smith     | person  | [founder, ai] | Founder of SophiaPro, AI startup                 | /_knowledge/Jane Smith.md     |
    ```
    
    Keep rows sorted alphabetically by Title within each index file.
    
    ---
    
    ## Step 4 — Report
    
    - How many units were already indexed vs. newly added
    - Which index files were updated or created, and how many entries were added to each
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related