Constants§
Functions§
- apply_
patch_ pure - Apply a unified diff to original text, returning modified content.
Pure implementation — no subprocess, no
patchbinary required. Only handles patches produced bygenerate_patch()(unified diff format). Returns an error if the patch does not apply cleanly. - dir_
patch_ path - Path to a per-file patch within a directory entry.
e.g.
.skillfile/patches/skills/architecture-patterns/SKILL.md.patch - generate_
patch - Generate a unified diff of original → modified. Empty string if identical.
All output lines are guaranteed to end with ‘\n’.
Format:
--- a/{label}/+++ b/{label}, 3 lines of context. - has_
dir_ patch - has_
patch - patch_
path - Path to the patch file for a single-file entry.
e.g.
.skillfile/patches/agents/my-agent.patch - patches_
root - read_
patch - remove_
all_ dir_ patches - remove_
dir_ patch - remove_
patch - Remove the patch file for a single-file entry. No-op if it doesn’t exist.
- walkdir
- Recursively list all files under a directory, sorted.
- write_
dir_ patch - write_
patch