cheez-write

Replace or delete code blocks safely using hash anchors and tilth edit mode.

15|1|Updated May 4, 2026
One-click install
npx skills add https://github.com/paulnsorensen/easy-cheese --skill cheez-write
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cheez-write
Source: https://github.com/paulnsorensen/easy-cheese/tree/main/skills/cheez-write
Command: npx skills add https://github.com/paulnsorensen/easy-cheese --skill cheez-write

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It eliminates risky, token-heavy “rewrite the whole file” edits by performing precise code modifications that stay safe under concurrent changes.

Core Features & Use Cases

  • Hash-anchored block edits with tilth MCP: updates specific code ranges using line hash anchors so edits are rejected when the file changed.
  • Signature and implementation replacements: replace function bodies, signatures, or imports with tight boundaries.
  • Structural codemod escape hatch: route cross-cutting structural rewrites to ast-grep (sg --rewrite) when appropriate, while keeping one-off edits in tilth_edit.

Quick Start

Use cheez-write to edit a specific block of code after reading anchors with cheez-read for the same file and section.

Frequently Asked Questions about cheez-write

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

FAQPage Schema
How do I safely edit a specific code block under concurrent file changes?

Hash-anchored edits safely modify specific code blocks under concurrent file changes by using start and end line hash anchors to verify the target range hasn't been altered, rejecting the edit if the file changed. This prevents overwriting concurrent modifications.

What is the best way to replace function signatures and imports without rewriting the whole file?

Hash-anchored block edits replace function signatures, implementations, and imports with tight boundaries using deterministic code edits, eliminating the token-heavy and risky approach of rewriting the entire file for surgical structural modifications.

Do I need a specific MCP edit mode to perform hash-anchored code edits?

Yes, hash-anchored code edits require the tilth MCP edit mode via mcp__tilth__tilth_edit, using start and end hash anchors obtained from a prior mcp__tilth__tilth_read. The process must stop with clear errors when edit mode is unavailable.

How do I handle structural code refactoring across multiple locations in a file?

Cross-cutting structural rewrites and refactoring tasks should be routed to ast-grep using the sg --rewrite command as an escape hatch, while keeping one-off surgical edits within the tilth_edit hash-anchored workflow for safe code modifications.

Why does my hash-anchored code edit fail with an error?

Hash-anchored edits fail with clear errors when the tilth MCP edit mode is unavailable or when the start and end hash anchors no longer match the file, indicating the target code block changed concurrently since the prior anchor read.