Skip to content

feat(library): add open-folder action for skills in management page#16190

Draft
Pleasurecruise wants to merge 1 commit into
mainfrom
feat/open-skill-folder
Draft

feat(library): add open-folder action for skills in management page#16190
Pleasurecruise wants to merge 1 commit into
mainfrom
feat/open-skill-folder

Conversation

@Pleasurecruise

Copy link
Copy Markdown
Collaborator

What this PR does

Before this PR:

Skills in Cherry Studio live as folders on disk (SKILL.md plus scripts/assets), but the Skills management page offered no way to get from a skill to its folder — users had to hunt for the install location manually to share, back up, or zip a skill.

After this PR:

Each skill's card menu on the Skills management page gains an Open folder action that reveals the skill's on-disk directory in the OS file manager (Finder on macOS, File Explorer on Windows), with the skill's folder selected/highlighted. From there users can copy/zip the real skill directory directly.

Fixes #15955

Why we need it and why it was done in this way

The skill folder lives at feature.agents.skills ({userData}/Data/Skills/<folderName>) in the main-process path registry. Rather than add a new IPC channel, the action reuses existing renderer APIs end-to-end:

  • window.api.getAppInfo()appDataPath
  • window.api.resolvePath() to normalize the path cross-platform
  • window.api.file.showInFolder() to reveal it (this already does an existence check and calls shell.showItemInFolder, which highlights the folder)

showInFolder throws when the folder doesn't resolve, so the negative case surfaces a toast instead of a broken/erroring action.

The following tradeoffs were made:

  • The renderer builds the path as ${appDataPath}/Data/Skills/<folderName>, which hardcodes the skill-storage subpath that otherwise lives only in the main-process path registry (feature.agents.skills). This keeps the change purely renderer-side with zero new IPC surface, at the cost of a silent break if that registry path ever moves. An alternative (exposing skillsPath via App_Info, or a dedicated Skill_OpenFolder IPC) was considered and intentionally not taken to keep the change minimal.

The following alternatives were considered:

  • Adding a dedicated Skill_OpenFolder IPC (resolve + reveal in main) — rejected as redundant given the existing reveal IPC.
  • Adding skillsPath to App_Info — rejected to avoid widening the app-info payload.

Links to places where the discussion took place: N/A

Breaking changes

None.

Special notes for your reviewer

The action is shown for every skill in the management list (all are installed on disk). Built-in skills (e.g. skill-creator) are intentionally included, matching the issue's verification example.

Checklist

  • Branch: This PR targets the correct branch — main for active development, v1 for v1 maintenance fixes
  • PR: The PR description is expressive enough and will help future contributors
  • Code: Write code that humans can understand and Keep it simple
  • Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
  • Upgrade: Impact of this change on upgrade flows was considered and addressed if required
  • Documentation: A user-guide update was considered and is present (link) or not required. Check this only when the PR introduces or changes a user-facing feature or behavior.
  • Self-review: I have reviewed my own code before requesting review from others

Release note

Skills management: add an "Open folder" action to reveal a skill's folder in Finder / File Explorer for easy sharing or backup.

Add an "Open folder" item to each skill's card menu on the Skills
management page that reveals the skill's on-disk folder in Finder /
File Explorer, reusing the existing getAppInfo + resolvePath +
file.showInFolder IPC. Closes #15955.

Signed-off-by: Pleasurecruise <3196812536@qq.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.

[Feature]: Open Skill Folder from Skills Management

1 participant