Refactor Code
Description
This prompt turns ChatGPT into a code refactoring expert to provide clean and concise code, improving maintainability. It helps the user by making code easier to read and modify.
Prompt Details
[Copy Prompt]
“You are a Clean Code expert, I have the following code, please refactor it in a more clean and concise way so that my colleagues can maintain the code more easily. Also, explain why you want to refactor the code so that I can add the explanation to the Pull Request. [attach code]”
After using, you will have the right to edit the reminder to create your own version.
Update: 10/03/2023 08:38:22
Comments
Prompt Details
In the reminder, you will find places marked with two brackets "[]" or "<>", where you will replace the input information with similar content, and then delete the brackets after your content has been replaced.
The output content example returned from the A.P.I will therefore be shorter and less expressive than when you use live chat with GPT.
![Refactor Code Output](https://static.chat-prompt.com/image-prompt/refactor-code-Example.jpeg)
![Enhancing Prompt Engineering for ChatGPT: A New AI's Role](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fassets-global.website-files.com%2F64808cc9f88d76f4355b870a%2F658ed9e67bd9a5c089812669_Open%2520graph_Bundle.webp?table=block&id=7e9fd88a-02c6-4fc4-a5a9-a222bd9bda2f&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=500&userId=&cache=v2)
Enhancing Prompt Engineering for ChatGPT: A New AI's Role
![6 Expert ChatGPT Prompts: Creating AWS CloudFormation templates](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F39b97c46-8fb5-4c1e-a149-277ce7289fdc%2FUntitled.png?table=block&id=56609be3-0ae1-449a-aac8-732315c6aa8e&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=1720&userId=&cache=v2)
6 Expert ChatGPT Prompts: Creating AWS CloudFormation templates
![UI/UX Design Prompts](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F31daba85-b348-4c1f-95de-f68a5f6f3267%2F3cc81704-9ead-429f-9248-e71545d69bbc%2Fgodofprompt_Landing_Page_Website_UIUX_Learning_LMS_DOJO_Cyberpu_dee2913f-e305-4a99-9389-981e86fab1ef.png?table=block&id=012fb0fe-1e17-4315-8988-016eef10d699&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=2000&userId=&cache=v2)
UI/UX Design Prompts
![6 Advanced ChatGPT Prompts: Write website page speed optimization](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fd2586912-d8bf-44a6-8caa-ca6831b6cac1%2FUntitled.png?table=block&id=874b8464-e1ca-4a5b-80e5-77293936890b&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=1120&userId=&cache=v2)
6 Advanced ChatGPT Prompts: Write website page speed optimization
![Enhancing ChatGPT Prompts: Rise of the AI Prompt Engineer](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fassets-global.website-files.com%2F64808cc9f88d76f4355b870a%2F658ed9e67bd9a5c089812669_Open%2520graph_Bundle.webp?table=block&id=1cca6f93-715d-4a57-86f8-559774b20cf2&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=500&userId=&cache=v2)
Enhancing ChatGPT Prompts: Rise of the AI Prompt Engineer
![](https://firebasestorage.googleapis.com/v0/b/promptbase.appspot.com/o/DALLE_IMAGES%2FWSH6vlRZD38yZ4rbCzxk%2Fresized%2F1674884007142_400x200.png?alt=media&token=ba2ac9a1-fc18-445d-b34d-ba3a286392bd)
68 Expert ChatGPT Prompts: JavaScript and SEO
![9 Strategic ChatGPT Prompts: Visualizing Internal Linking with ChatGPT](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fsearchengineland.com%2Fwp-content%2Fseloads%2F2023%2F08%2FChatGPT-code-interpreter-Relationship-between-anchor-text-and-link-placement.png.webp?table=block&id=d643de1d-3a00-4043-b76d-60d374ee8c11&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=1400&userId=&cache=v2)
9 Strategic ChatGPT Prompts: Visualizing Internal Linking with ChatGPT
![Improving Prompt Engineering for ChatGPT: The Role of AI in Professional Prompt Design](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fassets-global.website-files.com%2F64808cc9f88d76f4355b870a%2F658ed9e67bd9a5c089812669_Open%2520graph_Bundle.webp?table=block&id=88cbfd2f-7cbe-44f2-9082-b96ce1fd0a9a&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=500&userId=&cache=v2)
Improving Prompt Engineering for ChatGPT: The Role of AI in Professional Prompt Design
![Enhancing Prompt Generation for ChatGPT: A New AI Approach](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fassets-global.website-files.com%2F64808cc9f88d76f4355b870a%2F658ed9e67bd9a5c089812669_Open%2520graph_Bundle.webp?table=block&id=d2f803f1-a4d7-44c2-909c-602ae0c9a37a&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=500&userId=&cache=v2)
Enhancing Prompt Generation for ChatGPT: A New AI Approach
![6 Strategic ChatGPT Prompts: Writing Git commit messages](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F49c17029-1ff5-4e4c-a133-a4536d0208a0%2FUntitled.png?table=block&id=c1e85fc3-d97a-4988-96f4-aebf9a6872b7&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=1540&userId=&cache=v2)
6 Strategic ChatGPT Prompts: Writing Git commit messages
![6 Advanced ChatGPT Prompts: Writing code comments](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F38d3c75d-d42b-45b0-85a1-994a2811efb1%2FUntitled.png?table=block&id=f2e8479f-c4dc-4595-a942-13a243711dca&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=1700&userId=&cache=v2)
6 Advanced ChatGPT Prompts: Writing code comments
![360° Degrees Environments](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fmagnific.ai%2Fback_socialnetworks.jpg?table=block&id=7c0d6d30-ae2c-41e4-9ccd-aa3ff85b90e1&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=500&userId=&cache=v2)
360° Degrees Environments
![NFTs](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F31daba85-b348-4c1f-95de-f68a5f6f3267%2F76e91534-08fc-4bd1-8265-84873ec47839%2Fgodofprompt_A_mystical_forest_elf_art_by_Gary_Vaynerchuk_NFT_pr_8d15c9ff-8947-45be-8959-c9c9ebbb8c27.png?table=block&id=049d1a98-6e24-47a1-bf5e-3f84932afe0c&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=2000&userId=&cache=v2)
NFTs
![6 Expert ChatGPT Prompts: Developing Chatbot Conversation Flows](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F31daba85-b348-4c1f-95de-f68a5f6f3267%2Fcdcdb5a7-9458-41cb-8f22-410c343337bc%2FDeveloping_Chatbot_Conversation_Flows.png?table=block&id=3cc62570-c4e3-4535-ab46-fd5d1c18437c&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=1410&userId=&cache=v2)
6 Expert ChatGPT Prompts: Developing Chatbot Conversation Flows
![AI Writing Assistant: An Intelligent Tool for Improving Text Structure, Style, and Coherence](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F31daba85-b348-4c1f-95de-f68a5f6f3267%2F8a7027da-2103-429b-8d72-f682a9c322c0%2FAI_Writing_Assistant-_An_Intelligent_Tool_for_Improving_Text_Structure_Style_and_Coherence.png?table=block&id=201741fc-98a4-4430-8e58-c8a770e26ac8&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=1410&userId=&cache=v2)
AI Writing Assistant: An Intelligent Tool for Improving Text Structure, Style, and Coherence
![Enhancing Prompt Engineering for ChatGPT: Unleashing the Power of Advanced AI Algorithms](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fassets-global.website-files.com%2F64808cc9f88d76f4355b870a%2F658ed9e67bd9a5c089812669_Open%2520graph_Bundle.webp?table=block&id=a85ba12f-3ccb-4f5a-8734-4807e8af04b9&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=500&userId=&cache=v2)
Enhancing Prompt Engineering for ChatGPT: Unleashing the Power of Advanced AI Algorithms
![6 Expert ChatGPT Prompts: Crafting custom CRM integrations](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F31daba85-b348-4c1f-95de-f68a5f6f3267%2Fd0a96aad-3dc3-4c86-a19c-c702b798c685%2FCrafting_custom_CRM_integrations.png?table=block&id=4e15b876-1b6d-4899-8c90-847f3a5ef114&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=1410&userId=&cache=v2)
6 Expert ChatGPT Prompts: Crafting custom CRM integrations
![](https://firebasestorage.googleapis.com/v0/b/promptbase.appspot.com/o/DALLE_IMAGES%2FWSH6vlRZD38yZ4rbCzxk%2Fresized%2F1674884007142_400x200.png?alt=media&token=ba2ac9a1-fc18-445d-b34d-ba3a286392bd)
5 Advanced ChatGPT Prompts: Optimize website speed
![7 Advanced ChatGPT Prompts: Add Google Maps integration](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fc10d8219-53ea-4150-8089-f0b9951e22b8%2FUntitled.png?table=block&id=3088dfba-94ed-43fc-a5b0-4b5f582a559f&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=1250&userId=&cache=v2)
7 Advanced ChatGPT Prompts: Add Google Maps integration
![](https://firebasestorage.googleapis.com/v0/b/promptbase.appspot.com/o/DALLE_IMAGES%2FWSH6vlRZD38yZ4rbCzxk%2Fresized%2F1674884007142_400x200.png?alt=media&token=ba2ac9a1-fc18-445d-b34d-ba3a286392bd)
5 Proven ChatGPT Prompts: Develop custom widgets
![6 Strategic ChatGPT Prompts: Choose CMS platform](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fe18d9875-8d3f-4279-84fa-b39db20a2b8f%2FUntitled.png?table=block&id=67b39e2d-32c2-4adb-bbac-869332385887&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=1490&userId=&cache=v2)
6 Strategic ChatGPT Prompts: Choose CMS platform
![6 Advanced ChatGPT Prompts: Create homepage layout](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fda3d6483-68fa-4887-897b-e31d20bb33b1%2FUntitled.png?table=block&id=5d78efe0-041c-4290-907d-e7d4007a423a&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=1690&userId=&cache=v2)
6 Advanced ChatGPT Prompts: Create homepage layout
![6 Expert ChatGPT Prompts: Develop subscription feature for newsletter](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F4cb3069f-b265-4d92-b16c-9df8646cada7%2FUntitled.png?table=block&id=e6b91cf3-124e-48f4-953d-e105cee273a2&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=1500&userId=&cache=v2)
6 Expert ChatGPT Prompts: Develop subscription feature for newsletter
![](https://firebasestorage.googleapis.com/v0/b/promptbase.appspot.com/o/DALLE_IMAGES%2FWSH6vlRZD38yZ4rbCzxk%2Fresized%2F1674884007142_400x200.png?alt=media&token=ba2ac9a1-fc18-445d-b34d-ba3a286392bd)
9 Expert ChatGPT Prompts: Coding Mega-Prompts [NEW]
![6 Innovative ChatGPT Prompts: Set up payment gateway](https://godmodechatgpt.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fdd1a8628-592b-48fd-9e02-462d12ee6fe0%2FUntitled.png?table=block&id=d47db81f-d6cb-4946-ae60-57cbf11a050a&spaceId=31daba85-b348-4c1f-95de-f68a5f6f3267&width=1500&userId=&cache=v2)