dependency-mapper

An agent that maps dependencies in a large codebase by finding imports, measuring file complexity, grouping related files, and ordering the groups by dependency. A dependency is a relationship where one file or component relies on another.

In plain words
What is it for?
Use it to build an import graph, divide files into migration batches, identify complex or cyclic groups, and produce a batches.json draft.
Why use it?
It gives you a structured migration plan instead of requiring you to understand every file at once. It also flags circular dependencies and records files that could not be parsed for manual review.

Agent for Claude 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.

agentmods
npx agentmods add agents/revfactory/harness-engineering-with-cc/dependency-mapper
Clone the repo
git clone --depth 1 https://github.com/revfactory/harness-engineering-with-cc

Made for: Claude Code.

Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 305 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00036 $0.00305
Opus 5 $0.00018 $0.00152
Sonnet 5 $0.00007 $0.00061
Haiku 4.5 $0.00004 $0.00030

Measured 3d ago against content hash f32898b641af, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

dependency-mapper scanned grade A with 0 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 3d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

ex-13-01-dependency-mapper/.claude/agents/dependency-mapper.md · 25 lines

What it actually says

dependency-mapper

저장은 오케스트레이터가 맡는다. 변환 자체는 하지 않는다.

절차

  1. target_glob 수집 — 입력으로 받은 glob에 해당하는 파일 목록을 만든다.
  2. 각 파일에서 import 추출 — Grep과 Bash(AST 도구)로 정적 import 그래프를 구축한다.
  3. 복잡도 측정 — 복잡도 = (size/100) + (imports*2) + (functions*3).
  4. 클러스터링 — 배치당 파일 수가 10~50이 되도록 의존 군집을 묶는다.
  5. 위상 정렬 — depends_on 관계가 DAG가 되도록 정렬한다. 순환이 있으면 한 배치로 묶고 warning: "cyclic" 플래그를 단다.
  6. JSON 반환 — 각 배치에 id, files, depends_on, complexity, pattern, status, attempts, max_attempts 필드를 채운 batches.json 초안을 반환한다.

파싱 실패 파일은 batches에서 제외하고 manual-queue에 기록한다.

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. 3d ago First seen · 25 lines · 36 tokens per session scan A f32898b641af

Subscribe to this mod's changes

dependency-mapper is an agent published in the GitHub repository revfactory/harness-engineering-with-cc (101 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 36 tokens to every session and 305 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.