# Style guide builder

The style guide builder lets admins create custom rules that flag specific text patterns and optionally suggest replacements. This is useful for enforcing organization-specific terminology, brand names, or writing conventions.

Custom rules appear the same way as built-in style check rules to end users: matched text is highlighted with a yellow underline, with replacement suggestions and a description shown on selection. Custom rules always take priority over built-in style rules.

The style guide builder is available for admins under paid Cloud and self-hosted plans.

### How custom rules work

Custom rules are added to the common category, meaning they aren't tied to a specific language and apply regardless of the language being checked. Support for language-specific rule sets is coming soon.

Each custom rule consists of the following parts:

* **Patterns** (required). The text to flag. Up to 3 per rule.
* **Suggestions** (optional). Replacement text offered to users. Up to 3 per rule. Required if no description is provided.
* **Description** (optional). An explanation shown to users. Max 200 characters. Required if no suggestions are provided.
* **Context awareness** (optional). Controls when the rule applies based on surrounding text. **Include in context** activates the rule only when at least one of the specified entries appears in the same sentence as the pattern. **Exclude from context** skips the rule when any of the specified entries is present. Up to 3 entries each.

To create language-specific rules, use the [Style guide API](/api-reference/style-guide-api.md) with the `lang` parameter.

Both custom rules and built-in style check rules are managed by users through the **Style** toggle in the product UI, and by admins through client-side configuration options. For details on available options, see [Style check](/features/style-check.md).

#### Case sensitivity

How case sensitivity works depends on the casing of your pattern.

If the pattern is entirely lowercase, it matches the same text in any case, and the suggestion adjusts to match:

| Case        | Pattern | Suggestion                         |
| ----------- | ------- | ---------------------------------- |
| Lowercase   | exampl1 | exampl2                            |
| Capitalized | Exampl1 | Exampl2                            |
| Uppercase   | EXAMPL1 | EXAMPL2                            |
| Mixed       | ExaMPl1 | exampl2 (original suggestion case) |

If the pattern or suggestion contains any non-lowercase characters, both stay in their original case regardless of how the matched text appears:

| Case        | Pattern | Suggestion |
| ----------- | ------- | ---------- |
| Lowercase   | exampl5 | ExaPl6     |
| Capitalized | Exampl5 | ExaPl6     |
| Uppercase   | EXAMPL5 | ExaPl6     |
| Mixed       | ExaMPl5 | ExaPl6     |

### Managing custom rules

How you manage custom rules depends on your setup:

* **Cloud.** Use the style guide builder in the admin panel at [app.wproofreader.com](https://app.wproofreader.com). See Style guide: Cloud admin panel →.
* **Self-hosted.** Work with style guide files directly. See [Style guide: Self-hosted](/features/style-guide-builder/style-guide-self-hosted.md).
* **API.** Use the style guide HTTP API to create, edit, delete, and list rules programmatically. See [Style guide API](/api-reference/style-guide-api.md).

### Limitations

* Up to 2,000 custom rules per subscription (Cloud) or per language file (self-hosted). Contact WebSpellChecker if you need more.
* The following characters can't be used in rule patterns, suggestions, or context fields: `# ; [ ] < > { }`. The description field allows `;` but restricts the rest.
* Each field (patterns, suggestions, context\_include, context\_exclude) has a maximum combined length of 150 Unicode characters. Descriptions can be up to 200 characters.


---

# 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://docs.wproofreader.com/features/style-guide-builder.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.
