Download on the App Store

Code Refactoring Assistant

Fill this prompt

Analyzes and refactors code to improve performance, readability, and adherence to best practices.

Prompt Template

Act as an expert software engineer. Review and refactor the following code to improve {{Focus Area:[code_focus_areas]}}. Ensure the solution is written in {{Language:[programming_languages]}} and matches the understanding of a {{Skill Level:[skill_levels]}} developer.

Context and Topic: {{Context: if used in an AI agent use the current project}}

Code to refactor:
{{Code: e.g. Paste your code snippet here}}

Prompt Guide

Best For

  • Starting from a structured, reusable prompt instead of a blank chat.
  • Adapting the prompt to your own inputs while keeping the original intent intact.
  • Workflows related to Software Development.

How To Use It

  1. Copy the full prompt template.
  2. Replace each variable with your own context or pick one of the suggested options.
  3. Paste the completed prompt into ChatGPT, Claude, Gemini, or another AI assistant.

Variables In This Prompt

Focus Area Predefined list

[code_focus_areas]

Language Predefined list

[programming_languages]

Skill Level Predefined list

[skill_levels]

Context

if used in an AI agent use the current project

Code

e.g. Paste your code snippet here

Example Starting Point

Act as an expert software engineer. Review and refactor the following code to improve [code_focus_areas]. Ensure the solution is written in [programming_languages] and matches the understanding of a [skill_levels] developer.

Context and Topic: if used in an AI agent use the current project

Code to refactor:
e.g. Paste your code snippet here

How Variables Work

Variable Syntax

Variables are wrapped in {{ and }} and follow this pattern:

{{variable name: option1, option2, option3 }}

Predefined Variables

A selection can reference a predefined variable list using square brackets. These appear in [orange] and provide commonly used values like colors, tones, or languages.

{{Tone: [tones] }}

Custom Selection Lists

You can also provide an inline list of choices separated by commas.

{{Format: bullet points, paragraphs, numbered list }}
💡

Tip: You don't need the PUCO app to use these prompts! Simply copy the template and replace each {{…}} section with your own text directly in ChatGPT, Claude, Gemini, or any other AI assistant.