AgentSkillsCN

index

管理 GNU Global 索引,用于代码分析。适用于当用户要求为项目建立索引、列出符号、查找函数的定义位置、展示函数源码,或查找某个符号的引用时使用。

SKILL.md
--- frontmatter
name: index
description: Manage GNU Global indexes for code analysis. Use when the user asks to index a project, list symbols, find where a function is defined, show function source, or find references to a symbol.

Index Management

Manage GNU Global indexes for code analysis.

When to use

Use this skill when the user asks:

  • "Index this project" / "Create an index"
  • "What symbols are in this project?"
  • "Where is function X defined?"
  • "Show me the source of function X"
  • "What references function X?"

How to invoke

Invocation: Use the claudit CLI only. Do not run python -m claudit.skills.index.

bash
claudit index create <project_dir> [--force]
claudit index list-symbols <project_dir>
claudit index get-body <function> <project_dir> [--language c|java|python]
claudit index lookup <symbol> <project_dir> [--kind definitions|references|both]
python
from claudit.skills.index import create, list_symbols, get_body, lookup

Prerequisites

  • GNU Global (gtags/global) must be installed.
  • Universal Ctags for get-body (function body extraction).