Skip to content

fix: copy skills dir to plugin cache on sync - #623

Merged
namastex888 merged 1 commit into
devfrom
fix/skills-path
Mar 17, 2026
Merged

namastex888 merged 1 commit into
devfrom
fix/skills-path

Conversation

@namastex888

Copy link
Copy Markdown
Contributor

Summary

Skills symlink at plugins/genie/skills -> ../../skills doesn't survive npm packaging. syncPlugin() now copies skills/ from the package root to the cache dir so CC can find /genie and all other skills.

+6 lines in update.ts. Symlink preserved for dev.

Test plan

  • 736/736 tests pass
  • genie update → /genie skill available in new CC session

The skills symlink at plugins/genie/skills doesn't survive npm
packaging. syncPlugin() now copies skills/ from the package root
to the cache dir as a fallback.
@coderabbitai

coderabbitai Bot commented Mar 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: dbcf8da0-157f-4cb0-8a64-79baa01a8b4f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/skills-path
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves an issue where Genie skills were not accessible after npm packaging due to symlinks failing to persist. It introduces a new step in the syncPlugin function to explicitly copy the skills directory into the plugin cache, guaranteeing that all skills are correctly located and loaded by the client. This change ensures functional consistency across packaged and development environments.

Highlights

  • Skill Availability Fix: Implemented a fix in syncPlugin() to copy the skills/ directory from the package root to the cache directory, resolving an issue where skill symlinks failed during npm packaging and prevented skills from being found by CC.
  • Development Environment Preservation: Ensured that the symlink for skills is preserved for development environments, maintaining existing workflows for developers.
Changelog
  • src/genie-commands/update.ts
    • Added logic to copy the skills directory from the global package directory to the plugin cache directory.
Activity
  • Author namastex888 created the pull request.
  • Author namastex888 has provided a test plan and marked one test case as passed, indicating initial verification of the fix.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses an issue where the skills directory is not available after an npm installation by copying it to the plugin cache during the syncPlugin process. The logic is sound. I've added one comment suggesting the use of the standard fs.cpSync instead of the custom copyDirSync for improved robustness and to correctly handle potential symbolic links within the skills directory.

Comment on lines +401 to +403
if (existsSync(skillsSrc) && !existsSync(join(cacheDir, 'skills'))) {
copyDirSync(skillsSrc, join(cacheDir, 'skills'));
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The custom copyDirSync function used here does not correctly handle symbolic links to files. It copies the symlink itself rather than the file it points to, which can result in broken links in the destination cacheDir.

Since your project requires Node.js >= 18.0.0, I recommend using the built-in fs.cpSync function. It is more robust, correctly handles symbolic links, and makes the !existsSync check redundant as it can create the destination directory.

Here is how you could implement it (you will need to import cpSync from node:fs):

if (existsSync(skillsSrc)) {
  cpSync(skillsSrc, join(cacheDir, 'skills'), { recursive: true });
}

Using cpSync would make this fix more reliable. Consider also replacing the other usage of copyDirSync in this file for consistency and to improve overall code health.

@namastex888

Copy link
Copy Markdown
Contributor Author

Wrong diagnosis — other skills work fine from the same path.

@namastex888 namastex888 reopened this Mar 17, 2026
@namastex888
namastex888 merged commit 32c9a2d into dev Mar 17, 2026
10 checks passed
@namastex888
namastex888 deleted the fix/skills-path branch March 29, 2026 22:10
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.

1 participant