Skip to content
Agent Memory
Skill

/llmdoc

Default V3 operating skill for llmdoc-enabled projects. Route discovery — exploring the codebase, locating a concept or contract, judging the blast radius of a change — through the llmdoc CLI instead of broad file crawling.

BOOST
From plugin
llmdoc
4835 skills3 agents3 hooks
Install
$ npx -y skills add TokenRollAI/llmdoc --skill llmdoc --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/llmdoc

Context preview

The summary Claude sees to decide when to auto-load this skill.

Default V3 operating skill for llmdoc-enabled projects. Route discovery — exploring the codebase, locating a concept or contract, judging the blast radius of a change — through the llmdoc CLI instead of broad file crawling.

SKILL.md

llmdoc.SKILL.md
name: llmdoc
description: "Default V3 operating skill for llmdoc-enabled projects. Route discovery — exploring the codebase, locating a concept or contract, judging the blast radius of a change — through the llmdoc CLI instead of broad file crawling."
allowed-tools: Read, Glob, Grep, Bash, Write, Edit, WebSearch, WebFetch

/llmdoc

Use the CLI to retrieve durable architecture, constraints, and working agreements from V3 `llmdoc/` projects. Run commands as `npx -y @tokenroll/llmdoc <cmd>`.

Retrieval Gate

Apply this gate before the first discovery action of a task, and again whenever investigation crosses into a new subsystem. Choose the one entry point that matches the intent:

| Intent | Entry point | |---|---| | Concept, contract, term, "where is X?" | `search <query>` | | Background or blast radius of concrete source files | `context --files <path...>` | | Cold start, unclear scope | `tree` | | Known topic or document kind | `index --topic <topic>` / `--kind <kind>` | | Bodies of documents already identified | `show <path...>` |

The gate guards broad native discovery: recursive or cross-directory exploration with Read, Grep, Glob, or shell outside a working set llmdoc has already narrowed.

Once llmdoc has narrowed that working set, native tools own the exact facts — source text, line numbers, test behavior, counts, git state. The knowledge surface deliberately does not duplicate those.

These entry points are alternatives, not a sequence. Stop as soon as the task has enough context; that permission applies after choosing an entry point, never instead of choosing one.

`status` and `delta` are not retrieval. Use them to assess staleness or to prepare `/llmdoc:update`, where `delta` decides light vs deep.

CLI Invocation

`@tokenroll/llmdoc` is external tooling, not a project dependency. `-y` lets a missing package resolve into the npm cache without a prompt.

  • Never add it to the served project's `package.json` or lockfile.
  • Pin in the package spec when reproducibility matters: `npx -y @tokenroll/llmdoc@<version> <cmd>`.
  • Never call a bare `npx llmdoc`; that name resolves to an unrelated package.
  • If the CLI stays unavailable, report the degraded path, then continue with narrowly scoped native tools.

Operating Rules

  • Preserve and reuse `LLMDOC_STATE` across continuation; do not replay prior reads unless evidence changed or the task moved.
  • Temporary investigation notes belong in `.llmdoc-tmp/`, not in stable docs.
  • Stable `llmdoc/` writes belong to `recorder`; `llmdoc/meta.json` changes go through the CLI only (`new`, `adopt`, `mv`, `fingerprint`, `commit`). A valid `.mdx` that already exists on disk gets its ledger entry via `adopt <path...>` — never the delete-and-recreate dance through `new`.
  • Before non-trivial edits, align with the user.
  • If `llmdoc/` does not exist, suggest `/llmdoc:init`; do not fabricate the knowledge surface ad hoc.
  • Once code is mostly done with no known major issues, delegate needed `/llmdoc:update` work alongside verification; include later fixes and finalize only after verification passes.
  • For topology or routing work, read [Knowledge Topology](references/knowledge-topology.md).
  • For SessionStart reminders or document preload, read [Startup Configuration](references/startup-config.md).
  • Never suggest `/llmdoc:upgrade`; it runs only when the user asks for it by name.

Reflection Gate

Strong reflection signals expose a reusable project or workflow lesson:

  • the user corrects an assistant assumption or action
  • verification proves the chosen approach wrong
  • substantial rework, rollback, or an instruction violation occurs
  • a missing project signal would likely prevent recurrence

Skip transient tool failures, trivial typos, speculation, and one-task preferences unless marked durable.

On a strong signal, continue the task and give `reflector` compact evidence while context is fresh. It writes a privacy-safe candidate under `.llmdoc-tmp/reflections/pending/`, never the transcript or tracked knowledge. A pending candidate triggers update review even with no source delta. At task end, name the lesson and ask once to run `/llmdoc:update --reflection <path>`; wait for authorization.

Continuation State

On compact or resume, keep `LLMDOC_STATE` small and practical:

  • active goal
  • documents already read
  • key conclusions and invariants
  • user decisions and constraints
  • next action
  • open risks or unknowns
  • pending lesson candidates, if any

If that state is still sufficient, continue without re-running `tree`, `index`, or prior `show` reads.

Roles

  • `investigator`: current-state research, scoped evidence gathering, scratch reports under `.llmdoc-tmp/`
  • `reflector`: turns strong corrections, verified mistakes, and major rework into structured candidates under `.llmdoc-tmp/reflections/pending/`
  • `recorder`: the only writer of tracked `llmdoc/` knowledge
Read more
Ships withllmdoc

Persistent engineering context that helps coding agents understand a repository without rediscovering its architecture every session. Preserve decisions, constraints, and cross-module contracts that source code does not explain cheaply.

Get the whole plugin
Stats
483
Stars
55
Forks
Active
Maintenance
TypeScript
Language
3h ago
Last commit
1y ago
Created
4h ago
Added

Repo: TokenRollAI/llmdoc

Other skills on llmdoc.