docs-setup

A command that detects the package ecosystems used by a project and creates or updates its docpin configuration. Package ecosystems are systems such as npm, PyPI, Rust crates, and Go modules.

In plain words
What is it for?
Use it during project setup to configure documentation caching, dependency limits, and the session-start version map.
Why use it?
It sets the project’s documentation lookup behavior without overwriting configuration values that are already present.

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/localplugins/plugins/docs-setup
Clone the repo
git clone --depth 1 https://github.com/localplugins/plugins
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 616 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.00020 $0.00616
Opus 5 $0.00010 $0.00308
Sonnet 5 $0.00004 $0.00123
Haiku 4.5 $0.00002 $0.00062

Measured yesterday against content hash 71399d9a8c19, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docs-setup 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 yesterday.

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.

docpin/commands/docs-setup.md · 51 lines

What it actually says

/docs-setup

One-time (or re-runnable) setup — no $ARGUMENTS. Detects this project's ecosystems and writes the docpin config file.

  1. Detect ecosystems — scan for the lockfiles/manifests listed in skills/docpin/references/resolver.md §1 (npm, PyPI, crates, Go) and report which were found.

  2. Create or update .docpin/config.json with this exact default schema (per the design spec §8) if the file doesn't already exist; if it already exists, preserve the user's existing values and only fill in any fields that are missing:

    {
      "cache": { "enabled": true, "dir": ".docpin/cache" },
      "hook": { "enabled": true, "maxDeps": 40 },
      "defaultEcosystem": null
    }
    
  3. Explain each field to the user:

    • cache.enabled — default true; when false, docpin skips the on-disk cache entirely and always fetches fresh (see skills/docpin/references/caching.md).
    • cache.dir — default .docpin/cache; where cached, distilled doc entries are written, keyed <ecosystem>/<pkg>@<version>[/topic].
    • hook.enabled — default true; controls whether the SessionStart hook (hooks/session-start.sh) injects a version map at session start. Set false to disable it.
    • hook.maxDeps — default 40; the maximum number of dependencies the SessionStart hook lists per ecosystem before truncating (it always notes when truncation happened).
    • defaultEcosystem — default null; set to one of "npm", "pypi", "crates", or "go" to resolve ambiguity when a bare library name exists in more than one ecosystem detected in this project.
    • If the user asks to change a value now (e.g. disable the hook, change maxDeps, or set a defaultEcosystem), update the corresponding field(s) in .docpin/config.json accordingly.
  4. Confirm .docpin/ is git-ignored — check the project's .gitignore for a .docpin/ (or equivalent) entry; if missing, append one. .docpin/config.json and .docpin/cache/ are project-local derived/config state and should never be committed.

Defaults apply even without running this command — /docs-setup just makes the config explicit and gives the user a place to change it.

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. yesterday First seen · 51 lines · 20 tokens per session scan A 71399d9a8c19

Subscribe to this mod's changes

docs-setup is a command published in the GitHub repository localplugins/plugins (5 stars, last pushed 1mo ago), licensed MIT. It adds 20 tokens to every session and 616 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-31.