modules

A command for inspecting, validating, running, and diagnosing built-in computed-field modules in Markdown VDB. Computed fields are values calculated from document content or related documents.

In plain words
What is it for?
Use it to list available modules, validate Formula or Rollup expressions, recompute derived fields, and read cached diagnostics. Formula fields are calculated from the current document; Rollup fields aggregate related data.
Why use it?
It provides a way to check or recompute derived data without manually editing stored results or expressions.

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/modules
Clone the repo
git clone --depth 1 https://github.com/geckse/markdown-vdb
Per session 13 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,279 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.00013 $0.01279
Opus 5 $0.00006 $0.00639
Sonnet 5 $0.00003 $0.00256
Haiku 4.5 $0.00001 $0.00128

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

Security

Grade A, and why

modules 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/modules.md · 198 lines

How it starts

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

mdvdb modules

Inspect and run the built-in modules that materialize computed frontmatter fields declared in .markdownvdb.schema.yml.

Module ID Owns Execution order
formula Formula fields calculated from the current document First
lookup_rollup Lookup fields copied from related documents and Rollup aggregations Second

Both modules are always on during ingest, watch updates, and schema changes. modules run is the explicit recomputation surface.

Usage

mdvdb modules <COMMAND> [OPTIONS]
Command Description
list List compiled-in modules, versions, and hooks
validate <MODULE> Validate a Formula or Rollup expression without changing files or the index
run <MODULE> Recompute persisted derived data
status <MODULE> Read cached diagnostics without running expressions

Valid module IDs are formula and lookup_rollup.

List modules

mdvdb modules list
mdvdb modules list --json

JSON output is an array of descriptors:

[
  {
    "id": "formula",
    "name": "Formula",
    "version": 1,
    "always_on": true,
    "hooks": ["full_ingest", "files_changed", "schema_changed", "manual_run"]
  },
  {
    "id": "lookup_rollup",
    "name": "Lookup & Rollup",
    "version": 1,
    "always_on": true,
    "hooks": ["full_ingest", "files_changed", "schema_changed", "manual_run"]
  }
]

Validate an expression

mdvdb modules validate <MODULE> \
  --formula <EXPRESSION> \
  --result-type <TYPE>

Supported result types are string, number, boolean, date, datetime, list, and json. Use the formula module for a document Formula and lookup_rollup for a Rollup expression, where values is the reserved input list.

# Formula expression
mdvdb modules validate formula \
  --formula 'price * quantity' \
  --result-type number

# Rollup expression
mdvdb modules validate lookup_rollup \
  --formula 'values.reduce((sum, value) => sum + Number(value), 0)' \
  --result-type number \
  --json

Read the full file on GitHub · 198 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 · 198 lines · 13 tokens per session scan A 33720e96e417

Subscribe to this mod's changes

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