# mend - One Patch Tool for Every AI Edit Format

> Applies AI-written code edits in any format - unified diff, SEARCH/REPLACE, V4A or JSON - with fuzzy line matching and all-or-nothing writes. Node 22, zero dependencies.

mend - One Patch Tool for Every AI Edit Format is a paid AI agent skill on Agensi by muhammad zildan. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $7 (one-time purchase)
- Creator: [muhammad zildan](https://www.agensi.io/creators/mhmmdzildan03)
- Version: 1.0
- Last updated: 2026-11-22
- Security: scan passed (2026-11-22); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/mend-one-patch-tool-for-every-ai-edit-format
- Tags: code-quality-review, testing-debugging, agents-orchestration

## About this skill

Every AI model writes code edits in a different dialect, and every pipeline breaks on someone else's format. mend ends that.

Feed it a patch as a unified diff (wrong line numbers and all), SEARCH/REPLACE blocks, a V4A patch, or JSON edit objects from a text-editor tool call. It detects the format automatically, finds the lines each edit names at the first matching tier - exact, trailing-whitespace-insensitive, then indentation-insensitive with re-indenting - and writes every change or none. No partial application, ever.

- Four formats in one tool, auto-detected or forced with --format
- Three-tier fuzzy matching that survives stale diffs and re-indented files
- Atomic: every edit lands or the tree is untouched, with a plain reason why
- --check dry-run mode with the same output and exit code
- --strict mode for exact-only matching
- One 36 KB TypeScript file, Node 22 standard library only, nothing to install

Built for the make.fun hidden-spec-cli bounty, where it scored 1000/1000 on the practice suite. The full specification it implements ships in the package (reference/SPEC.md), so your agent can answer edge-case questions from the spec itself.

## Requires

- Node.js 22.18+
- AI agent with shell access

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the mend - One Patch Tool for Every AI Edit Format skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What does mend - One Patch Tool for Every AI Edit Format do?

Applies AI-written code edits in any format - unified diff, SEARCH/REPLACE, V4A or JSON - with fuzzy line matching and all-or-nothing writes. Node 22, zero dependencies.

### Which AI agents support mend - One Patch Tool for Every AI Edit Format?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use mend - One Patch Tool for Every AI Edit Format?

Connect your AI agent to Agensi through MCP, then ask it to use mend - One Patch Tool for Every AI Edit Format on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
