| name | update-completions |
| description | Update the Zsh completion function (_copilot) to match the current copilot CLI interface. Use this skill when the user asks to update, refresh, or sync completions, or when new copilot CLI options, commands, or models need to be added to the completion file. |
| compatibility | Requires copilot CLI installed and available in PATH |
Update Completions
This skill updates the _copilot Zsh completion file to reflect the current
copilot CLI interface.
Steps
-
Gather current CLI help output. Run these commands and capture the output:
copilot --help
copilot help
copilot help config
copilot help commands
copilot help environment
copilot help logging
copilot help monitoring
copilot help permissions
copilot help providers
copilot mcp --help
copilot mcp add --help
copilot mcp get --help
copilot mcp list --help
copilot mcp remove --help
copilot plugin --help
copilot plugin install --help
copilot plugin marketplace --help
copilot plugin marketplace add --help
copilot plugin marketplace browse --help
copilot plugin marketplace remove --help
copilot plugin uninstall --help
copilot plugin update --help
copilot login --help
copilot init --help
-
Compare with _copilot. Read the _copilot completion file and compare
it against the help output. Identify:
- New, removed, or renamed flags/options (the
options array)
- New, removed, or renamed subcommands (the
commands array and
subcommand dispatch in the args case)
- New, removed, or renamed help topics (the
help_topics array)
- New command families that need their own completion branches (for
example
mcp and its subcommands/options)
- New or removed models (the fallback
models array)
- Changes to log levels or stream modes
- New or changed option aliases (for example
--effort alongside
--reasoning-effort)
- New or changed plugin subcommands
- New or changed login options
-
Update _copilot. Apply minimal, surgical edits to bring the completion
file in sync. Preserve the existing code style:
- Options use Zsh
_arguments spec format:
'--flag-name[Description]:arg-name:completer'
- Repeatable options are prefixed with
'*'
- Short/long pairs use
'(-s --long)'{-s,--long}'[Desc]' syntax
- Subcommand arrays use
'name:Description' format
- Model entries use
'model-id:Display Name' format
- For mutually synonymous options, use Zsh exclusion groups like
'(--effort --reasoning-effort)--effort[...]'
-
Update copilot.plugin.zsh if needed. If new wrapper functions or fpath
changes are warranted by CLI changes, update the plugin file too.
-
Verify. After editing:
- Run
zsh -n _copilot copilot.plugin.zsh
- Read back the modified file(s) to confirm the changes are syntactically
correct and consistent with the surrounding code
Important Notes
- The
_copilot__models_from_help function dynamically extracts models from
copilot --help at completion time. The static models array is only a
fallback — update it to stay reasonably current but do not remove the
dynamic extraction logic.
- Do not assume the
copilot help topic list is fixed. Treat copilot --help
or copilot help as the source of truth for which help topics currently
exist.
- Do not remove or alter the
_copilot__installed_plugins,
_copilot__marketplaces, _copilot__browsable_plugins, or
_copilot__installable_plugins helper functions unless the CLI changes
require it. These provide live dynamic completions.
- Keep the guard at the bottom:
if (( $+compstate )); then _copilot "$@"; fi