Skip to content
thiswillbeyourgithub edited this page May 11, 2023 · 4 revisions

This is a collection of prompts and tips on how to use them in AI commands.

General tips

In most cases, a simple prompt like :AI check this code for bugs works just fine, but sometimes the response is not what is expected. Here are a few tips that might help:

  • Add more context to the prompt, e.g.: AI check this Rust code for bugs and code smells
  • Try a different model/command, e.g.: AIC check this Rust code for bugs and code smells
  • Get an alternative suggestion by running :AIR

Prompts

Here are some examples of simple prompts and instructions that could inspire you and help improve your development workflow. The <> symbol denotes a visual selection.

Feel free to share your prompts and let's all improve together!

General programming

   :AI how to concat arrays in python?
<>:AIE simplify
 <>:AI explain
 <>:AI find bugs and code smells
 <>:AI complete a TODO comment
 <>:AI generate a unit test
 <>:AI create docummentation for this function
   :AI generate 5 sample users, store it python array
   :AI generate a paragraph of lorem ipsum
 <>:AI suggest optimization for this sql query
   :AI generate a user profile React component
<>:AIE values of this JSON are English labels, translate it to Spanish
<>:AIE generate an sql migraton from the changes below

Data transformation

<>:AIE make this a json
<>:AIE make this an sql table
<>:AIE make this a typescript enum
<>:AIE transform this python code to js
<>:AIE make a fetch request from this curl command

Natural language

<>:AIE fix grammar and spelling
<>:AIE reformulate
<>:AIE create a markdown documentation from the bullet point list
 <>:AI what is the sentiment of this text?
   :AI write a promotion text for my product that does this and that
 <>:AI translate this text to English
Clone this wiki locally