What problem does it solve?
Hand-written Chromium context patches in Brave-core are brittle and break on rebases. This Skill converts an existing .patch file into a robust Plaster rewrite/*.yaml config that expresses the change as an intent-conveying regex substitution, then proves correctness by regenerating the patch and diffing it against the original.
Core Features & Use Cases
- Patch-to-Plaster conversion: Reads a
.patch file, source path, or infers the change from the working tree, then authors a rewrite/<path>.yaml with one substitution per logical change.
- Intent-based matching rules: Applies the Plaster dos and don'ts for enums, switch statements, gn arrays,
pattern vs re_pattern, whitespace flexibility, and count semantics.
- Verification by regeneration: Runs
plaster.py apply on the specific config and diffs the regenerated patch against the original until they are byte-identical.
- Use Case: You edited an upstream Chromium source, ran
pnpm run update_patches, and now want the change expressed as a maintainable Plaster config instead of a fragile context patch.
Quick Start
Convert my patch at patches/components-foo-foo.cc.patch into a Plaster rewrite config and verify it reproduces the patch exactly.