angular-agents-skills 1.0.1 → 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 +87 -234
- package/dist/src/cli.js +44 -32
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,275 +1,106 @@
|
|
|
1
1
|
# angular-agents-skills
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/angular-agents-skills)
|
|
4
|
+
[](https://github.com/)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
> Instala conocimiento Angular production-ready como archivos `.md` / `.mdc` directamente en tu herramienta de AI.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
## Architecture
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
angular-agents-skills/
|
|
13
|
-
├── agents/ # Definiciones universales de agents
|
|
14
|
-
│ ├── angular-architect/
|
|
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
|
|
22
|
-
│ ├── angular-migrator/
|
|
23
|
-
│ │ ├── agent.md
|
|
24
|
-
│ │ └── configs/
|
|
25
|
-
│ └── angular-reviewer/
|
|
26
|
-
│ ├── agent.md
|
|
27
|
-
│ └── configs/
|
|
28
|
-
├── skills/ # Conocimiento Angular reutilizable
|
|
29
|
-
│ ├── architecture/
|
|
30
|
-
│ ├── components/
|
|
31
|
-
│ ├── libraries/
|
|
32
|
-
│ ├── performance/
|
|
33
|
-
│ ├── quality/
|
|
34
|
-
│ └── reactivity/
|
|
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
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Universal Agents
|
|
48
|
-
|
|
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.
|
|
50
|
-
|
|
51
|
-
### Skills
|
|
52
|
-
|
|
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.
|
|
54
|
-
|
|
55
|
-
### Adapters
|
|
56
|
-
|
|
57
|
-
Adapters transforman agents universales al formato específico de cada herramienta:
|
|
58
|
-
|
|
59
|
-
| Adapter | Formato de Salida | Path de Instalación |
|
|
60
|
-
|---|---|---|
|
|
61
|
-
| `opencode` | Markdown + YAML frontmatter | `.opencode/agents/` |
|
|
62
|
-
| `claude` | Markdown + YAML frontmatter | `.claude/agents/` |
|
|
63
|
-
| `codex` | TOML | `.codex/agents/` |
|
|
64
|
-
| `cursor` | MDC (Markdown Custom) | `.cursor/rules/` |
|
|
65
|
-
| `copilot` | Markdown con header | `.github/` |
|
|
66
|
-
|
|
67
|
-
Agregar una nueva herramienta AI solo requiere crear un nuevo archivo adapter — sin modificar agents ni la lógica core.
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
## Installation
|
|
72
|
-
|
|
73
|
-
### CLI Global
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
npm install -g angular-agents-skills
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Como dependencia del proyecto
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
npm install angular-agents-skills
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### Node.js >= 18.0.0 requerido
|
|
8
|
+
Configura una sola vez y distribuye a **Cursor**, **Claude Code**, **OpenCode**, **Copilot** o **Codex** sin dependencias en tu proyecto.
|
|
86
9
|
|
|
87
10
|
---
|
|
88
11
|
|
|
89
|
-
##
|
|
12
|
+
## ⚡ Quick Start
|
|
90
13
|
|
|
91
|
-
|
|
14
|
+
Ejecuta directamente con `npx` (sin instalación previa):
|
|
92
15
|
|
|
93
16
|
```bash
|
|
94
|
-
#
|
|
95
|
-
npx angular-ai
|
|
96
|
-
|
|
97
|
-
# Claude Code
|
|
98
|
-
npx angular-ai agent angular-architect --ai claude
|
|
99
|
-
|
|
100
|
-
# Codex
|
|
101
|
-
npx angular-ai agent angular-architect --ai codex
|
|
17
|
+
# Ver catálogo disponible
|
|
18
|
+
npx angular-ai list agents
|
|
19
|
+
npx angular-ai list skills
|
|
102
20
|
|
|
103
|
-
# Cursor
|
|
21
|
+
# Instalar un agente (ej. Cursor)
|
|
104
22
|
npx angular-ai agent angular-architect --ai cursor
|
|
105
23
|
|
|
106
|
-
#
|
|
107
|
-
npx angular-ai
|
|
24
|
+
# Instalar una skill (ej. Claude Code)
|
|
25
|
+
npx angular-ai skill signals-state-management --ai claude
|
|
108
26
|
```
|
|
109
27
|
|
|
110
|
-
|
|
28
|
+
## 🎯 Supported AI Tools & Destinations
|
|
111
29
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
30
|
+
| Herramienta | `--ai` | Formato | Ruta por Defecto |
|
|
31
|
+
| :--- | :--- | :--- | :--- |
|
|
32
|
+
| **Cursor** | `cursor` | `.mdc` | `.cursor/rules/` |
|
|
33
|
+
| **Claude Code** | `claude` | `.md` | `.claude/agents/` |
|
|
34
|
+
| **OpenCode** | `opencode` | `.md` | `.opencode/agents/` |
|
|
35
|
+
| **Codex** | `codex` | `.toml` | `.codex/agents/` |
|
|
36
|
+
| **Copilot** | `copilot` | `.md` | `.github/` |
|
|
117
37
|
|
|
118
|
-
|
|
119
|
-
npx angular-ai skill signals-state-management --ai opencode
|
|
120
|
-
npx angular-ai skill defer-blocks --all
|
|
121
|
-
```
|
|
38
|
+
## 📖 Usage
|
|
122
39
|
|
|
123
|
-
###
|
|
40
|
+
### Agents
|
|
124
41
|
|
|
125
42
|
```bash
|
|
126
|
-
|
|
127
|
-
npx angular-ai
|
|
128
|
-
```
|
|
43
|
+
# Para una herramienta específica
|
|
44
|
+
npx angular-ai agent <name> --ai <tool>
|
|
129
45
|
|
|
130
|
-
|
|
46
|
+
# Para todas las herramientas soportadas
|
|
47
|
+
npx angular-ai agent <name> --all
|
|
131
48
|
|
|
132
|
-
|
|
133
|
-
npx angular-ai
|
|
134
|
-
npx angular-ai list skills
|
|
135
|
-
npx angular-ai list adapters
|
|
49
|
+
# En un directorio personalizado
|
|
50
|
+
npx angular-ai agent <name> --ai <tool> --target ./custom-dir
|
|
136
51
|
```
|
|
137
52
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
## Available Agents
|
|
53
|
+
## 🤖 Available Agents
|
|
141
54
|
|
|
142
55
|
| Agent | Descripción | Triggers |
|
|
143
|
-
|
|
144
|
-
| `angular-architect` | Genera componentes, servicios y libraries siguiendo convenciones
|
|
145
|
-
| `angular-migrator` | Migra código
|
|
146
|
-
| `angular-reviewer` | Revisa PRs y código contra
|
|
56
|
+
| :--- | :--- | :--- |
|
|
57
|
+
| `angular-architect` | Genera componentes, servicios y libraries siguiendo convenciones modernas: Signal inputs/outputs, standalone components e `inject()`. | `create component`, `generar`, `scaffold`, `crear servicio`, `nueva library` |
|
|
58
|
+
| `angular-migrator` | Migra código legacy a patrones modernos: `@if`/`@for`, Signals, standalone components y host bindings. | `migrate`, `migrar`, `convertir a signals`, `modernizar`, `upgrade` |
|
|
59
|
+
| `angular-reviewer` | Revisa PRs y código contra checklists de performance, reactividad, arquitectura y testing. | `review`, `revisar`, `code review`, `PR review`, `check` |
|
|
147
60
|
|
|
148
61
|
---
|
|
149
62
|
|
|
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 |
|
|
63
|
+
## 💡 Available Skills
|
|
189
64
|
|
|
190
65
|
### Reactivity
|
|
66
|
+
* `signals-state-management`: Gestión de estado reactivo local con `signal()`, `computed()` y `linkedSignal()`.
|
|
67
|
+
* `signals-inputs-outputs`: Migración de `@Input()`/`@Output()` a APIs signal-based: `input()`, `output()` y `model()`.
|
|
68
|
+
* `signals-effects`: Uso correcto de `effect()` y `afterRenderEffect()` para side effects reactivos.
|
|
191
69
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
---
|
|
199
|
-
|
|
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
|
|
221
|
-
|
|
222
|
-
```bash
|
|
223
|
-
# Instalar dependencias
|
|
224
|
-
npm install
|
|
225
|
-
|
|
226
|
-
# Build
|
|
227
|
-
npm run build
|
|
228
|
-
|
|
229
|
-
# Watch (dev)
|
|
230
|
-
npm run dev
|
|
231
|
-
|
|
232
|
-
# Tests
|
|
233
|
-
npm test
|
|
234
|
-
|
|
235
|
-
# Tests en watch mode
|
|
236
|
-
npm run test:watch
|
|
237
|
-
|
|
238
|
-
# Type check
|
|
239
|
-
npm run lint
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
### Adding a new Agent
|
|
70
|
+
### Components
|
|
71
|
+
* `viewchild-contentchild-signals`: Queries reactivas con `viewChild()`, `contentChild()` y `contentChildren()`.
|
|
72
|
+
* `modern-host-bindings`: Enlace de clases, atributos y ARIA vía objeto `host` en `@Component`.
|
|
73
|
+
* `content-projection-ng`: Proyección avanzada con `ng-content`, selectores y `ngProjectAs`.
|
|
74
|
+
* `dynamic-components`: Creación e instanciación dinámica en runtime con `createComponent()` y `ApplicationRef`.
|
|
243
75
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
76
|
+
### Performance & Flow
|
|
77
|
+
* `control-flow-syntax`: Control flow nativo del template: `@if`, `@for` (con `track`) y `@switch`.
|
|
78
|
+
* `defer-blocks`: Lazy-loading granular con `@defer` y sus triggers (`viewport`, `idle`, `interaction`, `timer`).
|
|
247
79
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
permission:
|
|
254
|
-
edit: allow
|
|
255
|
-
bash: ask
|
|
256
|
-
```
|
|
80
|
+
### Quality & Architecture
|
|
81
|
+
* `pr-reviewer`: Review automatizado de Pull Requests con reporte estructurado.
|
|
82
|
+
* `vitest-angular-components`: Configuración y tests de componentes standalone con Vitest Browser Mode.
|
|
83
|
+
* `injection-tokens`: Definición y consumo de `InjectionToken`s tipados para configuración e inyección funcional.
|
|
84
|
+
* `overlay-animation-lifecycle`: Coordinación de ciclo de vida de animaciones CSS de enter/leave para overlays sin Angular animations.
|
|
257
85
|
|
|
258
|
-
###
|
|
86
|
+
### Libraries
|
|
87
|
+
* `standalone-component-library`: Scaffold de library standalone con ng-packagr, barrel exports y SCSS.
|
|
88
|
+
* `monorepo-ng-packagr`: Arquitectura y operación de monorepo multi-library con ng-packagr y path aliases.
|
|
89
|
+
* `library-versioning`: Manejo de versiones semánticas y control de peer dependencies.
|
|
259
90
|
|
|
260
|
-
|
|
261
|
-
2. Agregar `SKILL.md` con metadata YAML al inicio y contenido en markdown
|
|
91
|
+
### Crear un nuevo Adapter
|
|
262
92
|
|
|
263
|
-
|
|
93
|
+
Implementa la interfaz `Adapter` en un nuevo archivo:
|
|
264
94
|
|
|
265
95
|
```typescript
|
|
96
|
+
// adapters/my-tool/index.ts
|
|
266
97
|
import type { Adapter, AdapterOutput, UniversalAgent } from '../../src/types.js';
|
|
267
98
|
|
|
268
99
|
export function createMyToolAdapter(): Adapter {
|
|
269
100
|
return {
|
|
270
101
|
name: 'my-tool',
|
|
271
|
-
description: '
|
|
272
|
-
defaultDir: '.my-tool/
|
|
102
|
+
description: 'Custom AI Assistant',
|
|
103
|
+
defaultDir: '.my-tool/rules',
|
|
273
104
|
extension: 'md',
|
|
274
105
|
|
|
275
106
|
generate(agent: UniversalAgent, config?: Record<string, unknown>): AdapterOutput {
|
|
@@ -285,17 +116,39 @@ export function createMyToolAdapter(): Adapter {
|
|
|
285
116
|
},
|
|
286
117
|
};
|
|
287
118
|
}
|
|
288
|
-
```
|
|
289
119
|
|
|
290
|
-
|
|
120
|
+
// registralo en cli.ts
|
|
291
121
|
|
|
292
|
-
```typescript
|
|
293
122
|
import { createMyToolAdapter } from '../adapters/my-tool/index.js';
|
|
123
|
+
|
|
294
124
|
registerAdapter(createMyToolAdapter());
|
|
295
125
|
```
|
|
296
126
|
|
|
297
|
-
|
|
127
|
+
## 🏗️ Architecture & New Adapters
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
angular-agents-skills/
|
|
131
|
+
├── agents/ # Markdown puro + configs YAML
|
|
132
|
+
├── skills/ # Conocimiento clasificado (SKILL.md)
|
|
133
|
+
├── adapters/ # Conversores específicos por AI
|
|
134
|
+
└── src/ # CLI y motor de distribución
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## 💻 Development
|
|
138
|
+
### Instalar dependencias
|
|
139
|
+
npm install
|
|
140
|
+
|
|
141
|
+
### Compilar TypeScript
|
|
142
|
+
npm run build
|
|
143
|
+
|
|
144
|
+
### Modo watch durante desarrollo
|
|
145
|
+
npm run dev
|
|
146
|
+
|
|
147
|
+
### Ejecutar tests
|
|
148
|
+
npm test
|
|
298
149
|
|
|
299
|
-
|
|
150
|
+
### Probar la CLI localmente sin publicar
|
|
151
|
+
node dist/src/cli.js list skills
|
|
152
|
+
node dist/src/cli.js skill defer-blocks --ai cursor
|
|
300
153
|
|
|
301
|
-
MIT
|
|
154
|
+
> ## Licence MIT
|
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.1",
|
|
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",
|