Agent skill

Dependency Map

by 312362115 in 312362115/claude

依赖关系分析技能:回答"改这里会影响哪里". An agent skill from 312362115/claude.

MITAuto-check passed

Install Dependency Map

skills CLI
$ npx skills add 312362115/claude --skill dependency-map -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install 312362115/claude dependency-map --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/312362115/claude.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/dependency-map .claude/skills/dependency-map && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dependency-map
GitHub stars
107
Token cost
~888 tokens
SKILL.md length
63 words
Files
1
Skills in repo
20
Repo updated
First seen
Licence
MIT

At a glance

依赖关系分析技能:回答"改这里会影响哪里". An agent skill from 312362115/claude.

  • SKILL.md covers 第一步:确定分析目标, 第二步:静态依赖分析, 第三步:数据流分析 and 第四步:输出影响面评估, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Dependency Map is an agent skill from 312362115/claude. 依赖关系分析技能:回答"改这里会影响哪里"。 追踪调用链、数据流、副作用,评估改动的影响面。 和 code-walkthrough 的区别:walkthrough 关注"是什么",dependency-map 关注"改了影响谁"。 触发词:影响面、改这个会影响哪里、依赖关系、调用链、影响分析、谁在用这个。 触发场景:改动前评估影响、重构前分析依赖、删代码前确认安全、API 变更前评估调用方。 即使用户没有说"依赖分析",只要意图是"评估改动的影响范围",都应触发此技能。

Its SKILL.md is about 890 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The licence is MIT.

Example prompts

  • “改这里会影响哪里”
  • “,dependency-map 关注”
  • “,只要意图是”
  • “/dependency-map”

What it can do on your machine

Read from SKILL.md and the folder at commit 2d4fa49. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown and bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dependency Map loads about 888 tokens when it runs. Until then it costs about 63 tokens; SKILL.md has 63 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~888

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from 312362115/claude at commit 2d4fa49, republished under its MIT licence (© 312362115). 63 words, ~888 tokens.

