Skip to content

[BUG] Installation fails with EINVAL - broken symlinks to temp directory for data/scripts #133

@dfeirstein

Description

@dfeirstein

Problem

Installing via npx skills add fails for 25 out of 26 agents with an EINVAL error. The skill appears to install but data/ and scripts/ are broken symlinks pointing to a cleaned-up temp directory, causing:

python3: can't open file '/Users/.../.claude/skills/ui-ux-pro-max/scripts/search.py': [Errno 2] No such file or directory

Error Output

■  Failed to install 25

  ✗ ui-ux-pro-max → Claude Code: Invalid src or dest: cp returned EINVAL
    (cannot copy /var/folders/.../T/skills-XXXXX/src/ui-ux-pro-max/data
    to a subdirectory of self
    /var/folders/.../T/skills-XXXXX/src/ui-ux-pro-max/data)
    /Users/.../.agents/skills/ui-ux-pro-max/data

This error repeats for all agents except Antigravity.

Root Cause

The installer:

  1. Clones the repo to a temp directory (/var/folders/.../T/skills-XXXXX/)
  2. Creates the shared location at ~/.agents/skills/ui-ux-pro-max/ with symlinks pointing back to the temp directory
  3. Attempts to cp the data/ and scripts/ directories, but since the symlinks already point to the source, it detects a circular copy ("cannot copy to a subdirectory of self") and fails with EINVAL
  4. The temp directory is eventually cleaned up by the OS, leaving broken symlinks

After install, data and scripts are dangling symlinks:

data -> /var/folders/.../T/skills-XXXXX/src/ui-ux-pro-max/data  (broken)
scripts -> /var/folders/.../T/skills-XXXXX/src/ui-ux-pro-max/scripts  (broken)

Workaround

Manually clone the repo and copy the directories as real files:

git clone https://github.com/nextlevelbuilder/ui-ux-pro-max-skill.git /tmp/ui-ux-pro-max-skill

# Remove broken symlinks
rm ~/.claude/skills/ui-ux-pro-max/data ~/.claude/skills/ui-ux-pro-max/scripts

# Copy as real directories
cp -R /tmp/ui-ux-pro-max-skill/src/ui-ux-pro-max/data ~/.claude/skills/ui-ux-pro-max/data
cp -R /tmp/ui-ux-pro-max-skill/src/ui-ux-pro-max/scripts ~/.claude/skills/ui-ux-pro-max/scripts
cp -R /tmp/ui-ux-pro-max-skill/src/ui-ux-pro-max/templates ~/.claude/skills/ui-ux-pro-max/templates

rm -rf /tmp/ui-ux-pro-max-skill

Environment

  • macOS (Darwin 24.6.0)
  • Installed via: npx skills add https://github.com/nextlevelbuilder/ui-ux-pro-max-skill --skill ui-ux-pro-max --yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions