
开发者专用ChatGPT提示集合
项目收录了多种开发者专用的ChatGPT提示,涉及代码重构、文档编写和bug修复等方面。这些提示不仅适用于程序员,也能帮助学生、营销人员和内容创作者提高工作效率。通过使用这些提示,可以更好地利用ChatGPT解决各类编程问题,激发创新思维。
Welcome to my personal collection of ChatGPT prompts for developers! 🙌
This repository contains a list of powerful ChatGPT prompts that can help you get the creative juices flowing. 💡 Whether you are a beginner or an experienced pro, these prompts can help you think outside the box and find new solutions to problems. 🚀
The list is divided into categories: [ prompts for coders, students, marketers, and content writers ]. So no matter your profession, there is something here for everyone! 😊 Let’s dive right into these powerful ChatGPT prompts that can help take your creativity to the next level! 🌊
Prompts for Coders
Like many things in life, with GPT-4, you get out what you put in. In this case, providing more context, instructions, and guidance will usually produce better results.
Here are some tips and techniques to improve:
Split your prompts: Try breaking your prompts and desired outcome across multiple steps. Keeping prompts to have a single outcome has shown to produce better results than combined prompts. For example, ask for a review, then ask for a refactor based on the review response. This may become less important in time as LLMs increase their token limit.
Give Examples: Provide expected inputs, data and outputs to improve accuracy quality. 📝
Be Specific: Don’t be afraid to list exactly what you want, what you know, what is needed, and what not to include. 🔎
Ask it to Reflect: A technique called reflexion has been shown to increase GPT4’s accuracy. Basically ask it ‘Why were you wrong?’ or get it to reflect and review its own response. 🤔
can be used to update, refactor, and review a piece of code. A well-designed set of prompts is one where each has separated concerns and singular responsibilities.
by getting GPT-4 to re-write your code into the style you want. This step will generally result in coherent output, in the style you want, but may introduce errors, so we do it first.
Prompt:
Review the following code and re-write it to modern es6 programming standards and formatting:
[insert code here]
Get recommendations to improve any logical or security concerns introduced. It’s important that we don’t ask for a refactor, just the reasoning behind wanting the refactor.
Prompt:
Review your provided code 'tempFunction' for any logical or security concerns and provide a list of recommendations.
Validate the provided recommendations. Reflexion is a powerful technique to improve the accuracy of the initial recommendations and try to eliminate any hallucinations. This is not always required but it is worth asking if you are unsure about any recommendations.
Prompt:
Review your above recommendations. Tell me why you were wrong and if any recommendations were overlooked or incorrectly added?
Combine your reviews, recommendations and feedback to get GPT-4 to write your new function.
Prompt:
Re-write the 'tempFunction' function based off your review and recommendations.
Create some simple tests that we can run locally and validate the results
Prompt:
Create two [ define technology ] tests for the above 'tempFunction' function. One that is expected to pass and one that is expected to fail.
Let's see if we can get GPT4 to make or average prompts and turn them into "voyage inspirant" type mastery prompts.
Prompt:
[your prompt]
Re-write the above text to be more verbose and include a lot of superfluous description about each thing, use very painting language.
<sup>⬆️ Back to table of contents</sup>
Prompt:
I'll provide a chatGPT prompt. You'll ask questions to understand the audience and goals, then optimize the prompt for effectiveness and relevance using the principle of specificity.
<sup>⬆️ Back to table of contents</sup>
If you're not satisfied with your solution you can ask to ChatGPT to give you alternatives
Prompt:
I'll provide you with a piece of code that I made and
I need you give me alternatives to do the same in other way:
[INSERT YOUR CODE HERE]
<sup>⬆️ Back to table of contents</sup>
[!NOTE] Adding documentation requires creating clear and comprehensive explanations of a module’s purpose, design, and implementation.
Prompt 1#:
I don't know how to code, but I want to understand how this works. Explain the following code to me in a way that a non-technical person can understand. Always use Markdown with nice formatting to make it easier to follow. Organize it by sections with headers. Include references to the code as markdown code blocks in each section. The code:
[insert code here]
Prompt 2#:
Please add comprehensive documentation for [file or module name], including clear and concise explanations of its purpose, design, and implementation. Consider including examples of how to use the module, as well as any relevant diagrams or flow charts to help illustrate its workings. Ensure that the documentation is easily accessible to other developers and is updated as the module evolves. Consider using documentation tools such as inline comments, markdown files, or a documentation generator to simplify the process.
[insert code here]
<sup>⬆️ Back to table of contents</sup>
Prompt:
Create terms and services for my website about an [AI tool] called [name].
<sup>⬆️ Back to table of contents</sup>
Prompt:
Write a cheat sheet for [markdown formatting].
<sup>⬆️ Back to table of contents</sup>
Prompt:
Generate documentation for the code below. You should include detailed instructions to allow a developer to run it on a local machine, explain what the code does, and list vulnerabilities that exist in this code.
[enter code]
<sup>⬆️ Back to table of contents</sup>
Prompt:
Write a detailed blog on How to build a [COVID tracker] using React with proper structuring of code.
<sup>⬆️ Back to table of contents</sup>
[!NOTE] Don't spend time trying to figure out how code works, just ask ChatGPT to explain it to you
Prompt:
Context: I'm starting a new position as backend developer and I have to start to understand how some functions are working
Technologies: [INSERT YOUR TECHNOLOGIES HERE]
You have to: explain me the code line by line
[INSERT YOUR CODE HERE]
<sup>⬆️ Back to table of contents</sup>
[!NOTE] Create a diagram of your architecture using Mermaid
Prompt:
Write the Mermaid code for an architecture diagram for this solution [DESCRIBE SOLUTION]
Example:
graph TD; A[Client] -->|HTTP Request| B(API Gateway); B -->|HTTP Request| C[Service 1]; B -->|HTTP Request| D[Service 2]; C -->|Database Query| E[Database]; D -->|Database Query| E;
<sup>⬆️ Back to table of contents</sup>
[!NOTE] Create an entity relationship diagram using Mermaid
Prompt:
Write the Mermaid code for an entity relationship diagram for these classes [INSERT CLASSES]
<sup>⬆️ Back to table of contents</sup>
[!NOTE] Ask to ChatGPT to refactor your code
Prompt:
I have a piece of code and I need you do a refactor of it:
[INSERT YOUR CODE HERE]
Refactoring code is an essential process in software development that aims to improve the quality, readability, and maintainability of existing code without altering its functionality. Refactoring can enhance code efficiency, reduce errors, and make it easier to modify or extend in the future. With ChatGPT’s help, you can effectively refactor your code and achieve a better code structure.
<sup>⬆️ Back to table of contents</sup>
[!NOTE] By providing your old function to GPT-4 and asking it to refactor it to modern coding practices, you can quickly modernize your code.
Prompt:
Refactor the following code to modern es6 programming standards:
[INSERT YOUR CODE HERE]
<sup>⬆️ Back to table of contents</sup>
[!NOTE] If you have a long function that is doing too much, you can ask GPT-4 to refactor it into multiple methods.
Prompt:
Refactor the following code into multiple methods to improve readability and maintainability:
[INSERT YOUR CODE HERE]
<sup>⬆️ Back to table of contents</sup>
[!NOTE] If you have a function that is taking too long to run, you can ask GPT-4 to refactor it to improve performance.
Prompt:
Refactor the following code to improve performance:
[INSERT YOUR CODE HERE]
<sup>⬆️ Back to table of contents</sup>
Prompt:
Add a parameter to this function to do [FUNCTIONALITY]
[INSERT YOUR CODE HERE]
<sup>⬆️ Back to table of contents</sup>
[!NOTE] Let ChatGPT rewrite the code for you according to style guidelines.
Prompt:
Rewrite the code below following the Google style guidelines for javascript.
[INSERT YOUR CODE HERE]
<sup>⬆️ Back to table of contents</sup>
[!NOTE] If your organization or code base uses specific coding practices and styles that you want to maintain, you can provide instructions to GPT-4 on which particular coding practice or style you’d like it to focus on.
Prompt:
Review the following code and refactor it to make it more DRY and adopt the SOLID programming principles.
[INSERT YOUR CODE HERE]
<sup>⬆️ Back to table of contents</sup>
[!NOTE] Sometimes we are unaware of the vulnerabilities or potential issues our code can create. Having GPT-4 review and address code issues can save you more than just time.
Prompt 1#:
Review this code for errors and refactor to fix any issues:
[INSERT YOUR CODE HERE]
Prompt 2#:
I'm developing software in [INSERT YOUR TECHNOLOGIES HERE] and I need you help me to find and
fix all the errors in my code, following the best practices. I'll provide you my code
and you'll give me the code with all the corrections explained line by line
Prompt 3#:
I wrote this code [CODE] I got this error [ERROR] How can I fix it? or What does this error mean?
<sup>⬆️ Back to table of contents</sup>
[!NOTE] This process typically involves identifying the source of the error, understanding the issue, and implementing a solution to resolve the issue
Prompt:
Please find and fix the bug in the [component name] component that is causing [describe the issue].
[INSERT YOUR CODE HERE]
<sup>⬆️ Back to table of contents</sup>
[!NOTE] Unit tests are automated tests that check the behavior of individual units of code in isolation. They help catch bugs early and make it easier to maintain the code.
Prompt 1#:
Please write unit tests for [file or module name] to ensure its proper functioning
[insert code here]
Prompt 2#:
Create 2 unit tests for the provided code. One for a successful condition and one for failure.
<sup>⬆️ Back to table of contents</sup>


