Skip to main content
Run your project’s formatter after every agent file edit so style stays consistent without extra steps.
The user asks for a refactor; the formatter runs automatically after each file edit.

How It Works

Quick Start

1

Simple Usage

Enable auto-formatting on edit tools:
2

With Configuration

Pin formatters per extension:
A missing or failing formatter never fails the edit — the original write is kept and errors are logged at debug level.

How It Works

After a successful edit_file or apply_patch, the pipeline detects a formatter by file extension, runs it, and re-reads the file on exit code 0. The {path} placeholder is the absolute path to the edited file. If omitted from your argv list, it is appended automatically.

Configuration Options


Best Practices

post_edit_format="auto" runs a formatter only when one is on PATH — zero cost when none is installed.
Prefer ./node_modules/.bin/prettier so the version matches package.json.
Match local and CI formatter versions to avoid diff churn between runs.
Most useful for interactive agent sessions where you want immediate clean output.

File Editing

Core edit and patch tools

Code Agent

Code assistant configuration