fetch-docs

fetch-docs is a command for coding agents from poindexter12/waypoint. It costs 12 tokens per session (4,310 once invoked), scanned A, original, MIT.

A command that downloads the latest official Claude Code documentation and stores it locally for agents.

In plain words
What is it for?
Refreshing all documentation or fetching specific guides about skills, plugins, hooks, sub-agents, or slash commands.
Why use it?
It reduces the risk of relying on outdated instructions when Claude Code features or rules change.

Command

Part of the claire plugin — 2 skills, 2 commands, 4 agents shipped together

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/poindexter12/waypoint/fetch-docs
Clone the repo
git clone --depth 1 https://github.com/poindexter12/waypoint

Or install claire, the plugin that ships this one along with the rest of its 2 skills, 2 commands, 4 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fetch-docs

README.md
[![agentmods](https://agentmods.dev/badge/commands/poindexter12/waypoint/fetch-docs.svg)](https://agentmods.dev/commands/poindexter12/waypoint/fetch-docs)
Your own site
<a href="https://agentmods.dev/commands/poindexter12/waypoint/fetch-docs"><img src="https://agentmods.dev/badge/commands/poindexter12/waypoint/fetch-docs.svg" alt="Measured on agentmods" height="20"></a>
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 4,310 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.04310
Opus 5 $0.00006 $0.02155
Sonnet 5 $0.00002 $0.00862
Haiku 4.5 $0.00001 $0.00431

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

Security

Grade A, and why

fetch-docs 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.

claire/commands/fetch-docs.md · 698 lines

How it starts

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

/fetch:docs-claire

Fetch latest Claude Code documentation from official docs site and cache locally for claire agents.

ARGUMENT SPECIFICATION

SYNTAX: /fetch:docs-claire [--force] [doc-name]

OPTIONAL:
  --force
    Type: flag
    Default: false
    Purpose: Force refresh even if cache is fresh

  [doc-name]
    Type: enum[skills, plugins, hooks-guide, sub-agents, slash-commands]
    Default: (all docs)
    Purpose: Fetch specific doc only

EXECUTION PROTOCOL

Execute steps sequentially. Each step must complete successfully before proceeding.

STEP 1: PARSE ARGUMENTS

PARSE:

FORCE_REFRESH=false
TARGET_DOC="all"

for arg in "$@"; do
    if [ "$arg" = "--force" ]; then
        FORCE_REFRESH=true
    elif [ "$arg" != "--force" ]; then
        TARGET_DOC="$arg"
    fi
done

VALIDATION:

  • IF TARGET_DOC not in [all, skills, plugins, hooks-guide, sub-agents, slash-commands] → ERROR PATTERN "invalid-doc-name"

NEXT:

  • On success → STEP 2
  • On failure → ABORT

STEP 2: ENSURE CACHE DIRECTORY EXISTS

EXECUTE:

CACHE_DIR="claire/docs-cache"
test -d "$CACHE_DIR"
DIR_EXISTS=$?

if [ $DIR_EXISTS -ne 0 ]; then
    mkdir -p "$CACHE_DIR"
    MKDIR_EXIT=$?
fi

VALIDATION:

  • IF mkdir fails → ERROR PATTERN "cache-dir-creation-failed"

DATA:

  • CACHE_DIR = "claire/docs-cache"

NEXT:

  • On success → STEP 3
  • On failure → ABORT

STEP 3: READ DOCS INDEX

EXECUTE:

INDEX_FILE="claire/docs-index.json"
test -f "$INDEX_FILE"
INDEX_EXISTS=$?

if [ $INDEX_EXISTS -eq 0 ]; then
    INDEX_JSON=$(cat "$INDEX_FILE" 2>&1)
    CAT_EXIT=$?
else
    INDEX_JSON="{}"
    CAT_EXIT=0
fi

VALIDATION:

  • IF INDEX_EXISTS == 0 AND CAT_EXIT != 0 → ERROR PATTERN "index-read-failed"

PARSE INDEX:

{
  "skills": {
    "url": "https://code.claude.com/docs/en/skills",
    "lastFetched": "2025-11-23T12:34:56Z"
  },
  "sub-agents": {
    "url": "https://code.claude.com/docs/en/sub-agents",
    "lastFetched": "2025-11-23T10:00:00Z"
  },
  ...
}

DOC LIST:

  • skills
  • plugins
  • hooks-guide
  • sub-agents
  • slash-commands

Read the full file on GitHub · 698 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 · 698 lines · 0 tokens per session scan A 28f833b9c4c2

Subscribe to this mod's changes

fetch-docs is a command published in the GitHub repository poindexter12/waypoint (7 stars, last pushed 7mo ago), licensed MIT. It adds 12 tokens to every session and 4,310 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.