codegraph-edit

Apply unified diffs to source files via the codegraph CLI patch command.

1|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/Heyo-Computer/heyo-public --skill codegraph-edit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codegraph-edit
Source: https://github.com/Heyo-Computer/heyo-public/tree/main/plugins/codegraph-claude/skills/codegraph-edit
Command: npx skills add https://github.com/Heyo-Computer/heyo-public --skill codegraph-edit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the inefficiency and risk of token-heavy file rewrites by enabling precise, context-aware code modifications through unified diffs.

Core Features & Use Cases

  • Precise Patching: Applies changes via unified diffs, ensuring high accuracy and reducing the risk of silent code corruption.
  • Token Efficiency: Avoids reading and writing entire files, significantly reducing token consumption during large refactors or multi-file updates.
  • Use Case: When refactoring a function across multiple modules, use this skill to apply targeted logic changes without the overhead of re-writing the entire codebase.

Quick Start

Use the codegraph-edit skill to apply the generated unified diff to the target source file.

Frequently Asked Questions about codegraph-edit

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

FAQPage Schema
How do I apply a unified diff to patch source code efficiently?

To apply a unified diff to patch source code, the codegraph-edit skill uses the codegraph CLI patch command for surgical updates. This approach minimizes token usage by modifying only targeted sections instead of rewriting entire files.

What is the best way to refactor code across multiple modules without high token consumption?

The best way to refactor code across multiple modules while saving tokens is applying targeted unified diffs. This method ensures precise patching and significantly reduces token consumption compared to reading and rewriting entire codebase files.

Do I need the codegraph CLI installed to use codegraph-edit?

Yes, you need the codegraph CLI installed and accessible within your repository environment to use codegraph-edit. The skill relies on this command-line interface to execute patch operations and apply the generated unified diffs.

How does patching with unified diffs prevent silent code corruption?

Patching with unified diffs prevents silent code corruption by applying highly precise, context-aware modifications to source files. Instead of overwriting entire documents, this surgical approach updates only the exact targeted code segments.

When should I use unified diffs instead of rewriting entire source files?

You should use unified diffs instead of rewriting entire source files during large refactors or multi-file updates. This surgical patching method maintains context, ensures high accuracy, and avoids the token overhead of processing full documents.