
Authoring Patch Sets
Declares new firmware patches and presets in a vphone patch set.
Install
npx skills add Lakr233/vphone-cli --skill authoring-patch-sets -g -a claude-code -y- Repository
- Lakr233/vphone-cli16.3k
- Category
- Engineering
- Updated
- 4d ago
- License
- MIT
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- No, instructions only
What it does
Declare a new firmware patch in a vphone patch set, add a patch set, or write a patch preset. Use when adding or changing a patch in FirmwarePatcher, when a patch needs a version gate, when a patch should be selectable or off by default, or when building an out-of-tree .vphonepatchset.
Authoring Patch Sets
Every patch this project applies is declared in a patch set, selected by a preset, and written only if the gate says so. A patch that exists in code but in no manifest still applies, it just cannot be turned off, and it prints a warning on every run. Declaring it is what makes it real.
The Three Layers
| Layer | Type | Where |
|---|---|---|
| A patch | VPhonePatchDeclaration | a set's patches array |
| A set | VPhonePatchSetManifest | FirmwarePatcher/PatchSets/*.swift, or a .vphonepatchset's Contents/Resources/Manifest.plist |
| A preset | VPhonePatchPreset | VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/*.plist |
The types live in VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/. The
in-tree sets and the shipped presets live in
VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/, listed by
FirmwarePatchSetCatalog.
Adding a Patch to an Existing Set
-
Write the patch as usual. Nothing about patch code changes: same
ARM64Disassemblermatching, sameARM64Encoder/ARM64constants for replacement bytes, sameemit(...). Follow the kernel patcher guardrails inAGENTS.md. -
Note the record identifier your patch emits, the
patchID:you pass toemit. That is what ties the patch to its declaration. -
Declare it in the right set, with the identifier being the record identifier, or the part before
.<site>when the patch writes several sites. Name it by the scheme in Naming:VPhonePatchDeclaration( identifier: "kernel-boot-my_patch", title: "What it is, in three or four words", summary: "What it does and why the guest needs it. One or two sentences.", target: .firmware(.kernelcache), applicability: VPhonePatchApplicability(iOSBase: .major(27)), bootEssential: true, )
