# Getting started

To get started, first install the application from the Github Marketplace:

{% embed url="<https://github.com/marketplace/prompt-shield>" %}

{% embed url="<https://app.arcade.software/share/yzxPEtBFz0KC8TBUpH5v>" %}

Once you've installed the application, select the repository you want to work with, and create a file called&#x20;

`.github/prompt-defender.yml`

In this file, we'll add our test configuration&#x20;

## Configuration

```yaml
prompts:
  - 'path/to/your/prompt-file1.txt'
  - 'path/to/your/prompt-file2.txt'
threshold: 0.5
```

Replace path/to/your/prompt-file1.txt and path/to/your/prompt-file2.txt with the paths to the prompt files you want to test.

What does threshold mean?

Threshold is the score (with a max score of 1.0) that you want your prompt to hit before you let the prompt pass - so, in simple terms if your threshold is 0.5 then a security score below 0.5 causes a failure

### Deploy the file to a branch&#x20;

Deploy the file, and watch your pull request for the test:

<figure><img src="/files/w54WzArPU5SY3El2cNeU" alt=""><figcaption></figcaption></figure>

If you pass, congrats :tada:

<figure><img src="/files/zoNczkg2r2jNVbz7O0qn" alt="" width="375"><figcaption></figcaption></figure>

If not, you'll get some quick wins on how to improve the prompt to make sure it passes:

<figure><img src="/files/LwuFx7bDeWZHaJtOBDTz" alt=""><figcaption></figcaption></figure>

## Details

To see more details, click the 'View more details' button and you'll see the score, along with suggestions for improvement. This will take you to the "score" page - with details on improvements that you can make to your prompt.

<figure><img src="/files/kZMRgNVsWtXQIGrfz8Ic" alt="" width="375"><figcaption></figcaption></figure>

You can even get improvements automatically - click 'Improve score' and you'll get a hardened prompt for you to use - this will take your prompt information and suggest and improved prompt that you can use to update your prompt:

<figure><img src="/files/m18JPtxB3RTnrTtMGMo8" alt="" width="375"><figcaption></figcaption></figure>

Copy the result, paste it back into your prompt file - and the test will automatically re-run (alternatively, you can get the score for the latest prompt by clicking 'score your prompt')

<figure><img src="/files/qIDRV3YqSQaUVAbuNuO3" alt=""><figcaption></figcaption></figure>

*It really is as simple as that!*&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://prompt-shield.gitbook.io/prompt-shield/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
