# User-defined commands

User-defined commands are pre-defined commands that you create yourself. Effectively it's like creating a toolbar button with your own function on it, but instead of the button living on a toolbar, it lives in a global command list and other buttons or menus can refer to it by name. User-defined commands are created via the [User Commands](https://chaoses-ib.gitbook.io/directory-opus/manual/customize/the_customize_dialog/user_commands) tab of the [Customize](https://chaoses-ib.gitbook.io/directory-opus/manual/customize) dialog.

When you create a user command you give it a name (which must be unique and not clash with any of the Opus commands), and other buttons can then run your user command using its name. User commands can also accept parameters (arguments) on the command line, which lets you pass through parameters to external programs or scripts that your user command might invoke.

See the documentation for the [User Commands](https://chaoses-ib.gitbook.io/directory-opus/manual/customize/the_customize_dialog/user_commands) tab for more details on creating and using user commands.


---

# Agent Instructions: 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://chaoses-ib.gitbook.io/directory-opus/manual/customize/creating_your_own_buttons/user-defined_commands.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.
