Skills2026年5月14日·1 分钟阅读

ast-index — Fast Code Search for Agents

ast-index builds an AST index for fast code search and integrates with Claude/Codex/Cursor; verified 347★ and installs via Homebrew.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Asset
直接安装命令
npx -y tokrepo@latest install 8af1d19c-c287-537f-a08f-d3ab7d1a144f --target codex

先 dry-run 确认安装计划,再运行此命令。

介绍

ast-index 通过 AST 索引实现高速代码搜索,可接入 Claude/Codex/Cursor 与 MCP;已验证 347★,README 标注 46+ 命令,支持 Homebrew 快速安装(产物约 44MB)。

Best for: 大型仓库:grep 太慢/太吵,需要 agent 精准查符号、调用方与引用位置

Works with: macOS Homebrew(快速安装)+ 可调用 CLI/MCP 的各类 agent

Setup time: 8-18 minutes

Key facts (verified)

  • GitHub:347 stars · 29 forks;最近更新 2026-05-13。
  • 许可证:MIT;作者头像与仓库链接均已通过 GitHub API 复核。
  • README 中可对照的入口命令:ast-index rebuild

Main

  • 先建索引再持续使用:第一次用 rebuild,日常改动优先用增量 update

  • 给 agent 写硬规则:读 500+ 行文件前先跑 outlinesymbol/usages,减少 token 消耗。

  • 单仓多项目建议开启 walk-up,让子目录复用根索引,避免每个子项目重复建库。

Source-backed notes

  • README 提供 Homebrew 安装(brew tap defendend/ast-indexbrew install ast-index),并列出 46+ 命令。
  • README 描述与 Claude/Codex/Cursor 的集成方式(含 ast-index install-codex-mcp)。
  • README 提到构建产物体积提示(CLI 二进制约 ~44MB)。

FAQ

  • 每次改代码都要重建索引吗?:不需要。日常用增量 update,只有索引不同步时再 rebuild
  • 这是某一种语言专用吗?:它支持多种符号查询;具体语言支持以 README 为准。
  • agent 能通过 MCP 用它吗?:可以。README 描述了 MCP server wrapper,可向 MCP 客户端暴露工具。
🙏

来源与感谢

Source: https://github.com/defendend/Claude-ast-index-search > License: MIT > GitHub stars: 347 · forks: 29

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产