Download SKILL.mdSave it as .claude/skills/dependency-map/SKILL.md (or your agent's skills folder).
name
dependency-map
description
依赖关系分析技能:回答"改这里会影响哪里"。 追踪调用链、数据流、副作用,评估改动的影响面。 和 code-walkthrough 的区别:walkthrough 关注"是什么",dependency-map 关注"改了影响谁"。 触发词:影响面、改这个会影响哪里、依赖关系、调用链、影响分析、谁在用这个。 触发场景:改动前评估影响、重构前分析依赖、删代码前确认安全、API 变更前评估调用方。 即使用户没有说"依赖分析",只要意图是"评估改动的影响范围",都应触发此技能。
version
1.0.0
last_updated
2026-04-08
repository
https://github.com/312362115/claude

依赖关系分析(Dependency Map)

代码改动最怕的不是改错,而是不知道改动波及到了哪里。 本 skill 的使命:在改动之前,画出影响面地图。


第一步:确定分析目标

用 AskUserQuestion 确认:

  • 分析什么:哪个函数/类/模块/文件?
  • 为什么分析:准备改什么?删什么?还是纯了解?
  • 分析深度:只看直接依赖,还是追踪到底?
分析请求
  │
  ├─ 改函数签名 → 追踪所有调用方
  ├─ 改数据结构 → 追踪数据的读写点
  ├─ 删文件/模块 → 追踪所有 import
  ├─ 改 API 接口 → 追踪前端调用 + 外部消费方
  └─ 改配置/环境变量 → 追踪所有引用点

第二步:静态依赖分析

2.1 Import/Require 分析
bash
# 找到谁引用了目标文件
grep -r "import.*from.*'目标模块'" src/
grep -r "require('目标模块')" src/

# 或用 Grep 工具搜索

输出格式:

markdown
## 引用关系

### 被谁引用(上游,改目标会影响他们)
- `src/api/auth.ts:3` — import { login } from './services/auth'
- `src/api/user.ts:5` — import { validateToken } from './services/auth'
- `tests/auth.test.ts:1` — import { login, logout } from '../services/auth'

### 引用了谁(下游,目标依赖他们)
- `src/models/user.ts` — UserModel
- `src/utils/jwt.ts` — signToken, verifyToken
- `bcrypt` — 外部依赖
2.2 函数/方法级调用链

对于函数级分析,追踪更精细的调用关系:

bash
# 搜索函数名的所有调用
grep -rn "目标函数名(" src/ --include="*.ts" --include="*.js"

输出格式:

markdown
## 调用链:validateToken()

定义:src/services/auth.ts:45

调用方:
├─ src/middleware/auth.ts:12 — authMiddleware() 每个请求都会调用
│   └─ 被 src/api/index.ts:8 的 app.use(authMiddleware) 注册为全局中间件
├─ src/api/user.ts:23 — getUserProfile() 手动调用做额外校验
└─ tests/auth.test.ts:34 — 测试用例

影响面评估:
- authMiddleware 是全局中间件 → 改签名会影响所有需要认证的接口
- 测试需要同步更新

第三步:数据流分析

当改动涉及数据结构时,追踪数据从哪来、到哪去:

3.1 数据结构变更
markdown
## 数据流:User 类型

### 定义位置
`src/types/user.ts:5` — interface User { id, name, email, role }

### 创建点(写入)
- `src/services/user.ts:createUser()` — 注册时创建
- `src/services/auth.ts:oauthCallback()` — OAuth 登录时创建

### 读取点
- `src/api/user.ts:getUserProfile()` — 返回给前端
- `src/middleware/auth.ts:12` — 从 token 解析出 user
- `src/services/order.ts:45` — 创建订单时读取 user.id

### 持久化
- `src/models/user.ts` — 数据库 users 表
- `src/utils/cache.ts:getUserCache()` — Redis 缓存

### 影响评估
如果给 User 加字段:
- 数据库需要 migration
- 缓存的序列化/反序列化需要兼容
- API 响应自动包含(如果没有字段过滤的话)

如果删 User 字段:
- 检查所有读取点是否还在用
- 前端是否依赖这个字段

第四步:输出影响面评估

4.1 影响面清单
markdown
## 影响面评估:<改动描述>

### 直接影响(必须改)
| 文件 | 行号 | 影响原因 | 改动类型 |
|------|------|---------|---------|
| src/api/auth.ts | 23 | 调用了要修改的函数 | 同步更新参数 |
| src/middleware/auth.ts | 12 | 依赖返回值结构 | 适配新结构 |

### 间接影响(需要验证)
| 文件 | 行号 | 风险点 | 验证方式 |
|------|------|--------|---------|
| src/api/user.ts | 45 | 使用了相同的类型 | 跑测试确认 |

### 不受影响(确认安全)
- src/services/order.ts — 虽然在同目录,但无依赖关系
- src/utils/format.ts — 纯工具函数,不涉及

### 测试影响
- tests/auth.test.ts — 需要更新测试用例
- tests/user.test.ts — 需要回归验证
4.2 风险等级
等级判断标准
低风险只影响内部实现,公共接口不变,有测试覆盖
中风险影响多个文件但不影响外部接口,有部分测试覆盖
高风险影响公共接口/全局中间件/数据结构,测试覆盖不足

分析准则

  • 宁多不漏:不确定的归入"需要验证",不要归入"不受影响"
  • 标注行号:每个影响点必须标注具体位置,方便定位
  • 区分直接/间接:直接影响必须改,间接影响需验证,不要混在一起
  • 关注隐式依赖:不只看 import,还要看运行时依赖(事件监听、全局状态、环境变量)
  • 递归但有界:追踪调用链要有深度限制,一般追 3 层足够。超过 3 层的间接影响可忽略

与其他 skill 的关系

code-walkthrough(理解代码)→ dependency-map(评估影响)→ refactoring(执行改动)

dependency-map vs code-walkthrough:

  • walkthrough:理解代码。"这段代码是什么,怎么运转"
  • dependency-map:评估影响。"改这里会动到哪里"
  • 通常先 walkthrough 建立理解,再 dependency-map 评估改动

© 312362115, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/dependency-map of 312362115/claude.

Open the folder on GitHubat commit 2d4fa49

Compare with similar skills

Dependency Map next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dependency Map compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dependency Map this skill312362115/claude107—~888Automated safety check: PassMIT
Dependency Scanningsickn33/agentic-awesome-skills47k1 repos~2.4kAutomated safety check: PassMIT
Dependency Checkruvnet/ruflo74k—~258Automated safety check: PassMIT
When Mapping Dependencies Use Dependency Mapperaiskillstore/marketplace4301 repos~1.6kAutomated safety check: PassNone
Dependency Mapborghei/Claude-Skills881—~1.7kAutomated safety check: PassMIT
Dependency Updatecodewhale-hq/Codewhale41k—~142Automated safety check: PassMIT

Similar skills

  • Dependency Scanning

    sickn33/agentic-awesome-skills

    Scan package dependencies for known vulnerabilities using Snyk, Dependabot, and OWASP Dependency-Check.

    47k GitHub starsUsed in 1 repo~2.4k tokens
    SecurityAuto-check passed
  • Dependency Check

    ruvnet/ruflo

    Scan project dependencies for known vulnerabilities and CVEs.

    74k GitHub stars~258 tokensUpdated today
    SecurityAuto-check passed
  • Comprehensive dependency mapping, analysis, and visualization tool for software projects

    430 GitHub starsUsed in 1 repo~1.6k tokens
    Agent WorkflowsAuto-check passed
  • Dependency Map

    borghei/Claude-Skills

    Cross-team dependency tracking with critical path analysis and Mermaid dependency graphs for program coordination.

    881 GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Dependency Update

    codewhale-hq/Codewhale

    Read release notes/changelogs, update a defined dependency scope, handle breaking changes, and verify.

    41k GitHub stars~142 tokensUpdated today
    DevelopmentAuto-check passed
  • Token Map

    nexu-io/open-design

    Map an extracted Figma / source-code token bag onto the active OD design system, producing a deterministic mapping the generate stage can consume.

    100k GitHub stars~1.4k tokensUpdated today
    Frontend & DesignAuto-check passed

More from 312362115/claude

All 20 skills in this repo
  • Diagram

    312362115/claude

    专业图表生成技能:根据需求自动选择合适的图表类型,生成符合设计规范的 PNG 图表. An agent skill from 312362115/claude.

    107 GitHub stars~2.7k tokensUpdated 4 mo ago
    Auto-check passed
  • Deep Research

    312362115/claude

    深度调研技能:对任意命题进行系统性调研并输出专业研究报告. An agent skill from 312362115/claude.

    107 GitHub stars~6.6k tokensUpdated 4 mo ago
    Auto-check passed
  • Preview Md

    312362115/claude

    MD 文件浏览器预览:GitHub 风格渲染 + 左侧自动目录. An agent skill from 312362115/claude.

    107 GitHub stars~636 tokensUpdated 4 mo ago
    Auto-check passed
  • Writing

    312362115/claude

    通用写作技能:以"内容→组件→组合"的方式产出技术文档、产品文档、汇报材料. An agent skill from 312362115/claude.

    107 GitHub stars~1.6k tokensUpdated 4 mo ago
    Auto-check passed
  • Code Walkthrough

    312362115/claude

    代码导读技能:帮助快速理解不熟悉的项目或模块,建立心智模型. An agent skill from 312362115/claude.

    107 GitHub stars~1k tokensUpdated 4 mo ago
    Auto-check: notes
  • DB Review

    312362115/claude

    数据库代码审查 + Migration 安全检查. An agent skill from 312362115/claude.

    107 GitHub stars~1.8k tokensUpdated 4 mo ago
    Auto-check passed

Questions about Dependency Map

What does Dependency Map do?

依赖关系分析技能:回答"改这里会影响哪里". An agent skill from 312362115/claude. Dependency Map is an agent skill from 312362115/claude.

How do I install Dependency Map in Claude Code?

Run `npx skills add 312362115/claude --skill dependency-map -a claude-code`. Or copy the skill folder (skills/dependency-map in 312362115/claude) into .claude/skills/dependency-map in your project. Claude Code loads it when a task matches its description.

How do I install Dependency Map in Codex?

Run `npx skills add 312362115/claude --skill dependency-map -a codex`. Or copy the skill folder (skills/dependency-map in 312362115/claude) into .agents/skills/dependency-map in your project. Codex loads it when a task matches its description.

Can I use Dependency Map in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add 312362115/claude --skill dependency-map -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dependency-map, .gemini/skills/dependency-map, .github/skills/dependency-map and .opencode/skills/dependency-map in your project.

What does Dependency Map need to run?

SKILL.md names no scripts, command-line tools or credentials: Dependency Map is instructions for the agent only.

Does Dependency Map access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Dependency Map safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dependency Map use?

Dependency Map is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dependency Map use?

About 888 tokens (SKILL.md is roughly 3.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Dependency Map?

Skills that share tags, products or a category with Dependency Map: Dependency Scanning (sickn33/agentic-awesome-skills, 47k stars), Dependency Check (ruvnet/ruflo, 74k stars), When Mapping Dependencies Use Dependency Mapper (aiskillstore/marketplace, 430 stars) and Dependency Map (borghei/Claude-Skills, 881 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dependency Map?

312362115 (a GitHub user) maintains it in 312362115/claude, which has 107 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on May 14, 2026.

Source: 312362115/claude on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.