[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B0VJ3Q0YMCTJY69FEJ4100":3,"skill-same:01M7B0VJ3Q0YMCTJY69FEJ4100":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":13,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":43,"install":44,"resources":57},"01M7B0VJ3Q0YMCTJY69FEJ4100","version-single-source",null,"Use when adding a new component dependency or versioning a binary in install\u002Fboot scripts.","gitricko\u002F.minions","gitricko","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F18060558?v=4","01M7B0KG9EHG0CZ0QT1EN5YPCR","01M7B0KGA0ZV14R7SKBF3B5SCT",2,"MIT","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fversion-single-source\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: version-single-source\ndescription: Use when adding a new component dependency or versioning a binary in install\u002Fboot scripts.\nversion: 1.0.0\nauthor: Hermes Agent\nlicense: MIT\nplatforms: [linux]\nmetadata:\n  hermes:\n    tags: [versions, dependencies, install, maintainability, deps]\n    related_skills: [self-update-fix, ci-debugging]\n---\n\n# Single Source of Truth for Component Versions\n\nEvery hardcoded version is a maintenance trap. Use the `deps.yaml → versions.env`\npattern for all component version management.\n\n## The rule\n\n**Never hardcode a version in a script file.** Always source it from the\ncentral lockfile (`etc\u002Fversions.env`), which is generated from\n`etc\u002Fdeps.yaml` by `scripts\u002Fsync-versions.sh`.\n\n## How the pattern works\n\n```\netc\u002Fdeps.yaml          ←  single source of truth (edit this)\n       ↓ sync-versions.sh\netc\u002Fversions.env       ←  generated (do not edit; regenerated on every install)\n       ↓ . source\nlib\u002F*.sh install_*()   ←  uses ${COMPONENT_VERSION}\n```\n\n## Adding a new dependency\n\n1. **Add to `etc\u002Fdeps.yaml`:**\n   ```yaml\n   dependencies:\n     - name: MY_NEW_DEP\n       version: \"1.2.3\"\n       source_type: github_tag\n       repo: org\u002Frepo-name\n       sha_source: none\n   ```\n\n2. **Re-generate `versions.env`:**\n   ```bash\n   bash scripts\u002Fsync-versions.sh\n   ```\n\n3. **In your `lib\u002F` script, source versions.env at the top of the function:**\n   ```bash\n   # shellcheck disable=SC1091,SC2153\n   if [ -f \"${MINIONS_HOME}\u002Fetc\u002Fversions.env\" ]; then\n       . \"${MINIONS_HOME}\u002Fetc\u002Fversions.env\"\n   fi\n   my_dep_version=\"${MY_NEW_DEP_VERSION:-1.2.3}\"\n   ```\n   The fallback default (`:-1.2.3`) protects against standalone contexts\n   where `versions.env` may not have been copied yet.\n\n4. **Validate:**\n   ```bash\n   grep MY_NEW_DEP etc\u002Fversions.env\n   bash -n lib\u002Fmy-new-dep.sh\n   shellcheck lib\u002Fmy-new-dep.sh\n   ```\n\n## The 4-file sync invariant\n\n`deps.yaml` is the single source of truth. Three derived files must stay in sync — CI enforces this as blocking:\n\n| Derived file | Generator | CI job |\n|--------------|-----------|--------|\n| `etc\u002Fversions.env` | `scripts\u002Fsync-versions.sh` | `version-sync` |\n| `.node-version` | `scripts\u002Fsync-versions.sh` (NODE entry) | `version-sync` |\n| `README.md` badges | `scripts\u002Fsync-readme-badges.sh` | `version-sync` (badge check) |\n\nAfter editing `deps.yaml`, always run both generators before committing:\n\n```bash\nbash scripts\u002Fsync-versions.sh\nbash scripts\u002Fsync-readme-badges.sh\nbash scripts\u002Fsync-versions.sh --check && bash scripts\u002Fsync-readme-badges.sh --check\n```\n\n## Fixing dependency drift (advisory CI failure)\n\n`dependency-drift` is advisory (`continue-on-error: true`) — it queries upstream (GitHub tags \u002F npm) and fails when a pin is behind `latest`. Fix with `bump.sh --open-pr`, which fetches real SHA256 for tarball deps (NODE\u002FUV) and regenerates derived files:\n\n```bash\nbash scripts\u002Fcheck-updates.sh --json  # identify outdated dep\nbash scripts\u002Fbump.sh DEP=VERSION --open-pr  # e.g. NODE=v26.11.0 — strips leading v for release_tarball, fetches SHASUMS256.txt\nbash scripts\u002Fsync-readme-badges.sh       # bump.sh syncs versions.env + .node-version; badges need separate step\nbash scripts\u002Fcheck-updates.sh --json     # verify 0 outdated\n```\n\nFor release_tarball deps the pin omits the leading `v` (URL template already embeds it); github_tag deps keep it. For `sha_source: none` deps (npm, github_tag) a plain `bump.sh DEP=VERSION` is correct — `--open-pr` only matters for tarball deps (`sha_source: shasums` \u002F `release_assets`) that need SHA fetching; npm bumps never fetch SHAs.\n\n## Common mistakes\n\n| Mistake | Symptom | Fix |\n|---------|---------|-----|\n| Hardcoded version in `lib\u002Ffoo.sh` | Bump `deps.yaml` but install still gets old version | Source `versions.env` |\n| Missing `sha_source: none` | `sync-versions.sh` tries to fetch checksums and fails | Add explicit `sha_source: none` |\n| Source inside function (not top-level) | shellcheck SC2153 \"MINIONS_HOME may not be assigned\" | Move `. versions.env` to module top-level |\n| Omitting shellcheck disable | CI `shellcheck` test fails with SC1091\u002FSC2153 | Add `# shellcheck disable=SC1091,SC2153` above the source line |\n| Bumped `deps.yaml` but forgot derived files | `version-sync` fails \"badges\u002Fversions.env out of date\" | Run both `sync-versions.sh` and `sync-readme-badges.sh` |\n| Ran `bump.sh` without `--open-pr` for NODE\u002FUV | SHA256 placeholders stale, install fetches wrong tarball | Use `--open-pr` so `populate_shas` fetches real SHAs |\n| Deferred pin for an opt-in dep (\"pin later\") | Latest drifts silently, `version-sync` passes but installed version unauditable | Pin every managed binary in `deps.yaml` even if install is opt-in (`--tailscale` still needs `TAILSCALE_VERSION`) |\n| Used `curl pipe sh` latest for a dep that releases static tarballs on a separate host (e.g. `pkgs.tailscale.com`) | GitHub Releases has no assets, `sha_source: none` + `github_tag` is correct — tarball pin via `release_tarball` only if you actually fetch from GitHub | Verify upstream release layout first: if tarballs live off-GitHub, keep `github_tag`\u002F`sha_source: none` and fetch from the vendor host with a `TAILSCALE_VERSION` pin |\n| Lazy optional npm deps not pulled by `--no-optional` install | Runtime `MODULE_NOT_FOUND` \u002F \"X unavailable — install the optional dependency\" for a package the main install claimed success on | The main package lazy-loads the dep via `createRequire` and it is not in its `package.json` deps. Add a second `npm install` WITHOUT `--no-optional` for that dep (+ its platform binding) in the same `ensure_*()` function, guarded by `PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1` etc. Mark the block with the upstream issue and a \"revert when upstream bundles it\" note so it is removed once fixed. |\n\n## Real-world example\n\n`lib\u002Fmnemon.sh` hardcoded `mnemon_version=\"0.2.5\"` (4 releases behind\n`0.2.9`), while `etc\u002Fversions.env` had `MNEMON_VERSION=\"0.2.9\"`. The\ninstaller still *worked* (download succeeded), but installed a stale\nversion silently. Fix: source `versions.env` at module top-level, use\n`${MNEMON_VERSION:-0.2.9}` with a fallback default.","# Single Source of Truth for Component Versions\n\nEvery hardcoded version is a maintenance trap. Use the `deps.yaml → versions.env`\npattern for all component version management.\n\n## The rule\n\n**Never hardcode a version in a script file.** Always source it from the\ncentral lockfile (`etc\u002Fversions.env`), which is generated from\n`etc\u002Fdeps.yaml` by `scripts\u002Fsync-versions.sh`.\n\n## How the pattern works\n\n```\netc\u002Fdeps.yaml          ←  single source of truth (edit this)\n       ↓ sync-versions.sh\netc\u002Fversions.env       ←  generated (do not edit; regenerated on every install)\n       ↓ . source\nlib\u002F*.sh install_*()   ←  uses ${COMPONENT_VERSION}\n```\n\n## Adding a new dependency\n\n1. **Add to `etc\u002Fdeps.yaml`:**\n   ```yaml\n   dependencies:\n     - name: MY_NEW_DEP\n       version: \"1.2.3\"\n       source_type: github_tag\n       repo: org\u002Frepo-name\n       sha_source: none\n   ```\n\n2. **Re-generate `versions.env`:**\n   ```bash\n   bash scripts\u002Fsync-versions.sh\n   ```\n\n3. **In your `lib\u002F` script, source versions.env at the top of the function:**\n   ```bash\n   # shellcheck disable=SC1091,SC2153\n   if [ -f \"${MINIONS_HOME}\u002Fetc\u002Fversions.env\" ]; then\n       . \"${MINIONS_HOME}\u002Fetc\u002Fversions.env\"\n   fi\n   my_dep_version=\"${MY_NEW_DEP_VERSION:-1.2.3}\"\n   ```\n   The fallback default (`:-1.2.3`) protects against standalone contexts\n   where `versions.env` may not have been copied yet.\n\n4. **Validate:**\n   ```bash\n   grep MY_NEW_DEP etc\u002Fversions.env\n   bash -n lib\u002Fmy-new-dep.sh\n   shellcheck lib\u002Fmy-new-dep.sh\n   ```\n\n## The 4-file sync invariant\n\n`deps.yaml` is the single source of truth. Three derived files must stay in sync — CI enforces this as blocking:\n\n| Derived file | Generator | CI job |\n|--------------|-----------|--------|\n| `etc\u002Fversions.env` | `scripts\u002Fsync-versions.sh` | `version-sync` |\n| `.node-version` | `scripts\u002Fsync-versions.sh` (NODE entry) | `version-sync` |\n| `README.md` badges | `scripts\u002Fsync-readme-badges.sh` | `version-sync` (badge check) |\n\nAfter editing `deps.yaml`, always run both generators before committing:\n\n```bash\nbash scripts\u002Fsync-versions.sh\nbash scripts\u002Fsync-readme-badges.sh\nbash scripts\u002Fsync-versions.sh --check && bash scripts\u002Fsync-readme-badges.sh --check\n```\n\n## Fixing dependency drift (advisory CI failure)\n\n`dependency-drift` is advisory (`continue-on-error: true`) — it queries upstream (GitHub tags \u002F npm) and fails when a pin is behind `latest`. Fix with `bump.sh --open-pr`, which fetches real SHA256 for tarball deps (NODE\u002FUV) and regenerates derived files:\n\n```bash\nbash scripts\u002Fcheck-updates.sh --json  # identify outdated dep\nbash scripts\u002Fbump.sh DEP=VERSION --open-pr  # e.g. NODE=v26.11.0 — strips leading v for release_tarball, fetches SHASUMS256.txt\nbash scripts\u002Fsync-readme-badges.sh       # bump.sh syncs versions.env + .node-version; badges need separate step\nbash scripts\u002Fcheck-updates.sh --json     # verify 0 outdated\n```\n\nFor release_tarball deps the pin omits the leading `v` (URL template already embeds it); github_tag deps keep it. For `sha_source: none` deps (npm, github_tag) a plain `bump.sh DEP=VERSION` is correct — `--open-pr` only matters for tarball deps (`sha_source: shasums` \u002F `release_assets`) that need SHA fetching; npm bumps never fetch SHAs.\n\n## Common mistakes\n\n| Mistake | Symptom | Fix |\n|---------|---------|-----|\n| Hardcoded version in `lib\u002Ffoo.sh` | Bump `deps.yaml` but install still gets old version | Source `versions.env` |\n| Missing `sha_source: none` | `sync-versions.sh` tries to fetch checksums and fails | Add explicit `sha_source: none` |\n| Source inside function (not top-level) | shellcheck SC2153 \"MINIONS_HOME may not be assigned\" | Move `. versions.env` to module top-level |\n| Omitting shellcheck disable | CI `shellcheck` test fails with SC1091\u002FSC2153 | Add `# shellcheck disable=SC1091,SC2153` above the source line |\n| Bumped `deps.yaml` but forgot derived files | `version-sync` fails \"badges\u002Fversions.env out of date\" | Run both `sync-versions.sh` and `sync-readme-badges.sh` |\n| Ran `bump.sh` without `--open-pr` for NODE\u002FUV | SHA256 placeholders stale, install fetches wrong tarball | Use `--open-pr` so `populate_shas` fetches real SHAs |\n| Deferred pin for an opt-in dep (\"pin later\") | Latest drifts silently, `version-sync` passes but installed version unauditable | Pin every managed binary in `deps.yaml` even if install is opt-in (`--tailscale` still needs `TAILSCALE_VERSION`) |\n| Used `curl pipe sh` latest for a dep that releases static tarballs on a separate host (e.g. `pkgs.tailscale.com`) | GitHub Releases has no assets, `sha_source: none` + `github_tag` is correct — tarball pin via `release_tarball` only if you actually fetch from GitHub | Verify upstream release layout first: if tarballs live off-GitHub, keep `github_tag`\u002F`sha_source: none` and fetch from the vendor host with a `TAILSCALE_VERSION` pin |\n| Lazy optional npm deps not pulled by `--no-optional` install | Runtime `MODULE_NOT_FOUND` \u002F \"X unavailable — install the optional dependency\" for a package the main install claimed success on | The main package lazy-loads the dep via `createRequire` and it is not in its `package.json` deps. Add a second `npm install` WITHOUT `--no-optional` for that dep (+ its platform binding) in the same `ensure_*()` function, guarded by `PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1` etc. Mark the block with the upstream issue and a \"revert when upstream bundles it\" note so it is removed once fixed. |\n\n## Real-world example\n\n`lib\u002Fmnemon.sh` hardcoded `mnemon_version=\"0.2.5\"` (4 releases behind\n`0.2.9`), while `etc\u002Fversions.env` had `MNEMON_VERSION=\"0.2.9\"`. The\ninstaller still *worked* (download succeeded), but installed a stale\nversion silently. Fix: source `versions.env` at module top-level, use\n`${MNEMON_VERSION:-0.2.9}` with a fallback default.",{"name":5,"author":23,"license":14,"version":24,"metadata":25,"platforms":36,"description":7},"Hermes Agent","1.0.0",{"hermes":26},{"tags":27,"related_skills":33},[28,29,30,31,32],"versions","dependencies","install","maintainability","deps",[34,35],"self-update-fix","ci-debugging",[37],"linux","main","e95aec76487a22bbbc23b63234724bc7178d4692","skills\u002Fversion-single-source","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions","https:\u002F\u002Fgithub.com\u002Fgitricko","2026-11-13 16:00:00",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add gitricko\u002F.minions --skill version-single-source",{"tool":50,"command":51},"bunx","bunx skills add gitricko\u002F.minions --skill version-single-source",{"tool":53,"command":54},"pnpm","pnpm dlx skills add gitricko\u002F.minions --skill version-single-source","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fversion-single-source\u002FSKILL.md",true,[],[59,66,73,79,86,93],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M7B0V888DV8J3JY5W9Z6WCF3","tdd","Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions \"red-green-refactor\", or wants integration tests.","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Ftdd\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M7B0TVFM38JH3PBA2K219Z2X","shell-path-login","Use when a binary or script works in one shell context but not another (interactive vs non-interactive login vs non-login shell).","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fshell-path-login\u002FSKILL.md",[],[],{"skillNo":74,"name":34,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M7B0TKFCTVQBTSNF9WF1MXJ6","Fix a failing dependency update PR. Use when a self-update PR's CI fails, or when invoked by scripts\u002Fself-update-fix.sh.","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fself-update-fix\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M7B0TB57WEW0E6E9874K3C72","pr-change-log","Use when a multi-commit PR needs its description written\u002Fupdated, or when closing out a long branch with many fix commits.","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fpr-change-log\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":18},"01M7B0T2FGSV0ZFRZ46PG4BBY2","persistent-knowledge","Persistent skills\u002Fknowledge in Codespace via symlinks.","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fpersistent-knowledge\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":18},"01M7B0SSS6R0QN67MZNTEM3GWC","mnemon-seed-persistence","Persist Mnemon memory across Codespace rebuilds.","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fmnemon-seed-persistence\u002FSKILL.md",[],[]]