indexing-code

indexing-code is a skill for Claude Code from telagod/code-abyss. It costs 50 tokens per session (1,834 once invoked), scanned D, original, MIT.

A code relationship and change-history index for a project. It shows which functions call each other, what files depend on a file, and where changes are likely to have wider effects.

In plain words
What is it for?
Use it to understand an unfamiliar codebase, trace a bug, search indexed code, assess the impact of a change, and identify high-risk or tightly connected files.
Why use it?
It reduces the risk of changing code without noticing its callers, dependencies, related files, or untested paths. It also helps trace how a function or file has changed over time.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions Claude Code; reads ~/.codex paths.

Part of the code-abyss plugin — 39 skills shipped together

Good fit Use it to understand an unfamiliar codebase, trace a bug, search indexed code, assess the impact of a change, and identify high-risk or tightly connected files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/telagod/code-abyss/indexing-code
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add telagod/code-abyss --skill indexing-code
Clone the repo
git clone --depth 1 https://github.com/telagod/code-abyss

Made for: Claude Code.

Or install code-abyss, the plugin that ships this one along with the rest of its 39 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for indexing-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/telagod/code-abyss/indexing-code/github.svg)](https://agentmods.dev/skills/telagod/code-abyss/indexing-code)
Your own site
<a href="https://agentmods.dev/skills/telagod/code-abyss/indexing-code"><img src="https://agentmods.dev/badge/skills/telagod/code-abyss/indexing-code/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for indexing-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/telagod/code-abyss/indexing-code"><img src="https://agentmods.dev/badge/skills/telagod/code-abyss/indexing-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,834 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 3 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.01834
Opus 5.5 $0.00020 $0.00734
Sonnet 5.5 $0.00010 $0.00367
Haiku 4.5 $0.00005 $0.00183

Measured 1mo ago against content hash aea381957e88, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade D, and why

indexing-code scanned grade D with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 5 executable files (hooks/common/install-hooks.sh, hooks/common/pre-edit-check.sh, hooks/common/session-init.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

> - `--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>`

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

abyss attach claude # → ~/.claude/settings.json

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

> - `--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>`
skills/indexing-code/SKILL.md · 149 lines

How it starts

The opening of the file, as written. The whole thing — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.

代码关系图 · abyss

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

前置

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

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

核心行为

改文件前:跑 abyss context

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

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 输出关键字段

{
  "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 输出关键字段

{
  "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                           # 索引统计

Read the full file on GitHub · 149 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 149 lines · 50 tokens per session scan D aea381957e88

Subscribe to this mod's changes

indexing-code is a skill published in the GitHub repository telagod/code-abyss (244 stars, last pushed 2mo ago), licensed MIT. It adds 50 tokens to every session and 1,834 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it D with 3 findings (downloads and executes remote code, reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

silent-failure-hunter

Audits error-handling code in a pull request for silent failures, broad catch blocks, unjustified fallbacks, and unactionable error messages. Surfaces hidden failures users would otherwise hit in production. Use when reviewing PRs that add or modify try/catch, error callbacks, or fallback logic.

jasmedia/cc-pr-reviewer · 67 tokens

aitask-explorechat

Chat-native explore flow for a bug report — machine-spawned by the chatlink gateway, every decision routed through the file-spool Q&A relay instead of AskUserQuestion, ending in a task-creation payload.json. Not a user task command.

beyondeye/aitasks · 57 tokens

quaere-evidence

This skill should be used whenever the user asks to investigate unclear bugs, defend or reject PR review comments, triage CI failures or flaky tests, review risky/security/database/concurrency/external-API changes or multi-file refactors, or make any claim that needs evidence before patching. It enforces a falsifiable…

haru0416-dev/quaere · 98 tokens

printing-press-output-review

Internal sub-skill: agentic review of a printed CLI's sampled command output for plausibility issues that rule-based checks can't encode (substring-match relevance, format bugs, silent source drops, ranking failures). Invoked via the Skill tool by the main printing-press skill at Phase 4.85 and printing-press-polish…

mvanhorn/cli-printing-press · 102 tokens

audit

Fast quality gate — detects stack, runs static analysis, checks cross-layer consistency, fixes issues. Run between every pipeline phase, before every commit push, after every feature batch. Lighter than /analyze but catches the same critical issues.

skillmds/skillmd · 50 tokens

logic-lens

AI-powered Claude Code skill that performs deep code review using formal logic and reasoning frameworks to detect bugs, anti-patterns, and security risks beyond what linters catch.

skillmds/skillmd · 37 tokens