diff-applier

Apply SEARCH/REPLACE patch files to Python and JavaScript projects.

54|21|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/Nhqvu2005/VibeGravityKit --skill diff-applier
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diff-applier
Source: https://github.com/Nhqvu2005/VibeGravityKit/tree/main/VibeGravityKit/.agent/skills/diff-applier
Command: npx skills add https://github.com/Nhqvu2005/VibeGravityKit --skill diff-applier

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the inefficiency and risk of manual code patching by providing an automated, safe, and intelligent way to apply code changes.

Core Features & Use Cases

  • Safe Patch Application: Applies code changes using precise SEARCH/REPLACE blocks, preventing accidental overwrites and ensuring targeted modifications.
  • Automated Linting: Integrates with linters like flake8 (Python) or eslint (JS) to automatically check for code style violations after patching.
  • Codebase Indexing: Updates the project's code index using a codebase-navigator script, ensuring discoverability and maintainability.
  • Use Case: When refactoring a function, use this skill to apply a patch file that renames the function and updates its calls, then automatically verifies the code quality and updates the project's search index.

Quick Start

Apply the patch defined in 'my_patch.txt' to the file 'src/main.py'.

Frequently Asked Questions about diff-applier

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

FAQPage Schema
How do I apply a code patch to a Python or JavaScript file safely?

Applying a code patch safely involves using SEARCH/REPLACE blocks to execute targeted modifications and prevent accidental overwrites. This approach ensures precise changes by matching exact text before replacing, reducing the risk of breaking unrelated code in Python or JavaScript projects.

What is automated codebase indexing and when do I need it after patching?

Automated codebase indexing updates your project's search index using a navigator script post-patching. You need it to maintain code discoverability and maintainability, ensuring that newly refactored functions or modified files are immediately searchable and referenced correctly across the project.

Does automated linting work with both Python and JavaScript projects?

Yes, automated linting works with both Python and JavaScript projects. The patching process integrates with flake8 for Python and eslint for JavaScript, automatically checking for code style violations immediately after applying the code changes to maintain quality.

What's the best way to automate code refactoring across multiple files?

The best way to automate code refactoring is using a patch file with SEARCH/REPLACE blocks to rename functions and update calls, followed by automated linting and codebase indexing. This ensures precise modifications, verifies code quality, and updates the search index automatically.

Why does my code modification break unrelated functions in the target file?

Code modification may break unrelated functions if not using safe patch application with SEARCH/REPLACE blocks. Without precise targeted modifications to match exact text before replacing, you risk accidental overwrites that can corrupt surrounding code logic in the target file.