Indexing Code logo

Indexing Code

Community
telagod
indexing-code

Code relationship graph and temporal intelligence via abyss CLI. Provides caller tracing, impact analysis, hotspot detection, and file-level context gathering. Agent automatically runs abyss before modifying code to check impact. Works with any agent that has shell access.

Overview

Publishertelagod
Repositorycode-abyss
Skill nameindexing-code
Stars
242
Forks
33
Bundled files
10
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 10 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by telagod on GitHub. Read the source before you install it.

Installation

Install the Indexing Code AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/telagod/code-abyss/tree/main/skills/indexing-code
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/telagod/code-abyss.git /tmp/code-abyss
mkdir -p .claude/skills
cp -r /tmp/code-abyss/skills/indexing-code .claude/skills/indexing-code
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Indexing Code in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Indexing Code on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Indexing Code is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

代码关系图 · abyss

不是搜索工具,是代码的调用图 + 时间智能。通过 shell 调用 abyss CLI。

前置

进入项目时,检查并初始化索引:

sh
command -v abyss >/dev/null && [ ! -f .code-abyss/index.db ] && abyss index

核心行为

改文件前:跑 abyss context

即将修改任何代码文件时,先获取该文件的完整上下文(不需要知道函数名):

sh
abyss context <要修改的文件路径> --json

返回:该文件所有函数的外部调用方、依赖的类型和函数、热点评分、耦合文件。

根据返回结果:

  • 有 production callers:检查改动是否会破坏调用方,改完逐个同步
  • hotspot score > 5000:高风险文件,跑 abyss impact <func> --json 深入分析
  • impact risk > 7/10:跟用户确认方案后再改
  • 有 uncovered paths:提醒用户补测试
  • 有 coupled files:检查耦合文件是否需要同步修改

其他场景

场景命令
初识项目架构abyss map --json
追查 bug 来源abyss history <file> --symbol <func> --json
搜索代码(比 grep 好)abyss search "关键词" --json

输出说明

--json 输出结构化 JSON,agent 直接解析。不加 --json 输出人类可读文本。

context 输出关键字段

json
{
  "symbols_with_external_callers": [
    { "symbol": "SetError",
      "external_callers": [
        { "file": "handler.go", "line": 42, "caller": "HandleRequest",
          "confidence": 0.95, "is_test": false }
      ],
      "possible_callers": []
    }
  ],
  "dependencies": [{ "name": "Account", "file": "types.go", "kind": "type_ref" }],
  "hotspot": { "score": 5200, "changes_30d": 12, "complexity": 433 },
  "coupled_files": [{ "file": "gateway.go", "co_changes": 13, "coupling": "65%" }]
}
  • external_callers:confidence ≥ 0.7 的可信调用方,按解析档位标注(1.0 同文件 / 0.95 同包 / 0.9 import 限定 / 0.8 全局唯一)
  • possible_callers:confidence < 0.7 的歧义匹配——参考线索,不是事实,勿据此改调用方

impact 输出关键字段

json
{
  "direct_callers": 17,
  "transitive_callers": 521,
  "uncovered_paths": ["handler.go:DoSomething"],
  "risk_score": 8.5,
  "risk_factors": ["high blast radius", "319 paths without test coverage"]
}

CLI 速查

abyss index                           # 建索引(~5s)
abyss context <file> [--json]         # 文件完整上下文(改代码前用这个)
abyss callers <symbol> [--json]       # 谁调了这个函数(默认隐藏 confidence < 0.7)
abyss callers <symbol> --min-confidence 0   # 连歧义匹配一起看
abyss impact <symbol> [--json]        # 改了会影响什么(低置信边被排除时会在 risk_factors 标注)
abyss hook pre-edit                   # agent hook:stdin 读 tool JSON,增量刷新索引后输出警告
abyss hook post-edit                  # agent hook:编辑后增量刷新索引
abyss search "query" [--json]         # 搜索代码
abyss map [--json]                    # 项目热点+耦合
abyss history <file> [--symbol X]     # 变更历史
abyss stats                           # 索引统计

Hook 自动执行

Hook 注入按 host 分两条路径(hybrid 切割架构,2026-06-25 锁定):

claude / codex / gemini — 由 abyss CLI 的 attach 子命令负责(production 主入口,abyss v0.5.20+):

sh
abyss attach claude     # → ~/.claude/settings.json
abyss attach codex      # → ~/.codex/config.toml(Codex 0.125+ 数组表)
abyss attach gemini     # → ~/.gemini/settings.json(SessionStart/BeforeTool/AfterTool)
abyss attach all        # 三平台一次完成

幂等,重跑覆盖旧 shape,不污染其它键。

二进制查找顺序:PATH → ~/.code-abyss/bin/abyss。两处都没有时 hook 静默停用,后装 abyss 即生效,无需重装。

v4.8.x → v4.9 deprecation 期变更

  • --with-hooks 对 claude/codex/gemini 仍写入 hook,但 install.js 打印 warning 引导改用 abyss attach <host>;v5.0 移除该路径(openclaw/pi/hermes 的 --with-hooks 永久保留并改造为 spawn install-hooks.sh)
  • --with-abyss 已移除(Agent OS v5.1)。请用 curl -fsSL https://raw.githubusercontent.com/telagod/abyss/main/install.sh | bash;claude/codex/gemini graph hooks 用 abyss attach <host>
  • --with-mcp 注册 abyss MCP 进入 deprecation,引导用户改用 abyss mcp 客户端自配;v5.0 移除

openclaw / pi / hermes — 由 code-abyss npm 包负责(abyss CLI 不接管这三平台,见 abyss src/attach/mod.rs 注释):

sh
npx code-abyss --target openclaw --with-hooks   # 自动 spawn install-hooks.sh
npx code-abyss --target pi       --with-hooks
npx code-abyss --target hermes   --with-hooks

或脱离安装器直接跑脚本:

sh
bash skills/indexing-code/hooks/common/install-hooks.sh auto   # 自动检测平台

自动检测平台并注入对应 hook 配置(幂等,JSON 合并用 node):

平台Hook 事件配置位置
Claude CodePreToolUse(Edit|Write).claude/settings.json
Codex CLIPreToolUse(Bash|shell|apply_patch|Edit|Write)~/.codex/config.toml
Gemini CLIBeforeTool(write_file|replace)~/.gemini/settings.json
Pi Agenttool_call(edit_file|write_file)~/.pi/agent/settings.json
Hermespre_tool_call~/.hermes/config.yaml 或 plugin
OpenClawbefore_tool_callplugin api.on()

统一入口是 abyss hook pre-edit(shell 脚本只是带存在性守卫的薄壳):自动识别各平台 stdin JSON 形状、增量刷新索引(警告反映文件当前状态而非旧索引)、输出生产调用方 / 歧义引用 / 热点警告。编辑后可挂 abyss hook post-edit 保持索引新鲜。agent 无需手动调用。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Indexing Code AI skill do?

Code relationship graph and temporal intelligence via abyss CLI. Provides caller tracing, impact analysis, hotspot detection, and file-level context gathering. Agent automatically runs abyss before modifying code to check impact. Works with any agent that has shell access.

Why use Indexing Code on TypingMind?

Because you install it once and use it with any model. Indexing Code is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Indexing Code in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/telagod/code-abyss/tree/main/skills/indexing-code. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Indexing Code?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Indexing Code?

As many as you like. As long as a model supports skills, you can use Indexing Code with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Indexing Code AI skill free?

Yes. It is published on GitHub by telagod under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