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

# Work from your tools

- [GitHub & GitLab Sync](https://gitbook.com/docs/docs-as-code/git-sync.md): Synchronize your GitBook docs with GitHub or GitLab with GitBook’s bi-directional integration
- [Enabling GitHub Sync](https://gitbook.com/docs/docs-as-code/git-sync/enabling-github-sync.md): Sync your GitHub repo with GitBook
- [Enabling GitLab Sync](https://gitbook.com/docs/docs-as-code/git-sync/enabling-gitlab-sync.md): Sync your GitLab repo with GitBook
- [Content configuration](https://gitbook.com/docs/docs-as-code/git-sync/content-configuration.md): Configure Git Sync through code
- [GitHub pull request preview](https://gitbook.com/docs/docs-as-code/git-sync/github-pull-request-preview.md): See a preview of your content when making a pull request in GitHub
- [Commit messages & Autolink](https://gitbook.com/docs/docs-as-code/git-sync/commits.md)
- [Monorepos](https://gitbook.com/docs/docs-as-code/git-sync/monorepos.md): Use Git Sync with monorepos and map spaces to separate directories
- [Troubleshooting](https://gitbook.com/docs/docs-as-code/git-sync/troubleshooting.md): Resolve common Git Sync, repository, redirects, and sign-in issues
- [GitBook MCP](https://gitbook.com/docs/docs-as-code/gitbook-mcp.md): Connect AI coding assistants to GitBook so they can create sites, open change requests, and edit content through GitBook’s API
- [GitBook CLI](https://gitbook.com/docs/docs-as-code/gitbook-cli.md): Work with your GitBook content from the command line — sign in, query the API, and drive docs workflows from scripts or AI coding agents.
- [Agent skills](https://gitbook.com/docs/docs-as-code/ai-coding-assistants-and-skillmd.md): Use GitBook’s official SKILL.md file to give AI coding assistants like Claude Code, Cursor or Codex knowledge of GitBook’s features and blocks
- [Guides](https://gitbook.com/docs/docs-as-code/guides.md): Explore guides for docs-as-code workflows, GitBook Agent, and AI-ready documentation


---

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