Skip to content

Commit 3d121ba

Browse files
authored
Merge pull request #321 from syncable-dev/remove-agent-chat
feat: updating claude skills
2 parents 29b4058 + d542a15 commit 3d121ba

4 files changed

Lines changed: 15 additions & 24 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
},
77
"metadata": {
88
"description": "Syncable CLI skills for AI coding agents — project analysis, security, vulnerabilities, dependencies, IaC validation, and cloud deployment.",
9-
"version": "0.1.8"
9+
"version": "0.1.0"
1010
},
1111
"plugins": [
1212
{
1313
"name": "syncable-cli-skills",
1414
"source": "./installer/plugins/syncable-cli-skills",
1515
"description": "Syncable CLI skills for project analysis, security scanning, vulnerability detection, dependency auditing, IaC validation, Kubernetes optimization, and cloud deployment.",
16-
"version": "0.1.8",
16+
"version": "0.1.0",
1717
"author": {
1818
"name": "Syncable",
1919
"email": "support@syncable.dev"

installer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "syncable-cli-skills",
3-
"version": "0.1.8",
3+
"version": "0.1.9",
44
"type": "module",
55
"description": "Install Syncable CLI skills for AI coding agents (Claude Code, Cursor, Windsurf, Codex, Gemini CLI)",
66
"license": "GPL-3.0",

installer/plugins/syncable-cli-skills/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "syncable-cli-skills",
33
"description": "Syncable CLI skills for project analysis, security scanning, vulnerability detection, dependency auditing, IaC validation, Kubernetes optimization, and cloud deployment.",
4-
"version": "0.1.8",
4+
"version": "0.1.0",
55
"author": {
66
"name": "Syncable",
77
"email": "support@syncable.dev"

installer/src/transformers/claude.ts

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { TransformResult } from './types.js';
66
import { execCommand, commandExists } from '../utils.js';
77

88
const PLUGIN_NAME = 'syncable-cli-skills';
9-
const PLUGIN_VERSION = '0.1.8';
9+
const PLUGIN_VERSION = '0.1.0';
1010
const MARKETPLACE_NAME = 'syncable';
1111
const MARKETPLACE_REPO = 'syncable-dev/syncable-cli';
1212

@@ -173,32 +173,23 @@ function enablePluginInSettings(): void {
173173
* 2. Fall back to manual: write cache files + update settings.json
174174
*/
175175
export async function installClaudePlugin(skills: Skill[]): Promise<{ cacheDir: string; skillCount: number }> {
176-
// Try the official CLI first — this handles enabledPlugins registration.
177-
// We don't return early on success because the CLI may have cached an old
178-
// version of the plugin that is missing the skills directory (e.g. from a
179-
// previous install before skills were added, or from a stale npx cache).
180-
// We always write skills directly to the cache so they're guaranteed to exist.
176+
// Try the official CLI first — this registers the marketplace and plugin
177+
// in Claude Code's settings. We still do a manual write afterwards because
178+
// the CLI-cached version may be stale or missing skills.
181179
await tryClaudeCliInstall();
182180

183181
const cacheDir = getClaudePluginCacheDir();
182+
const pluginRootDir = path.dirname(cacheDir); // .../syncable-cli-skills/
184183

185-
// Remove stale older-version cache entries so Claude Code doesn't load an
186-
// empty/outdated version instead of the current one.
187-
const pluginRootDir = path.dirname(cacheDir);
184+
// Nuke the ENTIRE plugin cache (all versions) and recreate fresh.
185+
// This prevents version mismatches, stale caches, and — critically —
186+
// removes any .orphaned_at marker that Claude Code writes when a cached
187+
// version doesn't match the marketplace catalog.
188188
if (fs.existsSync(pluginRootDir)) {
189-
for (const entry of fs.readdirSync(pluginRootDir)) {
190-
if (entry !== PLUGIN_VERSION) {
191-
fs.rmSync(path.join(pluginRootDir, entry), { recursive: true, force: true });
192-
}
193-
}
194-
}
195-
196-
// Clear old skills and rewrite them so the cache is always up to date.
197-
const skillsDir = path.join(cacheDir, 'skills');
198-
if (fs.existsSync(skillsDir)) {
199-
fs.rmSync(skillsDir, { recursive: true });
189+
fs.rmSync(pluginRootDir, { recursive: true, force: true });
200190
}
201191

192+
// Write every skill into a clean cache directory.
202193
for (const skill of skills) {
203194
const results = transformForClaude(skill);
204195
for (const { relativePath, content } of results) {

0 commit comments

Comments
 (0)