angular-agents-skills 1.0.0 → 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/README.md +192 -96
- package/dist/src/cli.js +44 -32
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,202 +1,298 @@
|
|
|
1
|
-
#
|
|
1
|
+
# angular-agents-skills
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Instala conocimiento Angular production-ready en tu agente de AI coding.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Agents y skills definidos una sola vez, instalados en OpenCode, Claude Code, Codex, Cursor, Copilot o cualquier herramienta futura. Sin duplicar configuración. Sin depender de un vendor.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## Architecture
|
|
10
10
|
|
|
11
11
|
```
|
|
12
|
-
angular-
|
|
13
|
-
├── agents/
|
|
12
|
+
angular-agents-skills/
|
|
13
|
+
├── agents/ # Definiciones universales de agents
|
|
14
14
|
│ ├── angular-architect/
|
|
15
|
-
│ │ ├── agent.
|
|
16
|
-
│ │ └──
|
|
15
|
+
│ │ ├── agent.md # Instrucciones (markdown puro)
|
|
16
|
+
│ │ └── configs/ # Configuración por herramienta AI
|
|
17
|
+
│ │ ├── opencode.yaml
|
|
18
|
+
│ │ ├── claude.yaml
|
|
19
|
+
│ │ ├── codex.yaml
|
|
20
|
+
│ │ ├── cursor.yaml
|
|
21
|
+
│ │ └── copilot.yaml
|
|
17
22
|
│ ├── angular-migrator/
|
|
18
|
-
│ │ ├── agent.
|
|
19
|
-
│ │ └──
|
|
23
|
+
│ │ ├── agent.md
|
|
24
|
+
│ │ └── configs/
|
|
20
25
|
│ └── angular-reviewer/
|
|
21
|
-
│ ├── agent.
|
|
22
|
-
│ └──
|
|
23
|
-
├──
|
|
24
|
-
│ ├── opencode.ts
|
|
25
|
-
│ ├── claude.ts
|
|
26
|
-
│ └── codex.ts
|
|
27
|
-
├── skills/ # Reusable Angular knowledge
|
|
26
|
+
│ ├── agent.md
|
|
27
|
+
│ └── configs/
|
|
28
|
+
├── skills/ # Conocimiento Angular reutilizable
|
|
28
29
|
│ ├── architecture/
|
|
29
30
|
│ ├── components/
|
|
30
31
|
│ ├── libraries/
|
|
31
32
|
│ ├── performance/
|
|
32
33
|
│ ├── quality/
|
|
33
34
|
│ └── reactivity/
|
|
34
|
-
├──
|
|
35
|
-
│ ├──
|
|
36
|
-
│ ├──
|
|
37
|
-
│ ├──
|
|
38
|
-
│
|
|
39
|
-
└──
|
|
35
|
+
├── adapters/ # Conversores de formato por herramienta
|
|
36
|
+
│ ├── opencode/
|
|
37
|
+
│ ├── claude/
|
|
38
|
+
│ ├── codex/
|
|
39
|
+
│ ├── cursor/
|
|
40
|
+
│ └── copilot/
|
|
41
|
+
└── src/ # CLI y lógica core
|
|
42
|
+
├── cli.ts
|
|
43
|
+
├── registry.ts
|
|
44
|
+
└── types.ts
|
|
40
45
|
```
|
|
41
46
|
|
|
42
|
-
### Universal
|
|
47
|
+
### Universal Agents
|
|
43
48
|
|
|
44
|
-
|
|
49
|
+
Cada agent es un directorio con un `agent.md` (instrucciones en markdown puro) y un directorio `configs/` con archivos YAML por cada herramienta AI. Esta es la fuente de verdad. Los agents nunca dependen de ninguna herramienta específica.
|
|
45
50
|
|
|
46
|
-
|
|
47
|
-
- **`agent.md`** — Pure markdown instructions (no frontmatter, no tool-specific syntax)
|
|
51
|
+
### Skills
|
|
48
52
|
|
|
49
|
-
|
|
53
|
+
Skills son módulos de conocimiento Angular reutilizables. Cada skill es un `SKILL.md` dentro de una categoría. Los agents referencian los skills relevantes para ejecutar sus tareas.
|
|
50
54
|
|
|
51
55
|
### Adapters
|
|
52
56
|
|
|
53
|
-
Adapters
|
|
57
|
+
Adapters transforman agents universales al formato específico de cada herramienta:
|
|
54
58
|
|
|
55
|
-
| Adapter |
|
|
59
|
+
| Adapter | Formato de Salida | Path de Instalación |
|
|
56
60
|
|---|---|---|
|
|
57
61
|
| `opencode` | Markdown + YAML frontmatter | `.opencode/agents/` |
|
|
58
62
|
| `claude` | Markdown + YAML frontmatter | `.claude/agents/` |
|
|
59
63
|
| `codex` | TOML | `.codex/agents/` |
|
|
64
|
+
| `cursor` | MDC (Markdown Custom) | `.cursor/rules/` |
|
|
65
|
+
| `copilot` | Markdown con header | `.github/` |
|
|
60
66
|
|
|
61
|
-
|
|
67
|
+
Agregar una nueva herramienta AI solo requiere crear un nuevo archivo adapter — sin modificar agents ni la lógica core.
|
|
62
68
|
|
|
63
69
|
---
|
|
64
70
|
|
|
65
71
|
## Installation
|
|
66
72
|
|
|
67
|
-
###
|
|
73
|
+
### CLI Global
|
|
68
74
|
|
|
69
75
|
```bash
|
|
70
|
-
npm install -g angular-
|
|
76
|
+
npm install -g angular-agents-skills
|
|
71
77
|
```
|
|
72
78
|
|
|
73
|
-
###
|
|
79
|
+
### Como dependencia del proyecto
|
|
74
80
|
|
|
75
81
|
```bash
|
|
76
|
-
npm install angular-
|
|
82
|
+
npm install angular-agents-skills
|
|
77
83
|
```
|
|
78
84
|
|
|
85
|
+
### Node.js >= 18.0.0 requerido
|
|
86
|
+
|
|
79
87
|
---
|
|
80
88
|
|
|
81
89
|
## Usage
|
|
82
90
|
|
|
83
|
-
###
|
|
91
|
+
### Instalar un agent para una herramienta
|
|
84
92
|
|
|
85
93
|
```bash
|
|
86
|
-
#
|
|
87
|
-
npx angular-
|
|
94
|
+
# OpenCode
|
|
95
|
+
npx angular-agents-skills agent angular-architect --ai opencode
|
|
96
|
+
|
|
97
|
+
# Claude Code
|
|
98
|
+
npx angular-agents-skills agent angular-architect --ai claude
|
|
99
|
+
|
|
100
|
+
# Codex
|
|
101
|
+
npx angular-agents-skills agent angular-architect --ai codex
|
|
88
102
|
|
|
89
|
-
#
|
|
90
|
-
npx angular-
|
|
103
|
+
# Cursor
|
|
104
|
+
npx angular-agents-skills agent angular-architect --ai cursor
|
|
91
105
|
|
|
92
|
-
#
|
|
93
|
-
npx angular-
|
|
106
|
+
# Copilot
|
|
107
|
+
npx angular-agents-skills agent angular-architect --ai copilot
|
|
94
108
|
```
|
|
95
109
|
|
|
96
|
-
###
|
|
110
|
+
### Instalar un agent para todas las herramientas
|
|
97
111
|
|
|
98
112
|
```bash
|
|
99
|
-
npx angular-
|
|
113
|
+
npx angular-agents-skills agent angular-architect --all
|
|
100
114
|
```
|
|
101
115
|
|
|
102
|
-
###
|
|
116
|
+
### Instalar una skill
|
|
103
117
|
|
|
104
118
|
```bash
|
|
105
|
-
npx angular-
|
|
106
|
-
|
|
107
|
-
--agent ./my-agents
|
|
119
|
+
npx angular-agents-skills skill signals-state-management --ai opencode
|
|
120
|
+
npx angular-agents-skills skill defer-blocks --all
|
|
108
121
|
```
|
|
109
122
|
|
|
110
|
-
###
|
|
123
|
+
### Directorio personalizado
|
|
111
124
|
|
|
112
125
|
```bash
|
|
113
|
-
npx angular-ai
|
|
126
|
+
npx angular-agents-skills agent angular-architect --ai opencode --target ./my-agents
|
|
127
|
+
npx angular-agents-skills skill signals-effects --ai claude --target ./my-skills
|
|
114
128
|
```
|
|
115
129
|
|
|
116
|
-
###
|
|
130
|
+
### Listar recursos disponibles
|
|
117
131
|
|
|
118
132
|
```bash
|
|
119
|
-
npx angular-
|
|
133
|
+
npx angular-agents-skills list agents
|
|
134
|
+
npx angular-agents-skills list skills
|
|
135
|
+
npx angular-agents-skills list adapters
|
|
120
136
|
```
|
|
121
137
|
|
|
122
138
|
---
|
|
123
139
|
|
|
124
|
-
## Agents
|
|
140
|
+
## Available Agents
|
|
125
141
|
|
|
126
|
-
| Agent |
|
|
142
|
+
| Agent | Descripción | Triggers |
|
|
127
143
|
|---|---|---|
|
|
128
|
-
| `angular-architect` |
|
|
129
|
-
| `angular-migrator` |
|
|
130
|
-
| `angular-reviewer` |
|
|
144
|
+
| `angular-architect` | Genera componentes, servicios y libraries siguiendo convenciones del proyecto y mejores prácticas. Usa signal-based inputs/outputs, standalone components, functional inject(). | create component, generar, scaffold, crear servicio, nueva library |
|
|
145
|
+
| `angular-migrator` | Migra código Angular legacy a patrones modernos: template syntax (@if/@for/@switch), signals, standalone components, host bindings. Respeta funcionalidad existente. | migrate, migrar, convertir a signals, modernizar, upgrade |
|
|
146
|
+
| `angular-reviewer` | Revisa PRs y código contra una checklist de performance, reactivity, arquitectura y testing. Genera reporte estructurado con blockers y sugerencias. | review, revisar, code review, PR review, check |
|
|
131
147
|
|
|
132
148
|
---
|
|
133
149
|
|
|
134
|
-
## Skills
|
|
150
|
+
## Available Skills
|
|
151
|
+
|
|
152
|
+
### Architecture
|
|
153
|
+
|
|
154
|
+
| Skill | Descripción |
|
|
155
|
+
|---|---|
|
|
156
|
+
| `injection-tokens` | Define y consume `InjectionToken`s tipados para configuración y patrones adapter/strategy |
|
|
157
|
+
| `overlay-animation-lifecycle` | Coordina animaciones CSS de enter/leave para overlays (modal, popover, toast) sin Angular animations |
|
|
158
|
+
|
|
159
|
+
### Components
|
|
160
|
+
|
|
161
|
+
| Skill | Descripción |
|
|
162
|
+
|---|---|
|
|
163
|
+
| `dynamic-components` | Crea y monta componentes dinámicamente en runtime con `createComponent()` y `ApplicationRef` |
|
|
164
|
+
| `modern-host-bindings` | Bindings dinámicos de clases, atributos y ARIA via objeto `host` en `@Component` |
|
|
165
|
+
| `content-projection-ng` | Proyección de contenido con `ng-content`, `select` y `ngProjectAs` (slots nombrados y multi-slot) |
|
|
166
|
+
| `viewchild-contentchild-signals` | Query de view/content children con funciones signal-based: `viewChild()`, `contentChild()`, `contentChildren()` |
|
|
167
|
+
|
|
168
|
+
### Libraries
|
|
169
|
+
|
|
170
|
+
| Skill | Descripción |
|
|
171
|
+
|---|---|
|
|
172
|
+
| `standalone-component-library` | Scaffold de library Angular standalone con ng-packagr, barrel exports y SCSS |
|
|
173
|
+
| `monorepo-ng-packagr` | Estructura y operación de monorepo multi-library con ng-packagr, path aliases y scripts |
|
|
174
|
+
| `library-versioning` | Actualización de versiones de libraries y manejo de peer dependencies |
|
|
175
|
+
|
|
176
|
+
### Performance
|
|
177
|
+
|
|
178
|
+
| Skill | Descripción |
|
|
179
|
+
|---|---|
|
|
180
|
+
| `defer-blocks` | Lazy-load de secciones de template con `@defer`, triggers (viewport, idle, interaction), placeholder, loading, error |
|
|
181
|
+
| `control-flow-syntax` | Control flow nativo del template: `@if`, `@for` (con `track`), `@switch` en vez de directivas estructurales |
|
|
182
|
+
|
|
183
|
+
### Quality
|
|
184
|
+
|
|
185
|
+
| Skill | Descripción |
|
|
186
|
+
|---|---|
|
|
187
|
+
| `pr-reviewer` | Review de Pull Requests usando Azure DevOps MCP con reporte estructurado |
|
|
188
|
+
| `vitest-angular-components` | Configuración y tests de componentes standalone con Vitest browser mode + Playwright |
|
|
135
189
|
|
|
136
|
-
|
|
190
|
+
### Reactivity
|
|
137
191
|
|
|
138
|
-
|
|
|
192
|
+
| Skill | Descripción |
|
|
139
193
|
|---|---|
|
|
140
|
-
|
|
|
141
|
-
|
|
|
142
|
-
|
|
|
143
|
-
| **Performance** | defer-blocks, control-flow-syntax |
|
|
144
|
-
| **Quality** | pr-reviewer, vitest-angular-components |
|
|
145
|
-
| **Reactivity** | signals-state-management, signals-inputs-outputs, signals-effects |
|
|
194
|
+
| `signals-state-management` | Gestión de estado local con `signal()`, `computed()` y `linkedSignal()` |
|
|
195
|
+
| `signals-inputs-outputs` | Migración de `@Input()`/`@Output()` a APIs signal-based: `input()`, `output()`, `model()` |
|
|
196
|
+
| `signals-effects` | Uso correcto de `effect()` y `afterRenderEffect()` para side effects reactivos |
|
|
146
197
|
|
|
147
198
|
---
|
|
148
199
|
|
|
149
|
-
##
|
|
200
|
+
## Supported AI Tools
|
|
201
|
+
|
|
202
|
+
| Tool | Formato | Path por Defecto | Notas |
|
|
203
|
+
|---|---|---|---|
|
|
204
|
+
| **OpenCode** | Markdown + YAML frontmatter | `.opencode/agents/` | Soporta `mode` y `permission` en frontmatter |
|
|
205
|
+
| **Claude Code** | Markdown + YAML frontmatter | `.claude/agents/` | Soporta `tools` en frontmatter |
|
|
206
|
+
| **Codex** | TOML | `.codex/agents/` | Instrucciones escapadas en `developer_instructions` |
|
|
207
|
+
| **Cursor** | MDC (Markdown Custom) | `.cursor/rules/` | Incluye `alwaysApply: false` en frontmatter |
|
|
208
|
+
| **GitHub Copilot** | Markdown | `.github/` | Archivo nombrado `copilot-instructions-<agent>.md` |
|
|
209
|
+
|
|
210
|
+
### Agregar una nueva herramienta AI
|
|
211
|
+
|
|
212
|
+
1. Crear `adapters/my-tool/index.ts` implementando la interfaz `Adapter`
|
|
213
|
+
2. Registrar en `src/cli.ts` con `registerAdapter(createMyToolAdapter())`
|
|
214
|
+
3. Listo. La CLI ahora soporta `--ai my-tool`
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Development & Contributing
|
|
219
|
+
|
|
220
|
+
### Setup
|
|
150
221
|
|
|
151
222
|
```bash
|
|
152
|
-
#
|
|
223
|
+
# Instalar dependencias
|
|
153
224
|
npm install
|
|
154
225
|
|
|
155
226
|
# Build
|
|
156
227
|
npm run build
|
|
157
228
|
|
|
158
|
-
#
|
|
229
|
+
# Watch (dev)
|
|
230
|
+
npm run dev
|
|
231
|
+
|
|
232
|
+
# Tests
|
|
159
233
|
npm test
|
|
160
234
|
|
|
235
|
+
# Tests en watch mode
|
|
236
|
+
npm run test:watch
|
|
237
|
+
|
|
161
238
|
# Type check
|
|
162
239
|
npm run lint
|
|
163
240
|
```
|
|
164
241
|
|
|
165
|
-
|
|
242
|
+
### Adding a new Agent
|
|
166
243
|
|
|
167
|
-
|
|
244
|
+
1. Crear directorio `agents/<agent-name>/`
|
|
245
|
+
2. Agregar `agent.md` con instrucciones en markdown puro (sin frontmatter, sin sintaxis de herramienta específica)
|
|
246
|
+
3. Crear `configs/` con un YAML por cada herramienta AI soportada:
|
|
168
247
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
generate(agent: UniversalAgent): AdapterOutput {
|
|
179
|
-
// Transform agent to tool-specific format
|
|
180
|
-
return {
|
|
181
|
-
filename: `${agent.metadata.name}.ext`,
|
|
182
|
-
content: `...`,
|
|
183
|
-
};
|
|
184
|
-
},
|
|
185
|
-
|
|
186
|
-
getInstallPath(options: InstallOptions): string {
|
|
187
|
-
const base = options.targetDir || this.defaultDir;
|
|
188
|
-
return `${base}/${options.agentName}.ext`;
|
|
189
|
-
},
|
|
190
|
-
};
|
|
248
|
+
```yaml
|
|
249
|
+
# agents/my-agent/configs/opencode.yaml
|
|
250
|
+
name: my-agent
|
|
251
|
+
description: Descripción del agent
|
|
252
|
+
mode: subagent
|
|
253
|
+
permission:
|
|
254
|
+
edit: allow
|
|
255
|
+
bash: ask
|
|
191
256
|
```
|
|
192
257
|
|
|
193
|
-
|
|
258
|
+
### Adding a new Skill
|
|
259
|
+
|
|
260
|
+
1. Crear directorio `skills/<category>/<skill-name>/`
|
|
261
|
+
2. Agregar `SKILL.md` con metadata YAML al inicio y contenido en markdown
|
|
262
|
+
|
|
263
|
+
### Adding a new Adapter
|
|
264
|
+
|
|
194
265
|
```typescript
|
|
195
|
-
import {
|
|
196
|
-
|
|
266
|
+
import type { Adapter, AdapterOutput, UniversalAgent } from '../../src/types.js';
|
|
267
|
+
|
|
268
|
+
export function createMyToolAdapter(): Adapter {
|
|
269
|
+
return {
|
|
270
|
+
name: 'my-tool',
|
|
271
|
+
description: 'My AI Tool',
|
|
272
|
+
defaultDir: '.my-tool/agents',
|
|
273
|
+
extension: 'md',
|
|
274
|
+
|
|
275
|
+
generate(agent: UniversalAgent, config?: Record<string, unknown>): AdapterOutput {
|
|
276
|
+
return {
|
|
277
|
+
filename: `${agent.metadata.name}.md`,
|
|
278
|
+
content: `---\ndescription: ${agent.metadata.description}\n---\n\n${agent.instructions.content}`,
|
|
279
|
+
};
|
|
280
|
+
},
|
|
281
|
+
|
|
282
|
+
getInstallPath(name: string, targetDir?: string): string {
|
|
283
|
+
const base = targetDir || this.defaultDir;
|
|
284
|
+
return `${base}/${name}.${this.extension}`;
|
|
285
|
+
},
|
|
286
|
+
};
|
|
287
|
+
}
|
|
197
288
|
```
|
|
198
289
|
|
|
199
|
-
|
|
290
|
+
Registrar en `src/cli.ts`:
|
|
291
|
+
|
|
292
|
+
```typescript
|
|
293
|
+
import { createMyToolAdapter } from '../adapters/my-tool/index.js';
|
|
294
|
+
registerAdapter(createMyToolAdapter());
|
|
295
|
+
```
|
|
200
296
|
|
|
201
297
|
---
|
|
202
298
|
|
package/dist/src/cli.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';
|
|
3
|
+
import { dirname, join, resolve } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
3
5
|
import { parse as parseYaml } from 'yaml';
|
|
4
|
-
import { registerAdapter, getAdapter, listAdapters, hasAdapter } from './registry.js';
|
|
5
|
-
import { createOpenCodeAdapter } from '../adapters/opencode/index.js';
|
|
6
6
|
import { createClaudeAdapter } from '../adapters/claude/index.js';
|
|
7
7
|
import { createCodexAdapter } from '../adapters/codex/index.js';
|
|
8
|
-
import { createCursorAdapter } from '../adapters/cursor/index.js';
|
|
9
8
|
import { createCopilotAdapter } from '../adapters/copilot/index.js';
|
|
9
|
+
import { createCursorAdapter } from '../adapters/cursor/index.js';
|
|
10
|
+
import { createOpenCodeAdapter } from '../adapters/opencode/index.js';
|
|
11
|
+
import { getAdapter, hasAdapter, listAdapters, registerAdapter } from './registry.js';
|
|
12
|
+
// Determinar la raíz del paquete npm (subiendo dos niveles desde dist/src/cli.js)
|
|
13
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
14
|
+
const __dirname = dirname(__filename);
|
|
15
|
+
const PACKAGE_ROOT = resolve(__dirname, '..', '..');
|
|
10
16
|
registerAdapter(createOpenCodeAdapter());
|
|
11
17
|
registerAdapter(createClaudeAdapter());
|
|
12
18
|
registerAdapter(createCodexAdapter());
|
|
@@ -108,7 +114,11 @@ function installAgent(agentName, ai, agentsDir, targetDir) {
|
|
|
108
114
|
const agent = loadAgent(agentName, agentsDir);
|
|
109
115
|
const config = loadAgentConfig(agentName, ai, agentsDir);
|
|
110
116
|
const output = adapter.generate(agent, config);
|
|
111
|
-
|
|
117
|
+
// Asegurar que la ruta base apunte al directorio donde el usuario ejecuta el comando (process.cwd())
|
|
118
|
+
const resolvedTargetDir = targetDir
|
|
119
|
+
? resolve(process.cwd(), targetDir)
|
|
120
|
+
: resolve(process.cwd(), adapter.defaultDir);
|
|
121
|
+
const installPath = adapter.getInstallPath(agentName, resolvedTargetDir);
|
|
112
122
|
const dir = dirname(installPath);
|
|
113
123
|
mkdirSync(dir, { recursive: true });
|
|
114
124
|
writeFileSync(installPath, output.content, 'utf-8');
|
|
@@ -130,7 +140,10 @@ function installSkill(skillName, ai, skillsDir, targetDir) {
|
|
|
130
140
|
}
|
|
131
141
|
const skill = loadSkill(skillName, skillsDir);
|
|
132
142
|
const filename = `${skillName}.md`;
|
|
133
|
-
|
|
143
|
+
// Asegurar que la ruta base apunte al directorio donde el usuario ejecuta el comando (process.cwd())
|
|
144
|
+
const base = targetDir
|
|
145
|
+
? resolve(process.cwd(), targetDir)
|
|
146
|
+
: resolve(process.cwd(), adapter.defaultDir, 'skills');
|
|
134
147
|
const installPath = join(base, filename);
|
|
135
148
|
const dir = dirname(installPath);
|
|
136
149
|
mkdirSync(dir, { recursive: true });
|
|
@@ -147,28 +160,28 @@ function installSkillAll(skillName, skillsDir, targetDir) {
|
|
|
147
160
|
}
|
|
148
161
|
function printHelp() {
|
|
149
162
|
console.log(`
|
|
150
|
-
angular-
|
|
163
|
+
angular-agents-skills — Install Angular agents and skills for AI coding tools
|
|
151
164
|
|
|
152
|
-
Usage:
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
165
|
+
Usage:
|
|
166
|
+
npx angular-agents-skills agent <name> --ai <tool> [--target <path>]
|
|
167
|
+
npx angular-agents-skills agent <name> --all [--target <path>]
|
|
168
|
+
npx angular-agents-skills skill <name> --ai <tool> [--target <path>]
|
|
169
|
+
npx angular-agents-skills skill <name> --all [--target <path>]
|
|
170
|
+
npx angular-agents-skills list agents
|
|
171
|
+
npx angular-agents-skills list skills
|
|
172
|
+
npx angular-agents-skills list adapters
|
|
160
173
|
|
|
161
|
-
Options:
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
174
|
+
Options:
|
|
175
|
+
--ai <tool> Target AI tool: ${listAdapters().join(', ')}
|
|
176
|
+
--all Install for all available AI tools
|
|
177
|
+
--target <path> Custom target directory
|
|
165
178
|
|
|
166
|
-
Examples:
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
`);
|
|
179
|
+
Examples:
|
|
180
|
+
npx angular-agents-skills agent angular-architect --ai opencode
|
|
181
|
+
npx angular-agents-skills skill standalone-component-library --ai claude
|
|
182
|
+
npx angular-agents-skills agent angular-architect --ai opencode --target ./my-agents
|
|
183
|
+
npx angular-agents-skills skill signals-state-management --all
|
|
184
|
+
`);
|
|
172
185
|
}
|
|
173
186
|
function main() {
|
|
174
187
|
const args = process.argv.slice(2);
|
|
@@ -177,10 +190,12 @@ function main() {
|
|
|
177
190
|
return;
|
|
178
191
|
}
|
|
179
192
|
const command = args[0];
|
|
193
|
+
const agentsDir = join(PACKAGE_ROOT, 'agents');
|
|
194
|
+
const skillsDir = join(PACKAGE_ROOT, 'skills');
|
|
180
195
|
if (command === 'list') {
|
|
181
196
|
const type = args[1];
|
|
182
197
|
if (type === 'agents') {
|
|
183
|
-
const agents = listAgents(
|
|
198
|
+
const agents = listAgents(agentsDir);
|
|
184
199
|
if (agents.length === 0) {
|
|
185
200
|
console.log('No agents found.');
|
|
186
201
|
}
|
|
@@ -193,7 +208,7 @@ function main() {
|
|
|
193
208
|
return;
|
|
194
209
|
}
|
|
195
210
|
if (type === 'skills') {
|
|
196
|
-
const skills = listSkills(
|
|
211
|
+
const skills = listSkills(skillsDir);
|
|
197
212
|
if (skills.length === 0) {
|
|
198
213
|
console.log('No skills found.');
|
|
199
214
|
}
|
|
@@ -226,7 +241,6 @@ function main() {
|
|
|
226
241
|
const allFlag = args.includes('--all');
|
|
227
242
|
const targetIndex = args.indexOf('--target');
|
|
228
243
|
const targetDir = targetIndex !== -1 ? args[targetIndex + 1] : undefined;
|
|
229
|
-
const agentsDir = resolve('agents');
|
|
230
244
|
if (!allFlag && aiIndex === -1) {
|
|
231
245
|
console.error('Error: specify --ai <tool> or --all');
|
|
232
246
|
process.exit(1);
|
|
@@ -260,7 +274,6 @@ function main() {
|
|
|
260
274
|
const allFlag = args.includes('--all');
|
|
261
275
|
const targetIndex = args.indexOf('--target');
|
|
262
276
|
const targetDir = targetIndex !== -1 ? args[targetIndex + 1] : undefined;
|
|
263
|
-
const skillsDir = resolve('skills');
|
|
264
277
|
if (!allFlag && aiIndex === -1) {
|
|
265
278
|
console.error('Error: specify --ai <tool> or --all');
|
|
266
279
|
process.exit(1);
|
|
@@ -289,5 +302,4 @@ function main() {
|
|
|
289
302
|
process.exit(1);
|
|
290
303
|
}
|
|
291
304
|
main();
|
|
292
|
-
export {
|
|
293
|
-
export { registerAdapter, getAdapter, listAdapters, hasAdapter };
|
|
305
|
+
export { getAdapter, hasAdapter, installAgent, installAgentAll, installSkill, installSkillAll, listAdapters, listAgents, listSkills, loadAgent, loadAgentConfig, loadSkill, registerAdapter };
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "angular-agents-skills",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Install Angular agents and skills for AI coding tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"angular-
|
|
7
|
+
"angular-agents-skills": "dist/src/cli.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "tsc",
|
|
@@ -42,4 +42,4 @@
|
|
|
42
42
|
"skills",
|
|
43
43
|
"adapters"
|
|
44
44
|
]
|
|
45
|
-
}
|
|
45
|
+
}
|