> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/zh/chuang-jian-nei-rong/styleguide/check-content-against-your-style-guide.md).

# 根据样式指南检查内容

使用 GitBook Agent 根据你的风格指南审查页面、变更请求或整个空间。

GitBook Agent 在撰写或编辑内容时都会遵循你的风格指南。要检查现有内容，或在变更合并前检查变更，请使用以下三种检查之一：

| 检查                                                          | 范围       | 代理的行为                  | 适用场景          |
| ----------------------------------------------------------- | -------- | ---------------------- | ------------- |
| [页面检查](#check-a-page)                                       | 一个页面     | 只留下评论，不做任何更改           | 你正在处理某个页面     |
| [变更请求审核](#request-a-style-guide-review-on-a-change-request) | 变更请求中的更改 | 请求修改，并引用它们违反的规则        | 你的更改已准备好供审核   |
| [站点检查](#run-a-style-guide-check-across-your-site)           | 一次最多三个空间 | 针对每个空间，在一个变更请求中修复发现的问题 | 你希望现有内容符合风格指南 |

{% hint style="info" %}
检查功能使用 GitBook AI，因此必须为你的组织启用它。
{% endhint %}

## 检查页面

编辑页面时，请使用 **检查是否符合风格指南** （位于 **改进** 菜单中），或在聊天中向 GitBook Agent 提问。Agent 会根据你的风格指南检查页面，并留下评论总结检查结果。它不会修改页面。

## 在变更请求中请求风格指南审核

如果你的网站有风格指南，GitBook Agent 会作为建议的审阅者显示在你的变更请求中，并标记为 **风格指南审阅**.

1. 在你的变更请求中，点击 **请求审查**.
2. 为你的变更添加标题和说明，或点击 **生成** 让 Agent 帮你撰写。
3. 在 **审阅者**下，点击 **请求** （位于 **GitBook Agent**旁边）。你可以同时添加其他审阅者，也可以将列表留空，以通知组织中的所有审阅者。

Agent 会根据风格指南审核你的更改。如果发现违规，它会请求修改，并引用每一处违规所依据的规则。

## 在整个站点运行风格指南检查

站点检查会审核你选择的空间中的每个页面，并修复发现的问题。你需要对该站点以及你检查的每个空间拥有编辑权限。

1. 打开你的风格指南，前往 **检查** 标签页，然后点击 **运行检查**.
2. 选择要检查的空间。一次最多可以检查三个空间。
3. 审阅并合并 GitBook Agent 为每个空间打开的变更请求。

如果检查修复了某些内容，它会将其变更请求标记为准备好供审核。如果没有发现任何问题，它会将变更请求归档，这样就不会留下一个空草稿。

「 **检查** 」标签页会按照网站自身的结构列出网站中的各个空间，并显示每个空间的检查状态：

* 变更请求的状态，或在检查运行时显示加载图标
* 检查上次运行的时间
* 当你在检查后修改了风格指南时，会显示 **风格指南在此之后已编辑** 徽标

点击某一行以打开其变更请求。

每个空间一次只有一个检查变更请求。如果在某个空间的变更请求仍处于打开状态时再次运行检查，Agent 会更新该变更请求，并按当前状态检查这些页面。只有在前一个变更请求被合并或归档后，才会打开新的变更请求。

## 故障排除

### 某条规则未被标记

GitBook Agent 只会标记它能够执行的规则。请检查该规则是否：

* 有编号 ID，或是一条明确、可检查的指令
* 不包含占位文本
* 没有涵盖该文本的例外情况

如果该规则位于第一页之外的其他页面，Agent 只有在任务涉及该页面主题时才会读取它。请将核心规则移到第一页。

### 自定义说明中的规则不会在审核中强制执行

GitBook Agent 只会依据你的风格指南检查风格。请将你希望标记的写作规则从自定义指令移到风格指南中。详情请参阅 [风格指南和自定义指令](https://gitbook.com/docs/documentation/zh/chuang-jian-nei-rong/styleguide/how-gitbook-agent-enforces-your-style-guide.md#style-guides-and-custom-instructions).

### 审核只显示少量问题

Agent 每次大约会标记五项问题，并优先从最重要的问题开始。如果还存在更多问题，它会给出数量。修复已标记的问题后，再请求一次审核即可查看其余问题。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook.com/docs/documentation/zh/chuang-jian-nei-rong/styleguide/check-content-against-your-style-guide.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
