patch-context
Skill2 starsChanged yesterdayMITView on GitHub
Use when about to add, modify, or audit an entry in Eyas's patching catalog. Loads manifest.json, library.ts, and the Agentic-patching section of CLAUDE.md into context as a single bootstrap so subsequent edits don't need to re-discover the conventions. Trigger phrases: "add a patch script", "new RTR script", "another curated remediation", "patching catalog", "manifest entry".
In this repository8 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- audit-remediationsSkill
- audit-write-toolsSkill
- cost-summarySkill
- dev-serverSkill
- validate-bundleSkill
- verify-featureSkill
- verify-patchSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Run these reads in parallel — every catalog edit needs all three:
- Very specific: line 31
Always run /verify-patch <script_id> to confirm the manifest entry resolves, the rendered body is ASCII, and the spotlight pattern matches …
- Distinctive: line 33
If a new entry is broadly user-visible (new OS, new install method, new param), update the patching paragraph in CLAUDE.md so the catalog …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
patch-context
Bootstrap the working set for any change to lib/eyas-tools/rtr/patching/.
What to do
Run these reads in parallel — every catalog edit needs all three:
Read lib/eyas-tools/rtr/patching/manifest.json(full file)Read lib/eyas-tools/rtr/library.ts(full file —resolvePlan,matchRemediation,validateParams,asciiCoerceare all load-bearing)Read CLAUDE.mdand locate the "Agentic patching (the curated RTR script library)" section — read at least that section plus the surrounding context
Then list lib/eyas-tools/rtr/patching/scripts/windows/, scripts/linux/, scripts/macos/ to see what's already on disk.
Conventions worth re-reading every time
- Manifest order is first-declared-wins for spotlight remediation matching. Place narrow patterns (e.g.
win-wsl-update) ahead of broad ones (e.g.win-update-install). - Scripts must be ASCII.
asciiCoerceis a backstop (it drops anything non-ASCII after mapping smart punctuation); source files should be clean. No em-dashes (—), smart quotes, or ellipses (…) in.ps1/.shfiles. - Params are validated by
validateParamsagainst the manifest schema. Unknown keys are rejected. Enum + regex enforced (fullmatch semantics; a leading(?i)becomes the JSiflag — JS has no other inline flags, so don't use them). - Windows MSI installers go through
_lib/msi-installer.ps1::Install-FromUrl— never reinvent the download/install dance. Direct EXE installers pass-SilentArgsper-vendor. - Windows Update payloads use the WUA COM API (
Microsoft.Update.Session), never PSWindowsUpdate. Seewindows-update-install.ps1as the canonical example. - RTR transport is CloudFile-only (eyas-mcp's one-off private script,
lib/mcp/native-dispatch.ts). Inlinerunscript -Raw=corrupts single-quote bodies.
After editing
Always run /verify-patch <script_id> to confirm the manifest entry resolves, the rendered body is ASCII, and the spotlight pattern matches the intended remediation strings.
If a new entry is broadly user-visible (new OS, new install method, new param), update the patching paragraph in CLAUDE.md so the catalog list stays current.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

