@qubiit/lmagent 3.3.1 → 3.4.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/.agents/docs/commands.md +16 -18
- package/.agents/docs/getting-started.md +10 -23
- package/.agents/scripts/create_skill.js +5 -5
- package/.agents/scripts/validate_skills.js +5 -5
- package/AGENTS.md +4 -4
- package/CLAUDE.md +5 -5
- package/CONTRIBUTING.md +3 -8
- package/GEMINI.md +5 -5
- package/README.md +18 -25
- package/install.js +361 -786
- package/package.json +2 -2
- package/scripts/create_skill.js +9 -5
- package/scripts/token-analyzer.js +32 -59
- package/scripts/validate_skills.js +5 -3
package/package.json
CHANGED
package/scripts/create_skill.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* LMAgent Skill Generator — v3.
|
|
4
|
+
* LMAgent Skill Generator — v3.4.0
|
|
5
5
|
*
|
|
6
6
|
* Genera la estructura completa de un nuevo skill interactivamente.
|
|
7
7
|
*
|
|
@@ -14,11 +14,15 @@ import { mkdirSync, writeFileSync, existsSync } from 'fs';
|
|
|
14
14
|
import { join, resolve, dirname } from 'path';
|
|
15
15
|
import { fileURLToPath } from 'url';
|
|
16
16
|
import { createInterface } from 'readline';
|
|
17
|
+
import { readFileSync } from 'fs';
|
|
17
18
|
|
|
18
19
|
const __filename = fileURLToPath(import.meta.url);
|
|
19
20
|
const __dirname = dirname(__filename);
|
|
20
21
|
const ROOT = resolve(__dirname, '..');
|
|
21
|
-
const SKILLS_DIR = join(ROOT, 'skills');
|
|
22
|
+
const SKILLS_DIR = join(ROOT, '.agents', 'skills');
|
|
23
|
+
|
|
24
|
+
const pkgContent = readFileSync(join(ROOT, 'package.json'), 'utf-8');
|
|
25
|
+
const CURRENT_VERSION = JSON.parse(pkgContent).version;
|
|
22
26
|
|
|
23
27
|
// ─── Colores ──────────────────────────────────────────────────
|
|
24
28
|
const c = {
|
|
@@ -92,7 +96,7 @@ name: ${data.name}
|
|
|
92
96
|
description: ${data.description}
|
|
93
97
|
role: ${data.role}
|
|
94
98
|
type: ${data.type}
|
|
95
|
-
version: "
|
|
99
|
+
version: "${CURRENT_VERSION}"
|
|
96
100
|
icon: ${data.icon}
|
|
97
101
|
expertise:
|
|
98
102
|
${expertise}
|
|
@@ -206,13 +210,13 @@ Antes de considerar una tarea terminada, verifica TODO:
|
|
|
206
210
|
|
|
207
211
|
---
|
|
208
212
|
|
|
209
|
-
*Skill version:
|
|
213
|
+
*Skill version: ${CURRENT_VERSION} | LMAgent Framework*
|
|
210
214
|
`;
|
|
211
215
|
}
|
|
212
216
|
|
|
213
217
|
// ─── Main ─────────────────────────────────────────────────────
|
|
214
218
|
async function main() {
|
|
215
|
-
console.log(c.bold(
|
|
219
|
+
console.log(c.bold(`\n🛠️ LMAgent Skill Generator v${CURRENT_VERSION}\n`));
|
|
216
220
|
|
|
217
221
|
const prompt = createPrompt();
|
|
218
222
|
|
|
@@ -75,32 +75,36 @@ function analyze(options = {}) {
|
|
|
75
75
|
const projectRoot = process.cwd();
|
|
76
76
|
|
|
77
77
|
// Detectar qué agentes están instalados
|
|
78
|
-
// Detectar qué agentes están instalados
|
|
79
|
-
const
|
|
80
|
-
{ name: 'Cursor', rulesDir: '.cursor/rules',
|
|
81
|
-
{ name: '
|
|
82
|
-
{ name: '
|
|
83
|
-
{ name: '
|
|
84
|
-
{ name: '
|
|
85
|
-
{ name: '
|
|
86
|
-
{ name: '
|
|
87
|
-
{ name: '
|
|
88
|
-
{ name: '
|
|
89
|
-
{ name: '
|
|
90
|
-
{ name: '
|
|
91
|
-
{ name: '
|
|
92
|
-
{ name: '
|
|
93
|
-
{ name: '
|
|
78
|
+
// Detectar qué agentes están instalados (simplificado revisando marcadores/directorios comunes)
|
|
79
|
+
const IDE_CONFIGS = [
|
|
80
|
+
{ name: 'Cursor', rulesDir: '.cursor/rules', markerFile: '.cursorrules' },
|
|
81
|
+
{ name: 'Windsurf', rulesDir: '.windsurf/rules', markerFile: '.windsurf' },
|
|
82
|
+
{ name: 'Cline', rulesDir: '.clinerules', markerFile: '.clinerules' },
|
|
83
|
+
{ name: 'Roo Code', rulesDir: '.roo/rules', markerFile: '.roo' },
|
|
84
|
+
{ name: 'VSCode Copilot', rulesDir: '.github/instructions', markerFile: '.vscode' },
|
|
85
|
+
{ name: 'Trae', rulesDir: '.trae/rules', markerFile: '.trae' },
|
|
86
|
+
{ name: 'Claude Code', rulesDir: '.claude/rules', markerFile: '.claude' },
|
|
87
|
+
{ name: 'Zed', rulesDir: '.rules', markerFile: '.zed' },
|
|
88
|
+
{ name: 'Amp / Kimi / Replit', rulesDir: '.agents/rules', markerFile: '.agents' },
|
|
89
|
+
{ name: 'Antigravity', rulesDir: '.agent/rules', markerFile: '.agent' },
|
|
90
|
+
{ name: 'Augment', rulesDir: '.augment/rules', markerFile: '.augment' },
|
|
91
|
+
{ name: 'Gemini CLI', rulesDir: '.gemini/rules', markerFile: '.gemini' },
|
|
92
|
+
{ name: 'OpenClaw', rulesDir: 'rules', markerFile: 'openclaw.json' },
|
|
93
|
+
{ name: 'CodeBuddy', rulesDir: '.codebuddy/rules', markerFile: '.codebuddy' },
|
|
94
|
+
{ name: 'Codex', rulesDir: '.codex', markerFile: '.codex' },
|
|
95
|
+
{ name: 'Continue', rulesDir: '.continue/rules', markerFile: '.continue' },
|
|
96
|
+
{ name: 'Goose', rulesDir: '.goose', markerFile: '.goose' },
|
|
97
|
+
{ name: 'OpenHands', rulesDir: '.openhands/microagents', markerFile: '.openhands' }
|
|
94
98
|
];
|
|
95
99
|
|
|
96
|
-
const installedAgents =
|
|
97
|
-
fs.existsSync(path.join(projectRoot,
|
|
98
|
-
fs.existsSync(path.join(projectRoot,
|
|
99
|
-
|
|
100
|
+
const installedAgents = IDE_CONFIGS.filter(ide => {
|
|
101
|
+
const markerInProject = ide.markerFile && fs.existsSync(path.join(projectRoot, ide.markerFile));
|
|
102
|
+
const rulesDirRoot = ide.rulesDir && fs.existsSync(path.join(projectRoot, ide.rulesDir.split('/')[0]));
|
|
103
|
+
return markerInProject || rulesDirRoot;
|
|
104
|
+
});
|
|
100
105
|
|
|
101
106
|
// ── Entry Points (archivos raíz que el agente lee al arrancar) ──
|
|
102
|
-
const entryFiles = ['AGENTS.md', 'CLAUDE.md', 'GEMINI.md', '.cursorrules', '.continuerules', '.goosehints',
|
|
103
|
-
'.openhands/microagents/repo.md', '.junie/guidelines.md', '.github/copilot-instructions.md'];
|
|
107
|
+
const entryFiles = ['AGENTS.md', 'CLAUDE.md', 'GEMINI.md', '.cursorrules', '.windsurfrules', '.windsurfrules.md', '.continuerules', '.goosehints', 'openclaw.json'];
|
|
104
108
|
const entryItems = entryFiles
|
|
105
109
|
.map(f => path.join(projectRoot, f))
|
|
106
110
|
.filter(f => fs.existsSync(f))
|
|
@@ -110,47 +114,16 @@ function analyze(options = {}) {
|
|
|
110
114
|
});
|
|
111
115
|
|
|
112
116
|
// ── Skills ──
|
|
113
|
-
const skillsItems =
|
|
114
|
-
|
|
115
|
-
const dir = path.join(projectRoot, agent.skillsDir);
|
|
116
|
-
skillsItems.push(...scanDir(dir));
|
|
117
|
-
}
|
|
118
|
-
// Deduplicar por contenido (mismo archivo copiado a múltiples agentes)
|
|
119
|
-
const skillsSeen = new Set();
|
|
120
|
-
const skillsUniq = skillsItems.filter(i => {
|
|
121
|
-
const key = path.basename(path.dirname(i.file)) + '/' + path.basename(i.file);
|
|
122
|
-
if (skillsSeen.has(key)) return false;
|
|
123
|
-
skillsSeen.add(key);
|
|
124
|
-
return true;
|
|
125
|
-
});
|
|
117
|
+
const skillsItems = scanDir(path.join(projectRoot, '.agents', 'skills'));
|
|
118
|
+
const skillsUniq = skillsItems;
|
|
126
119
|
|
|
127
120
|
// ── Rules ──
|
|
128
|
-
const rulesItems =
|
|
129
|
-
|
|
130
|
-
const dir = path.join(projectRoot, agent.rulesDir);
|
|
131
|
-
rulesItems.push(...scanDir(dir));
|
|
132
|
-
}
|
|
133
|
-
const rulesSeen = new Set();
|
|
134
|
-
const rulesUniq = rulesItems.filter(i => {
|
|
135
|
-
const key = path.basename(i.file);
|
|
136
|
-
if (rulesSeen.has(key)) return false;
|
|
137
|
-
rulesSeen.add(key);
|
|
138
|
-
return true;
|
|
139
|
-
});
|
|
121
|
+
const rulesItems = scanDir(path.join(projectRoot, '.agents', 'rules'));
|
|
122
|
+
const rulesUniq = rulesItems;
|
|
140
123
|
|
|
141
124
|
// ── Workflows ──
|
|
142
|
-
const workflowsItems =
|
|
143
|
-
const
|
|
144
|
-
for (const dir of workflowDirs) {
|
|
145
|
-
workflowsItems.push(...scanDir(path.join(projectRoot, dir)));
|
|
146
|
-
}
|
|
147
|
-
const wfSeen = new Set();
|
|
148
|
-
const workflowsUniq = workflowsItems.filter(i => {
|
|
149
|
-
const key = path.basename(i.file);
|
|
150
|
-
if (wfSeen.has(key)) return false;
|
|
151
|
-
wfSeen.add(key);
|
|
152
|
-
return true;
|
|
153
|
-
});
|
|
125
|
+
const workflowsItems = scanDir(path.join(projectRoot, '.agents', 'workflows'));
|
|
126
|
+
const workflowsUniq = workflowsItems;
|
|
154
127
|
|
|
155
128
|
// ── Totales ──
|
|
156
129
|
const totalTokens = sumTokens(entryItems) + sumTokens(skillsUniq) + sumTokens(rulesUniq) + sumTokens(workflowsUniq);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* LMAgent Skills Validator — v3.0
|
|
4
|
+
* LMAgent Skills Validator — v3.4.0
|
|
5
5
|
*
|
|
6
6
|
* Valida la integridad de todos los skills del framework.
|
|
7
7
|
* Verifica: frontmatter YAML, campos obligatorios, estructura de directorio.
|
|
@@ -26,10 +26,12 @@ const __dirname = dirname(__filename);
|
|
|
26
26
|
const ROOT = resolve(__dirname, '..');
|
|
27
27
|
const SKILLS_DIR = join(ROOT, '.agents', 'skills');
|
|
28
28
|
|
|
29
|
+
const pkgContent = readFileSync(join(ROOT, 'package.json'), 'utf-8');
|
|
30
|
+
const CURRENT_VERSION = JSON.parse(pkgContent).version;
|
|
31
|
+
|
|
29
32
|
// ─── Configuración ────────────────────────────────────────────
|
|
30
33
|
const REQUIRED_FIELDS = ['name', 'description', 'role', 'type', 'version', 'icon', 'expertise', 'activates_on', 'triggers'];
|
|
31
34
|
const VALID_TYPES = ['agent_persona', 'methodology'];
|
|
32
|
-
const CURRENT_VERSION = '3.2.0';
|
|
33
35
|
const OPTIONAL_DIRS = ['scripts', 'references', 'assets'];
|
|
34
36
|
|
|
35
37
|
// ─── Colores (sin dependencias) ───────────────────────────────
|
|
@@ -197,7 +199,7 @@ function main() {
|
|
|
197
199
|
|
|
198
200
|
const c = chalk;
|
|
199
201
|
|
|
200
|
-
console.log(c.bold(
|
|
202
|
+
console.log(c.bold(`\n🔍 LMAgent Skill Validator v${CURRENT_VERSION}\n`));
|
|
201
203
|
console.log(chalk.dim(` Directorio: ${SKILLS_DIR}`));
|
|
202
204
|
console.log(chalk.dim(` Campos obligatorios: ${REQUIRED_FIELDS.length}`));
|
|
203
205
|
console.log('');
|