diff --git a/SKILL.md b/SKILL.md index 2321ea3..bf30c0e 100644 --- a/SKILL.md +++ b/SKILL.md @@ -8,7 +8,7 @@ description: > procedure, or set of instructions into a portable skill that works across Claude Code, GitHub Copilot, OpenAI Codex, and other compatible agents — or wants to deploy, install, publish, or symlink any skill into the agent skill directories ($HOME/.agents/skills, - $HOME/.claude/skills, $HOME/.cline/skills), even if they just say "make this skill available". + $HOME/.claude/skills), even if they just say "make this skill available". license: Proprietary metadata: author: workspace-swiss-knife @@ -83,7 +83,7 @@ task scaffold -- --skill-name="my-skill" --output-dir="/path/to/.agents/skills" # or directly via cli module: task cli:scaffold -- --skill-name="my-skill" --output-dir="/path/to/.agents/skills" -# Deploy a skill into $HOME/.agents/skills, $HOME/.claude/skills and $HOME/.cline/skills +# Deploy a skill into $HOME/.agents/skills and $HOME/.claude/skills task deploy -- --skill-dir="/absolute/path/to/skill" # copy instead of symlink, replace existing real directories: task deploy -- --skill-dir="/absolute/path/to/skill" --mode=copy --force @@ -209,7 +209,12 @@ resolves to **absolute paths** and targets both canonical agent skill directorie - `$HOME/.agents/skills/` - `$HOME/.claude/skills/` -- `$HOME/.cline/skills/` + +**About `$HOME`:** `$HOME` is the shell environment variable holding the current user's +home directory — e.g. `/Users/` on macOS, `/home/` on Linux. The +deploy action resolves it at runtime via Node's `os.homedir()`, so the same command works +for any user on any machine without hard-coding paths. `~` is the shell shorthand for the +same directory. ```bash cd /scripts @@ -235,7 +240,7 @@ Rules: - [ ] Scripts (if any) have `--help`, avoid interactive prompts, use structured output - [ ] If `scripts/` exists: `scripts/.gitignore` is present (node_modules/, dist/, .env, .venv/) - [ ] If `scripts/` exists: no source files (`.py`, `.ts`, `.js`, `.sh`) sit directly in `scripts/` — they must be in `scripts/src/` or `scripts/.scripts/` -- [ ] Skill is deployed (`task deploy`) so it resolves at `$HOME/.agents/skills/`, `$HOME/.claude/skills/` and `$HOME/.cline/skills/` via absolute paths +- [ ] Skill is deployed (`task deploy`) so it resolves at `$HOME/.agents/skills/` and `$HOME/.claude/skills/` via absolute paths ## If the skill isn't triggering reliably diff --git a/scripts/.scripts/cli/Taskfile.yml b/scripts/.scripts/cli/Taskfile.yml index 24bca21..812ed40 100644 --- a/scripts/.scripts/cli/Taskfile.yml +++ b/scripts/.scripts/cli/Taskfile.yml @@ -30,7 +30,7 @@ tasks: deploy: desc: | - Deploy a skill into $HOME/.agents/skills, $HOME/.claude/skills and $HOME/.cline/skills (absolute paths). + Deploy a skill into $HOME/.agents/skills and $HOME/.claude/skills (absolute paths). Usage: task cli:deploy -- --skill-dir="/absolute/path/to/skill" [--mode=symlink|copy] [--force] cmds: - | diff --git a/scripts/.scripts/cli/api/build.sh b/scripts/.scripts/cli/api/build.sh old mode 100644 new mode 100755 diff --git a/scripts/.scripts/cli/api/scaffold.sh b/scripts/.scripts/cli/api/scaffold.sh old mode 100644 new mode 100755 diff --git a/scripts/.scripts/cli/api/validate.sh b/scripts/.scripts/cli/api/validate.sh old mode 100644 new mode 100755 diff --git a/scripts/Taskfile.yml b/scripts/Taskfile.yml index f9f6e12..d520ff8 100644 --- a/scripts/Taskfile.yml +++ b/scripts/Taskfile.yml @@ -41,7 +41,7 @@ tasks: deploy: desc: | - Deploy a skill into $HOME/.agents/skills, $HOME/.claude/skills and $HOME/.cline/skills (absolute paths). + Deploy a skill into $HOME/.agents/skills and $HOME/.claude/skills (absolute paths). Usage: task deploy -- --skill-dir="/absolute/path/to/skill" [--mode=symlink|copy] [--force] cmds: - task: cli:deploy diff --git a/scripts/src/actions/deploy/action.ts b/scripts/src/actions/deploy/action.ts index a68e836..3e88d2e 100644 --- a/scripts/src/actions/deploy/action.ts +++ b/scripts/src/actions/deploy/action.ts @@ -7,7 +7,9 @@ * Default targets (always resolved to absolute paths): * $HOME/.agents/skills/ * $HOME/.claude/skills/ - * $HOME/.cline/skills/ + * + * $HOME is the current user's home directory (e.g. /Users/ on macOS, + * /home/ on Linux), resolved at runtime via os.homedir(). * * Modes: * symlink (default) — creates an absolute-path symlink to the skill source. @@ -39,7 +41,7 @@ import { basename, join, resolve } from "node:path"; // Helpers // --------------------------------------------------------------------------- -const DEFAULT_TARGETS = [".agents/skills", ".claude/skills", ".cline/skills"]; +const DEFAULT_TARGETS = [".agents/skills", ".claude/skills"]; const COPY_EXCLUDES = new Set(["node_modules", "dist", ".git"]); diff --git a/scripts/src/cli/commands.ts b/scripts/src/cli/commands.ts index 07ce8b7..b76ff29 100644 --- a/scripts/src/cli/commands.ts +++ b/scripts/src/cli/commands.ts @@ -8,7 +8,7 @@ * Actions: * validate — validate a skill directory against the agentskills.io spec * scaffold — scaffold a new skill directory from the built-in template - * deploy — deploy a skill into $HOME/.agents/skills, $HOME/.claude/skills, $HOME/.cline/skills + * deploy — deploy a skill into $HOME/.agents/skills and $HOME/.claude/skills * * Output is always YAML to stdout. Exit 0 on success, 1 on error. */ @@ -81,7 +81,8 @@ Actions: --skill-dir Path to the skill root directory (required) --mode symlink (default) or copy --targets Comma-separated target directories - (default: $HOME/.agents/skills,$HOME/.claude/skills,$HOME/.cline/skills) + (default: $HOME/.agents/skills,$HOME/.claude/skills; + $HOME = the current user's home directory) --force Replace an existing real directory at the destination Examples: