Retext
Refactoring

Senior Python Code Auditor in Spanish Prompt

Sets the AI up as a Senior software architect and Python expert. It's for developers. Use it at the start of a task, before you write the code by hand.

Installs as a snippet — type ;senior-python to paste this prompt anywhere on your Mac.
Prompt Template
Act as a Senior Software Architect and Python expert. You are tasked with performing a comprehensive code audit and complete refactoring of the provided script.

Your instructions are as follows:

### Critical Mindset
- Be extremely critical of the code. Identify inefficiencies, poor practices, redundancies, and vulnerabilities.

### Adherence to Standards
- Rigorously apply PEP 8 standards. Ensure variable and function names are professional and semantic.

### Modernization
- Update any outdated syntax to leverage the latest Python features (3.10+) when beneficial, such as f-strings, type hints, dataclasses, and pattern matching.

### Beyond the Basics
- Research and apply more efficient libraries or better algorithms where applicable.

### Robustness
- Implement error handling (try/except) and ensure static typing (Type Hinting) in all functions.

### IMPORTANT: Output Language
- Although this prompt is in English, **you MUST provide the summary, explanations, and comments in SPANISH.**

### Output Format
1. **Bullet Points (in Spanish)**: Provide a concise list of the most critical changes made and the reasons for each.
2. **Refactored Code**: Present the complete, refactored code, ready for copying without interruptions.

Here is the code for review:

[codigo]

Source: awesome-chatgpt-prompts (CC0).

How to use this prompt

  1. 1

    Copy the prompt

    Use the copy button, or type its Retext trigger in any app to paste it.

  2. 2

    Open your AI assistant

    Start a new chat in ChatGPT, Claude, Gemini or the assistant you use.

  3. 3

    Fill in the details

    Replace any [bracketed] parts with your own details.

  4. 4

    Check and refine

    Read the answer, then reply with one change at a time.

Tips for better results

  • •Fill in [codigo] before you send it. The rest of the prompt depends on those details.
  • •Expect a bulleted list. Name the exact columns, fields or sections you want so you can paste the result straight into your own document.
  • •To steer the Senior software architect and Python expert, add one line after the prompt about your situation: your level, your goal and anything to avoid.

Get the free prompt pack

Our best coding prompts in one Markdown file, delivered by email. The templates here stay free either way — the pack just saves you the copying.

Variations

Context first

Add this line at the end: Before you start, ask me up to three questions about what I need from the Senior software architect and Python expert and wait for my answers.

Second opinion

Add this line: After your answer, list two things a skeptical Senior software architect and Python expert would question about it, and how you would address them.

Save it as a Retext snippet

Retext is a free text expander for Mac. Save this prompt once, then type ;senior-python in any app (ChatGPT, Claude, your editor, a browser tab) and the full prompt is pasted in.

  1. Click Add to Retext. The prompt installs as a snippet with the trigger ;senior-python.
  2. Change the trigger in Retext if you prefer a different one.
  3. Type the trigger wherever you want the prompt, then fill in the brackets.

Frequently asked questions

What does the Senior Python Code Auditor in Spanish prompt do?

Sets the AI up as a Senior software architect and Python expert. It's written for developers.

Which AI tools does it work with?

It's plain text, so it works in any chat assistant, including ChatGPT, Claude and Gemini. Paste it as the first message of a new chat.

What do I need to fill in?

Replace [codigo] with your own details. Leave the rest as it is unless you want to change how the AI answers.

Can I save this prompt as a snippet?

Yes. Click Add to Retext and it installs as a snippet with the trigger ;senior-python. Type that in any Mac app to paste the full prompt.

Related Templates

Get the free prompt pack

Our best coding prompts in one Markdown file, delivered by email. The templates here stay free either way — the pack just saves you the copying.