Skip to content
Merged
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
19 changes: 12 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,28 +89,33 @@ skills-clean: ## Remove all globally installed skills for a clean reinstall.

.PHONY: skills-install
skills-install: ## Install skills from SKILLS.txt (supports per-repo skill selection).
@grep -v '^\s*#' $(SKILLS_FILE) | grep -v '^\s*$$' | while IFS= read -r line; do \
@failed=0; \
grep -v '^\s*#' $(SKILLS_FILE) | grep -v '^\s*$$' | while IFS= read -r line; do \

Copilot AI Apr 3, 2026

Copy link

Choose a reason for hiding this comment

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

The grep patterns use \s (e.g., ^\s*#), which is not portable in POSIX/basic grep and is typically treated as a literal s unless using PCRE modes. This can cause comment/blank-line filtering to behave incorrectly on some systems. Prefer a POSIX-compatible character class like [[:space:]] (e.g., ^[[:space:]]*# and ^[[:space:]]*$$) or move this filtering into the shell loop with a case check.

Suggested change
grep -v '^\s*#' $(SKILLS_FILE) | grep -v '^\s*$$' | while IFS= read -r line; do \
grep -v '^[[:space:]]*#' $(SKILLS_FILE) | grep -v '^[[:space:]]*$$' | while IFS= read -r line; do \

Copilot uses AI. Check for mistakes.
repo=$$(echo "$$line" | awk '{print $$1}'); \
skill_args=$$(echo "$$line" | awk '{print $$2}' | tr ',' '\n' | sed '/^$$/d' | while read -r s; do printf " --skill $$s"; done); \
if [ -n "$$skill_args" ]; then \
echo "Installing selected skills from $$repo..."; \
if bunx skills add $$repo --global --yes $$skill_args </dev/null; then \
echo "✓ Installed $$repo (selective)"; \
else \
echo "✗ Failed to install $$repo"; \
exit 1; \
echo "✗ Failed to install $$repo (continuing...)"; \
failed=1; \
fi; \
else \
echo "Installing all skills from $$repo..."; \
if bunx skills add $$repo --global --yes </dev/null; then \
echo "✓ Installed $$repo (all)"; \
else \
echo "✗ Failed to install $$repo"; \
exit 1; \
echo "✗ Failed to install $$repo (continuing...)"; \
failed=1; \
fi; \
fi; \
done
@echo "All external skills installed successfully."
done; \
if [ "$$failed" = "1" ]; then \
echo "Some skills failed to install (see above)."; \
else \
echo "All external skills installed successfully."; \
fi

.PHONY: skills-install-repo
skills-install-repo: ## Install a single skill repo. Usage: make skills-install-repo REPO=owner/repo [SKILLS=a,b,c]
Expand Down