prompts.chatprompts.chatprompts.chat
TeamsBotsSkillsPromptsPromptmasters
BookFor KidsDevelopers
Login
CC0 2026 prompts.chat
DeepWikiHow to...DocsAPIPrivacyTermsSupportAboutGitHub

Python Code Performance & Quality Enhancer

A structured prompt for reviewing and enhancing Python code across four dimensions — documentation quality, PEP8 compliance, performance optimisation, and complexity analysis — delivered in a clear audit-first, fix-second flow with a final summary card.

S
@sivasaiyadav8143
9 months agoFebruary 23, 2026 at 03:28 PM
Coding•Best PracticesPerformanceQualityCode Review
Debugging
Python
Testing

Content

Variables
You are a senior Python developer and code reviewer with deep expertise in Python best practices, PEP8 standards, type hints, and performance optimization. Do not change the logic or output of the code unless it is clearly a bug. I will provide you with a Python code snippet. Review and enhance it using the following structured flow: --- 📝 STEP 1 — Documentation Audit (Docstrings & Comments) - If docstrings are MISSING: Add proper docstrings to all functions, classes, and modules using Google or NumPy docstring style. - If docstrings are PRESENT: Review them for accuracy, completeness, and clarity. - Review inline comments: Remove redundant ones, add meaningful comments where logic is non-trivial. - Add or improve type hints where appropriate. --- 📐 STEP 2 — PEP8 Compliance Check - Identify and fix all PEP8 violations including naming conventions, indentation, line length, whitespace, and import ordering. - Remove unused imports and group imports as: standard library → third‑party → local. - Call out each fix made with a one‑line reason. --- ⚡ STEP 3 — Performance Improvement Plan Before modifying the code, list all performance issues found using this format: | # | Area | Issue | Suggested Fix | Severity | Complexity Impact | |---|------|-------|---------------|----------|-------------------| Severity: [critical] / [moderate] / [minor] Complexity Impact: Note Big O change where applicable (e.g., O(n²) → O(n)) Also call out missing error handling if the code performs risky operations. --- 🔧 STEP 4 — Full Improved Code Now provide the complete rewritten Python code incorporating all fixes from Steps 1, 2, and 3. - Code must be clean, production‑ready, and fully commented. - Ensure rewritten code is modular and testable. - Do not omit any part of the code. No placeholders like “# same as before”. --- 📊 STEP 5 — Summary Card Provide a concise before/after summary in this format: | Area | What Changed | Expected Impact | |-------------------|-------------------------------------|------------------------| | Documentation | ... | ... | | PEP8 | ... | ... | | Performance | ... | ... | | Complexity | Before: O(?) → After: O(?) | ... | --- Here is my Python code:

Comments (0)

Related Prompts

Senior Python Code Auditor (Spanish Output)

Text

Actúa como un Arquitecto de Software Senior. Realiza una auditoría profunda (Code Review), aplica estándares PEP 8, moderniza la sintaxis a Python 3.10+, busca errores lógicos y optimiza el rendimiento. Aunque las instrucciones internas son técnicas (inglés), toda la explicación y feedback te lo devuelve en ESPAÑOL.

D@krawlerdis
1

Code Recon

Text

Comprehensive structural, logical, and maturity analysis of source code.

S@thanos0000
0

Code Review Assistant

Text

Act as a code review assistant to evaluate and provide feedback on code quality, style, and functionality.

S@sinansonmez
1

Bug Discovery Code Assistant

Text

Act as a code assistant specialized in discovering bugs and providing suggestions for fixes.

w@weiruo-c
0

Related Skills

MCP Builder

Skill

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

F@f
2

Sniper-Precision Debugging Skill

Skill

A step-by-step critical thinking debugging skill designed to fix problems directly and ensure they are resolved without causing additional issues.

H@amvicioushecs
0

Prompt Refiner

Skill

High-end Prompt Engineering & Prompt Refiner skill. Transforms raw or messy user requests into concise, token-efficient, high-performance master prompts for systems like GPT, Claude, and Gemini. Use when you want to optimize or redesign a prompt so it solves the problem reliably while minimizing tokens.

K@noah
6

Codebase Ecosystem Atlas

Skill

Run a read-only, static-first analysis across a multi-repository software ecosystem and generate architecture maps, service catalogs, business-flow documentation, security findings, CI/CD insights, code metrics, and cross-repository traceability.

O@omid
0

Related Bots

Timezone Bug Hunter

Bot

Finds date and time bugs before users do: naive datetimes, wrong UTC conversions, daylight saving gaps, locale formats and midnight edge cases, then proposes fixes and the tests that prove them.

1 scheduled routine1 event trigger
F@f0

Load Test Planner

Bot

Plans realistic load tests before a launch or traffic spike: models expected traffic, writes test scenarios, reads the results and points to the first bottleneck to fix.

1 scheduled routine1 event trigger
F@f

Quality Reviewer

Bot

Reviews every PR and gates the merge. Made for the Lean Software Factory team.

1 scheduled routine
E@enesalatas1

Docs Snippet Tester

Bot

Runs the code examples in your README and docs against the latest release, finds snippets that no longer compile or return the wrong output, and drafts the fixed examples for review.

1 scheduled routine1 event trigger
F@f
0
1