update-completions

update-completions is a command for Claude Code from wbingli/zsh-claudecode-completion. It costs 11 tokens per session (3,730 once invoked), scanned A, original, MIT.

A command for updating zsh completion suggestions for the Claude Code command-line tool. It compares the installed tool version with the version recorded in the project before regenerating them.

In plain words
What is it for?
It checks versions, gathers command help for top-level commands and subcommands, and updates the tracked zsh completion script, with a force option to skip the version check.
Why use it?
Completion files can become out of date when the command-line tool adds or changes commands and options.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions Claude Code.

Good fit It checks versions, gathers command help for top-level commands and subcommands, and updates the tracked zsh completion script, with a force option to skip the version check.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/wbingli/zsh-claudecode-completion/update-completions
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.

Clone the repo
git clone --depth 1 https://github.com/wbingli/zsh-claudecode-completion

Made for: Claude Code.

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-completions

README.md
[![agentmods](https://agentmods.dev/badge/commands/wbingli/zsh-claudecode-completion/update-completions/github.svg)](https://agentmods.dev/commands/wbingli/zsh-claudecode-completion/update-completions)
Your own site
<a href="https://agentmods.dev/commands/wbingli/zsh-claudecode-completion/update-completions"><img src="https://agentmods.dev/badge/commands/wbingli/zsh-claudecode-completion/update-completions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for update-completions

Your own site · 80×15
<a href="https://agentmods.dev/commands/wbingli/zsh-claudecode-completion/update-completions"><img src="https://agentmods.dev/badge/commands/wbingli/zsh-claudecode-completion/update-completions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,730 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00011 $0.03730
Opus 5 $0.00005 $0.01865
Sonnet 5 $0.00002 $0.00746
Haiku 4.5 $0.00001 $0.00373

Measured 11d ago against content hash c4dfd710a939, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

update-completions 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 11d 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.

.claude/commands/update-completions.md · 280 lines

How it starts

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

You are updating the zsh completion script for Claude Code CLI. Follow these steps:

Step 1: Check for Force Flag and Compare Versions

  1. Check if --force was passed as an argument to this command (check $ARGUMENTS).

  2. If --force is NOT present:

    • Get the installed Claude version: claude --version
    • Read the tracked version from the claude-version file in this repository
    • Compare the versions. If they match or the installed Claude version is lower than the tracked version, report "Completions are up to date" and stop.
  3. If --force IS present:

    • Skip version comparison
    • Report "Force flag detected, regenerating completions regardless of version"
    • Continue to Step 2

Step 2: Gather Help Output (if versions differ)

Run these commands to get the current CLI structure:

  • claude --help
  • claude mcp --help
  • claude plugin --help
  • claude install --help

Important: How to gather a comphrehensive help output

Above are just examples, but you should gather help output for all top-level commands and subcommands as needed to fully capture the CLI structure for completions. Store this output for use in the next step.

It may have multiple sub commands. For example, claude plugin will have its own set of subcommands. In the meanwhile, claude plugin marketplace may also have its own set of subcommands. Make sure to capture all levels of subcommands as needed.

You need to iterate through every subcommand to get their help output as well. For example, start with claude --help. You will have all the top level commands and options. For each top level command, you will need to run claude <top-level-command> --help to get its subcommands and options. If any of those subcommands have their own subcommands, you will need to run claude <top-level-command> <subcommand> --help as well, and so on, until you have captured the full hierarchy of commands and options.

Hidden Commands

Some Claude CLI commands are hidden — they work but are not listed in claude --help. These must be included in completions even though they won't appear in the help output. Always gather their help output separately:

Read the full file on GitHub · 280 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. 11d ago First seen · 280 lines · 11 tokens per session scan A c4dfd710a939

Subscribe to this mod's changes

update-completions is a command published in the GitHub repository wbingli/zsh-claudecode-completion (56 stars, last pushed yesterday), licensed MIT. It adds 11 tokens to every session and 3,730 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-30.