From 03f09fbcadf36273b977328a52708732135ada6d Mon Sep 17 00:00:00 2001 From: Amolith Date: Wed, 31 Dec 2025 08:31:32 -0700 Subject: [PATCH] build: add Makefile for skill installation Replace GNU Stow with Make targets for installing/uninstalling skills. Supports tab completion for skill names and configurable SKILL_DIR. Assisted-by: Claude Opus 4.5 via Crush --- Makefile | 37 +++++++++++++++++++++++++++++++++++++ README.md | 30 ++++++++++++++++++------------ 2 files changed, 55 insertions(+), 12 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..f5e280b6efbc05d06e4e0cd31574661ee80f095e --- /dev/null +++ b/Makefile @@ -0,0 +1,37 @@ +SKILL_DIR ?= $(HOME)/.config/crush/skills +SKILLS := $(patsubst skills/%/,%,$(wildcard skills/*/)) + +UNINSTALL_TARGETS := $(addprefix uninstall-,$(SKILLS)) + +.PHONY: list all uninstall $(SKILLS) $(UNINSTALL_TARGETS) + +list: + @echo "Available skills:" + @printf " %s\n" $(SKILLS) + @echo "" + @echo "Install with: make [SKILL_DIR=path]" + @echo "Default target: $(SKILL_DIR)" + +all: $(SKILLS) + +$(SKILLS): + @mkdir -p "$(SKILL_DIR)" + @ln -sfn "$(CURDIR)/skills/$@" "$(SKILL_DIR)/$@" + @echo "Installed $@ → $(SKILL_DIR)/$@" + +$(UNINSTALL_TARGETS): + $(eval SKILL := $(patsubst uninstall-%,%,$@)) + @if [ -e "$(SKILL_DIR)/$(SKILL)" ]; then \ + rm -f "$(SKILL_DIR)/$(SKILL)"; \ + echo "Uninstalled $(SKILL) from $(SKILL_DIR)"; \ + else \ + echo "Warning: $(SKILL) not found in $(SKILL_DIR)" >&2; \ + fi + +uninstall: + @for skill in $(SKILLS); do \ + if [ -e "$(SKILL_DIR)/$$skill" ]; then \ + rm -f "$(SKILL_DIR)/$$skill"; \ + echo "Uninstalled $$skill from $(SKILL_DIR)"; \ + fi; \ + done diff --git a/README.md b/README.md index 1b58e334a049315e457ad0259f2d9e8bb374a88a..eb7d7c7e3cfa27a6b6da5a1ebbc61417d70dddb4 100644 --- a/README.md +++ b/README.md @@ -39,28 +39,34 @@ agent capabilities through a standardised format. ## Installation -Clone the repository, then symlink the skills you want into your agent's -skills directory. +Clone the repository, then install skills via `make` or manual symlinks. ```sh git clone https://git.secluded.site/agent-skills cd agent-skills ``` -### With GNU Stow +### With Make -Get it from your preferred/available package manager (definitely true on -Linux, I assume so on macOS and Windows) +Skills install to `~/.config/crush/skills/` by default. Override by +setting `SKILL_DIR`. Tab completion works so you don't have to remember +skill names or copy/paste. ```sh -# Install all skills -stow -d skills -t ~/.config/crush/skills . +# List available skills +make list -# Install specific skills -stow -d skills -t ~/.config/crush/skills authoring-skills … +# Install all skills to default dir +make all -# Remove a skill -stow -D -d skills -t ~/.config/crush/skills formatting-commits +# Install specific skills to Claude Code +SKILL_DIR=~/.claude/skills make authoring-skills formatting-commits + +# Remove a specific skill from Amp +make uninstall-authoring-skills SKILL_DIR=~/.config/agents/skills + +# Remove all skills from Codex +make uninstall SKILL_DIR=~/.codex/skills ``` ### With symlinks @@ -92,7 +98,7 @@ cd ~/path/to/agent-skills git pull ``` -Symlinked skills, either with stow or regular symlinks, update automatically. +Symlinked skills update automatically. ## Contributions