> 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).

# 指南

探索关于 docs-as-code 工作流、GitBook Agent 和 AI 就绪文档的指南

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="/docs/guides/editing-and-publishing-documentation/import-or-migrate-your-content-to-gitbook-with-git-sync.md">How to import docs with Git Sync</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="/docs/guides/editing-and-publishing-documentation/how-to-write-documentation-with-ai.md">How to write documentation with AI</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="/docs/guides/seo-and-llm-optimization/geo-guide.md">How to optimize docs for AI</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="/docs/guides/editing-and-publishing-documentation/gitbook-agent-prompt-examples.md">How to streamline your docs workflow with GitBook Agent</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="/docs/guides/editing-and-publishing-documentation/create-and-publish-a-site-from-the-command-line.md">How to publish a docs site with the GitBook CLI</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 skills 可为编码助手提供有关 GitBook 功能和内容块的上下文。

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

<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.
