setup-scripts

v2026.09.25

Generate or regenerate all helper scripts used by org automation skills

GitHub
安装命令
npx skhub add seabbs/setup-scripts
Markdown
SKILL.md

Setup Helper Scripts

Generate all shell scripts in ~/.claude/scripts/ used by the org automation skills. Run this after a fresh install, or to regenerate scripts if they go missing.

Script inventory

All scripts live in ~/.claude/scripts/ and must be executable. They share a common library _lib.sh with functions for parsing CLAUDE.md files.

ScriptUsed byPurpose
_lib.shAll scriptsShared: get_gh_org, parse_repo_names, parse_repo_names_with_type
org-ci-health.sh/org-ci-healthCI run status + action versions per repo
org-deps.sh/org-depsDESCRIPTION/Project.toml deps + release tags
org-releases.sh/org-releasesRelease tags, commit counts, NEWS status
org-maintenance.sh/org-maintenanceNon-main worktrees + open PRs with status
daily-summary.sh/daily-summaryBot PRs, issues, commits, blockers for a date
weekly-plan.sh/weekly-planDaily logs, open PRs, assigned issues, commit counts
org-standards.sh/org-standardsConfig files, CI workflows, badges per repo
org-issues-scan.sh/org-issues-tidy, /org-issues-doOpen issues with metadata and bot comment status
bot-tasks.sh/bot-tasksUnprocessed bot notifications with comment context
cron-bot-tasks.shcronPoll for new bot requests, trigger if needed

Procedure

  1. Create ~/.claude/scripts/ if it does not exist
  2. For each script in the inventory above, check if it exists and is executable
  3. If missing, read the current version from this skill's embedded templates below and write it
  4. If it exists, check its version comment against the template — offer to update if outdated
  5. Run chmod +x on all scripts
  6. Smoke test each script (run with --help or a quick org name) and report pass/fail

Templates

The templates for each script are maintained in the script files themselves. This skill should read the existing scripts at ~/.claude/scripts/*.sh to verify they exist.

If any are missing, regenerate them by:

  1. Reading ~/.claude/scripts/_lib.sh for the shared library pattern
  2. Following the same pattern (source _lib.sh, use get_gh_org, parse_repo_names)
  3. Outputting JSON to stdout
  4. Using set -euo pipefail and bash 3.2 compatibility (no mapfile, no associative arrays)

Bash 3.2 compatibility rules

macOS ships bash 3.2. All scripts MUST:

  • Not use mapfile — use while IFS= read -r loops instead
  • Not use associative arrays (declare -A) — use parallel indexed arrays
  • Not use |& — use 2>&1 |
  • Not use [[ =~ ]] with literal ) in patterns — use sed for extraction
  • Use $(( )) for arithmetic, not let
  • Process substitution < <() works on macOS bash 3.2 but test if unsure

Validation

After generating, run each script and verify:

  • Exit code 0
  • Output is valid JSON (pipe through jq .)
  • No bash syntax errors

Report results as a table:

ScriptExistsExecutableValid JSONStatus

Auto-Exit When Standalone

IMPORTANT: If this command is being run as a standalone request, automatically exit after completing all phases successfully.

发现
标签

此技能尚未发布标签。

版本
最新版本元数据

版本

v2026.09.25

发布时间

Sep 25, 2026

分类

未分类

许可证

MIT

源路径

plugins/org-management/skills/setup-scripts

默认分支

main

最新提交

cf859a3

Tree SHA

5c81048