lang-fish

Standardize Fish shell scripting with Fish-native variables, argparse, and status codes.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/dragoscirjan/opencode-config --skill lang-fish
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lang-fish
Source: https://github.com/dragoscirjan/opencode-config/tree/main/skills/lang-fish
Command: npx skills add https://github.com/dragoscirjan/opencode-config --skill lang-fish

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Fish shell has syntax and runtime behavior that differ from Bash, which can cause broken scripts, incorrect variable handling, and unreliable command-line tools. This Skill helps you write Fish code that is idiomatic, predictable, and easier to maintain.

Core Features & Use Cases

  • Fish-native scripting rules: Uses set for variables, argparse for argument parsing, and status for exit codes.
  • Safer shell development: Prevents accidental reliance on POSIX or Bash idioms that do not behave correctly in Fish.
  • Practical workflow support: Useful for writing shell functions, interactive utilities, and automation scripts that need clear Fish conventions.
  • Companion guidance: Recommends loading the clean-code skill alongside this one for cleaner and more maintainable implementations.

Quick Start

Ask the assistant to write or review your Fish shell script using Fish-native conventions and include clean-code guidance.

Frequently Asked Questions about lang-fish

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

FAQPage Schema
How do I write Fish shell scripts that avoid Bash syntax errors?

To write Fish shell scripts safely, use Fish-native conventions like `set` for variables, `argparse` for argument parsing, and `status` for exit codes to prevent broken scripts caused by Bash assumptions.

Why does my shell script break when I run it in Fish?

Your shell script breaks in Fish because its syntax and runtime behavior differ from Bash, requiring Fish-native variable handling and argument parsing to avoid incorrect execution and unreliable command-line tools.

What is the best way to parse command-line arguments in Fish shell?

The best way to parse command-line arguments in Fish shell is using the built-in `argparse` command, which standardizes option parsing and prevents accidental reliance on POSIX or Bash idioms that do not behave correctly.

Can I use Bash variable assignment syntax for Fish automation scripts?

You cannot use Bash variable assignment syntax for Fish automation scripts. Fish requires the `set` command for variable handling to ensure scripts are idiomatic, predictable, and easier to maintain.

How do I handle exit codes correctly in Fish shell functions?

To handle exit codes correctly in Fish shell functions, use Fish-native `status` based checks instead of Bash variables, ensuring predictable behavior and reliable interactive command workflows.