backlinks

A command that lists files linking to a chosen Markdown file. These incoming links are called backlinks.

In plain words
What is it for?
Use it to find links made in Markdown text, wiki-style links, or frontmatter relation fields.
Why use it?
It shows which documents depend on or refer to a file, so you can understand its connections before changing it.

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/backlinks
Clone the repo
git clone --depth 1 https://github.com/geckse/markdown-vdb
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,004 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.00015 $0.02004
Opus 5 $0.00008 $0.01002
Sonnet 5 $0.00003 $0.00401
Haiku 4.5 $0.00002 $0.00200

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

Security

Grade A, and why

backlinks 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/backlinks.md · 217 lines

How it starts

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

Show files that link TO a specific file. Unlike mdvdb links, which shows both directions, backlinks focuses on incoming graph connections. A backlink may come from a body Markdown link, a body wikilink, or a whole-value frontmatter Relation.

Usage

mdvdb backlinks <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 backlinks to be available.

Options

This command has no command-specific options. Only global options apply.

Global Options

These options apply to all commands. See Commands Index for details.

Flag Short Description
--verbose -v Increase log verbosity (-v info, -vv debug, -vvv trace)
--root Project root directory (defaults to current directory)
--no-color Disable colored output
--json Output results as JSON

Human-Readable Output

When run without --json, backlinks displays a formatted list of files linking to the target:

  ● Backlinks to docs/api/endpoints.md

  Incoming: 4 incoming links

  ├── docs/architecture.md "API Endpoints"
  │   line 12
  ├── docs/index.md "Endpoints Reference"
  │   line 34
  ├── docs/api/overview.md "Endpoints" [wikilink]
  │   line 8
  └── projects/relaunch.md "API Endpoints" (reference)
      frontmatter

If no files link to the target:

  ● Backlinks to docs/orphan-page.md

  ✗ No files link to docs/orphan-page.md

Output Elements

Element Description
Source file The file that contains a link pointing to the target
Link text The display text of the body link or frontmatter Relation (in quotes)
Line number For a body link, the 1-based line where it appears
frontmatter Location shown instead of a line number for a frontmatter Relation
(field) Dimmed badge naming the originating frontmatter Relation field
[wikilink] Blue badge indicating the link uses [[wikilink]] syntax

Read the full file on GitHub · 217 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 · 217 lines · 15 tokens per session scan A d6f0f8775c1e

Subscribe to this mod's changes

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

Related

Other commands, from other repositories