shell-completions

Guidance for working on the shell completion system. See AGENTS.md for project overview.

Agent

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 agents/jvgomg/podkit/shell-completions
Clone the repo
git clone --depth 1 https://github.com/jvgomg/podkit
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 605 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.00000 $0.00605
Opus 5 $0.00000 $0.00302
Sonnet 5 $0.00000 $0.00121
Haiku 4.5 $0.00000 $0.00060

Measured yesterday against content hash d32c025205e1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

shell-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 yesterday.

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.

agents/shell-completions.md · 38 lines

How it starts

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

Shell Completions

Guidance for working on the shell completion system. See AGENTS.md for project overview.

The podkit completions command generates shell completion scripts (zsh, bash) by walking the Commander.js command tree at runtime. Completions are auto-generated from the actual CLI structure — there is no static completion file to maintain.

How It Works

The completion system supports three levels:

  1. Subcommands and flags — auto-generated from the Commander.js tree
  2. Static argument values — options using .choices() or .addOption(new Option(...).choices([...])) auto-complete their values (e.g. --qualitymax, high, medium, low)
  3. Dynamic argument values--device and --collection complete with names from the user's config via a hidden __complete command

Impact on CLI Changes

  • Adding or removing commands, subcommands, or options requires no changes to the completions system. The generator reads the Commander.js program tree dynamically, so new commands automatically appear in completions.
  • When adding an option with known values, use .addOption(new Option(...).choices([...])) instead of .option() — the completion generator picks up argChoices automatically.
  • For options with a custom parse function (like sync's repeatable -t, --type), use new Option() with manual argChoices assignment to preserve the parser while exposing choices for completions.
  • The hidden __complete command reads the config file directly (no validation) and outputs names. Dynamic completions for new option types require updating extractCommandTree (to tag the option) and the zsh/bash generators.
  • The --cmd flag on completions zsh/bash controls which binary the dynamic helpers call. This is important for dev binaries with non-standard names (e.g. podkit-dev).

Testing Completions During Development

The completions generator derives the function prefix from --cmd: podkit-dev_podkit_dev, podkit_podkit. This means each binary gets its own isolated function namespace and the two completion scripts can coexist without clobbering each other.

Read the full file on GitHub · 38 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. yesterday First seen · 38 lines · 0 tokens per session scan A d32c025205e1

Subscribe to this mod's changes

shell-completions is an agent published in the GitHub repository jvgomg/podkit (39 stars, last pushed 9d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 605 tokens. 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-09-01.