# Best Practices

**Reusability & Modularity**

* Keep actions modular and reusable
* Use clear and meaningful names for custom actions to improve readability and maintainability
* Add a concise description that clearly explains the purpose of the custom action

**Input & Validation**

* Validate input values before use
* Choose the appropriate scripting language (Python or JavaScript) before saving the custom action

**Execution & Interaction**

* Select the correct element type to ensure accurate interaction during test execution
* Handle exceptions gracefully

**Coding Standards**

* Maintain proper and consistent indentation when writing Python code
* Use Title Case for naming custom actions to follow standard capitalization conventions

**Debugging**

* Log meaningful messages for debugging


---

# 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://docs.avoautomation.com/avo-assure/actions/custom-action/best-practices.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.