字节旗下AI内容创作Agent
小云雀是字节跳动旗下剪映团队推出的AI内容创作Agent,主打”一句话打造一个爆款”的零门槛创作体验。用户只需输入一句指令,可自动生成15-60秒短视频、数字人口播视频、风格化海报等内容,支持200+可商用数字人形象和19种语言及方言。小云雀核心功能包括智能成片、AI设计、照片会说话、爆款复刻等,已接入豆包大模型、DeepSeek Chat及自研Seedance 2.0视频生成模型、Seedream 5.0图像生成模型。目前支持安卓APP和网页版,每日登录可领取120积分。适合自媒体创作者、电商营销人员、教育工作者及普通用户使用,近期因用户量激增,视频生成排队时长可达8小时。


字节跳动旗下 AI 智能助手
字节跳动旗下 AI 智能助手

一站式AI短剧创作平台
Pixmax专注打造下一代“ AI 视觉创作引擎”,整合行业顶尖 AI 大模型、工工业级精准控制及企业级协同管理功能,是全方位的 AI 内容创作平台。


GPT充值
支持 ChatGPT Plus / Pro 充值服务,支付便捷,自动发货,售后可查。


AI 图片生成平台
GPT Image 2 是面向用户的 AI 图片生成平台,支持文生图、图生图及多模型创意工作流。


