# Write Gate

Deterministic pre-write content gate for Ulpi.

- Type: Plugin
- Version: 1.0.0
- Updated: 22 Nov 2026
- Publisher: 2vic1
- Category: Tools

[Contact us](https://www.ulpi.io/en/support#contact)

## What it does

Deterministic pre-write content gate for Ulpi. A pre_tool_call hook parses the exact bytes about to be written as JSON, TOML or Python (stdlib parsers), rejects NUL bytes, oversized content and user-declared regex contracts, and short-circuits invalid writes with a precise line/column error returned to the model as a tool-call error, so the agent fixes the content in the same tool-calling loop instead of leaving a broken file behind.

Also adds a write_gate_check preflight tool, a /writegate slash command and Settings -\> Plugins config. Patch/replacement fragments are never parsed as whole documents: NUL, size and regex contracts still run on the fragment, and the reconstructed post-edit file is parsed when it can be rebuilt.

Disclosure — no network calls, no shell commands, no subprocesses, no background processes, no credentials, no telemetry; reads the in-memory arguments of the tool call it gates, one optional user-specified JSON rules file named in the rules_file setting, and (for fragment edits only) the size-capped target file named in that same tool call, read-only; persists three integer counters in profile-scoped plugin state; never auto-approves or bypasses Ulpi's approval gate; fails open on any internal error.

## Tools it adds

The tools an agent gets once this plugin is installed.

- `write_gate_check`

## Review notes

What an owner reads and accepts before the install is approved.

- Ulpi has not reviewed this version: it is listed in the public plugin catalog, and the install still fetches it at its pinned commit, checks its shape and scans it before you approve

## More in Tools

- [writing-guard](https://www.ulpi.io/en/marketplace/plugins/writing-guard): Style check for every Ulpi answer in German and English: finds em and en dashes outside code, links and quotes.
- [X Bookmarks](https://www.ulpi.io/en/marketplace/plugins/x-bookmarks): Reads your own X bookmarks (long posts and X Articles in full).
- [Yandex Calendar](https://www.ulpi.io/en/marketplace/plugins/yandex-calendar): List, create, update, RSVP to, move and delete Yandex Calendar events over CalDAV, with attendees, busy status and several calendars.

[All listings →](https://www.ulpi.io/en/marketplace) · [Publisher's guide →](https://www.ulpi.io/en/docs) · [Report a problem →](https://www.ulpi.io/en/security#report)
