fish-shell-scripting

Write Fish shell scripts with correct idioms and cross-platform compatibility.

8|Updated Nov 29, 2025
One-click install
npx skills add https://github.com/Pyroxin/opinionated-claude-skills --skill fish-shell-scripting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fish-shell-scripting
Source: https://github.com/Pyroxin/opinionated-claude-skills/tree/main/opinionated-fish-shell/skills/fish-shell-scripting
Command: npx skills add https://github.com/Pyroxin/opinionated-claude-skills --skill fish-shell-scripting

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides guidance and best practices for writing robust and efficient Fish shell scripts, helping you avoid common pitfalls and write more maintainable automation.

Core Features & Use Cases

  • Cross-Platform Compatibility: Ensures scripts work on both macOS and Fedora Linux.
  • Idiomatic Fish Patterns: Teaches essential Fish features like lists-not-strings, proper scoping, and wrapper functions.
  • Use Case: You need to write a script to manage your development environment setup on both your personal laptop (macOS) and a remote server (Fedora). This skill helps you write a Fish script that handles differences gracefully and avoids common bugs.

Quick Start

Use the fish-shell-scripting skill to create a new Fish script that checks for the existence of a directory named 'data' in the current path and creates it if it doesn't exist.

Frequently Asked Questions about fish-shell-scripting

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

FAQPage Schema
How do I write a Fish shell script that works on both macOS and Fedora Linux?

To write cross-platform Fish shell scripts for macOS and Fedora, you must apply judgment frameworks that handle environmental differences gracefully and avoid common compatibility bugs. This ensures your automation runs consistently across both operating systems.

What is the best way to handle variables in Fish shell scripting without causing bugs?

Handling variables correctly in Fish shell scripting requires understanding its unique lists-not-strings semantics and scoping rules. Avoiding universal variable anti-patterns is critical to preventing unexpected behavior and maintaining script correctness.

When should I use Fish shell scripting instead of bash or another programming language?

Use Fish shell scripting when you need idiomatic patterns like wrapper functions and native list handling that bash lacks. It provides frameworks to decide when Fish is superior to bash or when a full programming language is more appropriate.

How do I create a Fish script to check for a directory and create it if it doesn't exist?

Creating a Fish script to check and generate a missing directory involves using idiomatic Fish patterns for file system checks. This approach ensures correct execution while avoiding common scoping or variable parsing bugs.

Why does my Fish shell script fail when I treat variables as strings?

Fish shell scripts fail when treating variables as strings because Fish uses a unique lists-not-strings semantic model. Understanding this mechanism and applying proper scoping rules is essential to avoid common parsing bugs.