AgentSkillsCN

alias-scripts

将rc文件别名导出为可执行脚本,以便非交互式shell和代理可以使用,并提供备份和恢复功能。

SKILL.md
--- frontmatter
name: alias-scripts
description: Export rc file aliases into executable scripts so non-interactive shells and agents can use them, with backups and restore.

Alias Scripts skill

  • Purpose: turn rc file aliases into real executables on PATH for non-interactive shells and agents
  • Best use: when aliases do not work in non-interactive shells and you want script equivalents
  • Repo: ~/dev/repos/alias-scripts
  • Install deps (bun): bun install
  • Generate scripts: bun run alias-scripts -- generate
  • Output dir: default ~/.local/bin (use --out <dir> to change)
  • List aliases (rc file only): bun run alias-scripts -- list
  • Report shell + PATH + conflicts (rc aliases only): bun run alias-scripts -- report
  • Backups: bun run alias-scripts -- backups
  • Restore latest: bun run alias-scripts -- restore
  • Restore by id: bun run alias-scripts -- restore --id <backup-id>
  • Clean generated scripts: bun run alias-scripts -- clean
  • Overwrite scripts in output dir: --force (creates backup if overwriting)
  • Disable aliases in rc file: --disable-aliases (comments matching alias lines)
  • Target rc file: --rc ~/.zshrc (comma-separated supported)
  • Backup location: --backup-dir ~/.config/alias-scripts/backups
  • Filter names: --include "g*,c*" --exclude "gs"
  • Dry run: --dry-run
  • Safety: --disable-aliases edits rc files; backups are created so you can restore