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

# プロンプト

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

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

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

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

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

* **説明**: プロンプトが何をするかの簡単な要約。
* **アイコン**: 読者がブロックを見つけやすくするためのオプションのアイコン。
* **プロンプト**: AIツールにコピーしたり送信したりできるプロンプトのテキスト。

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

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

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

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

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

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

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

この **デフォルトの表示** 設定は、読者が最初にどれだけのプロンプトを見られるかを制御します。

選択してください **非表示** を選ぶとプロンプトを隠せます。選択してください **一部のみ表示** を選ぶと10行のプレビューになり、 **完全に表示** を選ぶとプロンプト全体が表示されます。&#x20;

### 例

読者に、書かれたとおりに正確にプロンプトを再利用してほしい場合は、プロンプトブロックを使います。たとえば:

{% 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://gitbook.com/docs/documentation/ja-gitbook-documentation/creating-content/blocks/prompt.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
