shell-integration

Provide cross-shell scripting patterns for Bash, Zsh, and Fish.

14|5|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/oakoss/agent-skills --skill shell-integration-oakoss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shell-integration
Source: https://github.com/oakoss/agent-skills/tree/main/skills/shell-integration
Command: npx skills add https://github.com/oakoss/agent-skills --skill shell-integration-oakoss

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides patterns and best practices for building robust shell scripts, custom completions, and terminal-integrated tools that work seamlessly across Bash, Zsh, and Fish.

Core Features & Use Cases

  • Cross-Shell Compatibility: Write scripts and completions that function reliably across different shells.
  • Advanced Shell Features: Leverage ZLE widgets, Bash readline, Fish events, and more for enhanced terminal interaction.
  • Use Case: Develop a custom CLI tool with auto-completion for Bash, Zsh, and Fish, ensuring a consistent and powerful user experience across all major shells.

Quick Start

Use the shell-integration skill to create a Zsh completion function for a new command.

Frequently Asked Questions about shell-integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write shell scripts that work across Bash, Zsh, and Fish?

Cross-shell compatibility requires applying specific scripting patterns and best practices that ensure reliable execution across Bash, Zsh, and Fish. It addresses the need for consistent CLI tool behavior by handling parameter expansion and signal handling variations.

How do I create custom auto-completion for a CLI tool in multiple shells?

You can create custom auto-completion by leveraging shell-specific completion systems to generate functions for Zsh, Bash, and Fish. This provides a consistent user experience for CLI tools across all major shells.

What is the best way to use ZLE widgets and readline bindings for terminal interaction?

The best way to enhance terminal interaction is by leveraging ZLE widgets in Zsh and readline bindings in Bash. These advanced shell features allow you to capture and manipulate user input directly within the terminal prompt.

Does this approach support ANSI escape sequences and prompt hooks?

Yes, this approach fully supports utilizing ANSI escape sequences and prompt hooks. It provides patterns to integrate these features seamlessly into your terminal environment for dynamic prompt generation and output formatting.

How do I handle signals in shell scripting across different environments?

Handling signals in shell scripting requires implementing specific signal management patterns that work reliably across different environments. This ensures your robust shell scripts can gracefully intercept and respond to system interrupts.

When do I need Fish events versus Bash readline for terminal integration?

You need Fish events when building event-driven terminal interactions in Fish, whereas Bash readline is used for custom keybindings in Bash. Choosing between them depends on the target shell's specific advanced features for terminal integration.