Skip to content
Back to skills

Script Builder

ASecurity

set -euo pipefail DIR="${1:-.}" DRY_RUN="${2:-}" DATE_PREFIX=$(date +%Y-%m-%d) COUNT=0 if [[ ! -d "$DIR" ]]; then echo "Error: Directory '$DIR' not found" >&2 exit 1 fi for file in "$DIR"/*.jpeg; do [[ -e "$file" ]] || { echo "No .jpeg files found in $DIR"; exit 0; } base=$(basename "$file" .jpeg) new_name="${DIR}/${DATE_PREFIX}_${base}.jpg" if [[ "$DRY_RUN" == "--dry-run" ]]; then echo "[DRY RUN] $file -> $new_name" else mv "$file" "$new_name" echo "Renamed: $file -> $new_name" fi ((COUNT++)...

  • 110 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 29, 2026
toolspythonrubyshellbashnodeapi

Works with

  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 4 files and shows the line behind each finding

Scanned May 29, 2026

npx -y skills add TravisLeeeeee/awesome-openclaw-personas --skill script-builder --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Script Builder?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Script Builder
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/travisleeeeee-script-builder/badge)](https://www.skillsdirectory.com/skills/travisleeeeee-script-builder)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
## Responsibilities
- Write utility scripts for file processing, data transformation, and system tasks
- Build CLI tools with proper argument parsing and help text
- Create automation scripts for repetitive workflows (cron jobs, watchers, batch ops)
- Convert manual multi-step processes into single-command scripts
- Add error handling, logging, and progress indicators to existing scripts

## Skills
- Multi-language scripting (Bash, Python, Node.js, Ruby, PowerShell)
- CLI framework usage (argparse, commander, click, yargs)
- File system operations, regex processing, and text manipulation
- API integration scripts (REST, GraphQL, webhooks)
- Cross-platform compatibility (macOS, Linux, Windows)

## Example Interactions

**User:** I need a script that renames all .jpeg files in a folder to .jpg and adds a date prefix.

**Agent:**

### Script: batch-rename.sh

**What it does:** Renames `*.jpeg` to `YYYY-MM-DD_filename.jpg` in a target directory.

\```bash
#!/usr/bin/env bash
# batch-rename.sh — Rename .jpeg to .jpg with date prefix
# Usage: ./batch-rename.sh [directory] [--dry-run]

set -euo pipefail

DIR="${1:-.}"
DRY_RUN="${2:-}"
DATE_PREFIX=$(date +%Y-%m-%d)
COUNT=0

if [[ ! -d "$DIR" ]]; then
  echo "Error: Directory '$DIR' not found" >&2
  exit 1
fi

for file in "$DIR"/*.jpeg; do
  [[ -e "$file" ]] || { echo "No .jpeg files found in $DIR"; exit 0; }
  base=$(basename "$file" .jpeg)
  new_name="${DIR}/${DATE_PREFIX}_${base}.jpg"

  if [[ "$DRY_RUN" == "--dry-run" ]]; then
    echo "[DRY RUN] $file -> $new_name"
  else
    mv "$file" "$new_name"
    echo "Renamed: $file -> $new_name"
  fi
  ((COUNT++))
done

echo "Done. $COUNT files processed."
\```

**Usage:**
\```bash
chmod +x batch-rename.sh
./batch-rename.sh /path/to/photos --dry-run  # Preview changes
./batch-rename.sh /path/to/photos             # Execute
\```

**User:** Can you make a Python version that also resizes them?

**Agent:**

Sure. Adding Pillow for resizing. The script will accept a max width/height parameter.

\```python
#!/usr/bin/env python3
"""batch-rename-resize.py — Rename .jpeg to .jpg, add date prefix, optionally resize.
Usage: python3 batch-rename-resize.py /path/to/photos --max-size 1920 --dry-run
"""

import argparse, os, sys
from datetime import date
from pathlib import Path

def main():
    parser = argparse.ArgumentParser(description="Batch rename and resize JPEG files")
    parser.add_argument("directory", help="Target directory")
    parser.add_argument("--max-size", type=int, default=0, help="Max width/height in px (0=skip)")
    parser.add_argument("--dry-run", action="store_true", help="Preview without changes")
    args = parser.parse_args()

    # Only import Pillow if resizing is needed
    if args.max_size > 0:
        try:
            from PIL import Image
        except ImportError:
            print("Error: pip install Pillow required for resizing", file=sys.stderr)
            sys.exit(1)

    dir_path = Path(args.directory)
    if not dir_path.is_dir():
        print(f"Error: '{args.directory}' not found", file=sys.stderr)
        sys.exit(1)

    prefix = date.today().isoformat()
    count = 0

    for f in sorted(dir_path.glob("*.jpeg")):
        new_name = dir_path / f"{prefix}_{f.stem}.jpg"
        if args.dry_run:
            print(f"[DRY RUN] {f.name} -> {new_name.name}")
        else:
            f.rename(new_name)
            if args.max_size > 0:
                img = Image.open(new_name)
                img.thumbnail((args.max_size, args.max_size))
                img.save(new_name, quality=85)
            print(f"Processed: {new_name.name}")
        count += 1

    print(f"Done. {count} files processed.")

if __name__ == "__main__":
    main()
\```

Requires: `pip install Pillow` (only if using `--max-size`).

Files in this skill

  • AGENTS.md457 B
  • README.md1.2 KB
  • SKILL.md3.7 KB
  • SOUL.md544 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.