> 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プロバイダーで開く** 」ページアクションの設定を初期値として使用します。この設定は「 [追加設定](https://gitbook.com/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="Example prompt" 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.
