sync-deps
Skill65 starsChanged 4 days agoMITView on GitHub
Refresh every dependency and version pin to its latest release (npm: at least 3 days old), run the dependency security audit, and maintain .github/notes/dependencies.md. Use when updating dependencies or any version pin (Bun, a GitHub Action, a pinned CLI), when the canary pre-push audit hook fails, or when `bun audit` flags a high advisory.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- add-packageSkill
- agent-browserSkill
- api-endpointSkill
- codebase-mapSkill
- db-migrationSkill
- delete-commentSkill
- designSkill
- devSkill
- docker-testSkill
- fontsSkill
- gh-commitSkill
- iceboxSkill
- portlessSkill
- releaseSkill
- runtime-apisSkill
- skills-managerSkill
- sync-docsSkill
- sync-ignoreSkill
- sync-shadcnSkill
- ui-verifySkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 38
After each move, git grep -nF '<old value>' -- ':!bun.lock' ':!CHANGELOG.md' lists every copy left: the docs that quote it, and in the …
- Very specific: line 51
Run bun run sync:shadcn (the sync-shadcn skill).
- Very specific: line 59
Docker: when Bun or anything in the image moved, build both images with --no-cache and run the single-libc and offline checks (the …
- Very specific: line 76
Add the --ignore flags the command in lefthook.yml carries, so an accepted exception stays quiet.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
Dependency Refresh and Audit
Two jobs share one record. A refresh moves everything to its latest release, an npm package to its latest that is at least 3 days old; an audit clears a high advisory. The pre-push hook runs the audit, on canary only (lefthook.yml). .github/notes/dependencies.md is the canonical record of every active override, ignored advisory and held version, and it stays in place even when there are none.
Refresh
A refresh moves the npm tree, then the pins outside it, which bun update never reaches.
1. Update the npm tree
bun run sync:depsIt runs bun update -r --latest, then bun install once more (postinstall rewrote ranges, so bun.lock is one install behind), then step 2's report of each copy of outside code that has a newer version and what to re-copy, then bun outdated -r, where only held groups and age-held (*) rows are expected. It exits 1 for a stale or drifted copy, 2 when only the registry or bun outdated could not be read, and 0 otherwise; a failed update or install stops it there with that command's exit code.
--latest crosses majors and rewrites the catalog; postinstall rewrites exact and tilde specs back to carets and reports the rest for a manual fix. For each package that crossed a major, read its current release notes or migration guide and grep the code for what it removed or renamed. Transitive copies stay wherever their parents' ranges hold them: a fresh lockfile barely moves them and only an override could lift them, so leave them. In the canonical starter, read ## Held versions in .github/notes/dependencies.md first: the update moves each held group past its hold, so put that group's catalog entries and bun.lock back to its held versions after it, unless step 4 proves the break fixed. A patch in root patchedDependencies is keyed to one exact version, so when the update moves a patched package, drop its patch if the new version carries the fix, else redo it with bun patch on the new version, committing it with --patches-dir .github/patches; in the canonical starter, ## Patched dependencies in the same .github/notes/dependencies.md names each one. Done when bun outdated -r prints no rows but the held groups' and the versions the release age keeps back, which it marks * (## Release age in .github/notes/dependencies.md).
2. Move the pins outside npm
These name a version no package.json range covers:
| Pin | Where it lives | Latest release |
| Bun | packageManager in the root package.json, FROM oven/bun:<version>-alpine in both Dockerfiles, bun-version: in every workflow job | npm view bun version |
| CLI-executed packages (canonical starter only) | GITPICK in packages/cli/src/git.ts, PGLAUNCH in packages/cli/src/db.ts | npm view <name> version |
| GitHub Actions | every uses: in .github/workflows/ | gh api repos/<owner>/<repo>/releases/latest --jq .tag_name |
| Node (canonical starter only) | node-version: in .github/workflows/cli-release.yml | the newest LTS line at https://nodejs.org/en/about/previous-releases |
| Inlined code from outside packages | each entry of packages/scripts/src/pins.json, and the file it names; a new copy gets its entry there, which bun run test enforces | bun run sync:deps prints it: every stale entry and what to re-copy |
| Vercel's Bun runtime | bunVersion in api/hono/vercel.json and web/next/vercel.json | the values https://vercel.com/docs/functions/runtimes/bun lists |
After each move, git grep -nF '<old value>' -- ':!bun.lock' ':!CHANGELOG.md' lists every copy left: the docs that quote it, and in the canonical starter the notes under .github/notes/. A hit that belongs to something else (a test fixture sharing the number) stays.
- Bun:
bun upgradefirst, so the local gates in step 4 run under the pinned release.@types/bunis a catalog entry, so step 1 moves it; it trails Bun's patch releases, so a lower patch there is expected. - CLI-executed packages: prove each by running it. A new gitpick fetches the same tree: run the old and the new version into two empty directories and
diff -rthem, then again as an overlay (-o) onto an existing checkout. A new pglaunch provisions and migrates throughinit --dbagainst a running Docker. - GitHub Actions: a major tag is the pin, so only a new major moves it. Read that major's release notes against how each workflow uses the action: its inputs, privileged triggers such as
pull_request_targetandworkflow_run, and any script thatrequires a module. A pull request runs its own copy of only itspull_requestandpull_request_reviewworkflows.pull_request_targetruns the base branch's copy, apushworkflow runs on the nextcanarypush that matches its path filter, and a workflow on a pull request closed intomainor onworkflow_runruns at the next release. So each workflow whose action moved has its first real run after the PR, and that run is the one to watch. - Node: the comment beside it names the npm floor it keeps, so it moves to a new LTS line, not to every release.
- Scalar API reference (
pins.json): move the entry andSCALAR_ESM_URLtogether. The page imports Scalar's ESM build from jsDelivr at that exact version. Prove a move in a browser:/api/docsrenders the OpenAPI spec, and its chunks load from the new version's path. - Vercel's Bun runtime:
bunVersionnames a release line, not a release, and Vercel moves the patch itself, so a Bun patch release changes nothing here. Move it only when the docs list a new line and the code is checked against that line's breaking changes;web/next/content/docs/deployment/vercel.mdx(canonical starter only) quotes the line and the accepted values.
Done when every row is on its latest release and the old-value grep returns no hit that belongs to the pin.
3. Re-sync shadcn
Run bun run sync:shadcn (the sync-shadcn skill). The sync runs shadcn@latest, so the registry and web/next/src/app/shadcn.css drift between refreshes, and a refresh is when to catch them up. Done when the diff is empty or holds only registry changes, and the type check passes.
4. Prove nothing broke
A refresh touches every surface, so verify every surface:
- Gates: the audit command
lefthook.ymlruns, thenbun run format:check,bun run lint,bun run check-types,bun run test, andbun run build, withTURBO_FORCE=trueset so every turbo task executes, since a cache hit replays an old green. - End to end (canonical starter only): the golden suite against a local stack, twice (the
docker-testskill). - Docker: when Bun or anything in the image moved, build both images with
--no-cacheand run the single-libc and offline checks (thedocker-testskill). - Browser: drive the pages built on the packages that moved (the
ui-verifyskill), for example the docs search after Fumadocs moves, or the console tables and their menus after Base UI moves.
When something breaks, bisect: pin one package group back to the base branch's versions, keep every other update, and retest. Packages that release together, such as fumadocs-core, fumadocs-ui, and fumadocs-mdx, move back together. Fix the code where the fix is ours; a group that has to stay back keeps its older versions, with the reason in the PR body and, in the canonical starter, an entry under ## Held versions in .github/notes/dependencies.md, and its packages, with the versions the release age keeps back (marked *), are the only rows bun outdated -r is then expected to print. Done when every gate is green, the suite passes twice, and the browser pass is clean.
5. Ship
One PR titled build(deps): ..., so the window can release (the gh-commit skill). Its body lists each pin from step 2 with its old and new version, and any breakage with its fix. Done when its CI is green and, after the merge, the canary push's workflows pass; a workflow that first runs at the next release is checked then.
Audit
1. Run
bun audit --audit-level highAdd the --ignore flags the command in lefthook.yml carries, so an accepted exception stays quiet. Done when the output is clean, or you have the list of high advisories to clear.
2. Fix on the highest rung that works
Fix each advisory on the highest rung that lifts the whole tree; drop a rung only when the one above cannot:
- Update the vulnerable dependency (best): bump its
catalog:entry in the rootpackage.json. - Update the parent that pins the vulnerable transitive dependency.
Override (last resort): pin the patched version in root
overrides:"overrides": { "<vulnerable-package>": "<patched-version>" }
When the advisory lists no patched version at all, none of the three can lift it. Then the gate ignores that one advisory by ID: add --ignore <GHSA-id>, with a one-line comment naming the package and why (the notes below do not ship to a fork), to the audit command in both lefthook.yml and .github/workflows/auto-check-build.yml, mirror it in the docs that quote them (manage/code-quality.mdx, contributing.mdx), and record it under ## Ignored advisories in .github/notes/dependencies.md. It is a security exception that ships to every fork, so it needs the user's go.
bun audit fix applies the first two rungs mechanically when a patched version exists within the ranges parents allow; --dry-run previews and --latest also crosses majors, so review what it picks before accepting. Read the advisory's affected ranges before reaching for a lower rung: the audit header lists every installed version of the package, not only the vulnerable ones. Follow with bun dedupe to collapse duplicate versions the tree accumulated.
Then bun i and prove nothing broke. Done when bun run check-types && bun run build pass and bun audit --audit-level high reports no high advisories.
3. Record every override and ignore
Every ignored advisory needs a block under ## Ignored advisories with the same four fields, and leaves all four places together. Every entry in root overrides needs a matching block in .github/notes/dependencies.md, in the file's existing shape: one ### <package> → <version> under ## Active overrides, carrying Advisory (link, severity, affected range), Why an override (why an update or parent bump can't lift the tree), Risk, and Exit criteria (when to remove it). Delete a block when its override goes. Done when every override has a block and no block outlives its override.
4. Ship
package.json, bun.lock, and .github/notes/dependencies.md go through a normal PR.
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.