你的AI Agent团队
Vecbase 是专为 AI 团队打造的智能工作空间,将数据管理、模型协作与知识沉淀整合于一处。算法、产品与业务在同一平台无缝协同,让从数据到 AI 应用的落地更快一步。


全球首个AI音乐社区
音述AI是全球首个AI音乐社区,致力让每个人都能用音乐表达自我。音述AI提供零门槛AI创作工具,独创GETI法则帮助用户精准定义音乐风格,AI润色功能支持自动优化作品质感。音述AI支持交流讨论、二次创作与价值变现。针对中文用户的语言习惯与文化背景进行专门优化,支持国风融合、C-pop等本土音乐标签,让 技术更好地承载人文表达。


阿里Qoder团队推出的桌面端AI智能体
QoderWork 是阿里推出的本地优先桌面 AI 智能体,适配 macOS14+/Windows10+,以自然语言交互实现文件管理、数据分析、AI 视觉生成、浏览器自动化等办公任务,自主拆解执行复杂工作流,数据本地运行零上传,技能市场可无限扩展,是高效的 Agentic 生产力办公助手。


一站式搞定所有学习需求
不再被海量信息淹没,开始真正理解知识。Lynote 可摘要 YouTube 视频、PDF、文章等内容。即时创建笔记,检测 AI 内容并下载资料,将您的学习效率提升 10 倍。


为AI短剧协作而生
专为AI短剧协作而生的AniShort正式发布,深度重构AI短剧全流程生产模式,整合创意策划、制作执行、实时协作、在线审片、资产复用等全链路功能,独创无限画布、双轨并行工业化工作流与Ani智能体助手,集成多款主流AI大模型,破解素材零散、版本混乱、沟通低效等行业痛点,助力3人团队效率提升800%,打造标准化、可追溯的AI短剧量产体系,是AI短剧团队协同创作、提升制作效率的核心工具。
最新AI工具、AI资讯
独家AI资源、AI项目落地

微信扫一扫关注公众号