# Extensions

> TOML tools, skills, prompt templates, hooks, and memory.

Keep reusable workflows in project files. Use a tool to run a command, a skill to give the model instructions on demand, a prompt template for a recurring task, or a hook to run checks at defined points in a session.

## Add a tool

Create `.openmax/tools/rust_sources.toml` in your project.

```toml
name = "rust_sources"
description = "List Rust source files under src"
command = "find"
args = ["src", "-type", "f", "-name", "*.rs"]
mutating = false

[params]
type = "object"
```

Open Max starts the command in the project directory, passes its JSON arguments on stdin, and returns stdout to the model. This command lists Rust files under `src` and takes no arguments from the model. Set `mutating` to describe whether the tool modifies state. Open Max uses that field for scheduling and approvals. The command runs with its process's host permissions.

Validate the manifest with `openmax --check`. Start a new session or run `/reload` to rebuild the declared tool list. When the agent adds a tool during a session, Open Max tells it how to run the tool on the next step while keeping the existing request prefix intact. In `ask` mode, execution still requires the applicable approvals.

## Add instructions or automation

| Use | Project location |
| --- | --- |
| Skills | `.agents/skills/<name>/SKILL.md` |
| Prompt templates | `.agents/prompts/` |
| Hooks | `.openmax/hooks/` |
| Memory | `.openmax/memory/` |

A skill starts with a YAML header containing `name` and `description`. Open Max includes those fields in the prompt and the model reads the file when it needs the instructions.

Run `openmax --spec tools` for the installed tool contract. Replace `tools` with `skills`, `prompts`, `hooks`, `mcp`, or `memory` for the other contracts. The [extension reference](https://github.com/Max17190/open-max/blob/main/docs/extending.md) covers each format, global locations, and how to connect an MCP server.
