agent-skills-standard 1.0.7 → 1.1.1

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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  **The engine behind High-Density AI coding. Command your AI assistants with professional standards.**
7
7
 
8
- The `agent-skills-standard` CLI is the official command-line tool to manage, sync, and version-control engineering standards across all major AI agents (**Cursor, Claude Code, GitHub Copilot, Antigravity, and more**).
8
+ The `agent-skills-standard` CLI is the official command-line tool to manage, sync, and version-control engineering standards across all major AI agents (**Cursor, Claude Code, GitHub Copilot, Gemini, Roo Code, OpenCode, and more**).
9
9
 
10
10
  ---
11
11
 
@@ -86,7 +86,10 @@ The CLI connects to the [Official Skills Registry](https://github.com/HoangNguye
86
86
 
87
87
  - **Flutter**: Clean Architecture, BLoC, AutoRoute, Performance, Security.
88
88
  - **Dart**: Idiomatic Patterns, Advanced Tooling.
89
- - **NestJS/Next.js**: (Coming Soon)
89
+ - **TypeScript/JavaScript**: Best practices, Security, Tooling.
90
+ - **React**: Hooks, Patterns, Performance.
91
+ - **NestJS**: Architecture, Microservices, Security.
92
+ - **Next.js**: App Router, RSC, FSD Architecture.
90
93
  - **Golang**: (Coming Soon)
91
94
 
92
95
  ---
@@ -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
@@ -126,18 +145,22 @@ class InitCommand {
126
145
  default: 'https://github.com/HoangNguyen0403/agent-skills-standard',
127
146
  },
128
147
  ]);
129
- const frameworkId = answers.framework;
130
- const selectedFramework = constants_1.SUPPORTED_FRAMEWORKS.find((f) => f.id === frameworkId);
131
- const isSupported = supportedCategories.includes(frameworkId);
148
+ const framework = answers.framework;
149
+ const selectedFramework = constants_1.SUPPORTED_FRAMEWORKS.find((f) => f.id === framework);
150
+ const isSupported = supportedCategories.includes(framework);
132
151
  if (!isSupported) {
133
- console.log(picocolors_1.default.yellow(`\nNotice: Skills for ${frameworkId} are not yet strictly defined and will be added soon.`));
152
+ console.log(picocolors_1.default.yellow(`\nNotice: Skills for ${framework} are not yet strictly defined and will be added soon.`));
134
153
  console.log(picocolors_1.default.gray('The CLI will still generate rule files with global standards.\n'));
135
154
  }
136
155
  const neededSkills = new Set();
137
- neededSkills.add(frameworkId);
156
+ neededSkills.add(framework);
138
157
  if (selectedFramework) {
139
158
  selectedFramework.languages.forEach((l) => neededSkills.add(l));
140
159
  }
160
+ // Special case: Next.js and React Native imply React
161
+ if (framework === constants_1.Framework.NextJS || framework === constants_1.Framework.ReactNative) {
162
+ neededSkills.add(constants_1.Framework.React);
163
+ }
141
164
  const config = {
142
165
  registry: answers.registry,
143
166
  agents: answers.agents,
@@ -165,9 +188,9 @@ class InitCommand {
165
188
  }
166
189
  await fs_extra_1.default.writeFile(configPath, js_yaml_1.default.dump(config));
167
190
  console.log(picocolors_1.default.green('\n✅ Initialized .skillsrc with your preferences!'));
168
- console.log(picocolors_1.default.gray(` Selected framework: ${frameworkId}`));
191
+ console.log(picocolors_1.default.gray(` Selected framework: ${framework}`));
169
192
  console.log(picocolors_1.default.gray(` Auto-enabled languages: ${Array.from(neededSkills)
170
- .filter((s) => s !== frameworkId)
193
+ .filter((s) => s !== framework)
171
194
  .join(', ') || 'none'}`));
172
195
  console.log(picocolors_1.default.cyan('\nNext step: Run `agent-skills-standard sync` to generate rule files.'));
173
196
  }
@@ -1,14 +1,37 @@
1
+ export declare enum Agent {
2
+ Cursor = "cursor",
3
+ Trae = "trae",
4
+ Claude = "claude",
5
+ Copilot = "copilot",
6
+ Antigravity = "antigravity",
7
+ OpenAI = "openai",
8
+ OpenCode = "opencode",
9
+ Gemini = "gemini",
10
+ Roo = "roo"
11
+ }
12
+ export declare enum Framework {
13
+ Flutter = "flutter",
14
+ NestJS = "nestjs",
15
+ Golang = "golang",
16
+ NextJS = "nextjs",
17
+ React = "react",
18
+ ReactNative = "react-native",
19
+ Angular = "angular"
20
+ }
1
21
  export interface AgentDefinition {
2
- id: string;
22
+ id: Agent;
3
23
  name: string;
4
24
  path: string;
5
25
  detectionFiles: string[];
6
26
  }
