> For the complete documentation index, see [llms.txt](https://wiki.staffplusplus.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.staffplusplus.org/features/staff-mode/command-hooks.md).

# Command hooks

You can execute commands whenever a staff member exits or enters a mode

```yaml
modes:
    default:
        enable-commands: []
        disable-commands: []
```

Commands listed here should be in the [Staff ++ command format](/general-information/other/configuring-commands.md)

### Placeholders:

| placeholder | description                                            |
| ----------- | ------------------------------------------------------ |
| %staff%     | The name of the staff member entering/exiting the mode |

### Executors:

| executor value | description                                |
| -------------- | ------------------------------------------ |
| staff          | The staff member entering/exiting the mode |

### Targets:

| target value | description                                |
| ------------ | ------------------------------------------ |
| staff        | The staff member entering/exiting the mode |

### Filters

Currently no filters are available except the [permission filter](/general-information/other/configuring-commands.md#permission-filter)

### Example:

```yaml
 modes:
    default:
        enable-commands: []
        disable-commands:
          - command: "tell %staff% Taking a break uh?"
            target: "staff"
            target-run-strategy: ONLINE
```
