Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ SKILLS_FILE := $(dir $(lastword $(MAKEFILE_LIST)))SKILLS.txt
SKILLS_LOCK_FILE := $(dir $(lastword $(MAKEFILE_LIST)))skills-lock.json
SKILLS_EXTERNAL_SOURCE_DIR := $(HOME)/.agents/skills
SKILLS_GLOBAL_LOCK := $(HOME)/.agents/.skill-lock.json
SKILLS_PROJECT_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
SKILLS_CLI := $(SKILLS_PROJECT_DIR)/node_modules/.bin/skills

MCP_SRC := $(dir $(lastword $(MAKEFILE_LIST))).ruler/mcp.json
MCP_TARGET_DIRS := $(HOME)/.cursor $(HOME)/.claude $(HOME)/.codex
Expand Down Expand Up @@ -87,6 +89,10 @@ skills-install: ## Install external skills from skills-lock.json (skips already
@lock="$(SKILLS_LOCK_FILE)"; \
skills_dir="$(SKILLS_EXTERNAL_SOURCE_DIR)"; \
force="$${DOTAGENTS_FORCE_SKILLS_INSTALL:-0}"; \
if ! (cd "$(SKILLS_PROJECT_DIR)" && bun install --frozen-lockfile --minimum-release-age 0 --no-progress >/dev/null); then \
echo "Error: failed to install the skills SDK from bun.lock"; \
exit 1; \
fi; \
Comment on lines +92 to +95

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: skills-install now runs bun install --frozen-lockfile unconditionally on every invocation, before the all-installed idempotency check that used to let the recipe exit 0 without touching bun. This makes make sync and offline/idempotent re-syncs depend on a live bun registry and rewrites node_modules every run; when the registry is unreachable the whole sync now hard-fails even though all skills are already present. Gate the install on the CLI already existing so the no-op path stays bun-free: [ ! -x "$(SKILLS_CLI)" ] && ! (cd "$(SKILLS_PROJECT_DIR)" && bun install ... ) else error.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Makefile, line 92:

<comment>`skills-install` now runs `bun install --frozen-lockfile` unconditionally on every invocation, before the all-installed idempotency check that used to let the recipe exit 0 without touching bun. This makes `make sync` and offline/idempotent re-syncs depend on a live bun registry and rewrites node_modules every run; when the registry is unreachable the whole sync now hard-fails even though all skills are already present. Gate the install on the CLI already existing so the no-op path stays bun-free: `[ ! -x "$(SKILLS_CLI)" ] && ! (cd "$(SKILLS_PROJECT_DIR)" && bun install ... )` else error.</comment>

<file context>
@@ -87,6 +89,10 @@ skills-install: ## Install external skills from skills-lock.json (skips already
 	@lock="$(SKILLS_LOCK_FILE)"; \
 	skills_dir="$(SKILLS_EXTERNAL_SOURCE_DIR)"; \
 	force="$${DOTAGENTS_FORCE_SKILLS_INSTALL:-0}"; \
+	if ! (cd "$(SKILLS_PROJECT_DIR)" && bun install --frozen-lockfile --minimum-release-age 0 --no-progress >/dev/null); then \
+		echo "Error: failed to install the skills SDK from bun.lock"; \
+		exit 1; \
</file context>
Suggested change
if ! (cd "$(SKILLS_PROJECT_DIR)" && bun install --frozen-lockfile --minimum-release-age 0 --no-progress >/dev/null); then \
echo "Error: failed to install the skills SDK from bun.lock"; \
exit 1; \
fi; \
if [ ! -x "$(SKILLS_CLI)" ]; then \
if ! (cd "$(SKILLS_PROJECT_DIR)" && bun install --frozen-lockfile --minimum-release-age 0 --no-progress >/dev/null); then \
echo "Error: failed to install the skills SDK from bun.lock"; \
exit 1; \
fi; \
fi; \

