links

A command that shows the links connected to one indexed Markdown file, including links going out and backlinks coming in.

In plain words
What is it for?
Use it to inspect Markdown links, wikilinks, and frontmatter relationships, then view the surrounding one-, two-, or three-step neighbourhood.
Why use it?
It helps reveal how a document fits into the rest of your notes and lets you follow connected documents across several steps.

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/geckse/markdown-vdb/links
Clone the repo
git clone --depth 1 https://github.com/geckse/markdown-vdb
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,206 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.00018 $0.03206
Opus 5 $0.00009 $0.01603
Sonnet 5 $0.00004 $0.00641
Haiku 4.5 $0.00002 $0.00321

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

Security

Grade A, and why

links 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.

docs/cli/commands/links.md · 358 lines

How it starts

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

Show graph connections for a specific file. These include body Markdown links, body wikilinks, and whole-value frontmatter Relations. The command displays both outgoing connections and incoming backlinks. With --depth 2 or --depth 3, it performs multi-hop traversal and returns the extended neighborhood as a tree.

Usage

mdvdb links <FILE_PATH> [OPTIONS]

Arguments

Argument Required Description
FILE_PATH Yes Relative path to the markdown file (e.g., docs/readme.md)

The FILE_PATH must be the relative path as stored in the index (relative to the project root). The file must have been ingested for its links to be available.

Options

Flag Short Default Description
--depth 1 Link traversal depth (1-3). Depth 1 shows direct links, depth 2-3 shows multi-hop neighborhood.

--depth <N>

Controls how many hops of links to follow from the target file.

Depth Behavior Output Format
1 (default) Shows only direct outgoing and incoming links Flat list with link metadata (text, body line or frontmatter location, Relation field, state)
2 Shows direct links plus links from those linked files Tree structure with nested children
3 Shows 3 levels of link traversal Tree structure with deeper nesting
  • Depth 1 returns a LinksOutput wrapping a LinkQueryResult -- a flat list of outgoing ResolvedLink entries and incoming LinkEntry entries. Every entry records its link text, body line or frontmatter location, wikilink flag, and optional Relation field. Validity state wraps outgoing entries; incoming entries are stored LinkEntry values.
  • Depth 2-3 recursively builds an outgoing and incoming neighborhood from the file, returning a NeighborhoodResult with NeighborhoodNode.children trees and per-branch cycle protection.

The depth value must be between 1 and 3 (inclusive). Values outside this range are rejected by the CLI parser.

Read the full file on GitHub · 358 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 · 358 lines · 18 tokens per session scan A 1b1bf80a5e1f

Subscribe to this mod's changes

links is a command published in the GitHub repository geckse/markdown-vdb (23 stars, last pushed 18d ago), licensed MIT. It adds 18 tokens to every session and 3,206 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.