Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
oakoss avatar

Shell Integration

  • 80 installs
  • 14 repo stars
  • Updated March 2, 2026
  • oakoss/agent-skills

Helps with ai & agent building tasks during AI-assisted development.

About

shell-integration is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • shell-integration
  • AI & Agent Building
  • AI-coding skill

Shell Integration by the numbers

  • 80 all-time installs (skills.sh)
  • +3 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #5,222 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/oakoss/agent-skills --skill shell-integration

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs80
repo stars14
Last updatedMarch 2, 2026
Repositoryoakoss/agent-skills

What it does

Helps with ai & agent building tasks during AI-assisted development.

Files

SKILL.mdMarkdownGitHub ↗

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

PatternShellKey Points
Completion functionZshcompdef, compadd, zstyle for matcher configuration
Completion functionBashcomplete, compgen, COMP_WORDS, COMP_CWORD, COMPREPLY
Completion functionFishcomplete -c cmd -a args, condition flags, subcommand patterns
ZLE widgetZshzle -N widget func, bindkey to map keys
Prompt hookZshprecmd, preexec, chpwd via add-zsh-hook
Prompt hookBashPROMPT_COMMAND (string or array in Bash 5.1+)
Event handlerFish--on-event, --on-variable, --on-signal
AbbreviationFishabbr -a name expansion, --function for dynamic
Parameter expansionZsh${(s.:.)var}, ${var:=default}, flags and modifiers
Terminal controlAllANSI/CSI escape sequences, tput, stty
Signal handlingAlltrap builtin, cleanup patterns, EXIT/INT/TERM
Process managementAllJob control (&, wait, bg, fg), subshells, coprocesses
Plugin installationAllSourcing strategies, version detection, ZDOTDIR loading order

Common Mistakes

MistakeCorrect Pattern
Using echo -e for escape sequences portablyUse printf or tput for portability across shells and OSes
Modifying PROMPT_COMMAND with = in BashAppend with += to avoid overwriting other tools
Defining Fish event handlers in lazy-loaded functionsPlace event handlers in config.fish or source them explicitly
Hardcoding terminal capabilitiesQuery via tput which respects TERM and terminfo
Missing emulate -L zsh in Zsh functionsAlways set local options to avoid polluting caller environment
Using $COMP_LINE splitting instead of COMP_WORDSUse COMP_WORDS[$COMP_CWORD] for reliable word extraction
Not quoting $@ in wrapper scriptsAlways use "$@" to preserve argument boundaries
Assuming /bin/sh is BashTarget POSIX sh for portable scripts, test with dash
Using function keyword in POSIX scriptsUse name() { ... } syntax for POSIX compatibility
Ignoring EXIT trap for cleanupAlways set trap cleanup EXIT for temp files and state

Delegation

  • Completion testing: Use Explore agent to verify completions interactively
  • Script review: Use Task agent for cross-shell compatibility audits
  • Code review: Delegate to code-reviewer agent
If the rust skill is available, delegate native binary compilation patterns to it. Shell wrappers often invoke Rust-compiled binaries for performance-critical operations.
If the cli-power-tools skill is available, delegate modern CLI utility patterns to it. Many shell plugins wrap tools like fd, ripgrep, and fzf.

References

  • Zsh integration: ZLE, completions, hooks, parameter expansion
  • Bash integration: readline, completions, PROMPT_COMMAND, shopt
  • Fish integration: completions, events, abbreviations, functions
  • Terminal control: ANSI/CSI sequences, tput, stty, capabilities
  • POSIX scripting: portable patterns, signal handling, process management
  • Plugin distribution: installation scripts, dotfile management, version detection

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.