fix: self-contained installation for all platforms

- Remove .shared folder dependency - all platforms now self-contained
- Each platform installation includes its own data/ and scripts/
- Update platform configs: reference → full install type
- Simplify template.ts: remove ensureSharedExists logic
- Update Cursor to Skill Mode (auto-activate)
- Update README to reflect Cursor in Skill Mode
- Bump CLI version to 2.2.2

Fixes issue where users couldn't find search.py in shared folder.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Viet Tran
2026-01-29 21:23:33 +07:00
parent 3eb7d99d67
commit 28fb9373bd
16 changed files with 59 additions and 83 deletions

View File

@@ -69,23 +69,23 @@ export function getAITypeDescription(aiType: AIType): string {
case 'claude':
return 'Claude Code (.claude/skills/)';
case 'cursor':
return 'Cursor (.cursor/commands/ + .shared/)';
return 'Cursor (.cursor/skills/)';
case 'windsurf':
return 'Windsurf (.windsurf/skills/ + .shared/)';
return 'Windsurf (.windsurf/skills/)';
case 'antigravity':
return 'Antigravity (.agent/skills/)';
case 'copilot':
return 'GitHub Copilot (.github/prompts/ + .shared/)';
return 'GitHub Copilot (.github/prompts/)';
case 'kiro':
return 'Kiro (.kiro/steering/ + .shared/)';
return 'Kiro (.kiro/steering/)';
case 'codex':
return 'Codex (.codex/skills/)';
case 'roocode':
return 'RooCode (.roo/commands/ + .shared/)';
return 'RooCode (.roo/skills/)';
case 'qoder':
return 'Qoder (.qoder/rules/ + .shared/)';
return 'Qoder (.qoder/skills/)';
case 'gemini':
return 'Gemini CLI (.gemini/skills/ + .shared/)';
return 'Gemini CLI (.gemini/skills/)';
case 'trae':
return 'Trae (.trae/skills/)';
case 'opencode':

View File

@@ -164,24 +164,9 @@ async function copyDataAndScripts(targetSkillDir: string): Promise<void> {
}
}
/**
* Ensure .shared folder exists with data and scripts
*/
async function ensureSharedExists(targetDir: string): Promise<boolean> {
const sharedDir = join(targetDir, '.shared', 'ui-ux-pro-max');
// Check if already exists
if (await exists(sharedDir)) {
return false; // Already exists, didn't create
}
await mkdir(sharedDir, { recursive: true });
await copyDataAndScripts(sharedDir);
return true; // Created new
}
/**
* Generate platform files for a specific AI type
* All platforms use self-contained installation with data and scripts
*/
export async function generatePlatformFiles(
targetDir: string,
@@ -206,17 +191,8 @@ export async function generatePlatformFiles(
await writeFile(skillFilePath, skillContent, 'utf-8');
createdFolders.push(config.folderStructure.root);
// Handle data/scripts based on install type
if (config.installType === 'full') {
// Full install: copy data and scripts into the skill directory
await copyDataAndScripts(skillDir);
} else {
// Reference install: ensure .shared exists
const createdShared = await ensureSharedExists(targetDir);
if (createdShared) {
createdFolders.push('.shared');
}
}
// Copy data and scripts into the skill directory (self-contained)
await copyDataAndScripts(skillDir);
return createdFolders;
}