update

update is a command for coding agents from Guohao1020/docs-cockpit. It costs 26 tokens per session (1,017 once invoked), scanned D, original, MIT.

A command for upgrading the docs-cockpit command-line tool and its plugin. It checks versions, shows changelog changes, and handles the selected upgrade process.

In plain words
What is it for?
Use it to check available updates, preview an upgrade with dry-run, confirm or skip prompts, control cache clearing, and skip changelog retrieval.
Why use it?
It removes the need to remember the installation method or manually decide whether a plugin cache restart is needed.

Command

Part of the docs-cockpit plugin — 3 skills, 5 commands, 1 hook 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/guohao1020/docs-cockpit/update
Clone the repo
git clone --depth 1 https://github.com/Guohao1020/docs-cockpit

Or install docs-cockpit, the plugin that ships this one along with the rest of its 3 skills, 5 commands, 1 hook.

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 update

README.md
[![agentmods](https://agentmods.dev/badge/commands/guohao1020/docs-cockpit/update.svg)](https://agentmods.dev/commands/guohao1020/docs-cockpit/update)
Your own site
<a href="https://agentmods.dev/commands/guohao1020/docs-cockpit/update"><img src="https://agentmods.dev/badge/commands/guohao1020/docs-cockpit/update.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 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,017 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 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.00026 $0.01017
Opus 5 $0.00013 $0.00508
Sonnet 5 $0.00005 $0.00203
Haiku 4.5 $0.00003 $0.00102

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

Security

Grade D, and why

update scanned grade D with 2 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 4d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

3. **Nuclear**: manually edit `~/.claude/settings.json` to remove `docs-cockpit` from both `extraKnownMarketplaces` AND `enabledPlugins` → save → restart → re-add marketplace

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf ~/.claude/plugins/cache/*docs-cockpit*
commands/update.md · 81 lines

How it starts

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

Explicit invocation of the docs-cockpit upgrade workflow. 0.7.0+ recommendation: just run docs-cockpit upgrade — the CLI handles everything (backend detection, version comparison, plugin cache decision, atomic restart).

The upgrade trigger phrases are routed by the use-docs-cockpit entry skill which dispatches to CLI docs-cockpit upgrade (see references/operations.md · upgrade). This slash command remains as the explicit invocation surface.

Primary path · 0.7.0+

docs-cockpit upgrade

That's the whole flow. The CLI:

  1. Shows current CLI + plugin layer versions
  2. Detects install backend (pip / uv / pipx / editable)
  3. Fetches GitHub latest version
  4. Shows CHANGELOG diff
  5. Asks confirmation
  6. Runs the right backend upgrade command
  7. Compares plugin version · if changed, auto-clears cache + prints ATOMIC restart instructions; if unchanged, says "no restart needed"

Useful flags:

  • --dry-run · print plan only · no changes
  • --yes / -y · skip the "Proceed? [Y/n]" prompt
  • --no-clear-cache · skip auto cache clear (manual control)
  • --skip-changelog · skip CHANGELOG fetch (faster)

What this slash command does

When user invokes /docs-cockpit:update:

  1. Run docs-cockpit upgrade (with --yes if you want non-interactive · normally let it prompt)
  2. Surface the output verbatim to the user
  3. If output ends with "ATOMIC NEXT STEP", emphasize to the user: quit Claude Code completely in the next 30 seconds. Don't let them defer.
  4. If output ends with "✓ no restart needed", confirm: CLI is up to date, plugin didn't need touching, they can keep working.

Fallback · user on pre-0.7.0

If docs-cockpit upgrade errors with "unknown subcommand", the user has <0.7.0 installed. Run the old manual flow:

# 1. Detect backend
which docs-cockpit              # POSIX
where.exe docs-cockpit          # Windows

# 2. Upgrade CLI (pick one)
pip install --upgrade git+https://github.com/Guohao1020/docs-cockpit.git
uv tool upgrade docs-cockpit
pipx upgrade docs-cockpit

# 3. ATOMIC · cache clear + IMMEDIATE restart (one operation · no pause)
#    POSIX:
rm -rf ~/.claude/plugins/cache/*docs-cockpit*
#    Windows:
Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\plugins\cache\*docs-cockpit*" -ErrorAction SilentlyContinue
#    → then: quit Claude Code immediately, reopen

Read the full file on GitHub · 81 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. 4d ago First seen · 81 lines · 26 tokens per session scan D 466334dbcdba

Subscribe to this mod's changes

update is a command published in the GitHub repository Guohao1020/docs-cockpit (2 stars, last pushed 2mo ago), licensed MIT. It adds 26 tokens to every session and 1,017 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it D with 2 findings (reads agent configuration directories, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.