tr
TokenRoll custom commands and agents for Claude Code
Summary
The tr skill provides a doc-driven workflow for Claude Code and Codex, enabling automated document management and proactive agent coordination.
- It simplifies project setup with minimal configuration and supports lightweight or full documentation updates after non-trivial tasks.
Overview
llmdoc is a doc-driven workflow for both Claude Code and Codex.
- •Core skill:
llmdoc - •Claude Code commands:
/llmdoc:init,/llmdoc:update - •Codex helper skills:
llmdoc-init,llmdoc-update
The default setup is simple:
- •
CLAUDE.mdandAGENTS.mdonly need one short rule: step one is loading thellmdocskill - •the core skill entry is short, while detailed rationale, protocols, and templates are split under
skills/llmdoc/references/ - •the core skill defines proactive guide/reflection reading and proactive user discussion before non-trivial edits
- •the workflow restores the good pattern of proactively asking whether to run
/llmdoc:updateat the end of non-trivial tasks - •
/llmdoc:updatesupports lightweight and heavier modes, so immediate post-task doc updates do not always require a full multi-agent pipeline - •helper Codex skills provide command-like entrypoints without pretending Codex has custom slash commands for this plugin
- •agents and command contracts stay focused on execution instead of carrying a large amount of duplicated guidance
Why This Version
The previous design exposed too many internal steps:
- •separate skills for reading docs, investigating, and doc workflow
- •separate
scoutandinvestigatoragents with overlapping responsibilities - •heavy line-level references instead of file-level retrieval
This refactor keeps the public interface small and moves the rest into one reusable operating skill plus small Codex helper entry skills.
Public Surface
- •Core skill:
llmdoc - •Claude Code commands:
/llmdoc:init,/llmdoc:update - •Codex helper skills:
llmdoc-init,llmdoc-update - •Claude Code plugin support:
.claude-plugin/ - •Codex CLI plugin support:
.codex-plugin/plugin.jsonand.agents/plugins/marketplace.json - •Codex CLI subagents:
.codex/agents/*.toml - •Codex CLI hooks:
SessionStart,Stoptemplates included
Workflow
use
use is not a command.
It is the operating mode defined by the llmdoc skill. The recommended setup is to tell the model to load that skill first, then follow it.
/llmdoc:init
Use /llmdoc:init to create or repair the llmdoc skeleton and generate initial docs.
In Claude Code, this is a command. In Codex, use the helper skill llmdoc-init for the equivalent workflow.
The command:
- Inspects the repo
- Creates the llmdoc directory structure
- Runs multi-investigator temporary scratch work with explicit coverage checks, then a follow-up gap-check pass
- Generates initial MUST, overview, architecture, and reference docs
- Synchronizes
llmdoc/index.md
/llmdoc:update
Use /llmdoc:update after meaningful work when project knowledge should be persisted.
In Claude Code, this is a command. In Codex, use the helper skill llmdoc-update for the equivalent workflow.
The command keeps tracked llmdoc/ docs consistent with the current repository. Stable docs should stay compact: either smaller than the source they describe or useful because they explain architecture, implementation intent, boundaries, and stable contracts.
The command selects the lightest mode that can keep docs correct:
- •
fast: default for immediate post-implementation updates when the coordinating assistant has fresh context - •
analysis: one focused evidence pass for stale context, current-state research, or unclear impact - •
full: separate investigation, reflection, and recording when risk or process learning justifies the extra independence
The command:
- Rebuilds context from llmdoc and the current working tree
- Proactively reads relevant guides and reflections
- Chooses an update mode
- Investigates impacted concepts only when the selected mode requires it
- Writes a reflection under
llmdoc/memory/reflections/only when there is a workflow lesson or missing-doc signal - Updates stable docs and reconciles
llmdoc/memory/doc-gaps.md - Synchronizes
llmdoc/index.md
In normal use, the main assistant should proactively ask whether to run /llmdoc:update when the task produced durable knowledge or a useful reflection.
llmdoc Layout
llmdoc/
├── index.md
├── startup.md
├── must/ # Small startup context package
├── overview/ # Project and feature identity
├── architecture/ # Retrieval maps, invariants, ownership
├── guides/ # One workflow per document
├── reference/ # Stable lookup facts and conventions
└── memory/
├── reflections/ # Post-task reflections
├── decisions/ # Durable process or design decisions
└── doc-gaps.md # Known documentation weaknesses
.llmdoc-tmp/
└── investigations/ # Temporary scratch investigation reportsllmdoc/index.md is the global doc map. llmdoc/startup.md is only the startup reading order. They should link to each other, but they should not repeat the same content.
.llmdoc-tmp/ is a local temporary context cache. Investigator reports can persist across nearby sessions and help avoid repeated research, but they are ignored by git, not indexed, and not a source of truth. Promote only durable conclusions into tracked llmdoc/ docs.
Internal Agents
| Agent | Purpose |
|---|---|
investigator | Evidence gathering for chat, current-state research, or temporary scratch reports |
worker | Executes well-defined tasks |
recorder | Maintains stable llmdoc documents |
reflector | Writes post-task reflections |
Install
Claude Code
Install Claude Code first. Anthropic’s official docs currently list:
- •
npm install -g @anthropic-ai/claude-code - •or native install on macOS/Linux/WSL:
curl -fsSL https://claude.ai/install.sh | bash
Official docs:
- •https://docs.anthropic.com/en/docs/claude-code/quickstart
- •https://docs.anthropic.com/en/docs/claude-code/setup
Then install this plugin marketplace and plugin:
/plugin marketplace add https://github.com/TokenRollAI/llmdoc
/plugin install llmdoc@llmdoc-cc-pluginAfter installation:
- Copy `CLAUDE.example.md` into
~/.claude/CLAUDE.md. - If you want repository-local instructions, adapt `AGENTS.example.md` into the project root.
- Restart Claude Code so the new prompt and plugin state are loaded.
Codex CLI
Install Codex CLI first. OpenAI’s official docs currently list:
npm i -g @openai/codex
codexOfficial docs:
- •https://developers.openai.com/codex/cli
- •https://developers.openai.com/codex/plugins
- •https://developers.openai.com/codex/plugins/build
- •https://developers.openai.com/codex/subagents
- •https://developers.openai.com/codex/hooks
This repository contains two separate Codex integration surfaces:
- •Plugin packaging for
llmdocitself:
- `.codex-plugin/plugin.json` - `skills/llmdoc/` - `skills/llmdoc-init/` - `skills/llmdoc-update/` - `.agents/plugins/marketplace.json` as a repo-scoped local marketplace example
- •Repo-local Codex workflow files for this repository:
- `.codex/config.toml` - `.codex/agents/` - `skills/llmdoc/templates/codex-hooks.json`
Use this when you want the llmdoc plugin available across all repositories on your machine.
codex plugin marketplace add TokenRollAI/llmdocThen:
- Restart Codex so the new marketplace source is loaded.
- Run
/pluginsin Codex. - Find
llmdocin the plugin list, select it to open the detail page. - Install the plugin.
- Start a new thread in any repository and either:
- ask Codex to load the llmdoc skill first for normal work - choose llmdoc-init when you want the /llmdoc:init workflow - choose llmdoc-update when you want the /llmdoc:update workflow - or type @ and choose the plugin or one of its bundled skills explicitly
Use this when you are working inside this repository — contributing to llmdoc or testing local changes.
- Open this repository in Codex.
- Make sure `.agents/plugins/marketplace.json` exists.
- If Codex was already running, restart it so the repo marketplace and project-scoped agents are reloaded.
- In Codex, run
/plugins. - Find
llmdocin the plugin list, select it to open the detail page. - Install the plugin.
- Start a new thread in this repository and either:
- ask Codex to load the llmdoc skill first for normal work - choose llmdoc-init when you want the /llmdoc:init workflow - choose llmdoc-update when you want the /llmdoc:update workflow - or type @ and choose the plugin or one of its bundled skills explicitly
- If you want hooks, copy `skills/llmdoc/templates/codex-hooks.json` to
.codex/hooks.jsonand adjust the script paths for your machine.
When you open this repository itself, Codex can also use the project-scoped agents under `.codex/agents/` and the agent limits from `.codex/config.toml`.
Repo Files
The reusable skill lives at `skills/llmdoc/SKILL.md`. The Codex helper entry skills live at `skills/llmdoc-init/SKILL.md` and `skills/llmdoc-update/SKILL.md`. Detailed references live under `skills/llmdoc/references/`. Codex hook templates live under `skills/llmdoc/templates/`.
Codex Subagents
This repository now also includes project-scoped Codex custom agents:
- •`.codex/config.toml`
- •`.codex/agents/llmdoc-investigator.toml`
- •`.codex/agents/llmdoc-worker.toml`
- •`.codex/agents/llmdoc-recorder.toml`
- •`.codex/agents/llmdoc-reflector.toml`
These follow the Codex subagent docs pattern for project-scoped standalone TOML files under .codex/agents/, so they apply when you open this repository in Codex.
The names are intentionally prefixed with llmdoc_ so they do not override Codex built-in agents like worker or explorer.
Migration Notes
This version removes the old fragmented skills and replaces them with one skill:
- •active skill:
llmdoc - •removed skills:
read-doc,investigate,update-doc,doc-workflow,deep-dive,commit - •removed commands:
initDoc,withScout,what - •removed agent:
scout
If you used those before:
- •use
/llmdoc:initinstead of the oldtr-prefixed init command - •use
/llmdoc:updateinstead of/update-doc - •load the
llmdocskill instead of using separate read/investigate skills
Install & Usage
mkdir -p .claude/agentsAdd the configuration to .claude/agents/tr.md
@trUse Cases
Usage Examples
/llmdoc:init to set up the documentation workflow in a new project.
After finishing a feature, run /llmdoc:update to refresh the docs.
User: 'Update the project docs to reflect the new API endpoint.'
Security Audits
Frequently Asked Questions
What is tr?
The tr skill provides a doc-driven workflow for Claude Code and Codex, enabling automated document management and proactive agent coordination. It simplifies project setup with minimal configuration and supports lightweight or full documentation updates after non-trivial tasks.
How to install tr?
To install tr: create the agents directory (mkdir -p .claude/agents), then add the config to .claude/agents/tr.md. Finally, @tr in Claude Code.
What is tr best for?
tr is a agent categorized under General. It is designed for: agent. Created by TokenRoll.
What can I use tr for?
tr is useful for: Initialize a new project with a structured documentation workflow using /llmdoc:init.; Automatically update project documentation after completing a non-trivial task with /llmdoc:update.; Proactively guide the AI to read relevant references before making edits to ensure context-aware changes.; Coordinate between Claude Code and Codex agents using shared skill definitions and command contracts.; Reduce documentation overhead by using lightweight update mode for quick post-task doc refreshes.; Maintain a clean separation between core skill logic and detailed rationale/protocols in separate reference files..