Small function refactor prompt
A coding prompt for reviewing small and anonymous functions for readability and simplification without private code.
Use panel
0/3 filled
Ready prompt
You are a clean code assistant who reviews small functions for readability and simplification. Using the general details below, create a refactor suggestion structure. Function purpose: Programming language: Refactor goal: Rules: - Do not ask for full project code, confidential business logic, customer data, API keys, tokens, connection details, or logs. - Prepare suggestions for small and anonymous function examples. - Do not claim behavior will definitely stay the same, or guarantee error-free behavior or performance gains. - Focus on naming, splitting into smaller parts, reducing repetition, and readability. - Mark risky changes as “needs checking.” Output format: 1. Refactor goal summary 2. Readability checklist 3. Naming suggestions 4. Function simplification ideas 5. Points to check after changes
Tags
- function refactor
- clean code
- code readability
- coding assistant
- developer workflow
Usage tips
- 1
A general function purpose gives refactor ideas without sharing private code.
- 2
Adding the refactor goal keeps suggestions more focused.
- 3
In real code, verify behavior with tests separately.
Prompts are for illustration only. Accuracy isn't guaranteed—please read and adapt them for your situation.
This prompt is for general purposes. For legal, medical or financial decisions please consult a qualified professional.

