#!/bin/bash # Headless Claude Code automation wrapper. # # Schedule this script with cron, launchd, or systemd to run # a skill or prompt on a recurring schedule. # # Customize: # - SKILL_NAME: the skill to run (e.g., /weekly-report) # - OUTPUT_DIR: where to save output files # - MAX_TURNS: safety ceiling on autonomous turns SKILL_NAME="/YOUR-SKILL-NAME" OUTPUT_DIR="pipeline-output" MAX_TURNS=15 cd "$(dirname "$0")/.." mkdir -p "$OUTPUT_DIR" claude -p "Run $SKILL_NAME and save output to $OUTPUT_DIR/$(date +%Y-%m-%d).md" \ --output-format text \ --max-turns "$MAX_TURNS"