feat(skill): add multi-app skill support for Claude/Codex (#365)

* feat(skill): add multi-app skill support for Claude/Codex/Gemini

- Add app-specific skill management with AppType prefix in skill keys
- Implement per-app skill tracking in database schema
- Add get_skills_for_app command to retrieve skills by application
- Update SkillsPage to support app-specific skill loading with initialApp prop
- Parse app parameter and validate against supported app types
- Maintain backward compatibility with default claude app

* fix(usage): reorder cache columns and prevent header text wrapping

- Swap cache read and cache write columns order
- Add whitespace-nowrap to all table headers to prevent text wrapping
- Improves table readability and layout consistency
This commit is contained in:
YoVinchen
2025-12-08 20:54:17 +08:00
committed by GitHub
parent 622a24ded4
commit 1fb2d5ed44
10 changed files with 298 additions and 83 deletions
+20 -6
View File
@@ -19,17 +19,31 @@ export interface SkillRepo {
enabled: boolean;
}
export type AppType = "claude" | "codex" | "gemini";
export const skillsApi = {
async getAll(): Promise<Skill[]> {
return await invoke("get_skills");
async getAll(app: AppType = "claude"): Promise<Skill[]> {
if (app === "claude") {
return await invoke("get_skills");
}
return await invoke("get_skills_for_app", { app });
},
async install(directory: string): Promise<boolean> {
return await invoke("install_skill", { directory });
async install(directory: string, app: AppType = "claude"): Promise<boolean> {
if (app === "claude") {
return await invoke("install_skill", { directory });
}
return await invoke("install_skill_for_app", { app, directory });
},
async uninstall(directory: string): Promise<boolean> {
return await invoke("uninstall_skill", { directory });
async uninstall(
directory: string,
app: AppType = "claude",
): Promise<boolean> {
if (app === "claude") {
return await invoke("uninstall_skill", { directory });
}
return await invoke("uninstall_skill_for_app", { app, directory });
},
async getRepos(): Promise<SkillRepo[]> {