mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 20:34:19 +00:00
Add a build hook that runs once before all runbooks, enabling automatic binary rebuild. Lifecycle is now: build (once) → [per runbook: setup → steps → teardown] Build hook uses os/exec directly (not session executor), outputs to stderr, and aborts immediately on failure. Fix all 17 runbooks to pass in devcontainer: - Adapt to session executor's set -eo pipefail (use cmd || EXIT=$? pattern for expected non-zero exits) - Replace embedded ```bash in heredocs with printf to avoid confusing the runbook parser - Fix negated assertion gotchas (Not FAIL, No such file) - Remove fragile verify code blocks (multi-block merge issues) - Fix step number collision (7b → 8, renumber subsequent) - Use -s flag for batch installs instead of repeated --force - Add (?m) flag for multi-line regex assertions
3.7 KiB
3.7 KiB
Universal Target Path Verification
Verify that the universal target path in targets.yaml matches the actual runtime path used by npx skills (vercel-labs/skills).
Scope
internal/config/targets.yaml— universal global_pathcmd/skillshare/init.go— universal auto-injection indetectCLIDirectories()anddetectNewAgents()- Cross-validation with upstream
npx skillsCLI behavior
Environment
- Devcontainer with network access (needs npm registry)
- Setup hook handles
ss init -g - Node.js / npm available in container
- A public GitHub repo with skills (e.g.,
runkids/feature-radar)
Steps
Step 1: Verify targets.yaml universal path
grep -A4 'global_name: universal' /workspace/internal/config/targets.yaml
Expected:
- exit_code: 0
- ~/.agents/skills
- .agents/skills
Step 2: Install skills globally via npx skills
npx -y skills@latest add runkids/feature-radar -g --all
Expected:
- exit_code: 0
- .agents/skills
- Not .config/agents/skills
Step 3: Verify skills installed to ~/.agents/skills
ls -la ~/.agents/skills/
Expected:
- exit_code: 0
- feature-radar
Step 4: Verify ~/.config/agents/skills was NOT created
CMD_EXIT=0; ls ~/.config/agents/skills/ 2>&1 || CMD_EXIT=$?; echo "EXIT=$CMD_EXIT"
Expected:
- EXIT=2
Step 5: Verify npx skills list sees the skills
npx -y skills@latest list -g
Expected:
- exit_code: 0
- .agents/skills
Step 6: Verify symlinks to agent-specific directories
ls -la ~/.claude/skills/ 2>/dev/null || true
Expected:
- exit_code: 0
- .agents/skills
Step 7: Verify skillshare init auto-includes universal
Note: Setup hook already ran init. Remove existing config to test fresh init.
rm -rf ~/.config/skillshare
ss init --no-copy --all-targets --no-git --no-skill
cat ~/.config/skillshare/config.yaml
Expected:
- exit_code: 0
- universal
- .agents/skills
Step 8: Verify skillshare sync creates universal target directory
mkdir -p ~/.config/skillshare/skills/test-skill
echo '---' > ~/.config/skillshare/skills/test-skill/SKILL.md
echo 'name: test-skill' >> ~/.config/skillshare/skills/test-skill/SKILL.md
echo '---' >> ~/.config/skillshare/skills/test-skill/SKILL.md
echo '# Test' >> ~/.config/skillshare/skills/test-skill/SKILL.md
ss sync
ls -la ~/.agents/skills/
Expected:
- exit_code: 0
- test-skill
Step 9: Verify agent CLI can read skillshare-synced skill
npx skills list -g uses a lock file (~/.agents/.skill-lock.json), not directory scanning. So it will NOT show skills placed by skillshare. Instead, verify the agent directories directly.
cat ~/.claude/skills/test-skill/SKILL.md
cat ~/.agents/skills/test-skill/SKILL.md
Expected:
- exit_code: 0
-
Test
Pass Criteria
- All 9 steps pass
- Confirmed:
~/.agents/skillsis the canonical global path for universal target - Confirmed:
~/.config/agents/skillsis NOT used by runtimenpx skills - Confirmed: skillshare sync to universal target is readable by agent CLIs via symlinks
Notes
- vercel-labs/skills source code references
{configHome}/agents/skillswhich suggests~/.config/agents/skills, but actual runtime behavior uses~/.agents/skills. This discrepancy was the root cause of Issue #54. - The
npx skills add -gcommand also creates symlinks from agent-specific directories (claude, cursor, etc.) back to~/.agents/skills/, which is the "universal" shared directory. npx skills list -gonly shows skills tracked in~/.agents/.skill-lock.json(installed vianpx skills add). Skills placed by external tools (like skillshare) won't appear innpx skills listbut ARE visible to agent CLIs that read the directory.