index-skills

Build a search index from SKILL.md files into ~/.ai/skill-index.json.

5|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/tiancaiamao/ai --skill index-skills
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: index-skills
Source: https://github.com/tiancaiamao/ai/tree/main/skills/index-skills
Command: npx skills add https://github.com/tiancaiamao/ai --skill index-skills

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill keeps a growing skills library discoverable by building and maintaining a searchable index from each skill's SKILL.md file.

Core Features & Use Cases

  • Skill Discovery: Extracts names, descriptions, aliases, keywords, and usage cues so skills can be found by intent instead of exact filenames.
  • Incremental Reindexing: Detects added, removed, and modified skills using file mtimes to avoid unnecessary full rebuilds.
  • Metadata Enrichment: Infers search-friendly aliases, categories, and use cases from each skill's instructions to improve retrieval quality.
  • Use Case: After adding a new skill or updating an existing one, run this Skill to refresh the central index and keep search results accurate.

Quick Start

Ask the skill to scan your skills directory and regenerate the search index at ~/.ai/skill-index.json.

Frequently Asked Questions about index-skills

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make my markdown skills searchable by intent instead of filename?

To make skills searchable by intent, you can build a search index that extracts names, descriptions, aliases, and keywords from SKILL.md frontmatter. This metadata enrichment allows discovery based on usage cues rather than exact file names.

What is the best way to incrementally update a skill search index after modifications?

Incremental updates for a skill index work by comparing file modification times (mtimes) to detect added, removed, or changed skills. This avoids unnecessary full rebuilds and merges updated metadata directly into the central index file.

How does semantic search indexing work with frontmatter metadata?

Semantic search indexing with frontmatter works by parsing SKILL.md files to extract categories, keywords, and use_when fields. It infers search-friendly aliases and use cases from the instructions to improve retrieval quality for skill discovery.

Do I need to manually rebuild the entire index every time I add a new skill?

No, you do not need to manually rebuild the entire index when adding a new skill. The indexing process detects new files using mtimes and performs an incremental reindex to refresh the central index at ~/.ai/skill-index.json.

When should I run a reindexing workflow for my skills library?

You should run a reindexing workflow after adding a new skill, removing an existing one, or updating instructions. This refreshes the central search index and ensures that skill discovery results remain accurate and up to date.

What limitations are there when relying on mtimes for incremental skill indexing?

Relying on mtimes for incremental skill indexing means the process detects file modifications accurately but depends on the filesystem's time tracking. It focuses on merging frontmatter and generated metadata, so deeply corrupted files may require a manual full rebuild.