> 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/kontentsuwosuru/blocks/prompt.md).

# プロンプト

再利用可能な AI プロンプトを共有するために、ページにプロンプトブロックを追加します

プロンプトブロックを使うと、ドキュメント内で再利用可能な AI プロンプトを共有できます。読者はワンクリックでプロンプトをコピーするか、対応している AI ツールで開くことができます。

### プロンプトブロックを追加する

1. 空白行で、次を入力します `/`.
2. クリックして **プロンプト** 挿入メニューで。
3. ブロックの内容と設定を追加します。

### プロンプトブロックのフィールド

各プロンプトブロックには次のフィールドが含まれます：

* **説明**：プロンプトが何をするかの簡単な要約。
* **アイコン**：読者がブロックを素早く見分けるのに役立つ、任意のアイコン。
* **プロンプト**：AI ツールに送信したりコピーしたりできるプロンプト本文。

プロンプトフィールドは Markdown をサポートしているため、見出し、リスト、その他の書式を使って長いプロンプトを構成できます。

### プロンプトのオプション

#### AI プロバイダーで開く

サーバー側の **AI プロバイダーで開く** 設定により、ブロックにプロンプトを直接開ける AI ツールのメニューを表示するかどうかを制御します。

この設定を有効にすると、公開済みのドキュメントで読者はプロバイダーメニューからプロンプトを開けます。

この設定を未設定のままにすると、GitBook はサイト全体レベルの **AI プロバイダーで開く** ページアクション。その設定は、 [追加設定](/docs/documentation/ja-gitbook-documentation/manage-your-site/customization/extra-configuration.md#open-in-ai-providers).

#### デフォルトの表示

サーバー側の **デフォルトの表示** 設定により、読者が最初にどの程度プロンプトを見られるかを制御します。

選択 **非表示** プロンプトを非表示にするには、 **一部表示** 10行のプレビューにする場合は、 **完全に表示** でプロンプト全体を表示します。

### 例

読者に、記載どおりのプロンプトをそのまま再利用してほしい場合は、プロンプトブロックを使用します。たとえば：

{% prompt description="Example prompt" icon="rectangle-terminal" defaultExpanded="full" %}

```markdown
このリリースノートの主要な変更点を要約してください。回答を「新機能」「破壊的変更」「推奨される次のステップ」に分けてください。回答は150語以内にしてください。
```

{% endprompt %}

### プロンプトブロックを使うタイミング

プロンプトブロックは次の用途に適しています：

* サポート、オンボーディング、トラブルシューティング向けの再利用可能なプロンプト
* 要約、分析、下書き作成のためのプロンプトテンプレート
* ドキュメントから始まり、AI ツールで続くワークフロー

### ベストプラクティス

読者に使ってほしい形に合わせて、プロンプトを書いてください：

* タスクを明確に記述する。
* 出力形式を定義する。
* 長さ、トーン、必要な入力などの制約を追加する。

### 公開済みドキュメントでの動作

公開ページでは、プロンプトブロックにより読者はより速く作業できます。

* **プロンプトをコピー** フルプロンプトをクリップボードにコピーします。
* **AI プロバイダーで開く** 有効にすると、プロバイダーメニューが表示されます。

## Markdownでの表記

{% code overflow="wrap" %}

````markdown
{% prompt description="例のプロンプト" icon="rectangle-terminal" openInAIProviders="true" defaultExpanded="full” %}
```markdown
このリリースノートの主要な変更点を要約してください。回答を「新機能」「破壊的変更」「推奨される次のステップ」に分けてください。回答は150語以内にしてください。
```
{% endprompt %}
````

{% endcode %}


---

# 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/kontentsuwosuru/blocks/prompt.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.
