map

A command for viewing and rebuilding a map of how files in a codebase depend on one another.

In plain words
What is it for?
Use it to display a dependency summary, rebuild the map, or query codebase relationships.
Why use it?
It helps you see which files are risky to change, whether the map is up to date, and where test coverage or environment-variable tracking is missing.

Command

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 commands/ar6420/hail_hydra/map
Clone the repo
git clone --depth 1 https://github.com/AR6420/Hail_Hydra
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 749 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.00011 $0.00749
Opus 5 $0.00005 $0.00375
Sonnet 5 $0.00002 $0.00150
Haiku 4.5 $0.00001 $0.00075

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

Security

Grade A, and why

map 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 2d 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.

content/commands/map.md · 101 lines

How it starts

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

Hydra Map

Manage the codebase dependency map.

If no arguments provided: Show Summary

Read .claude/hydra/codebase-map.json and display a summary:

🐉 Hydra Codebase Map
══════════════════════════════════
Status:     ✅ Current (matches HEAD)
Files:      487 mapped
Built:      2026-03-26 10:00:00
Git hash:   a1b2c3d

Risk Distribution:
  🔴 Critical (7+ deps):   8 files
  🟠 High (4-6 deps):     23 files
  🟡 Medium (2-3 deps):   89 files
  🟢 Low (0-1 deps):     367 files

Test Coverage:
  ✅ Covered:    234 files (48%)
  🟡 Partial:    78 files (16%)
  ❌ Untested:  175 files (36%)

Environment Variables: 12 tracked across 28 files

Top 5 Highest-Risk Files:
  src/services/auth.ts      (12 dependents) 🔴
  src/utils/helpers.ts      (9 dependents)  🔴
  src/config/index.ts       (8 dependents)  🔴
  src/models/user.ts        (7 dependents)  🔴
  src/middleware/cors.ts     (6 dependents)  🟠

If the map file doesn't exist, display:

🐉 Hydra Codebase Map
══════════════════════════════════
Status:     ❌ Not built

No codebase map found. Run /hydra:map rebuild to build one,
or it will be built automatically on the next hydra-scout dispatch.

If the map exists but _meta.git_hash doesn't match current git rev-parse HEAD:

Status:     ⚠️ Stale (map: a1b2c3d, HEAD: e4f5g6h)

If argument is "rebuild": Force Rebuild

Dispatch hydra-scout to do a complete rebuild of the map, regardless of staleness. Show progress and report when done.

If argument is a file path: Show Blast Radius

Read the map entry for that file and display:

🐉 Blast Radius: src/services/auth.ts
══════════════════════════════════════
Risk: 🔴 CRITICAL (12 dependents)
Test Coverage: ✅ Covered (tests/auth.test.ts, tests/integration/login.test.ts)

Imports (this file depends on):
  → src/models/user.ts
  → src/config/env.ts

Imported By (depends on this file):
  1st degree (direct):
    ← src/api/users.ts
    ← src/api/admin.ts
    ← src/middleware/auth.ts
  2nd degree (indirect):
    ← src/routes/index.ts (via api/users.ts)
    ← src/app.ts (via middleware/auth.ts)

Total Blast Radius: 5 files

Environment Variables Referenced:
  JWT_SECRET (also used in: src/middleware/auth.ts)
  AUTH_TIMEOUT (also used in: src/config/index.ts)

⚠ Changing this file could impact 5 other files.
  Run sentinel after any modifications.

Read the full file on GitHub · 101 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. 2d ago First seen · 101 lines · 11 tokens per session scan A 8fc67bdd3c0a

Subscribe to this mod's changes

map is a command published in the GitHub repository AR6420/Hail_Hydra (48 stars, last pushed 22d ago), licensed MIT. It adds 11 tokens to every session and 749 once invoked, about $0.0001 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.