open source is social v-it.org
1// SPDX-License-Identifier: MIT
2// Copyright (c) 2026 sol pbc
3
4import { spawnSync } from 'node:child_process';
5import { dirname, join } from 'node:path';
6import { fileURLToPath } from 'node:url';
7
8try {
9 const currentFile = fileURLToPath(import.meta.url);
10 const currentDir = dirname(currentFile);
11 const skillDir = join(currentDir, '..', 'skills', 'vit');
12 const result = spawnSync(
13 'npx',
14 ['--yes', 'skills', 'add', skillDir, '-g', '-a', 'claude-code', '-y'],
15 {
16 encoding: 'utf-8',
17 stdio: ['pipe', 'pipe', 'pipe'],
18 env: { ...process.env, CI: 'true' },
19 }
20 );
21
22 if (result.status === 0) {
23 console.log('vit: skill installed (using-vit)');
24 }
25} catch {
26 process.exit(0);
27}