index

index is a skill for Claude Code from softspark/ai-toolkit. It costs 33 tokens per session (774 once invoked), scanned A, original, Apache-2.0.

A command for rebuilding a knowledge-base search index using a vector store such as Qdrant; vector stores help find text by meaning rather than exact words.

In plain words
What is it for?
Use it to run incremental or full reindexing, detect content changes, remove deleted documents, and validate document metadata before indexing.
Why use it?
It keeps semantic search results aligned with documents that were added, changed, or deleted.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the ai-toolkit plugin — 113 skills, 44 agents, 14 hooks shipped together

Good fit Use it to run incremental or full reindexing, detect content changes, remove…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/softspark/ai-toolkit/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 softspark/ai-toolkit --skill index
Clone the repo
git clone --depth 1 https://github.com/softspark/ai-toolkit

Made for: Claude Code.

Or install ai-toolkit, the plugin that ships this one along with the rest of its 113 skills, 44 agents, 14 hooks.

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 index

README.md
[![agentmods](https://agentmods.dev/badge/skills/softspark/ai-toolkit/index.svg)](https://agentmods.dev/skills/softspark/ai-toolkit/index)
Your own site
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/index"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/index.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 774 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.
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.00033 $0.00774
Opus 5 $0.00016 $0.00387
Sonnet 5 $0.00007 $0.00155
Haiku 4.5 $0.00003 $0.00077

Measured 3d ago against content hash edf5f7cc89f9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

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 3d 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.

app/skills/index/SKILL.md · 96 lines

How it starts

The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Knowledge Base Indexing

$ARGUMENTS

Reindex the knowledge base for semantic search.

Prerequisite: This command requires a vector store (e.g., Qdrant) and an indexing pipeline configured for your project. If not configured, this command provides guidance on setup.

Usage

/index              # Incremental index (detect changes)
/index --full       # Full rebuild

Execution

Direct Execution

# Incremental index (auto-detects changes)
make index

# Full rebuild
make index-full

Docker Execution

docker exec {app-container} make index
docker exec {app-container} make index-full

Change Detection

The indexer uses content hashing to detect changes:

Scenario Action
New document Index
Changed content Reindex
No changes Skip
Deleted document Remove from index

Frontmatter Validation

Before indexing, ensure all KB documents have valid frontmatter:

---
title: "Document Title"
service: {service-name}
category: reference|howto|procedures|troubleshooting|decisions|best-practices
tags: [tag1, tag2]
last_updated: "YYYY-MM-DD"
---

Troubleshooting

Problem Solution
Index not updating Check file timestamps, run full rebuild
Missing documents Verify frontmatter is valid
Slow indexing Check embedding service performance
No vector store Set up Qdrant or compatible vector DB

Rules

  • MUST require explicit user permission before running make index or make index-full — never self-trigger
  • NEVER trigger a full rebuild to "clean up" unless the user asked for it
  • CRITICAL: validate KB frontmatter before indexing — abort on invalid documents rather than indexing a broken state
  • MANDATORY: respect change-detection hashes; do not force reindexing of unchanged documents

Gotchas

  • Content-hash change detection keys on the file's content AND path. A moved document (same content, new path) looks new to the indexer — both the old path vector and the new one will exist until a full rebuild. Plan a full rebuild after mass reorganizations.
  • Deleting a document on disk does not automatically remove its vectors from Qdrant; the indexer emits tombstones only if run with a directory scan. Without --delete-missing, orphan vectors stay for weeks.
  • Embedding providers rate-limit by requests-per-minute AND by tokens-per-minute. A reindex of 1000+ docs hits the token cap first and stalls silently — watch for 429s in the indexer log before concluding "slow indexing".
  • make index-full truncates the collection before re-embedding; if the embedding job crashes mid-way, the collection is left partially populated with no query-time indicator of the gap.

Read the full file on GitHub · 96 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. 3d ago First seen · 96 lines · 33 tokens per session scan A edf5f7cc89f9

Subscribe to this mod's changes

index is a skill published in the GitHub repository softspark/ai-toolkit (170 stars, last pushed 2d ago), licensed Apache-2.0. It adds 33 tokens to every session and 774 once invoked, about $0.0002 per session on Opus 5. 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-09-03.