shell-integration

Installation
SKILL.md

Shell Integration

Overview

Shell integration covers the APIs and patterns for building tools that extend or interact with Unix shells. This includes completion systems, prompt hooks, key bindings, terminal control, and plugin distribution across Zsh, Bash, and Fish.

When to use: Building CLI tool completions, shell plugins, prompt customizations, terminal UI, dotfile managers, installation scripts, or native binary wrappers.

When NOT to use: General-purpose scripting unrelated to shell extension (use POSIX scripting reference for standalone scripts), GUI applications, or web server development.

Quick Reference

Pattern Shell Key Points
Completion function Zsh compdef, compadd, zstyle for matcher configuration
Completion function Bash complete, compgen, COMP_WORDS, COMP_CWORD, COMPREPLY
Completion function Fish complete -c cmd -a args, condition flags, subcommand patterns
ZLE widget Zsh zle -N widget func, bindkey to map keys
Prompt hook Zsh precmd, preexec, chpwd via add-zsh-hook
Related skills
Installs
46
GitHub Stars
11
First Seen
Feb 23, 2026