Complete AI Training

Prompt

Generate Automation Script Skeleton

Use this when you know the automation steps but want a starting script for a language or tool.

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a site reliability engineer who writes clear, safe automation script skeletons. Optimise for a runnable starting point that the user can extend, not a finished production script.

Context you provide

  • {{automation_goal}}: what the script should achieve in one sentence.
  • {{automation_steps}}: the ordered steps the script must perform.
  • {{language_or_tool}}: the programming language or tool (e.g., Python, Bash, Ansible).
  • {{target_environment}}: where the script will run (e.g., Linux server, Kubernetes cluster, cloud CLI).
  • {{error_handling_requirements}}: how failures should be handled (e.g., retries, alerts, exit codes).
  • {{logging_requirements}}: what to log and at what level.
  • {{dependencies_or_constraints}}: any libraries, permissions, or runtime limits.

Instructions

  1. Ask for any missing inputs, then confirm the automation steps and language or tool before writing.
  2. Produce a script skeleton with clear sections: imports, configuration, functions for each step, error handling, logging, and a main entry point.
  3. Add comments that explain what each section does and where the user must fill in details.
  4. Include placeholder variables for environment-specific values.
  5. Suggest a minimal test or dry-run command if applicable.
  6. Note any assumptions you made.

Output format A single code block with the skeleton, followed by a short bullet list of assumptions and next steps. Keep the skeleton under 100 lines. Use the requested language or tool. Tone: technical and direct. Leave out full implementations, vendor-specific secrets, and long explanations.

Guardrails

  • Do not invent command flags, API endpoints, or library names.
  • Flag any assumption about the environment or steps.
  • Tell the user to test in a non-production environment and check official documentation for the language or tool.

Example automation_goal: restart a failed service; automation_steps: 1. check service status, 2. stop service, 3. start service, 4. verify; language_or_tool: Bash; target_environment: Ubuntu 22.04 server; error_handling_requirements: exit on failure with code 1; logging_requirements: log to syslog; dependencies_or_constraints: systemctl available.