CursorAI/Forum/24/10/Generate PR description from PR diff
Properties
- date-created
- 2024/10
- logseq-created-time-year
- 20/2/4
- Person/Deniz Gokcin
- My Notes
- Deniz has some great tips here on how to use FabricAI
- not sure how much prompting you are OK with doing but I am sure you can do it by modifying my existing prompt, push it to a git repo, crawl it with cursor’s doc crawling feature and use it as:
@create-description @PR Diff
- I am generating my prs and commits on a daily basis with the prompts in that are included in that repository which are crawled with the docs feature. and yes you just reference the crawled doc with @ and than add whatever you want as additional context.
- To answer your other question about easier ways of prompting in cursor, when I discovered this usage, cursor did not have the notepads feature so you can accomplish the same result by creating a notepad(
cmd + shift + p → Notepad: Create and Open New Notepad) and than reference it with @ with the same name if you want simplify the process. However I like putting my prompts under version control so thats why I have not changed my approach. - On an unrelated note about creating custom prompts in an easy way, I have a #Tip for you.
- There is an amazing CLI tool called FabricAI which is like a huge collection of amazing prompts that you can use with local/cloud LLMs.
- One specific pattern there gave me inspiration to use the create_pattern pattern and create this prompt in my repo that just creates prompts.
- So what you can do is to add the prompt generator prompt to a notepad, name it as
generate-prompt and than when you want to create a new prompt, mention it with @generate-prompt <what you want your prompt to do in plain text english> and than paste the nicely formatted markdown output to a new prompt and use it.
- So with GitHub/CLI, you can create PRs, through your terminal. You can combine this with advanced prompting and make cursor output the github cli command that creates the PR. Here is an example that uses this prompt and claude-3.5-sonnet to create this pr. The trick is to force cursor to output the cli command under backticks and bash as the language so that the play icon appears and you just click and boom!
