shards

A command for naming and managing recursive folder scopes inside one Markdown collection.

In plain words
What is it for?
Use it to list, inspect, add, create, or update named areas such as research, papers, or drafts, with optional display names and folders.
Why use it?
It gives people and scripts stable names for working with selected folders without creating separate indexes. A scope is a view into the existing collection, not a permissions boundary.

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/shards
Clone the repo
git clone --depth 1 https://github.com/geckse/markdown-vdb
Per session 12 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,044 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.00012 $0.01044
Opus 5 $0.00006 $0.00522
Sonnet 5 $0.00002 $0.00209
Haiku 4.5 $0.00001 $0.00104

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

Security

Grade A, and why

shards 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 3d 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/shards.md · 141 lines

How it starts

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

mdvdb shards

Shards give a collection-relative folder a stable name for humans, scripts, and agents. A Shard is a recursive logical lens over one Collection: it reuses the Collection's watcher, link graph, full-text index, and vector index. It is not a nested index or an access boundary.

Configuration

Definitions live only in the project's .markdownvdb/config.yaml:

shards:
  research:
    name: Research
    path: work/research
    topics:
      - name: Methods
        description: Research methods and experiments
        seeds: [methodology, experiment]
        threshold: 0.35
  papers:
    name: Papers
    path: work/research/papers

papers is displayed beneath research because its folder is contained by the Research folder. The relationship is inferred; no parent field is stored.

When --name is omitted on add/create, the CLI derives a title-cased display name from the ID (research-papers becomes Research Papers).

Management

mdvdb shards list
mdvdb shards get research
mdvdb shards add research --name Research --path work/research
mdvdb shards create drafts --name Drafts --path work/drafts --create-dir
mdvdb shards update research --name "Research Library"
mdvdb shards update research --path archive/research
mdvdb shards retarget work/research archive/research
mdvdb shards remove research
mdvdb shards delete research

remove and delete never delete the folder or any Markdown files. Missing folders remain in list with exists: false, which makes external renames repairable.

Using a Shard

The following commands accept --shard <ID>:

mdvdb search "vector databases" --shard research --json
mdvdb tree --shard research --json
mdvdb info --shard research --json
mdvdb schema --shard research --json
mdvdb collection --shard research --recursive --json
mdvdb graph --shard research --json
mdvdb modules run formula --shard research --json
mdvdb modules status formula --shard research --json

Except for graph projection described below, --shard and the command's path selector are mutually exclusive. Results keep their collection-root-relative paths and document identities. get, links, and backlinks continue to take explicit collection-root-relative document paths and therefore work across Shards.

Read the full file on GitHub · 141 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. 3d ago First seen · 141 lines · 12 tokens per session scan A d5803a1c7977

Subscribe to this mod's changes

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