> 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/wen-dang-ji-dai-ma/guides.md).

# 指南

GitBook 可与您现有的工具和工作流程协同工作。这些指南帮助您使用代码和 AI 来构建、维护和优化文档。

#### 探索

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h4><i class="fa-code-branch">:code-branch:</i></h4></td><td><h4>使用 Git Sync 导入或迁移内容</h4></td><td>通过 Git Sync 将现有文档导入 GitBook</td><td><a href="/spaces/LBGJKQic7BQYBXmVSjy0/pages/nE7HQxA8bhx2cDMqtwBa">/spaces/LBGJKQic7BQYBXmVSjy0/pages/nE7HQxA8bhx2cDMqtwBa</a></td></tr><tr><td><h4><i class="fa-pen-to-square">:pen-to-square:</i></h4></td><td><h4>使用 AI 编写文档</h4></td><td>使用 GitBook Agent 创建和维护文档</td><td><a href="/spaces/LBGJKQic7BQYBXmVSjy0/pages/lZib1r0W2EKSeHHGsXse">/spaces/LBGJKQic7BQYBXmVSjy0/pages/lZib1r0W2EKSeHHGsXse</a></td></tr><tr><td><h4><i class="fa-magnifying-glass-chart">:magnifying-glass-chart:</i></h4></td><td><h4>为 AI 搜索优化文档</h4></td><td>为 AI 搜索和 LLM 摄取准备文档</td><td><a href="/spaces/LBGJKQic7BQYBXmVSjy0/pages/0VDm6MCHnkOiY0UMgwUw">/spaces/LBGJKQic7BQYBXmVSjy0/pages/0VDm6MCHnkOiY0UMgwUw</a></td></tr><tr><td><h4><i class="fa-wand-magic-sparkles">:wand-magic-sparkles:</i></h4></td><td><h4>借助 GitBook Agent 简化文档工作流</h4></td><td>使用 GitBook Agent 进行更新、优化和批量文档任务</td><td><a href="/spaces/LBGJKQic7BQYBXmVSjy0/pages/qFDlIyMYStBBWzAihxLv">/spaces/LBGJKQic7BQYBXmVSjy0/pages/qFDlIyMYStBBWzAihxLv</a></td></tr><tr><td><h4><i class="fa-terminal">:terminal:</i></h4></td><td><h4>通过命令行创建并发布站点</h4></td><td>使用 GitBook CLI 创建并发布站点</td><td><a href="/spaces/LBGJKQic7BQYBXmVSjy0/pages/zmpnDiKX098r2S6GXiyP">/spaces/LBGJKQic7BQYBXmVSjy0/pages/zmpnDiKX098r2S6GXiyP</a></td></tr></tbody></table>

#### 快速指南

<details>

<summary>为您的仓库设置 Git Sync</summary>

Git Sync 让您的 GitHub 或 GitLab 仓库与 GitBook 保持同步。

本指南涵盖选择提供商、授权 GitBook 以及连接您的仓库。

<button type="button" class="button secondary" data-action="ask" data-query="Write a step-by-step guide to setting up Git Sync for a GitHub or GitLab repository. Cover selecting a provider, authorizing GitBook, connecting the repository, and checking the first sync. Include links to the relevant docs pages." data-icon="gitbook-assistant">打开指南</button>

</details>

<details>

<summary>通过 GitBook MCP 连接代码助手</summary>

GitBook MCP 可让兼容的代码助手访问您的 GitBook 内容。

本指南涵盖连接服务器、确认访问权限以及开始文档任务。

<button type="button" class="button secondary" data-action="ask" data-query="Write a step-by-step guide to connecting a coding assistant to GitBook with GitBook MCP. Cover adding the MCP server, authenticating, confirming access, and starting a documentation task. Include links to the relevant docs pages." data-icon="gitbook-assistant">打开指南</button>

</details>

<details>

<summary>使用 GitBook CLI 运行文档工作流</summary>

GitBook CLI 让您可以通过命令行处理内容。

本指南涵盖登录、查询内容以及运行文档工作流。

<button type="button" class="button secondary" data-action="ask" data-query="Write a step-by-step guide to using the GitBook CLI for documentation workflows. Cover installing the CLI, signing in, querying content, and running a useful workflow. Include links to the relevant docs pages." data-icon="gitbook-assistant">打开指南</button>

</details>

<details>

<summary>为代码助手赋予 GitBook 技能</summary>

Agent 技能为代码助手提供有关 GitBook 功能和内容区块的上下文。

本指南涵盖添加技能文件以及在文档任务中使用它。

<button type="button" class="button secondary" data-action="ask" data-query="Write a step-by-step guide to giving a coding assistant GitBook skills. Cover finding the skills file, adding it to the assistant&#x27;s context, and using it for a documentation task. Include links to the relevant docs pages." data-icon="gitbook-assistant">打开指南</button>

</details>


---

# 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 dynamically by asking a question.

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

```
GET https://gitbook.com/docs/documentation/zh/wen-dang-ji-dai-ma/guides.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