7
27
  export interface FrameworkDefinition {
8
- id: string;
28
+ id: Framework;
9
29
  name: string;
10
30
  languages: string[];
11
31
  detectionFiles: string[];
32
+ detectionDependencies?: string[];
12
33
  }
34
+ export declare const getAgentDefinition: (id: Agent) => AgentDefinition;
35
+ export declare const getFrameworkDefinition: (id: Framework) => FrameworkDefinition;
13
36
  export declare const SUPPORTED_AGENTS: AgentDefinition[];
14
37
  export declare const SUPPORTED_FRAMEWORKS: FrameworkDefinition[];
@@ -1,85 +1,153 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SUPPORTED_FRAMEWORKS = exports.SUPPORTED_AGENTS = void 0;
4
- exports.SUPPORTED_AGENTS = [
5
- {
6
- id: 'cursor',
7
- name: 'Cursor',
8
- path: '.cursor/skills',
9
- detectionFiles: ['.cursor', '.cursorrules'],
10
- },
11
- {
12
- id: 'claude',
13
- name: 'Claude Code',
14
- path: '.claude/skills',
15
- detectionFiles: ['.claude', 'CLAUDE.md'],
16
- },
17
- {
18
- id: 'copilot',
19
- name: 'GitHub Copilot',
20
- path: '.github/skills',
21
- detectionFiles: ['.github'],
22
- },
23
- {
24
- id: 'antigravity',
25
- name: 'Antigravity',
26
- path: '.agent/skills',
27
- detectionFiles: ['.agent'],
28
- },
29
- {
30
- id: 'openai',
31
- name: 'OpenAI',
32
- path: '.codex/skills',
33
- detectionFiles: ['.codex'],
34
- },
35
- {
36
- id: 'opencode',
37
- name: 'OpenCode',
38
- path: '.opencode/skills',
39
- detectionFiles: ['.opencode'],
40
- },
41
- ];
42
- exports.SUPPORTED_FRAMEWORKS = [
43
- {
44
- id: 'flutter',
45
- name: 'Flutter',
46
- languages: ['dart'],
47
- detectionFiles: ['pubspec.yaml'],
48
- },
49
- {
50
- id: 'nestjs',
51
- name: 'NestJS',
52
- languages: ['typescript', 'javascript'],
53
- detectionFiles: ['package.json'], // Can be improved with scanning package.json contents
54
- },
55
- {
56
- id: 'golang',
57
- name: 'Go (Golang)',
58
- languages: ['go'],
59
- detectionFiles: ['go.mod'],
60
- },
61
- {
62
- id: 'nextjs',
63
- name: 'Next.js',
64
- languages: ['typescript', 'javascript'],
65
- detectionFiles: ['next.config.js', 'next.config.mjs'],
66
- },
67
- {
68
- id: 'react',
69
- name: 'React',
70
- languages: ['typescript', 'javascript'],
71
- detectionFiles: ['package.json'],
72
- },
73
- {
74
- id: 'react-native',
75
- name: 'React Native',
76
- languages: ['typescript', 'javascript'],
77
- detectionFiles: [],
78
- },
79
- {
80
- id: 'angular',
81
- name: 'Angular',
82
- languages: ['typescript'],
83
- detectionFiles: ['angular.json'],
84
- },
85
- ];
3
+ exports.SUPPORTED_FRAMEWORKS = exports.SUPPORTED_AGENTS = exports.getFrameworkDefinition = exports.getAgentDefinition = exports.Framework = exports.Agent = void 0;
4
+ var Agent;
5
+ (function (Agent) {
6
+ Agent["Cursor"] = "cursor";
7
+ Agent["Trae"] = "trae";
8
+ Agent["Claude"] = "claude";
9
+ Agent["Copilot"] = "copilot";
10
+ Agent["Antigravity"] = "antigravity";
11
+ Agent["OpenAI"] = "openai";
12
+ Agent["OpenCode"] = "opencode";
13
+ Agent["Gemini"] = "gemini";
14
+ Agent["Roo"] = "roo";
15
+ })(Agent || (exports.Agent = Agent = {}));
16
+ var Framework;
17
+ (function (Framework) {
18
+ Framework["Flutter"] = "flutter";
19
+ Framework["NestJS"] = "nestjs";
20
+ Framework["Golang"] = "golang";
21
+ Framework["NextJS"] = "nextjs";
22
+ Framework["React"] = "react";
23
+ Framework["ReactNative"] = "react-native";
24
+ Framework["Angular"] = "angular";
25
+ })(Framework || (exports.Framework = Framework = {}));
26
+ const getAgentDefinition = (id) => {
27
+ switch (id) {
28
+ case Agent.Cursor:
29
+ return {
30
+ id,
31
+ name: 'Cursor',
32
+ path: '.cursor/skills',
33
+ detectionFiles: ['.cursor', '.cursorrules'],
34
+ };
35
+ case Agent.Trae:
36
+ return {
37
+ id,
38
+ name: 'Trae',
39
+ path: '.trae/skills',
40
+ detectionFiles: ['.trae'],
41
+ };
42
+ case Agent.Claude:
43
+ return {
44
+ id,
45
+ name: 'Claude Code',
46
+ path: '.claude/skills',
47
+ detectionFiles: ['.claude', 'CLAUDE.md'],
48
+ };
49
+ case Agent.Copilot:
50
+ return {
51
+ id,
52
+ name: 'GitHub Copilot',
53
+ path: '.github/skills',
54
+ detectionFiles: ['.github'],
55
+ };
56
+ case Agent.Antigravity:
57
+ return {
58
+ id,
59
+ name: 'Antigravity',
60
+ path: '.agent/skills',
61
+ detectionFiles: ['.agent'],
62
+ };
63
+ case Agent.OpenAI:
64
+ return {
65
+ id,
66
+ name: 'OpenAI',
67
+ path: '.codex/skills',
68
+ detectionFiles: ['.codex'],
69
+ };
70
+ case Agent.OpenCode:
71
+ return {
72
+ id,
73
+ name: 'OpenCode',
74
+ path: '.opencode/skills',
75
+ detectionFiles: ['.opencode'],
76
+ };
77
+ case Agent.Gemini:
78
+ return {
79
+ id,
80
+ name: 'Gemini',
81
+ path: '.gemini/skills',
82
+ detectionFiles: ['.gemini'],
83
+ };
84
+ case Agent.Roo:
85
+ return {
86
+ id,
87
+ name: 'Roo Code',
88
+ path: '.roo/skills',
89
+ detectionFiles: ['.roo'],
90
+ };
91
+ }
92
+ };
93
+ exports.getAgentDefinition = getAgentDefinition;
94
+ const getFrameworkDefinition = (id) => {
95
+ switch (id) {
96
+ case Framework.Flutter:
97
+ return {
98
+ id,
99
+ name: 'Flutter',
100
+ languages: ['dart'],
101
+ detectionFiles: ['pubspec.yaml'],
102
+ };
103
+ case Framework.NestJS:
104
+ return {
105
+ id,
106
+ name: 'NestJS',
107
+ languages: ['typescript', 'javascript'],
108
+ detectionFiles: ['nest-cli.json'],
109
+ detectionDependencies: ['@nestjs/core'],
110
+ };
111
+ case Framework.Golang:
112
+ return {
113
+ id,
114
+ name: 'Go (Golang)',
115
+ languages: ['go'],
116
+ detectionFiles: ['go.mod'],
117
+ };
118
+ case Framework.NextJS:
119
+ return {
120
+ id,
121
+ name: 'Next.js',
122
+ languages: ['typescript', 'javascript'],
123
+ detectionFiles: ['next.config.js', 'next.config.mjs'],
124
+ detectionDependencies: ['next'],
125
+ };
126
+ case Framework.React:
127
+ return {
128
+ id,
129
+ name: 'React',
130
+ languages: ['typescript', 'javascript'],
131
+ detectionFiles: [],
132
+ detectionDependencies: ['react', 'react-dom'],
133
+ };
134
+ case Framework.ReactNative:
135
+ return {
136
+ id,
137
+ name: 'React Native',
138
+ languages: ['typescript', 'javascript'],
139
+ detectionFiles: ['metro.config.js'],
140
+ detectionDependencies: ['react-native'],
141
+ };
142
+ case Framework.Angular:
143
+ return {
144
+ id,
145
+ name: 'Angular',
146
+ languages: ['typescript'],
147
+ detectionFiles: ['angular.json'],
148
+ };
149
+ }
150
+ };
151
+ exports.getFrameworkDefinition = getFrameworkDefinition;
152
+ exports.SUPPORTED_AGENTS = Object.values(Agent).map(exports.getAgentDefinition);
153
+ exports.SUPPORTED_FRAMEWORKS = Object.values(Framework).map(exports.getFrameworkDefinition);
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.7');
11
+ .version('1.1.1');
12
12
  program
13
13
  .command('init')
14
14
  .description('Initialize a .skillsrc configuration file interactively')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-skills-standard",
3
- "version": "1.0.7",
3
+ "version": "1.1.1",
4
4
  "description": "A CLI to manage and sync AI agent skills standard for Cursor, Claude, Copilot, and more.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {