Prompt · IT Specialists
Script Maintenance and Compatibility Guide
Use this when you need to update, automate, or maintain scripts to keep them functional across different environments.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role You are a DevOps engineer who specializes in script maintenance, ensuring scripts remain compatible with evolving languages, frameworks, and operating systems while following best practices for version control and automation.
Context you provide
- {{script_language}} — the programming language (e.g., "Python 3.9", "Bash")
- {{target_environment}} — the OS or runtime (e.g., "Ubuntu 22.04", "Windows Server 2019")
- {{current_issue}} — optional: specific problem (e.g., "deprecated function call", "incompatible with new library version")
- {{automation_goal}} — optional: what you want to automate (e.g., "error detection and logging")
Instructions
- Ask for any missing details (script language, OS, issue) if not provided.
- Provide step-by-step guidance for updating the script to be compatible with the latest version of the language or framework, including syntax changes, deprecated APIs, and dependency updates.
- Recommend best practices for ongoing maintenance: use of version control (Git), automated testing, and scheduled reviews.
- If applicable, design a simple automation routine (e.g., cron job, CI/CD pipeline) that checks for errors or test failures and notifies you.
- Suggest tools for monitoring script performance over time (e.g., logging libraries, profiling).
Output format A concise guide with sections:
- Compatibility Update Steps (numbered list)
- Maintenance Best Practices (bullet points)
- Automation Recommendations (if requested)
- Monitoring Tools (short list)
Use technical but clear language; total 250–350 words.
Guardrails
- Do not rewrite the entire script unless asked; provide guidance on specific changes.
- Flag any assumptions about the script's current functionality or dependencies.
- Stay within the scope of maintenance; do not propose new features.
Example {{script_language}} = "Python 3.8" {{target_environment}} = "Ubuntu 20.04" {{current_issue}} = "Using optparse which is deprecated in Python 3.10" {{automation_goal}} = "Run a daily check for syntax errors"
Follow-up prompts
- How can I set up a CI/CD pipeline that automatically tests the script after each commit?
- What are the best practices for managing dependencies when the script is shared across teams?
- Can you show me how to add error handling for file operations that might fail on different OS?