if [ ! -f "$$lock" ]; then \
echo "Error: $$lock not found"; \
exit 1; \
Expand All @@ -109,7 +115,7 @@ skills-install: ## Install external skills from skills-lock.json (skips already
skill_args=$$(printf '%s\n' "$$names" | while IFS= read -r n; do printf ' --skill %s' "$$n"; done); \
count=$$(printf '%s\n' "$$names" | wc -l | tr -d ' '); \
echo "Installing $$count skill(s) from $$source..."; \
bun x skills add "$$source" --global --yes $$skill_args </dev/null; \
$(SKILLS_CLI) add "$$source" --global --yes $$skill_args </dev/null; \
status=$$?; \
still_missing=$$(printf '%s\n' "$$names" | while IFS= read -r n; do \
if [ ! -e "$$skills_dir/$$n" ] && [ ! -L "$$skills_dir/$$n" ]; then printf ' %s' "$$n"; fi; \
Expand All @@ -131,15 +137,16 @@ skills-refresh: ## Force a reinstall of all external skills from skills-lock.jso

.PHONY: skills-update
skills-update: ## Update installed external skills to latest and refresh the lock.
@bun x skills update --global --yes </dev/null
@cd "$(SKILLS_PROJECT_DIR)" && bun install --frozen-lockfile --minimum-release-age 0 --no-progress >/dev/null

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The bun install --frozen-lockfile --minimum-release-age 0 --no-progress command is duplicated verbatim in both skills-install and skills-update. A shared SKILLS_* variable (alongside the other SKILLS_ vars) would keep them in sync and make future flag changes a one-line edit.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Makefile, line 140:

<comment>The `bun install --frozen-lockfile --minimum-release-age 0 --no-progress` command is duplicated verbatim in both `skills-install` and `skills-update`. A shared `SKILLS_*` variable (alongside the other SKILLS_ vars) would keep them in sync and make future flag changes a one-line edit.</comment>

<file context>
@@ -131,15 +137,16 @@ skills-refresh: ## Force a reinstall of all external skills from skills-lock.jso
 .PHONY: skills-update
 skills-update: ## Update installed external skills to latest and refresh the lock.
-	@bun x skills update --global --yes </dev/null
+	@cd "$(SKILLS_PROJECT_DIR)" && bun install --frozen-lockfile --minimum-release-age 0 --no-progress >/dev/null
+	@$(SKILLS_CLI) update --global --yes </dev/null
 	@$(MAKE) skills-lock
</file context>

@$(SKILLS_CLI) update --global --yes </dev/null
@$(MAKE) skills-lock

.PHONY: skills-lock
skills-lock: ## Regenerate skills-lock.json from SKILLS.txt.
@global_lock="$(SKILLS_GLOBAL_LOCK)"; \
skills_dir="$(SKILLS_EXTERNAL_SOURCE_DIR)"; \
if [ ! -f "$$global_lock" ]; then \
echo "Error: $$global_lock not found; install a skill first (bun x skills add ... --global) to initialize it."; \
echo "Error: $$global_lock not found; install a skill first ($(SKILLS_CLI) add ... --global) to initialize it."; \
exit 1; \
fi; \
if ! jq -e '(.version | type == "number") and (.skills | type == "object")' "$$global_lock" >/dev/null; then \
Expand All @@ -151,7 +158,7 @@ skills-lock: ## Regenerate skills-lock.json from SKILLS.txt.
jq --argjson ondisk "$$ondisk" --argjson spec "$$spec" '. as $$lock | ($$lock.skills | with_entries(select(.key as $$k | $$ondisk | index($$k))) | with_entries(.value |= ({source, sourceType, sourceUrl, ref, skillPath, skillFolderHash} | with_entries(select(.value != null))))) as $$inst | reduce $$spec[] as $$s ({}; if ($$s.names | length) == 0 then . + ($$inst | with_entries(select(.value.source | ascii_downcase == ($$s.repo | ascii_downcase)))) else reduce $$s.names[] as $$n (.; ($$inst[$$n] // null) as $$hit | .[$$n] = (if $$hit != null and (($$hit.source | ascii_downcase) == ($$s.repo | ascii_downcase)) then $$hit elif .[$$n] != null then .[$$n] elif ($$s.repo | test("^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$$")) then {source: $$s.repo, sourceType: "github", sourceUrl: "https://github.com/\($$s.repo).git"} else {source: $$s.repo} end)) end) | {version: $$lock.version, skills: (to_entries | sort_by(.key) | from_entries)}' "$$global_lock" > "$(SKILLS_LOCK_FILE).tmp" && mv "$(SKILLS_LOCK_FILE).tmp" "$(SKILLS_LOCK_FILE)"; \
for repo in $$(printf '%s' "$$spec" | jq -r '.[] | select(.names | length == 0) | .repo'); do \
if ! jq -e --arg repo "$$repo" '[.skills[] | select(.source | ascii_downcase == ($$repo | ascii_downcase))] | length > 0' "$(SKILLS_LOCK_FILE)" >/dev/null; then \
echo "warn: no installed skills for install-all repo $$repo; run: bun x skills add $$repo --global --yes --skill '*'"; \
echo "warn: no installed skills for install-all repo $$repo; run: bun install --frozen-lockfile --minimum-release-age 0 && $(SKILLS_CLI) add $$repo --global --yes --skill '*'"; \
fi; \
done; \
undeclared=$$(jq -r --argjson ondisk "$$ondisk" --slurpfile out "$(SKILLS_LOCK_FILE)" '.skills | keys[] | . as $$k | select(($$ondisk | index($$k)) and ($$out[0].skills | has($$k) | not))' "$$global_lock" | paste -sd, -); \
Expand Down
8 changes: 8 additions & 0 deletions UPGRADE_LOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Dependency upgrade log

## 2026-08-06

- `skills`: updated from `^1.5.20` to `^1.5.22`, the current stable release.
- `bun.lock` records the resolved `skills@1.5.22` package and its new transitive dependencies.
- The Makefile now invokes the project-local SDK binary and refreshes dependencies with Bun's release-age check disabled, so the declared current release is available immediately.
- Verification: `./node_modules/.bin/skills --version`, frozen-lockfile install, `make skills-install` from both `dotagents/` and the upstream `~/dotfiles` checkout, and `make sync`.
16 changes: 14 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@biomejs/biome": "2.3.11",
"@intellectronica/ruler": "^0.3.23",
"lefthook": "^2.0.15",
"skills": "^1.5.20"
"skills": "^1.5.22"
},
"packageManager": "bun@1.2.22"
}