| 1 | --- |
| 2 | title: Prompts |
| 3 | --- |
| 4 | |
| 5 | Prompts are reusable instructions that can be referenced at any time during chat. They are especially useful as context for repetitive and/or complex tasks. |
| 6 | |
| 7 | <Info> |
| 8 | Prompts were previously defined in a `.prompt` file format, but for |
| 9 | consistency we now recommend using the same Markdown format as |
| 10 | [rules](./rules.mdx) and adding `alwaysApply: false` to the frontmatter so |
| 11 | that they are manually triggered. |
| 12 | </Info> |
| 13 | |
| 14 | ### Quick Start |
| 15 | |
| 16 | Below is a quick example of setting up a prompt file: |
| 17 | |
| 18 | 1. Create a folder called `.continue/rules` at the top level of your workspace |
| 19 | 2. Add a file called `review-prompt.md` to this folder. |
| 20 | 3. Write the following contents to `review-prompt.md` and save. |
| 21 | |
| 22 | ```md title="review-prompt.md" |
| 23 | --- |
| 24 | name: Redux best practices review |
| 25 | alwaysApply: false |
| 26 | --- |
| 27 | |
| 28 | Review the currently open file for adherence to Redux best practices, as explained in their style guide at https://redux.js.org/style-guide/. |
| 29 | ``` |
| 30 | |
| 31 | Now 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. |
| 32 | |
| 33 | ## Further Examples |
| 34 | |
| 35 | Below 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). |
| 36 | |
| 37 | ### Security review |
| 38 | |
| 39 | ```md title="security-review.md" |
| 40 | --- |
| 41 | name: Security best practices review |
| 42 | alwaysApply: false |
| 43 | --- |
| 44 | |
| 45 | Review the changes in the current git diff for these security best practices: |
| 46 | |
| 47 | - Does the architecture follow security-by-design principles? |
| 48 | - Are there potential security vulnerabilities in the system design? |
| 49 | - Is sensitive data handled appropriately throughout the lifecycle? |
| 50 | ``` |
| 51 | |
| 52 | ### Pull in commonly used files for tasks |
| 53 | |
| 54 | ```md title="typeorm-entity-generator.md" |
| 55 | --- |
| 56 | name: Generate a new TypeORM entity |
| 57 | alwaysApply: false |
| 58 | --- |
| 59 | |
| 60 | Referencing `src/db/dataSource.ts` and `src/db/entity/SampleEntity.ts`, generate a new TypeORM entity based on the following requirements: |
| 61 | ``` |