> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nuon.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Writing policies

> Use the write-rego-policy skill to have your coding agent write OPA/Rego policies for your app template.

The `write-rego-policy` skill teaches your coding agent to write OPA/Rego [policies](https://docs.nuon.co/concepts/policies.md) in your app
config's `policies/` directory. It covers every policy type, when to warn versus deny, and testing a policy before
you ship it.

## Install the skill

If your client is [connected to the Nuon MCP server](https://docs.nuon.co/guides/agents/setup.md), ask for the skill by name and it loads on
demand.

Otherwise, install the skills from [nuonco/skills](https://github.com/nuonco/skills) using npx.

```sh theme={null}
npx skills add nuonco/skills
```

You can also install individual skills.

```sh theme={null}
npx skills add nuonco/skills/write-rego-policy
```

## Try it

```
Load the write-rego-policy skill and help me add a policy that blocks public S3 buckets.
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.