agent-skills-standard 1.0.7 → 1.1.0
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.
- package/dist/commands/init.js +19 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +13 -3
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/commands/init.js
CHANGED
|
@@ -14,16 +14,35 @@ const constants_1 = require("../constants");
|
|
|
14
14
|
class InitCommand {
|
|
15
15
|
async run() {
|
|
16
16
|
const configPath = path_1.default.join(process.cwd(), '.skillsrc');
|
|
17
|
+
// Load package.json for dependency checks
|
|
18
|
+
const packageJsonPath = path_1.default.join(process.cwd(), 'package.json');
|
|
19
|
+
let packageDeps = {};
|
|
20
|
+
if (await fs_extra_1.default.pathExists(packageJsonPath)) {
|
|
21
|
+
try {
|
|
22
|
+
const pkg = await fs_extra_1.default.readJson(packageJsonPath);
|
|
23
|
+
packageDeps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
24
|
+
}
|
|
25
|
+
catch (e) {
|
|
26
|
+
console.error(picocolors_1.default.red(`❌ Failed to read package.json: ${e instanceof Error ? e.message : String(e)}`));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
17
29
|
// Project detection
|
|
18
30
|
const detectionResults = {};
|
|
19
31
|
for (const framework of constants_1.SUPPORTED_FRAMEWORKS) {
|
|
20
32
|
let detected = false;
|
|
33
|
+
// 1. Check characteristic files
|
|
21
34
|
for (const file of framework.detectionFiles) {
|
|
22
35
|
if (await fs_extra_1.default.pathExists(file)) {
|
|
23
36
|
detected = true;
|
|
24
37
|
break;
|
|
25
38
|
}
|
|
26
39
|
}
|
|
40
|
+
// 2. Check dependencies (if not yet detected)
|
|
41
|
+
if (!detected &&
|
|
42
|
+
framework.detectionDependencies &&
|
|
43
|
+
framework.detectionDependencies.length > 0) {
|
|
44
|
+
detected = framework.detectionDependencies.some((dep) => Object.prototype.hasOwnProperty.call(packageDeps, dep));
|
|
45
|
+
}
|
|
27
46
|
detectionResults[framework.id] = detected;
|
|
28
47
|
}
|
|
29
48
|
// Agent detection
|
|
@@ -9,6 +9,7 @@ export interface FrameworkDefinition {
|
|
|
9
9
|
name: string;
|
|
10
10
|
languages: string[];
|
|
11
11
|
detectionFiles: string[];
|
|
12
|
+
detectionDependencies?: string[];
|
|
12
13
|
}
|
|
13
14
|
export declare const SUPPORTED_AGENTS: AgentDefinition[];
|
|
14
15
|
export declare const SUPPORTED_FRAMEWORKS: FrameworkDefinition[];
|
package/dist/constants/index.js
CHANGED
|
@@ -8,6 +8,12 @@ exports.SUPPORTED_AGENTS = [
|
|
|
8
8
|
path: '.cursor/skills',
|
|
9
9
|
detectionFiles: ['.cursor', '.cursorrules'],
|
|
10
10
|
},
|
|
11
|
+
{
|
|
12
|
+
id: 'trae',
|
|
13
|
+
name: 'Trae',
|
|
14
|
+
path: '.trae/skills',
|
|
15
|
+
detectionFiles: ['.trae'],
|
|
16
|
+
},
|
|
11
17
|
{
|
|
12
18
|
id: 'claude',
|
|
13
19
|
name: 'Claude Code',
|
|
@@ -50,7 +56,8 @@ exports.SUPPORTED_FRAMEWORKS = [
|
|
|
50
56
|
id: 'nestjs',
|
|
51
57
|
name: 'NestJS',
|
|
52
58
|
languages: ['typescript', 'javascript'],
|
|
53
|
-
detectionFiles: ['
|
|
59
|
+
detectionFiles: ['nest-cli.json'],
|
|
60
|
+
detectionDependencies: ['@nestjs/core'],
|
|
54
61
|
},
|
|
55
62
|
{
|
|
56
63
|
id: 'golang',
|
|
@@ -63,18 +70,21 @@ exports.SUPPORTED_FRAMEWORKS = [
|
|
|
63
70
|
name: 'Next.js',
|
|
64
71
|
languages: ['typescript', 'javascript'],
|
|
65
72
|
detectionFiles: ['next.config.js', 'next.config.mjs'],
|
|
73
|
+
detectionDependencies: ['next'],
|
|
66
74
|
},
|
|
67
75
|
{
|
|
68
76
|
id: 'react',
|
|
69
77
|
name: 'React',
|
|
70
78
|
languages: ['typescript', 'javascript'],
|
|
71
|
-
detectionFiles: [
|
|
79
|
+
detectionFiles: [],
|
|
80
|
+
detectionDependencies: ['react', 'react-dom'],
|
|
72
81
|
},
|
|
73
82
|
{
|
|
74
83
|
id: 'react-native',
|
|
75
84
|
name: 'React Native',
|
|
76
85
|
languages: ['typescript', 'javascript'],
|
|
77
|
-
detectionFiles: [],
|
|
86
|
+
detectionFiles: ['metro.config.js'],
|
|
87
|
+
detectionDependencies: ['react-native'],
|
|
78
88
|
},
|
|
79
89
|
{
|
|
80
90
|
id: 'angular',
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ const program = new commander_1.Command();
|
|
|
8
8
|
program
|
|
9
9
|
.name('agent-skills-standard')
|
|
10
10
|
.description('A CLI to manage and sync AI agent skills for Cursor, Claude, Copilot, and more.')
|
|
11
|
-
.version('1.0
|
|
11
|
+
.version('1.1.0');
|
|
12
12
|
program
|
|
13
13
|
.command('init')
|
|
14
14
|
.description('Initialize a .skillsrc configuration file interactively')
|