Review an RPA workflow for errors, fragility, and best practices
A structured code review of a UiPath, Power Automate, or similar bot workflow, with issues ranked and explained before any changes.
The prompt
Review my RPA workflow and explain what to fix. Do not rewrite it until I confirm which changes I want.
Platform: [e.g. "UiPath (XAML)", "Power Automate Desktop", "Automation Anywhere"]
What the process does: [SHORT DESCRIPTION and the apps it touches]
Workflow files: [PASTE the XAML or exported workflow]
Known problems: [e.g. "fails when the page loads slowly", "hard to maintain" - or "none"]
Check for:
1. Selectors and UI interaction - brittle or full-path selectors, hard-coded indexes, missing wildcards or anchors, fixed delays instead of element-exists or wait activities.
2. Error handling - missing Try/Catch, business vs. system exceptions not separated, no retry scope, no screenshot or log on failure, bot left in a bad state.
3. Structure - giant single workflows, duplicated logic that should be reusable components, unclear argument directions, unused variables, variables with too wide a scope.
4. Configuration - hard-coded paths, URLs, credentials, or emails that belong in config files or orchestrator assets.
5. Logging and auditability - meaningful log messages at key steps.
6. Performance - unnecessary loops, reading the same file or screen repeatedly.
7. Naming and readability - activity, variable, and argument names.
Return a table: # | Location (file/activity) | Issue | Why it matters | Recommended fix | Severity (critical/major/minor). Then list the 3 changes that would most improve reliability, and wait for my go-ahead before producing modified code.
Highlighted [brackets] are blanks to replace with your own details.
Fill in the blanks and use this promptMore Software Development prompts
What to fill in
- SHORT DESCRIPTION and the apps it touches
- PASTE the XAML or exported workflow
How this prompt is built
This prompt follows the Few-Shot structure (Few-shot prompting). A few-shot prompt includes one or more worked examples of the input and the output you want, so the model can copy the pattern instead of guessing it.
Related prompts
- Analyze logs to find what went wrongReads logs to identify errors, patterns, and the likely root cause.
- Get unstuck on a coding error with hints instead of the answerA plain-English explanation of your error and step-by-step hints, so you learn to debug instead of copying a fix.
- Get a beginner-friendly code review of my first projectA ranked set of the five improvements that matter most, explained simply, plus what you did well and what to learn next.
- Turn a threat report into Sigma detection rulesExtracts behaviors from a threat report, maps them to MITRE ATT&CK, and writes tuned Sigma rules with test notes.