Claude-skill-registry add-fish-alias
Use when creating a new fish shell alias, function, or command shortcut, or when user asks to "add an alias for X"
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/add-fish-alias" ~/.claude/skills/majiayu000-claude-skill-registry-add-fish-alias && rm -rf "$T"
manifest:
skills/data/add-fish-alias/SKILL.mdsource content
Add Fish Alias
Create a new fish shell function/alias in Juliet dotfiles.
Process
-
Create function file
symlinked/config/fish/functions/aliases/<name>.fish -
Write the function
function <name> --wraps "<wrapped-command>" <wrapped-command> $argv end -
Reload fish (or open new terminal)
source ~/.config/fish/config.fish
File Naming
- Filename = function name (e.g.,
definesg.fish
function)g - Use lowercase, hyphens for multi-word names
- Files are auto-loaded alphabetically
Patterns
Simple Wrapper
function g --wraps "git" git $argv end
Wrapper with Auto-Install
function nv --wraps "neovide" if ! command -v neovide 2&> /dev/null gum confirm "Neovide not installed. Install?" && brew install --cask neovide end neovide $argv end
Function with Subcommand Aliases
function pv --wraps "pipenv" switch $argv[1] case "i" set argv[1] install end pipenv $argv end
Interactive Function (using gum)
function clone set -l provider (gum choose --header "Source?" github gitlab) # ... rest of logic end
Multiple Functions in One File
Group related functions (e.g.,
git.fish contains ga, gl, gm, commit, etc.)
Conventions
- Use
for tab completion inheritance--wraps - Use
to pass all arguments$argv - Use
for interactive prompts (confirm, choose, input, spin)gum - Helper functions:
,log
,error
(defined in fish config)debuglog
Common Mistakes
- Forgetting
(loses tab completion)--wraps - Using
instead of$@
(bash syntax, not fish)$argv - Creating in wrong directory (must be in
)symlinked/config/fish/functions/aliases/