> For the complete documentation index, see [llms.txt](https://docs.opusbooster.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.opusbooster.com/platform/widgets/code-widget.md).

# コードウィジェット

ウェブサイトやファネルにコードを追加する必要がありますか？問題ありません。

コードウィジェットを追加するには、ウィジェット > その他のウィジェットへ移動し、コードウィジェットを選択します。

![](https://1369750374-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWQDl1MvGQxbiNyVOzW8v%2Fuploads%2Fr0vp0wTuAOX0BQyCx9cT%2Fcode.PNG?alt=media\&token=3f468052-2adf-42f7-94ad-5ef559e71933)

### **コードの設定** <a href="#edit-code" id="edit-code"></a>

設定アイコンからお好みのコード言語形式を選択します。

![](https://1369750374-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWQDl1MvGQxbiNyVOzW8v%2Fuploads%2FICnWnFhnjpFiEPDhrY1B%2Fcode%20add.PNG?alt=media\&token=5d94fa0f-fbcf-4465-b875-36a4ce46ef72)

### **コードの編集**

次に、以下のようにソースコードボックスに直接コードを追加してください。

![](https://1369750374-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWQDl1MvGQxbiNyVOzW8v%2Fuploads%2FbJ4qBUuhEaYwyqv67zb6%2FEDIT%20CODE.PNG?alt=media\&token=5e76a440-6b21-4f04-b26c-39d3c1af02ec)


---

# 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://docs.opusbooster.com/platform/widgets/code-widget.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.
