TsukiNi22/ai-utils / skills/libutils/libutils-install
libutils-install
Flagged| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 6.1 KB |
| requires.txt | markdown | 9 B |
| scripts/libutils.shexecutable | script | 15.5 KB |
| scripts/sudo-askpassexecutable | script | 1.1 KB |
scripts/sudo-askpass
View on GitHub#!/bin/bash
# Graphical password prompt for `sudo -A` (SUDO_ASKPASS) when there is no terminal (ex: Claude Code).
# Usage: SUDO_ASKPASS=~/.local/bin/sudo-askpass sudo -A <command>
# Prints the password on stdout (what sudo expects), exit 1 when cancelled.
PROMPT="${1:-Password:}"
# Command that asked for root (parent sudo process), shown in the dialog
CMD="$(ps -o args= -p "$PPID" 2>/dev/null | sed 's/^sudo -A //; s/^sudo //' | cut -c1-200)"
TEXT="Root access requested${CMD:+ for:\n<tt>$(printf '%s' "$CMD" | sed 's/&/\&/g; s/</\</g; s/>/\>/g')</tt>}\n\n$PROMPT"
if command -v zenity > /dev/null 2>&1; then
exec zenity --entry --hide-text --title="sudo" --text="$TEXT" --width=460 2> /dev/null
elif command -v kdialog > /dev/null 2>&1; then
exec kdialog --title "sudo" --password "$(printf '%b' "$TEXT" | sed 's/<[^>]*>//g')"
elif command -v systemd-ask-password > /dev/null 2>&1; then
exec systemd-ask-password "$(printf '%b' "$TEXT" | sed 's/<[^>]*>//g' | tr '\n' ' ')"
fi
echo "sudo-askpass: no graphical prompt available (zenity, kdialog)" >&2
exit 1
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |