orphans

A command that finds indexed Markdown files with no links to other files and no links coming into them.

In plain words
What is it for?
Use it to locate orphan files and review whether they should link to other documents or be linked from them.
Why use it?
It highlights isolated notes that may be disconnected from the rest of a documentation or knowledge collection.

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/orphans
Clone the repo
git clone --depth 1 https://github.com/geckse/markdown-vdb
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,193 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.00014 $0.01193
Opus 5 $0.00007 $0.00596
Sonnet 5 $0.00003 $0.00239
Haiku 4.5 $0.00001 $0.00119

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

Security

Grade A, and why

orphans 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/orphans.md · 146 lines

How it starts

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

mdvdb orphans

Find orphan files with no links. An orphan file is a markdown file in the index that has no outgoing links to other files and no incoming links (backlinks) from other files. These are isolated nodes in the link graph -- they neither reference nor are referenced by any other indexed file.

Usage

mdvdb orphans [OPTIONS]

Arguments

This command takes no arguments.

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, orphans displays a formatted list of isolated files:

  ● Orphan Files (3) — no incoming or outgoing links

  • docs/standalone-notes.md
  • archive/old-design.md
  • scratch/temp-ideas.md

  Total: 3 orphan files

If no orphan files are found:

  ✓ No orphan files found — all files are connected.

Output Elements

Element Description
Orphan count Total number of files with no links (shown in header)
File paths Relative paths of each orphan file, listed with bullet markers
Total Summary count at the bottom

Examples

# Find all orphan files
mdvdb orphans

# Find orphan files as JSON
mdvdb orphans --json

# Find orphan files in a specific project
mdvdb orphans --root /path/to/project

# Find orphan files with debug logging
mdvdb orphans -vv

JSON Output

OrphansOutput (--json)

{
  "orphans": [
    {
      "path": "docs/standalone-notes.md"
    },
    {
      "path": "archive/old-design.md"
    },
    {
      "path": "scratch/temp-ideas.md"
    }
  ],
  "total_orphans": 3
}

Read the full file on GitHub · 146 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 · 146 lines · 14 tokens per session scan A fd659b5d158c

Subscribe to this mod's changes

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