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

# 文档即代码

- [GitHub 与 GitLab 同步](https://gitbook.com/docs/documentation/zh/wen-dang-ji-dai-ma/git-sync.md): 使用 GitBook 的双向集成，将你的 GitBook 文档与 GitHub 或 GitLab 同步
- [启用 GitHub 同步](https://gitbook.com/docs/documentation/zh/wen-dang-ji-dai-ma/git-sync/enabling-github-sync.md): 将你的 GitHub 仓库与 GitBook 同步
- [启用 GitLab 同步](https://gitbook.com/docs/documentation/zh/wen-dang-ji-dai-ma/git-sync/enabling-gitlab-sync.md): 将你的 GitLab 仓库与 GitBook 同步
- [内容配置](https://gitbook.com/docs/documentation/zh/wen-dang-ji-dai-ma/git-sync/content-configuration.md): 通过代码配置 Git Sync
- [GitHub 拉取请求预览](https://gitbook.com/docs/documentation/zh/wen-dang-ji-dai-ma/git-sync/github-pull-request-preview.md): 在 GitHub 中创建拉取请求时查看你的内容预览
- [提交信息与自动链接](https://gitbook.com/docs/documentation/zh/wen-dang-ji-dai-ma/git-sync/commits.md)
- [单仓库](https://gitbook.com/docs/documentation/zh/wen-dang-ji-dai-ma/git-sync/monorepos.md): 在单仓库中使用 Git Sync，并将空间映射到独立目录
- [故障排除](https://gitbook.com/docs/documentation/zh/wen-dang-ji-dai-ma/git-sync/troubleshooting.md): 解决常见的 Git Sync、仓库、重定向和登录问题
- [GitBook MCP](https://gitbook.com/docs/documentation/zh/wen-dang-ji-dai-ma/gitbook-mcp.md): 将 AI 编程助手连接到 GitBook，使其可以创建站点、发起变更请求，并通过 GitBook 的 API 编辑内容
- [GitBook CLI](https://gitbook.com/docs/documentation/zh/wen-dang-ji-dai-ma/gitbook-cli.md): 通过命令行处理你的 GitBook 内容——登录、查询 API，并通过脚本或 AI 编程代理驱动文档工作流。
- [Agent 技能](https://gitbook.com/docs/documentation/zh/wen-dang-ji-dai-ma/ai-coding-assistants-and-skillmd.md): 使用 GitBook 官方的 SKILL.md 文件，为 Claude Code、Cursor 或 Codex 等 AI 编程助手提供 GitBook 功能和块的知识
- [指南](https://gitbook.com/docs/documentation/zh/wen-dang-ji-dai-ma/guides.md): 探索关于 docs-as-code 工作流、GitBook Agent 和 AI 就绪文档的指南


---

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