feat(agent): bundle find-skills and skill-creator as built-in skill for agent#13408
feat(agent): bundle find-skills and skill-creator as built-in skill for agent#13408
Conversation
Add the find-skills skill from vercel-labs/skills as a built-in resource that is automatically installed to the user-level .claude/skills directory on app startup. This enables users to discover and install agent skills from the open ecosystem via `npx skills` within Claude Code sessions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: suyao <sy20010504@gmail.com>
Add runtime detection section to SKILL.md instructing the agent to check for npx availability first, then fall back to the bundled bun at ~/.cherrystudio/bin/bun x when npx is not found. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: suyao <sy20010504@gmail.com>
Remove -g flag from skills add command in SKILL.md. In Cherry Studio,
CLAUDE_CONFIG_DIR points to {userData}/.claude which differs from
~/.claude, so global installs would not be found by the SDK. Project-level
installs go to {cwd}/.claude/skills/ which the SDK reads via settingSources.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: suyao <sy20010504@gmail.com>
There was a problem hiding this comment.
Note
This review was translated by Claude.
Code Review Summary
Overview
This PR implements a practical feature: bundling the find-skills skill as a built-in resource in Cherry Studio, allowing users to conveniently discover and install other skills. The overall code quality is good, and the documentation is clear and complete.
Strengths ✅
- Simplicity: The
installBuiltinSkills()function has clear logic and a single responsibility - Idempotency: Checks for target directory existence to avoid duplicate copying, protecting user modifications
- Complete Documentation: SKILL.md contains detailed usage scenarios, command descriptions, and examples
- Runtime Detection: Added npx and bun fallback logic
Issues to Watch ⚠️
1. Synchronous file operations may block the main process (bootstrap.ts)
Currently using synchronous APIs (readdirSync, mkdirSync, cpSync) to copy skill files at startup, which may block the Electron main process if the skill package is large. Consider changing to async implementation with error handling.
2. Hardcoded bun path (SKILL.md)
The ~/.cherrystudio/bin/bun path assumes a specific installation structure. Consider adding existence checks or passing via environment variables.
Overall Assessment
| Dimension | Score |
|---|---|
| Correctness | 8/10 |
| Maintainability | 7/10 |
| Robustness | 6/10 |
| Documentation | 9/10 |
| Overall | 7.5/10 |
Recommendations
- Consider changing synchronous file operations to asynchronous to avoid blocking the main process
- Add error handling and logging
- Handle edge cases for hardcoded paths
Original Content
Code Review Summary
概述
此 PR 实现了一个实用的功能:将 find-skills skill 作为内置资源捆绑到 Cherry Studio 中,使用户可以方便地发现和安装其他技能。整体代码质量良好,文档清晰完整。
优点 ✅
- 简洁性:
installBuiltinSkills()函数逻辑清晰,职责单一 - 幂等性:检查目标目录存在性避免重复复制,保护用户修改
- 文档完整:SKILL.md 包含详细的使用场景、命令说明和示例
- 运行时检测:添加了 npx 和 bun fallback 的逻辑
需要关注的问题 ⚠️
1. 同步文件操作可能阻塞主进程 (bootstrap.ts)
当前使用同步 API (readdirSync, mkdirSync, cpSync) 在启动时复制技能文件,如果技能包较大可能阻塞 Electron 主进程。建议改为异步实现并添加错误处理。
2. 硬编码的 bun 路径 (SKILL.md)
~/.cherrystudio/bin/bun 路径假设了特定安装结构,建议添加存在性检查或考虑通过环境变量传递。
总体评价
| 维度 | 评分 |
|---|---|
| 正确性 | 8/10 |
| 可维护性 | 7/10 |
| 健壮性 | 6/10 |
| 文档 | 9/10 |
| 总体 | 7.5/10 |
建议
- 考虑将同步文件操作改为异步,避免阻塞主进程
- 添加错误处理和日志记录
- 处理硬编码路径的边界情况
Reviewed by kimi-k2.5
Add the official skill-creator from anthropics/skills as a built-in resource. This skill guides users through creating, testing, and iterating on new skills with eval support and description optimization. Includes all supporting files: agents, scripts, eval-viewer, references, and assets directories. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: suyao <sy20010504@gmail.com>
Move installBuiltinSkills from synchronous bootstrap.ts to an async utility in utils/builtinSkills.ts, called during app.whenReady(). This avoids blocking the main process during startup and adds proper error handling with loggerService. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: suyao <sy20010504@gmail.com>
|
Note This comment was translated by Claude. We need to discuss whether it is truly necessary to add these two skills to the public skills. The submitted skills are ultimately meant to be shared among team developers, but the relevance of these two skills to our development workflow is not strong. Is it necessary for everyone to install these two skills? What would be inconvenient about making them private skills? Original Content需要讨论下是否确实需要把这两个skill添加到public skill。这些提交上来的skill说到底是给团队的开发者共享的,但这两个skill与我们的开发流程相关性并不强。我们有必要给每个人都装上这两个skill吗?作为private skill有哪里不方便呢? |
Note This comment was translated by Claude. This is for adding to the Agent, not as a development skill. I'm mainly concerned about the security of the find skill—when users use it, the permissions are too high, which could automatically download malicious skills. Original Content这个是加到 Agent 里面的吧,不是作为开发 skill,我主要担心的是 find skill 的安全性问题,用户使用的时候权限过高可能会自动下载恶意 skill |
|
Note This comment was translated by Claude. Oh, my bad. Original Contentoh, my bad. |
|
Note This comment was translated by Claude. Or hardcode the requirement that Original Content或者硬编码要求 |
What this PR does
Before this PR:
Users had no built-in way to discover and install agent skills from the open ecosystem within Claude Code sessions.
After this PR:
The
find-skillsskill (from vercel-labs/skills) is bundled as a built-in resource and automatically installed to the user-level.claude/skills/directory on app startup. This enables users to usenpx skills findandnpx skills addwithin Claude Code sessions to discover and install skills from the open agent skills ecosystem. Whennpxis unavailable, the agent falls back to the bundled bun at~/.cherrystudio/bin/bun x.Why we need it and why it was done in this way
The
find-skillsskill acts as a package manager interface for the open agent skills ecosystem, letting users search and install skills vianpx skills. Bundling it as a built-in ensures it works offline and is available immediately without user configuration.The following tradeoffs were made:
{userData}/.claude/skills/(theCLAUDE_CONFIG_DIRpath) so they are globally available to all agent sessions without per-project duplication.The following alternatives were considered:
.claude/skills/viaCLAUDE_CONFIG_DIR.Breaking changes
None.
Special notes for your reviewer
bootstrap.tsalongside other early file operations (copyOccupiedDirsInMainProcess).resources/skills/directory is already covered by theasarUnpack: resources/**rule inelectron-builder.yml.Checklist
Release note