💻 Coding & Development

Auditor de Código Python: Nivel Senior (Salida en Español)

📁 Coding & Development 👤 Contributed by @krawlerdis@gmail.com 🗓️ Updated
The prompt
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}

How to use this prompt

Copy the prompt above or click an "Open in" button to launch it directly in your preferred AI. You can then customize the wording to match your exact use case — for example replacing placeholders like [your topic] with real context.

Which AI model works best

Claude Opus 4 and Sonnet 4.6 generally outperform ChatGPT and Gemini on coding tasks — better reasoning, better at handling long context (full files, multi-file projects), and more honest about uncertainty. ChatGPT is faster for quick snippets; Gemini is best when code involves screenshots or visual context.

How to customize this prompt

Swap the language mentioned in the prompt (Python, JavaScript, etc.) for whichever stack you're on. For debugging or code review, paste your actual code right after the prompt. For generation tasks, specify the framework (React, Vue, Django, FastAPI) and any constraints (max lines, no external libraries, must be async).

Common use cases

  • Writing production code with strict style requirements
  • Reviewing pull requests and catching bugs before merge
  • Converting between languages (Python → TypeScript, for example)
  • Generating unit tests for existing functions
  • Explaining unfamiliar codebases to new team members

Variations

Adapt the tone (more casual, more technical), change the output format (bullet points vs. paragraphs), or add constraints (word limits, target audience).

Related prompts