Skip to content

fix(cli): replace pre-existing expect skill folders with symlinks#73

Draft
aidenybai wants to merge 3 commits intomainfrom
cursor/expect-skill-symlink-e74d
Draft

fix(cli): replace pre-existing expect skill folders with symlinks#73
aidenybai wants to merge 3 commits intomainfrom
cursor/expect-skill-symlink-e74d

Conversation

@aidenybai
Copy link
Copy Markdown
Member

@aidenybai aidenybai commented Apr 2, 2026

Summary

  • update ensureAgentSymlink to replace existing non-symlink expect paths (including directories/files created by skills.sh) with the expected symlink
  • keep existing behavior for already-correct symlinks and mismatched symlinks
  • add regression coverage for replacing a pre-existing non-symlink skill directory
  • handle broken symlink paths by replacing them with the correct symlink target

Context

This fixes installation failures like:

  • .codex/skills/expect exists and is not a symlink
  • .cursor/skills/expect exists and is not a symlink
  • .opencode/skills/expect exists and is not a symlink

when users have an existing expect folder from skills.sh.

Validation

  • pnpm test add-skill (in apps/cli)
  • ⚠️ pnpm typecheck fails due to pre-existing issues in packages/browser (missing generated runtime files and unrelated typing errors)
  • ⚠️ pnpm test fails due to environment-dependent cookie tests in packages/cookies
  • pnpm build succeeds

Slack Thread

Open in Web Open in Cursor 

Summary by cubic

Replace any pre-existing non-symlink or broken expect skill path with the correct symlink during CLI install. Keeps valid symlinks; replaces mismatched, broken, or directory/file paths with ../../.agents/skills/expect.

  • Bug Fixes
    • Fixes installs when .codex/skills/expect, .cursor/skills/expect, or .opencode/skills/expect already exist as a folder/file or as a broken/mismatched symlink by removing them and linking to ../../.agents/skills/expect.
    • Adds tests for replacing a non-symlink directory and a broken symlink.

Written for commit c903e1c. Summary will update on new commits.

Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
expect Ready Ready Preview, Comment Apr 3, 2026 5:19am

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 2, 2026

Open in StackBlitz

npm i https://pkg.pr.new/expect-cli@73

commit: c903e1c

Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants