skillfish 1.0.27 → 1.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,7 @@
9
9
  export interface AgentConfig {
10
10
  readonly name: string;
11
11
  readonly dir: string;
12
+ readonly globalDir?: string;
12
13
  readonly homePaths: readonly string[];
13
14
  readonly cwdPaths: readonly string[];
14
15
  }
@@ -32,6 +33,7 @@ export declare function detectAgent(config: AgentConfig, projectDir?: string): b
32
33
  export interface Agent {
33
34
  readonly name: string;
34
35
  readonly dir: string;
36
+ readonly globalDir?: string;
35
37
  readonly detect: () => boolean;
36
38
  }
37
39
  /**
@@ -47,5 +49,6 @@ export type DetectionLocation = 'global' | 'project' | 'both';
47
49
  export declare function getDetectedAgentsForLocation(location: DetectionLocation, projectDir?: string): readonly Agent[];
48
50
  /**
49
51
  * Get the skill directory path for an agent.
52
+ * Uses globalDir (if defined) when baseDir is the home directory.
50
53
  */
51
54
  export declare function getAgentSkillDir(agent: Agent | AgentConfig, baseDir: string): string;
@@ -10,7 +10,7 @@ export const AGENT_CONFIGS = [
10
10
  {
11
11
  name: 'Claude Code',
12
12
  dir: '.claude/skills',
13
- homePaths: ['.claude/settings.json', '.claude/projects.json', '.claude/credentials.json'],
13
+ homePaths: ['.claude'],
14
14
  cwdPaths: ['.claude'],
15
15
  },
16
16
  {
@@ -34,6 +34,7 @@ export const AGENT_CONFIGS = [
34
34
  {
35
35
  name: 'GitHub Copilot',
36
36
  dir: '.github/skills',
37
+ globalDir: '.copilot/skills',
37
38
  homePaths: ['.copilot/config.json', '.copilot'],
38
39
  cwdPaths: ['.github/skills', '.github/copilot-instructions.md'],
39
40
  },
@@ -243,12 +244,15 @@ export function getDetectedAgentsForLocation(location, projectDir) {
243
244
  }).map((config) => ({
244
245
  name: config.name,
245
246
  dir: config.dir,
247
+ ...(config.globalDir && { globalDir: config.globalDir }),
246
248
  detect: () => detectAgent(config, cwd),
247
249
  }));
248
250
  }
249
251
  /**
250
252
  * Get the skill directory path for an agent.
253
+ * Uses globalDir (if defined) when baseDir is the home directory.
251
254
  */
252
255
  export function getAgentSkillDir(agent, baseDir) {
253
- return join(baseDir, agent.dir);
256
+ const isGlobal = 'globalDir' in agent && agent.globalDir && baseDir === homedir();
257
+ return join(baseDir, isGlobal ? agent.globalDir : agent.dir);
254
258
  }
@@ -2,7 +2,7 @@
2
2
  * Skill installation logic.
3
3
  * Handles downloading, validating, and installing skills to agent directories.
4
4
  */
5
- import type { Agent } from './agents.js';
5
+ import { type Agent } from './agents.js';
6
6
  import { type SkillSource } from './manifest.js';
7
7
  export interface InstallResult {
8
8
  installed: {
@@ -7,6 +7,7 @@ import { homedir } from 'os';
7
7
  import { join } from 'path';
8
8
  import { randomUUID } from 'crypto';
9
9
  import { downloadTemplate } from 'giget';
10
+ import { getAgentSkillDir } from './agents.js';
10
11
  import { SKILL_FILENAME } from './github.js';
11
12
  import { writeManifest, MANIFEST_VERSION, } from './manifest.js';
12
13
  /**
@@ -128,7 +129,8 @@ export async function installSkill(owner, repo, skillPath, skillName, agents, op
128
129
  }
129
130
  // Copy to each agent directory
130
131
  for (const agent of agents) {
131
- const destDir = join(baseDir, agent.dir, skillName);
132
+ const agentSkillDir = getAgentSkillDir(agent, baseDir);
133
+ const destDir = join(agentSkillDir, skillName);
132
134
  if (existsSync(destDir) && !force) {
133
135
  result.skipped.push({
134
136
  skill: skillName,
@@ -138,7 +140,7 @@ export async function installSkill(owner, repo, skillPath, skillName, agents, op
138
140
  continue;
139
141
  }
140
142
  // Create parent directory
141
- mkdirSync(join(baseDir, agent.dir), { recursive: true, mode: 0o700 });
143
+ mkdirSync(agentSkillDir, { recursive: true, mode: 0o700 });
142
144
  // Atomic install: backup existing directory before overwrite (allows rollback on failure)
143
145
  const backupDir = `${destDir}.skillfish-backup`;
144
146
  let hasBackup = false;
package/dist/telemetry.js CHANGED
@@ -35,7 +35,7 @@ function sendTelemetry(payload) {
35
35
  export function trackCommand(command) {
36
36
  if (!command)
37
37
  return Promise.resolve();
38
- return sendTelemetry({ type: 'command', command });
38
+ return sendTelemetry({ event_type: 'command', command });
39
39
  }
40
40
  /**
41
41
  * Track a skill install. Inserts into telemetry_events and increments skill download count.
@@ -50,10 +50,10 @@ export function trackInstall(command, owner, repo, skillName) {
50
50
  if (!command || !owner || !repo || !skillName)
51
51
  return Promise.resolve();
52
52
  return sendTelemetry({
53
- type: 'install',
53
+ event_type: 'install',
54
54
  command,
55
- skillKey: `${owner}/${repo}`,
56
- // Legacy fields for skill count increment
55
+ skill_key: `${owner}/${repo}`,
56
+ // Fields for skill count increment
57
57
  owner,
58
58
  repo,
59
59
  skillName,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillfish",
3
- "version": "1.0.27",
3
+ "version": "1.0.29",
4
4
  "description": "All in one Skill manager for AI coding agents. Install, update, and sync Skills across Claude Code, Cursor, Copilot + more.",
5
5
  "type": "module",
6
6
  "bin": {