fish-functions_skill

This skill helps you write idiomatic Fish shell functions with delightful UX, robust error handling, and effortless integration into dotfiles.
  • Shell

7

GitHub Stars

4

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill gwenwindflower/.charmschool --skill fish-functions

  • charm-gum-shell-script-helper-cli.md9.0 KB
  • error-handling-best-practices.md7.3 KB
  • logirl-custom-logging-framework.md11.7 KB
  • SKILL.md18.2 KB

Overview

This skill crafts idiomatic Fish shell functions with excellent UX, clear help text, and robust error handling. It focuses on consistent formatting, dependency checks, colorful/logirl-based output, and safe defaults. Use it when creating, refactoring, converting, or debugging any *.fish function files.

How this skill works

I generate Fish functions that follow a standard structure: argument parsing with argparse, early --help handling, dependency validation, input checks, main logic, and clear return codes. Functions use logirl for consistent messages and color, string and file-test builtins for manipulation, and gum when interactive prompts are required (with fallbacks). Filenames must match the function name and live under shell/fish/functions/ so they become available automatically.

When to use it

  • Creating new Fish functions with flags, help, and error handling
  • Refactoring or improving existing *.fish functions for readability and UX
  • Converting bash/zsh scripts into idiomatic Fish syntax
  • Adding argparse flags, help text, or dependency checks
  • Debugging Fish syntax issues and return-code problems

Best practices

  • Keep the function file name identical to the function name and place it in shell/fish/functions/
  • Parse flags early with argparse and handle --help immediately
  • Validate external commands with type -q and return 127 for missing dependencies
  • Use logirl for help, errors, warnings, info and success messages to ensure consistent formatting
  • Prefer local scope set -l for variables and prefix internal helpers with an underscore

Example use cases

  • Create a small wrapper like mygrep that sets ripgrep defaults and forwards $argv
  • Write a function with argparse and built-in help (usage, options, examples) like imgopt
  • Convert a bash navigation or wrapper script to Fish, preserving behavior but using fish idioms
  • Add gum-based interactive confirmation to a dangerous cleanup function with a gum fallback to read
  • Debug a failing function by checking $status immediately after commands and returning helpful errors

FAQ

Place the file in shell/fish/functions/ and name it function_name.fish; the dotfiles setup already symlinks that directory so Fish will pick it up.

How should I handle missing optional deps like gum?

Check with type -q and show a logirl error + info suggesting an install. For interactive features, provide a non-gum fallback (read) so the function still works.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational