edit-tool-unicode-failure

Diagnose Unicode edit failures with xxd and rewrite files using the Write tool.

Updated Mar 4, 2026
One-click install
npx skills add https://github.com/hubeiqiao/skills --skill edit-tool-unicode-failure
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: edit-tool-unicode-failure
Source: https://github.com/hubeiqiao/skills/tree/main/edit-tool-unicode-failure
Command: npx skills add https://github.com/hubeiqiao/skills --skill edit-tool-unicode-failure

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses a critical failure in the Edit tool where it cannot find strings containing Unicode characters, leading to failed edits even when the text appears correct.

Core Features & Use Cases

  • Bypass Edit Tool Limitations: Overcomes the Edit tool's inability to match Unicode characters (emojis, em-dashes, curly quotes, non-breaking spaces).
  • Alternative Editing Strategy: Provides a workaround by using the Write tool to rewrite the entire file, ensuring changes are applied correctly.
  • Use Case: When attempting to edit a README file containing emojis and you receive a "String to replace not found" error, use this Skill's recommended approach to rewrite the file with your changes.

Quick Start

Use the Write tool to rewrite the entire file with your modifications.

Frequently Asked Questions about edit-tool-unicode-failure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does the Edit tool fail with a "String to replace not found" error when my file contains emojis or em-dashes?

The Edit tool fails to match strings containing Unicode characters like emojis, em-dashes, curly quotes, or non-breaking spaces because it cannot properly process these multi-byte sequences. Use the Write tool to rewrite the entire file as a workaround.

How do I edit a file when the Edit tool cannot find text containing curly quotes or non-breaking spaces?

To edit a file with curly quotes or non-breaking spaces, bypass the Edit tool and use the Write tool to rewrite the entire file with your modifications, ensuring changes are applied correctly without string matching failures.

How do I diagnose Unicode issues in a text file before applying edits?

Diagnose Unicode issues in a text file by running the `xxd` command to inspect the raw bytes and identify the specific multi-byte sequences causing the string matching failure before you rewrite the file.

What is the best workaround for the Edit tool's inability to match Unicode strings?

The best workaround for the Edit tool's Unicode string matching failure is to use the Write tool to rewrite the entire file completely instead of attempting a targeted string replacement.

Does the Edit tool support replacing strings with non-breaking spaces or multi-byte characters?

No, the Edit tool does not reliably support replacing strings containing non-breaking spaces or multi-byte Unicode characters. You must use the Write tool to rewrite the full file content to apply your changes successfully.