git-worktree-runner completions.instructions.md

Instructions for maintaining shell tab completion for the Git GTR command, across Bash, Zsh, and Fish.

In plain words
What is it for?
Use them when adding or renaming Git GTR commands, flags, branches, editors, or AI adapters, and when testing the completion files.
Why use it?
They help keep command, option, branch, editor, and AI-tool suggestions accurate when the CLI changes.

Instructions file for GitHub Copilot

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 instructions/coderabbitai/git-worktree-runner/completions
Clone the repo
git clone --depth 1 https://github.com/coderabbitai/git-worktree-runner

Made for: GitHub Copilot.

Per session 1,366 This file is loaded in full into every session.
When invoked 1,366 The same file — it is already loaded in full.
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.01366 $0.01366
Opus 5 $0.00683 $0.00683
Sonnet 5 $0.00273 $0.00273
Haiku 4.5 $0.00137 $0.00137

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

Security

Grade A, and why

git-worktree-runner completions.instructions.md 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.

.github/instructions/completions.instructions.md · 145 lines

How it starts

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

Completions Instructions

Overview

Shell completions provide tab-completion for git gtr commands, flags, branches, and adapter names across Bash, Zsh, and Fish shells.

When to Update Completions

Always update all three completion files when:

  • Adding new commands (e.g., git gtr new-command)
  • Adding new flags to existing commands (e.g., --new-flag)
  • Adding editor or AI adapters (completion must list available adapters)
  • Changing command names or flag names

File Responsibilities

  • completions/gtr.bash - Bash completion (requires bash-completion v2+)
  • completions/_git-gtr - Zsh completion (uses Zsh completion system)
  • completions/gtr.fish - Fish shell completion

Implementation Pattern

Each completion file implements:

  1. Command completion - Top-level commands (new, rm, editor, ai, list, etc.)
  2. Flag completion - Command-specific flags (e.g., --from, --force, --editor)
  3. Branch completion - Dynamic completion of git branches plus special ID 1 (via git branch)
  4. Adapter completion - Editor names (cursor, vscode, zed) and AI tool names (aider, claude, codex)

Testing Completions

Manual testing (no automated tests):

# Bash - source the completion file (requires git's bash completion to be loaded)
source completions/gtr.bash
git gtr <TAB>                    # Should show commands
git gtr new <TAB>                # Should show flags
git gtr go <TAB>                 # Should show branches + '1'
git gtr editor <TAB>             # Should show branches + '1'
git gtr editor --editor <TAB>    # Should show editor names

# Zsh - copy to fpath directory and reload (requires git's zsh completion)
mkdir -p ~/.zsh/completions
cp completions/_git-gtr ~/.zsh/completions/
# Add to ~/.zshrc: fpath=(~/.zsh/completions $fpath)
# Add to ~/.zshrc: autoload -Uz compinit && compinit
exec zsh  # Reload shell
git gtr <TAB>                    # Should show commands
git gtr new <TAB>                # Should show flags
git gtr go <TAB>                 # Should show branches + '1'

# Fish - symlink to ~/.config/fish/completions/
ln -s "$(pwd)/completions/gtr.fish" ~/.config/fish/completions/
exec fish  # Reload shell
git gtr <TAB>                    # Should show commands
git gtr new <TAB>                # Should show flags
git gtr go <TAB>                 # Should show branches + '1'

Read the full file on GitHub · 145 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 · 145 lines · 1,366 tokens per session scan A df64af14c284

Subscribe to this mod's changes

git-worktree-runner completions.instructions.md is an instructions file published in the GitHub repository coderabbitai/git-worktree-runner (1,754 stars, last pushed 4d ago), licensed Apache-2.0. It adds 1,366 tokens to every session, about $0.0068 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.