Skip to content

IvanCampos/agents / skills/launchd-non-apple-jobs

launchd-non-apple-jobs

Unverified

List launchd jobs that are not from Apple and create user launchd jobs. Use when the user says "show me my jobs", "show my launchd jobs", asks for non-Apple launchd jobs, or wants to create a one-time or recurring launchd job.

FileKindSize
SKILL.mdskill md1.8 KB
agents/openai.yamlconfig202 B
scripts/create_job.shexecutablescript6.7 KB
scripts/delete_job.shexecutablescript1.5 KB
scripts/show_jobs.shexecutablescript132 B

scripts/delete_job.sh

View on GitHub
#!/usr/bin/env bash
set -euo pipefail

usage() {
  cat <<'USAGE'
Usage:
  delete_job.sh --label <label> [--dry-run]

Options:
  --label   LaunchAgent label (e.g., com.example.myjob)
  --dry-run Print actions without bootout or deletion
USAGE
}

label=""
dry_run=0

while [[ $# -gt 0 ]]; do
  case "$1" in
    --label) label="$2"; shift 2 ;;
    --dry-run) dry_run=1; shift ;;
    -h|--help) usage; exit 0 ;;
    *) echo "Unknown arg: $1" >&2; usage; exit 2 ;;
  esac
done

if [[ -z "$label" ]]; then
  echo "Missing --label." >&2
  usage
  exit 2
fi

launch_agents_dir="${HOME}/Library/LaunchAgents"
plist_path="${launch_agents_dir}/${label}.plist"
wrapper_path="${launch_agents_dir}/${label}-once.sh"
trash_bin="$(command -v trash || true)"

if [[ $dry_run -eq 1 ]]; then
  echo "[DRY RUN] Would bootout: gui/${UID} ${plist_path}" >&2
  if [[ -f "$plist_path" ]]; then
    echo "[DRY RUN] Would trash: ${plist_path}" >&2
  fi
  if [[ -f "$wrapper_path" ]]; then
    echo "[DRY RUN] Would trash: ${wrapper_path}" >&2
  fi
  exit 0
fi

if [[ -f "$plist_path" ]]; then
  launchctl bootout "gui/${UID}" "$plist_path" >/dev/null 2>&1 || true
fi

if [[ -z "$trash_bin" ]]; then
  echo "trash not found; cannot delete files." >&2
  exit 1
fi

items=()
if [[ -f "$plist_path" ]]; then
  items+=("$plist_path")
fi
if [[ -f "$wrapper_path" ]]; then
  items+=("$wrapper_path")
fi

if [[ ${#items[@]} -eq 0 ]]; then
  echo "No files found for label: $label"
  exit 0
fi

"$trash_bin" "${items[@]}"

echo "Removed: ${label}"
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall