# Use the prompt library

1. Go to the `Prompt library` tab.
2. From there, you can access the following options:
   * [Add](#add-a-prompt-to-the-library): Save a new prompt to your library.
   * [Remove](#remove-prompt-s-from-the-library): Delete selected prompts from your library.
   * [Export](#export-the-prompt-library): Create an importable backup of all your saved prompts by exporting them.
   * [Import](#import-add-entries-to-the-prompt-library): Import previously exported prompts to your library.
   * [Send to](#send-prompt-to-the-openai-api-or-local-llm-tabs): Send a prompt directly to the `OpenAI API` or `Local LLM` tab.

## Add a prompt to the library

To add a new entry to the prompt library, follow these steps:

1. Click on the `Add` button.
2. Populate the `Author`, `Category` and `Prompt` fields.
3. Confirm by clicking on the `Ok` button.

{% hint style="info" %}
The prompt library automatically filters out duplicate entries, ensuring that you do not end up with multiple prompts for the same thing.
{% endhint %}

## Remove prompt(s) from the library

To remove one or multiple entries from the prompt library, follow these steps:

1. Select the entries you want to remove from the table.
2. Click on the `Remove` button.

## Export the prompt library

To export the entire prompt library, follow these steps:

1. Click on the `Export` button.
2. Choose the destination location and give a .json extension to the exported file.

{% hint style="warning" %}
It's important to give the exported file a .json extension for it to be recognised as a JSON file.
{% endhint %}

With the pre-populated built-in examples present by default within the `Prompt library` tab, the resulting JSON file should contain the following entries:

```json
[
    {
        "id": "3ed5b678-c6fd-4a36-8365-1b3711e1ef7f",
        "author": "Alexandre Teyar",
        "category": "built-in_generic",
        "text": "Analyze the HTTP request and response below for potential security vulnerabilities, specifically focusing on OWASP top 10 vulnerabilities such as SQL injection, XSS, CSRF, and other common web application security threats.\n\nFormat your response as a bullet list with each point listing a vulnerability name and a brief description, in the format and exclude irrelevant information:\n\n- Vulnerability Name: Brief description of vulnerability\n\n=== Request ===\n{REQUEST}\n\n=== Response ===\n{RESPONSE}",
        "created": "2024-01-31T15:10:09.941425100Z"
    },
    {
        "id": "f0f0b1f7-e9ea-40aa-93c6-6360d27e372d",
        "author": "Alexandre Teyar",
        "category": "built-in_biometric",
        "text": "Analyse the HTTP request and response below for potential security vulnerabilities related to the biometric authentication process.\n\nFormat your response as a bullet list with each point listing a vulnerability name and a brief description, in the format and exclude irrelevant information:\n\n- Vulnerability Name: Brief description of vulnerability\n\n=== Request ===\n{REQUEST}\n\n=== Response ===\n{RESPONSE}",
        "created": "2024-01-31T15:10:09.941425100Z"
    },
    {
        "id": "b2f1e0e8-6f29-418f-a107-582f8d14a6c5",
        "author": "Alexandre Teyar",
        "category": "built-in_spa",
        "text": "Analyse the HTTP request and response below for potential security vulnerabilities specific to the <SPA_FRAMEWORK_NAME> framework.\n\nFormat your response as a bullet list with each point listing a vulnerability name and a brief description, in the format and exclude irrelevant information:\n\n- Vulnerability Name: Brief description of vulnerability\n\n=== Request ===\n{REQUEST}\n\n=== Response ===\n{RESPONSE}",
        "created": "2024-01-31T15:10:09.941425100Z"
    }
]
```

## Import/Add entries to the prompt library

To import new entries to the prompt library, follow these steps:

1. Click on the `Import` button.
2. Choose the JSON file created in the [Export the prompt library](#export-the-prompt-library) section.

## Send prompt to the OpenAI API or Local LLM tabs

To send a prompt directly to the `OpenAI API` or the `Local LLM` tab, follow these steps:

1. Right-click on an entry from the table.
2. Choose an option from the `Send to OpenAI API` or `Send to Local LLM` options.
