SuperAPI AI Directory

worktree-repair

Coding & development

View repository

Updated 10-16 08:26

About this skill

Fix the configuration of the current worktree: complete the missing symbolic links and dependency installation.

Steps

  1. Confirm that the current directory is a worktree (.git is a file rather than a directory)
  2. Run the fix script:
node "${CLAUDE_SKILL_DIR}/../../scripts/worktree.mjs" repair "$(pwd)"
  1. Report the results: which files were linked, which already existed, and whether dependencies were reinstalled

Applicable scenarios

  • After the worktree is created, .env.local and other configuration files are missing
  • node_modules does not exist or is corrupted
  • Worktrees created manually via git worktree add need initialization
  • hook execution was interrupted, resulting in incomplete initialization