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.
| Script |
Used by |
Purpose |
_lib.sh |
All scripts |
Shared: get_gh_org, parse_repo_names, parse_repo_names_with_type |
org-ci-health.sh |
/org-ci-health |
CI run status + action versions per repo |
org-deps.sh |
/org-deps |
DESCRIPTION/Project.toml deps + release tags |
org-releases.sh |
/org-releases |
Release tags, commit counts, NEWS status |
org-maintenance.sh |
/org-maintenance |
Non-main worktrees + open PRs with status |
daily-summary.sh |
/daily-summary |
Bot PRs, issues, commits, blockers for a date |
weekly-plan.sh |
/weekly-plan |
Daily logs, open PRs, assigned issues, commit counts |
org-standards.sh |
/org-standards |
Config files, CI workflows, badges per repo |
org-issues-scan.sh |
/org-issues-tidy, /org-issues-do |
Open issues with metadata and bot comment status |
bot-tasks.sh |
/bot-tasks |
Unprocessed bot notifications with comment context |
cron-bot-tasks.sh |
cron |
Poll for new bot requests, trigger if needed |
Procedure
- Create
~/.claude/scripts/ if it does not exist
- For each script in the inventory above, check if it exists and is executable
- If missing, read the current version from this skill's embedded templates below and write it
- If it exists, check its version comment against the template — offer to update if outdated
- Run
chmod +x on all scripts
- 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:
- Reading
~/.claude/scripts/_lib.sh for the shared library pattern
- Following the same pattern (source
_lib.sh, use get_gh_org, parse_repo_names)
- Outputting JSON to stdout
- 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:
| Script |
Exists |
Executable |
Valid JSON |
Status |
Auto-Exit When Standalone
IMPORTANT: If this command is being run as a standalone request, automatically exit after completing all phases successfully.
1---2name: setup-scripts3description: Generate or regenerate all helper scripts used by org automation skills4---5
6# Setup Helper Scripts
7
8Generate all shell scripts in `~/.claude/scripts/` used by the org automation skills.
9Run this after a fresh install, or to regenerate scripts if they go missing.
10
11## Script inventory
12
13All scripts live in `~/.claude/scripts/` and must be executable.
14They share a common library `_lib.sh` with functions for parsing CLAUDE.md files.
15
16| Script | Used by | Purpose |
17|---|---|---|
18| `_lib.sh` | All scripts | Shared: `get_gh_org`, `parse_repo_names`, `parse_repo_names_with_type` |
19| `org-ci-health.sh` | `/org-ci-health` | CI run status + action versions per repo |
20| `org-deps.sh` | `/org-deps` | DESCRIPTION/Project.toml deps + release tags |
21| `org-releases.sh` | `/org-releases` | Release tags, commit counts, NEWS status |
22| `org-maintenance.sh` | `/org-maintenance` | Non-main worktrees + open PRs with status |
23| `daily-summary.sh` | `/daily-summary` | Bot PRs, issues, commits, blockers for a date |
24| `weekly-plan.sh` | `/weekly-plan` | Daily logs, open PRs, assigned issues, commit counts |
25| `org-standards.sh` | `/org-standards` | Config files, CI workflows, badges per repo |
26| `org-issues-scan.sh` | `/org-issues-tidy`, `/org-issues-do` | Open issues with metadata and bot comment status |
27| `bot-tasks.sh` | `/bot-tasks` | Unprocessed bot notifications with comment context |
28| `cron-bot-tasks.sh` | cron | Poll for new bot requests, trigger if needed |
29
30## Procedure
31
321. Create `~/.claude/scripts/` if it does not exist
332. For each script in the inventory above, check if it exists and is executable
343. If missing, read the current version from this skill's embedded templates below and write it
354. If it exists, check its version comment against the template — offer to update if outdated
365. Run `chmod +x` on all scripts
376. Smoke test each script (run with `--help` or a quick org name) and report pass/fail
38
39## Templates
40
41The templates for each script are maintained in the script files themselves.
42This skill should read the existing scripts at `~/.claude/scripts/*.sh` to verify they exist.
43
44If any are missing, regenerate them by:
451. Reading `~/.claude/scripts/_lib.sh` for the shared library pattern
462. Following the same pattern (source `_lib.sh`, use `get_gh_org`, `parse_repo_names`)
473. Outputting JSON to stdout
484. Using `set -euo pipefail` and bash 3.2 compatibility (no `mapfile`, no associative arrays)
49
50### Bash 3.2 compatibility rules
51
52macOS ships bash 3.2. All scripts MUST:
53- Not use `mapfile` — use `while IFS= read -r` loops instead
54- Not use associative arrays (`declare -A`) — use parallel indexed arrays
55- Not use `|&` — use `2>&1 |`
56- Not use `[[ =~ ]]` with literal `)` in patterns — use `sed` for extraction
57- Use `$(( ))` for arithmetic, not `let`
58- Process substitution `< <()` works on macOS bash 3.2 but test if unsure
59
60## Validation
61
62After generating, run each script and verify:
63- Exit code 0
64- Output is valid JSON (pipe through `jq .`)
65- No bash syntax errors
66
67Report results as a table:
68
69| Script | Exists | Executable | Valid JSON | Status |
70|---|---|---|---|---|
71
72## Auto-Exit When Standalone
73
74**IMPORTANT**: If this command is being run as a standalone request, automatically exit after completing all phases successfully.