> 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/ja-gitbook-documentation/docs-as-code/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>

エージェントスキルは、コーディングアシスタントに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 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/ja-gitbook-documentation/docs-as-code/guides.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.
