About script-generator
Script Generator creates optimized, syntax-validated scripts in Python, PowerShell, or Bash, but never runs them. It is intended for requests involving longer scripts, multiple targets, or repeated connections and authentication.
Key features
- 01Python, PowerShell, and Bash generation
- 02Concurrent handling of multiple targets
- 03Reuse of sessions and authentication
- 04Syntax validation before delivery
- 05Per-operation errors and I/O timeouts
- 06Credentials kept out of hardcoded script values
Use cases
- 01Generate a script for operations across multiple hosts
- 02Automate repeated HTTP requests with a reused session
- 03Create a script with repeated authentication handshakes
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ transilienceai/ communitytools --skill script-generatorAfter installing, type/script-generatorin Claude Code to confirm it loaded.
Details
From the project READMEScript Generator
Generates optimized, syntax-validated scripts on demand. Never executes scripts.
When to Use
- Scripts exceed ~30 lines
- Parallel operations on multiple targets
- Multi-library patterns (impacket + ldap3, pypsrp + concurrent.futures)
- Repeated auth handshakes or connection setup
Request Format
LANGUAGE: python3 | powershell | bash
TASK: What the script should accomplish
TARGETS: IPs, hostnames, URLs
CREDENTIALS: user, pass, hash, domain, certs
AVAILABLE_LIBRARIES: What's installed
OUTPUT_FORMAT: stdout format, file writes
CONSTRAINTS: timeout, no destructive ops, output directory
CONTEXT: (optional) Prior output, errors, what failed
Optimization
- Multiple targets →
concurrent.futures.ThreadPoolExecutor -
3 HTTP requests to same host →
requests.Session - Repeated auth → single auth, reuse session/token
- Prefer high-level libraries (impacket, ldap3, requests)
Output
Write to OUTPUT_DIR/artifacts/<task_name>.<ext>. Return:
SCRIPT_PATH: OUTPUT_DIR/artifacts/task_name.py
LANGUAGE: python3
VALIDATION: PASSED
EXECUTION: python3 OUTPUT_DIR/artifacts/task_name.py
DEPENDENCIES: impacket, concurrent.futures (stdlib)
Rules
- Never execute scripts — only generate, optimize, validate
- Per-operation error handling — no bare
except: - Timeout enforcement on all I/O
- Validate syntax before returning
- No secrets hardcoded — credentials as variables at top
Comments
Markdown supported