Elffuss BraidHub

kikocis/continue public

9c134d8c1202 · 2.3 KiBRawPermalink
1---
2title: "Creating Custom Prompts in Continue"
3description: "Learn how to create reusable prompt files in Continue to streamline repetitive tasks, including examples for code reviews, security checks, and entity generation"
4---
5
6Prompts are reusable instructions that can be referenced at any time during chat. They are especially useful as context for repetitive and/or complex tasks.
7
8<Info>
9 Prompts were previously defined in a `.prompt` file format, but for
10 consistency we now recommend using the same Markdown format as
11 [rules](./rules) and adding `alwaysApply: false` to the frontmatter so
12 that they are manually triggered.
13</Info>
14
15## Quick Start: How to Create Your First Prompt File
16
17Below is a quick example of setting up a prompt file:
18
191. Create a folder called `.continue/rules` at the top level of your workspace
202. Add a file called `review-prompt.md` to this folder.
213. Write the following contents to `review-prompt.md` and save.
22
23```md title="review-prompt.md"
24---
25name: Redux best practices review
26alwaysApply: false
27---
28
29Review the currently open file for adherence to Redux best practices, as explained in their style guide at https://redux.js.org/style-guide/.
30```
31
32Now to use this prompt, you can open Chat, type <kbd>/</kbd>, select the prompt, and type out any additional instructions you'd like to add.
33
34## Example Prompt Templates for Common Use Cases
35
36Below are more examples to get you started. You can also visit the Hub to [explore prompts](https://hub.continue.dev/explore/prompts) or [create your own](https://hub.continue.dev/new?type=block&blockType=prompts).
37
38### How to Create a Security Review Prompt
39
40```md title="security-review.md"
41---
42name: Security best practices review
43alwaysApply: false
44---
45
46Review the changes in the current git diff for these security best practices:
47
48- Does the architecture follow security-by-design principles?
49- Are there potential security vulnerabilities in the system design?
50- Is sensitive data handled appropriately throughout the lifecycle?
51```
52
53### How to Create a Prompt That References Existing Files
54
55```md title="typeorm-entity-generator.md"
56---
57name: Generate a new TypeORM entity
58alwaysApply: false
59---
60
61Referencing `src/db/dataSource.ts` and `src/db/entity/SampleEntity.ts`, generate a new TypeORM entity based on the following requirements:
62```