banner
andrewji8

Being towards death

Heed not to the tree-rustling and leaf-lashing rain, Why not stroll along, whistle and sing under its rein. Lighter and better suited than horses are straw sandals and a bamboo staff, Who's afraid? A palm-leaf plaited cape provides enough to misty weather in life sustain. A thorny spring breeze sobers up the spirit, I feel a slight chill, The setting sun over the mountain offers greetings still. Looking back over the bleak passage survived, The return in time Shall not be affected by windswept rain or shine.
telegram
twitter
github

After developing the project with Cursor, I整理了10条提示词.

Start with the project framework and let AI help you lay the foundation! 🏗️#

Problem#

When building a project from scratch, it's often easy to get stuck due to lack of direction.

Experience#

Use Cursor to generate the project framework, from file structure to basic modules in one go!

Prompts#

  • Generate a Spring Boot project framework that supports REST API and database connections.
  • Design a front-end and back-end separated project structure, with Vue for the front end and Flask for the back end.
  • Generate a user authentication module that supports JWT, including database models.
  • Build a microservices architecture project, including interface specifications for order service and payment service.
  • Generate a TypeScript project template that supports ESM modularization.
  • Design a full-stack project that includes configuration files for Docker deployment.

Effect#

With a clear framework, starting the project becomes easier, and development efficiency increases dramatically! 🎯


The clearer the prompts, the smarter the AI! 🧠#

Problem#

Vague prompts lead to AI-generated code that does not meet expectations.

Experience#

When writing prompts, be specific and clear; the more detailed the requirements, the more accurate the results!

Prompts#

  • Implement a multi-threaded crawler program in Python, including URL deduplication functionality.
  • Generate a REST API service based on Express.js that supports pagination queries.
  • Rewrite the following code to optimize the time complexity to O(n log n).
  • Generate a user registration function with a unit test coverage of no less than 90%.
  • Implement a function to calculate the median of an array, supporting input validation.
  • Create a simple WebSocket chat application using TypeScript.

Effect#

Clear prompts help the AI better understand your needs, making development more efficient! ✅


Delegate repetitive tasks to AI and focus more! 🎛️#

Problem#

Generating mock data and interface documentation is time-consuming and tedious.

Experience#

Let Cursor handle these tasks automatically, saving time and focusing on core development!

Prompts#

  • Generate interface documentation for the user service, including request parameters and return value descriptions.
  • Create mock data for the order service, including JSON format examples.
  • Generate Swagger API documentation comments for the following code.
  • Create a utility function that supports randomly generated test data, using JavaScript.
  • Create a Postman collection file that includes the following interface definitions.
  • Generate database migration scripts to add associations between the user table and the order table.

Effect#

Delegate repetitive tasks to AI and save time for more important things!


Optimize code performance to make programs run faster! 🔄#

Problem#

Insufficient code performance and repetitive logic.

Experience#

Use Cursor to analyze and optimize code, improving performance while learning more elegant writing methods!

Prompts#

  • Optimize the following code snippet to reduce memory usage and improve execution speed.
  • Refactor the code to remove duplicate logic and enhance maintainability.
  • Add index optimization suggestions for the following SQL queries.
  • Rewrite the following Python script to support multi-process acceleration.
  • Rewrite the code in an object-oriented manner to enhance extensibility.
  • Convert the following code to asynchronous mode to reduce I/O blocking.

Effect#

Programs run faster and more stably, significantly improving user experience!


Don't panic when encountering new technologies; Cursor helps you find resources! 🔍#

Problem#

Not knowing where to start when learning new technologies.

Experience#

Quickly query documentation and example code using Cursor to get started easily!

Prompts#

  • Generate introductory tutorial code for WebGL that renders a simple triangle.
  • Learn about Flask's routing capabilities and generate example code.
  • Generate complete code for your first classification model using TensorFlow.
  • Implement an Android application with login functionality, using Kotlin.
  • List the core concepts of Kubernetes and generate a Deployment example.
  • Implement basic permission management functionality using Spring Security.

Effect#

Quickly get started with new technologies, with no pressure from learning to practice!


Let AI help you write test cases, saving time and effort! 🧪#

Problem#

Test cases are numerous and complex, and writing them by hand is too time-consuming.

Experience#

Let Cursor automatically generate test cases, significantly improving coverage and compliance!

Prompts#

  • Generate unit tests for the following code, with coverage of no less than 90%.
  • Generate test cases based on Jest to test user login functionality.
  • Analyze the following code to identify uncovered test branches.
  • Write test cases using Pytest to test the data processing module.
  • Generate integration tests to simulate various exceptional scenarios of the API.
  • Create a test report template that includes pass rates and error details.

Effect#

Automating the testing process leads to more efficient development and better quality assurance!


Modular development makes projects clearer! 🚀#

Problem#

Developing large features is complex and can easily become chaotic.

Experience#

Use Cursor to break down project modules, reducing complexity and enhancing development efficiency!

Prompts#

  • Design the basic structure of the user module, supporting CRUD operations.
  • Generate separate code for the service layer and controller of the order module.
  • Design the payment module using a microservices architecture, supporting reconciliation functionality.
  • Design separate database tables and relationships for the following functional modules.
  • Generate a modular logging system that supports multiple log levels.
  • Design a pluggable plugin module that supports dynamic loading.

Effect#

Development becomes clearer, and team collaboration is more efficient!


Refactoring old projects, AI lends you a helping hand! 🛠️#

Problem#

Taking over an old project with outdated code and chaotic logic.

Experience#

Use Cursor to analyze old code and generate a compatibility-rich refactoring plan!

Prompts#

  • Upgrade the following code to the latest version of the framework syntax.
  • Analyze the technology stack of the old project and generate a migration plan to the new framework.
  • Optimize the indexing strategy for outdated SQL queries.
  • Migrate a Koa 1.x project to Koa 2.x and support middleware.
  • Refactor the following code to improve unit test coverage.
  • Generate a compatibility module that supports old version APIs.

Effect#

Old projects are revitalized, and delivery speed is significantly improved!


Multi-modal development makes products cooler! ✨#

Problem#

Low efficiency in design and code integration, with a lot of repetitive work.

Experience#

Use Cursor's multi-modal capabilities to generate code directly from design diagrams!

Prompts#

  • Generate HTML and CSS files based on design diagrams, supporting responsive layouts.
  • Use Tailwind CSS to implement the style design for the following page.
  • Convert Figma design diagrams into React component code.
  • Generate dark mode style code for the following pages.
  • Generate Material-UI style form components that support form validation.
  • Create a card component to display the content style of the design diagram.

Effect#

Front-end development efficiency increases dramatically, greatly enhancing user experience!


Encountering performance bottlenecks? Let AI help you optimize! 🚀#

Problem#

Insufficient project performance, but issues are hard to locate.

Experience#

Use Cursor to pinpoint performance issues and generate optimization plans!

Prompts#

  • Analyze the following code to identify performance bottlenecks.
  • Optimize I/O operations to improve data processing speed.
  • Reduce time complexity for the following loop logic.
  • Generate a performance comparison table showing time differences before and after optimization.
  • Replace blocking code with asynchronous methods to enhance concurrency.
  • Improve the execution efficiency of the following SQL queries to avoid full table scans.

Effect#

Performance improves by 40%, and the project runs faster and more stably!

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.