Hook

You might say

Configure a post-write hook for me. Every time the AI finishes writing a code file, automatically run Prettier to format it.

A lifecycle hook is a preset script or task that runs automatically when a specific event occurs.For example, git can run a check before a commit, and some AI tools expose an after-write trigger. Event names, parameters, and whether failure blocks the next step are product-specific. Check the current tool's documentation first, and keep risky scripts inside the intended permission and file scope.
Lifecycle Hook
Further reading