Keep Your Local SKILL.md Edits When npx skills Updates
Public skills are rarely usable untouched: you narrow a trigger description, tweak a rule, or set a skill to Manual. Here is how to update upstream packages without losing those changes.
Most public skills installed via npx skills need small local adjustments before they behave well in a real workflow:
- Tightening a broad
descriptionso the skill stops colliding with your other skills. - Adding a
"Not for ..."boundary line or adjusting a project convention inSKILL.md. - Marking the skill Manual (
disable-model-invocation: trueinSKILL.mdandpolicy.allow_implicit_invocation: falseinagents/openai.yaml) so it stops taxing every session. - Adding a local helper file or removing an irrelevant reference file.
The problem shows up the next time you run npx skills update: the CLI replaces the installed skill folder with the latest upstream files. Your description edits disappear, Manual skills quietly flip back to Automatic, and parked skills whose lock entries remained in ~/.agents/.skill-lock.json get reinstalled.
What npx skills tracks in ~/.agents/.skill-lock.json
When you install a public skill from GitHub with npx skills, the CLI writes an entry into ~/.agents/.skill-lock.json recording:
- The upstream repository (
sourceandsourceType) - The path to
SKILL.mdinside that repository (skillPath) - The installed commit hash (
commit) or folder hash (skillFolderHash)
The lock file knows where the skill came from, but npx skills does not keep a local baseline copy of the original files or run a three-way merge when replacing them.
How three-way patch merging solves the overwrite problem
To merge your local edits safely into an upstream update, you need three versions of every changed file—the same inputs git merge-file uses:
- Base (original): The exact skill folder at the commit recorded in
~/.agents/.skill-lock.jsonwhen you installed it. - Yours (local): Your current skill folder on disk, with your edits.
- Theirs (updated): The new upstream folder fetched by
npx skills.
With those three trees, every local change falls into a clear case:
| Change type | What happens on update |
|---|---|
| You edited a file upstream did not touch | Your version is kept verbatim. |
| Both you and upstream edited different lines | Three-way merge combines both changes cleanly. |
| Both you and upstream edited the same lines | Conflict is never silently forced; upstream’s file is kept and your exact unified diff is shown so you can reapply what still fits. |
| You added a new local file | Your file is restored unless upstream added a different file with the same name. |
| You deleted an upstream file | The file stays deleted unless upstream modified it. |
Separating load switches from real edits
One subtle detail makes multi-agent patching much cleaner: toggling a skill between Automatic and Manual modifies disable-model-invocation: in SKILL.md and policy.allow_implicit_invocation: in agents/openai.yaml. Those switches are state settings, not content patches.
In Skillroom, diff detection strips those two load-switch keys (and ignores noise like .DS_Store, .git, metadata.json, and __pycache__) before deciding whether a skill is marked Patched. Switching a skill to Manual never clutters your Patched view, and after an update Skillroom restores your Manual state automatically.
How Skillroom runs a patch-safe update
When you update a public skill through Skillroom:
- Fetch the baseline once: If Skillroom does not already have the original installed commit cached locally, it runs a shallow sparse checkout (
git fetch --depth 1 --filter=blob:noneplussparse-checkoutfor just that skill’s folder) into its local profile folder. - Snapshot before changing anything: Skillroom copies both your current folder and your pre-update copy so every update can be diffed or rolled back.
- Run
npx skillswith telemetry off: Skillroom invokes the open-sourceskillsCLI withDISABLE_TELEMETRYandDO_NOT_TRACKset. - Reapply Manual state and merge patches: Manual switches are preserved, and every non-conflicting local edit merges back into the new files. Any conflicting file stays cleanly on the upstream version with your previous diff listed alongside it.
- Respect parked skills: When you park a public skill in Skillroom, its entry is temporarily removed from
~/.agents/.skill-lock.json(and saved in the parked sidecar.skillroom/<folder>.json), so runningnpx skills update—even from a terminal outside Skillroom—will not resurrect parked skills. Restoring the skill puts its exact lock entry back.
Inspecting your local setup from the terminal
You can check which skills are public vs. owned, which ones have description problems, or verify your lock state with the Skillroom CLI:
# List public skills installed via npx skills
skillroom list --origin public
# Inspect a single skill's lock origin, paths, and token cost
skillroom show nextjs-app-router
If you want to weigh whether to keep managing skills with raw scripts and npx skills or add a manager on top, read Skillroom vs manual symlinks and the npx skills CLI.