diff-apply

Apply diff/patch files to the ace_engine codebase with backup and conflict resolution.

Updated Sep 22, 2023
One-click install
npx skills add https://github.com/eclipse-oniro-mirrors/arkui_ace_engine --skill diff-apply-eclipse-oniro-mirrors
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diff-apply
Source: https://github.com/eclipse-oniro-mirrors/arkui_ace_engine/tree/main/.claude/skills/arkoala_diff_apply
Command: npx skills add https://github.com/eclipse-oniro-mirrors/arkui_ace_engine --skill diff-apply-eclipse-oniro-mirrors

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables safe, deterministic application of generated diff/patch files to the ace_engine codebase while preserving original logic and preventing unintended changes.

Core Features & Use Cases

  • Analyze diffs and identify affected files in ROOT/code/foundation/arkui/ace_engine.
  • Back up originals, apply changes via git apply or patch, and capture rejects for later resolution.
  • Resolve conflicts using the guidance in references/conflict-resolution.md and verify by compiling the project.

Quick Start

Use the diff-apply skill to apply a patch file like changes.diff to the ROOT/code/foundation/arkui/ace_engine working directory and run build to verify.

Frequently Asked Questions about diff-apply

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

FAQPage Schema
How do I safely apply a diff patch to ace_engine source files?

You can apply a diff patch to ace_engine by backing up affected files, using git apply with --reject to capture conflicts, consulting conflict-resolution guidance, and running a build to verify correctness. This preserves original logic during the merge.

What file types are supported for deterministic patch application in ace_engine?

Deterministic patch application supports .ts, .cpp, .h, and .ets file types within the ROOT/code/foundation/arkui/ace_engine directory. The process ensures original logic is preserved when applying changes to these specific source files.

Why does git apply fail when patching ace_engine and how do I resolve conflicts?

Git apply fails during patching when changes conflict with existing code. You can resolve these conflicts by checking rejected hunks, consulting the references/conflict-resolution.md file for guidance, and then running the build to confirm correctness after resolution.

What's the best way to verify ace_engine code changes after applying a diff?

The best way to verify ace_engine code changes after applying a diff is to run the project build. Compiling the codebase confirms that the applied patch did not break existing logic and that the changes integrate correctly.

Does applying patches to ace_engine modify my original source files permanently?

Applying patches to ace_engine does not permanently risk your originals because the process enforces backing up affected files before applying changes. If issues arise, you can restore from backups before attempting conflict resolution.

Related Skills