> 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/docs-as-code.md).

# 使用你的工具进行工作

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