Restrict deploy targets to .agents and .claude skill dirs
Remove $HOME/.cline/skills from the default deploy targets everywhere (SKILL.md, deploy action, CLI help, Taskfiles), document what $HOME is and how it is resolved, and restore the execute bit on the cli api scripts (build.sh, scaffold.sh, validate.sh) so 'task build' works. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -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/<skill-name>`
|
||||
- `$HOME/.claude/skills/<skill-name>`
|
||||
- `$HOME/.cline/skills/<skill-name>`
|
||||
|
||||
**About `$HOME`:** `$HOME` is the shell environment variable holding the current user's
|
||||
home directory — e.g. `/Users/<username>` on macOS, `/home/<username>` 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 <skill-manager>/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/<name>`, `$HOME/.claude/skills/<name>` and `$HOME/.cline/skills/<name>` via absolute paths
|
||||
- [ ] Skill is deployed (`task deploy`) so it resolves at `$HOME/.agents/skills/<name>` and `$HOME/.claude/skills/<name>` via absolute paths
|
||||
|
||||
## If the skill isn't triggering reliably
|
||||
|
||||
|
||||
@@ -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:
|
||||
- |
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
@@ -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
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
* Default targets (always resolved to absolute paths):
|
||||
* $HOME/.agents/skills/<skill-name>
|
||||
* $HOME/.claude/skills/<skill-name>
|
||||
* $HOME/.cline/skills/<skill-name>
|
||||
*
|
||||
* $HOME is the current user's home directory (e.g. /Users/<username> on macOS,
|
||||
* /home/<username> 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"]);
|
||||
|
||||
|
||||
@@ -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> Path to the skill root directory (required)
|
||||
--mode <mode> symlink (default) or copy
|
||||
--targets <dirs> 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:
|
||||
|
||||
Reference in New Issue
Block a user