> For the complete documentation index, see [llms.txt](https://gitbook-open-v2-preview.gitbook.workers.dev/url/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-open-v2-preview.gitbook.workers.dev/url/gitbook.com/docs/documentation/ja-gitbook-documentation/creating-content/ai-coding-assistants-and-skillmd.md).

# AIコーディングアシスタントとskill.md

GitBook では、 [skill.md](https://gitbook.com/docs/skill.md) AI コーディングアシスタントに GitBook のドキュメントを適切に編集する方法を教えるファイルです。Claude Code、Cursor、Codex、またはその他の外部コーディングアシスタントを使って GitBook のドキュメントをローカルで編集したい場合は、skill.md ファイルを「プロジェクトルール」として使用してください。

これは [Git Sync ](/url/gitbook.com/docs/documentation/ja-gitbook-documentation/getting-started/git-sync.md)のワークフローとよく合います。ローカルでドキュメントを編集し、その後変更をコミットしてドキュメントサイトを更新します。参考ファイルには、GitBook の Markdown 拡張、カスタムブロック、設定ファイル、そして外部アシスタント向けのベストプラクティスがまとめられています。

#### ダウンロード

{% file src="/files/832b5ff08ffc6ef8f71b5eb5be928564940a537b" %}

{% hint style="info" %}
**GitBook エディタで AI を使って書く方が好みですか？**

GitBook では、 [GitBook Agent](/url/gitbook.com/docs/documentation/ja-gitbook-documentation/gitbook-agent/what-is-gitbook-agent.md) をエディタから直接使って AI 支援によるドキュメント作成ができます。このガイドは、Claude Code や Cursor のような外部コーディングアシスタントを使うことを好むチーム向けです。
{% endhint %}

### skill.md に含まれる内容

* すべてのカスタムブロックに対応した完全な構文リファレンス
* 設定ファイル形式（`.gitbook.yaml`, `SUMMARY.md`, `.gitbook/vars.yaml`)
* フロントマターのオプションとレイアウト制御
* 変数と式の構文
* 適切なブロックタイプを選ぶための判断表
* よくある落とし穴とベストプラクティス

このファイルを AI コーディングアシスタント（例: Claude Code、Codex など）に追加すると、GitBook のドキュメント向けのコンテンツ作成、編集、書式設定に必要な情報を提供できます。つまり、アシスタントは GitBook の機能に対して確立されたフレームワークとベストプラクティスに従うようになります。

### URL 経由で skill.md を使用する

ほとんどの AI コーディングアシスタントは、プロジェクト固有の指示をサポートしています。skill ファイルの URL を指定して、プロジェクト設定でこのファイルを参照すれば、アシスタントが GitBook の構文の扱い方を理解できます。

### skill.md をローカルで使用する

skill ファイルをダウンロードして、リポジトリに含めることもできます。まず skill.md をリポジトリのルートにダウンロードし、その後コーディングアシスタントの rules ファイルで参照してください: `「GitBook の構文とベストプラクティスについては、リポジトリのルートにある skill.md を読んでください」` 。これは Claude Code、ChatGPT、Codex、その他同様のツールでうまく機能します。

この方法はオフラインでも動作し、チーム固有の変更も可能です。

{% hint style="warning" %}
GitBook に新機能が追加されたら、ローカルのリポジトリを最新の skill.md ファイルに更新するのを忘れないでください。
{% endhint %}

### AI が生成したコンテンツのテスト

AI アシスタントが生成したコンテンツは、技術的な正確さと適切な書式の両方について、必ず確認とテストを行うことが重要です。

skill ファイルで訓練された AI アシスタントを使う場合は、次の点を確認してください:

* カスタムブロックが GitBook で正しくレンダリングされることを確認する
* すべての内部リンクが機能することを確認する
* フロントマターが有効な YAML であることを確認する
* 変数が正しいスコープを参照していることをテストする

{% hint style="warning" %}
**注意:** AI アシスタントは、誤った構文を生成したり、カスタムブロックの閉じ忘れをすることがあります。コミットする前に必ず変更内容を確認してください。
{% endhint %}

### GitBook Agent

GitBook で直接作業する方が好みですか？ [GitBook Agent](/url/gitbook.com/docs/documentation/ja-gitbook-documentation/gitbook-agent/what-is-gitbook-agent.md) Git Sync を使うかどうかにかかわらず、GitBook エディタで AI 支援のワークフローを利用できます。

Agent はドキュメントの全体文脈を把握しており、GitBook のブロックや機能の最適な使い方についてすでに学習しています。Agent は、コンテンツの下書き、更新、さまざまなユースケースに合わせたドキュメントの最適化を、GitBook アプリ内ですべて支援します。

<a href="/pages/0c03628b701ac10b3d6b9608662ac6e31dd661fe" class="button primary">GitBook Agent を見つける</a>


---

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

```
GET https://gitbook-open-v2-preview.gitbook.workers.dev/url/gitbook.com/docs/documentation/ja-gitbook-documentation/creating-content/ai-coding-assistants-and-skillmd.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
