360 Secure SkillHub
360 安全技能中心

Skill Index

扫描 skills/ 目录下所有 SKILL.md,解析 frontmatter 的 name、description 与相对路径,按目录结构和描述关键词分类,生成可检索的 skills/INDEX.md 表格;提供 register.sh 手动生成与 install-hooks.sh 安装 git pre-commit/post-merge 钩子自动更新索引。

kenwang-dev
kenwang-dev
热度 35.61
最近更新 2026-05-11 17:39:55
分类:效率依赖:代码执行 / 读写文件应用场景:工作流 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add skill-catalog
Metadata
name
skill-index
description
Auto-scan all installed skills, generate a categorized INDEX.md, and keep it in sync via git hooks. Triggers: skill index, scan skills, update index, skill catalog, manage skill list, skill inventory.

Skill Index

Auto-scan every SKILL.md under skills/, extract metadata, categorize, and produce a single searchable INDEX.md. Git hooks keep the index fresh on every commit and pull.

Problem It Solves

As skill count grows past 20+, finding the right one becomes painful — especially for the AI agent that must read descriptions at startup. Manual lists go stale fast.

Skill Index solves this by:

  • One command → complete, up-to-date inventory
  • Zero maintenance → git hooks auto-update on commit/pull
  • Instant lookup → AI reads INDEX.md instead of crawling the whole directory

Quick Start

Manual scan

bash skills/skill-index/register.sh

Install git hooks (one-time)

bash skills/skill-index/install-hooks.sh

After that, INDEX.md updates automatically whenever you commit or pull.

How It Works

  1. Scan — Recursively find all SKILL.md files under skills/
  2. Extract — Parse YAML frontmatter: name, description, relative path
  3. Categorize — Smart matching by directory structure + description keywords
  4. Generate — Write skills/INDEX.md as a categorized Markdown table

Output Format

# Skills Index
> Auto-generated. Run `bash skills/skill-index/register.sh` to update.

## Category Name
| Skill | Path | Trigger |
|-------|------|---------|
| my-skill | path/to/SKILL.md | Description preview... |

Customization

Adding categories

Edit the categorize() function in register.sh to add your own rules:

    *your-keyword*) echo "Your Category"; return ;;

Excluding skills

Add the skill's directory to the find exclusion list in register.sh:

find "$SKILLS_DIR" -name "SKILL.md" -not -path "*/skill-index/*" -not -path "*/your-private-skill/*"

Requirements

  • Bash 4+
  • Git (for hooks)
  • OpenClaw workspace with skills/ directory

License

MIT