@hybridlabor-api/bdb-antigravity-skills 1.1.1 → 1.1.3

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
@@ -82,13 +82,27 @@ Prompt example:
82
82
 
83
83
  ### Option 2: Using NPM / NPX (Recommended for Node users)
84
84
 
85
- You can run the installer directly without downloading the repository using `npx`:
85
+ ### 🤖 Autonomous Installation
86
+ Alternatively, you can simply ask your AI agent to install it for you:
87
+ > "Please install the @hybridlabor-api/bdb-antigravity-skills package via npx."
86
88
 
89
+ ---
90
+
91
+ ## 🔄 Updates & Auto-Update
92
+ Because this package is hosted on NPM, updating to the latest version is as simple as re-running the installation command:
87
93
  ```bash
88
- npx @hybridlabor-api/bdb-antigravity-skills
94
+ npx -y @hybridlabor-api/bdb-antigravity-skills@latest
89
95
  ```
90
96
 
91
- Or install it globally via npm:
97
+ **Autonomous Agent Updates (`bdb-updater`):**
98
+ We include a dedicated `bdb-updater` skill in the package. Your AI agent natively understands how to update itself!
99
+ Simply ask your agent: *"Check for BDB skill updates"* and it will query NPM and install the latest version automatically.
100
+
101
+ **Set it and forget it:**
102
+ You can tell your agent to automatically check for updates every week using the `/schedule` slash command:
103
+ > `/schedule CronExpression="0 10 * * 1" Prompt="Check if there is a new version of @hybridlabor-api/bdb-antigravity-skills and update it using the bdb-updater skill"`
104
+
105
+ You can install it globally via npm:
92
106
 
93
107
  ```bash
94
108
  npm install -g @hybridlabor-api/bdb-antigravity-skills
package/installer.js CHANGED
@@ -31,7 +31,6 @@ const globalConfigDir = path.join(geminiDir, 'config', 'skills');
31
31
  const globalLegacyDir = path.join(geminiDir, 'skills');
32
32
  const workspaceDir = path.join(currentDir, '.agents', 'skills');
33
33
 
34
- // Format timestamp like YYYYMMDD_HHMMSS
35
34
  const now = new Date();
36
35
  const timestamp = now.getFullYear().toString() +
37
36
  (now.getMonth()+1).toString().padStart(2, '0') +
@@ -42,8 +41,34 @@ const timestamp = now.getFullYear().toString() +
42
41
 
43
42
  const backupDir = path.join(geminiDir, `skills_backup_${timestamp}`);
44
43
 
45
- console.log(`Creating backup of current skills in ${backupDir}...`);
46
- fs.mkdirSync(backupDir, { recursive: true });
44
+ // Auto-accept flags for CI/CD or autonomous agents
45
+ const isAutoYes = process.argv.includes('-y') || process.argv.includes('--yes');
46
+
47
+ function promptMode(callback) {
48
+ if (isAutoYes) {
49
+ return callback('1'); // Default to merge in auto mode
50
+ }
51
+ console.log("\nInstallation Mode:");
52
+ console.log(" (1) Merge: Keep your existing skills/MCPs and add/update BDB tools.");
53
+ console.log(" (2) Replace: Backup and wipe your existing skills/MCPs, installing ONLY BDB tools.");
54
+ rl.question("\nSelect mode [1/2]: ", (answer) => {
55
+ if (answer.trim() === '2') {
56
+ callback('2');
57
+ } else {
58
+ callback('1');
59
+ }
60
+ });
61
+ }
62
+
63
+ function promptMCP(callback) {
64
+ if (isAutoYes) {
65
+ return callback('y');
66
+ }
67
+ console.log("");
68
+ rl.question("Do you also want to install the MCP Pack (Unreal, Rhino, Resolve, Grandma3, Resolume, Github, etc)? (y/n): ", (answer) => {
69
+ callback(answer);
70
+ });
71
+ }
47
72
 
48
73
  function moveIfExists(src, dest, label) {
49
74
  if (fs.existsSync(src)) {
@@ -52,16 +77,6 @@ function moveIfExists(src, dest, label) {
52
77
  }
53
78
  }
54
79
 
55
- moveIfExists(globalConfigDir, path.join(backupDir, 'config_skills_backup'), 'global config skills');
56
- moveIfExists(globalLegacyDir, path.join(backupDir, 'legacy_skills_backup'), 'global legacy skills');
57
- moveIfExists(workspaceDir, path.join(backupDir, 'workspace_skills_backup'), 'workspace skills');
58
-
59
- console.log("\nInstalling optimized skills (140 curated skills)...");
60
-
61
- fs.mkdirSync(globalConfigDir, { recursive: true });
62
- fs.mkdirSync(globalLegacyDir, { recursive: true });
63
- fs.mkdirSync(workspaceDir, { recursive: true });
64
-
65
80
  function copyDirRecursiveSync(source, target) {
66
81
  if (!fs.existsSync(source)) return;
67
82
  if (!fs.existsSync(target)) fs.mkdirSync(target, { recursive: true });
@@ -78,52 +93,80 @@ function copyDirRecursiveSync(source, target) {
78
93
  });
79
94
  }
80
95
 
81
- copyDirRecursiveSync(path.join(srcDir, 'skills', 'global_config'), globalConfigDir);
82
- console.log(" -> Installed global config skills.");
96
+ promptMode((mode) => {
97
+ fs.mkdirSync(backupDir, { recursive: true });
83
98
 
84
- copyDirRecursiveSync(path.join(srcDir, 'skills', 'global_legacy'), globalLegacyDir);
85
- console.log(" -> Installed global legacy skills.");
99
+ if (mode === '2') {
100
+ console.log(`\n[Replace Mode] Creating backup of current skills in ${backupDir}...`);
101
+ moveIfExists(globalConfigDir, path.join(backupDir, 'config_skills_backup'), 'global config skills');
102
+ moveIfExists(globalLegacyDir, path.join(backupDir, 'legacy_skills_backup'), 'global legacy skills');
103
+ moveIfExists(workspaceDir, path.join(backupDir, 'workspace_skills_backup'), 'workspace skills');
104
+ } else {
105
+ console.log(`\n[Merge Mode] Installing over existing directories. Existing skills will not be deleted.`);
106
+ }
86
107
 
87
- copyDirRecursiveSync(path.join(srcDir, 'skills', 'workspace_agents'), workspaceDir);
88
- console.log(" -> Installed workspace skills.");
108
+ console.log("\nInstalling optimized skills (140 curated skills)...");
109
+ fs.mkdirSync(globalConfigDir, { recursive: true });
110
+ fs.mkdirSync(globalLegacyDir, { recursive: true });
111
+ fs.mkdirSync(workspaceDir, { recursive: true });
89
112
 
90
- console.log("");
91
- const geminiMdSrc = path.join(srcDir, 'GEMINI.md');
92
- if (fs.existsSync(geminiMdSrc)) {
93
- fs.copyFileSync(geminiMdSrc, path.join(geminiDir, 'GEMINI.md'));
94
- console.log(` -> Installed GEMINI.md to ${path.join(geminiDir, 'GEMINI.md')}`);
95
- }
113
+ copyDirRecursiveSync(path.join(srcDir, 'skills', 'global_config'), globalConfigDir);
114
+ console.log(" -> Installed global config skills.");
96
115
 
97
- console.log("");
98
- rl.question("Do you also want to install the MCP Pack (Unreal, Rhino, Resolve, Grandma3, Resolume, Github, Chrome DevTools)? (y/n): ", function(answer) {
99
- if (answer.toLowerCase().startsWith('y')) {
100
- const configDir = path.join(geminiDir, 'config');
101
- fs.mkdirSync(configDir, { recursive: true });
102
-
103
- // Copy MCP servers code
104
- const mcpCodeTarget = path.join(configDir, 'mcps');
105
- copyDirRecursiveSync(path.join(srcDir, 'mcps'), mcpCodeTarget);
106
- console.log(` -> Installed local MCP servers to ${mcpCodeTarget}`);
107
-
108
- const mcpTarget = path.join(configDir, 'mcp_config.json');
109
- if (fs.existsSync(mcpTarget)) {
110
- fs.copyFileSync(mcpTarget, path.join(backupDir, 'mcp_config_backup.json'));
111
- console.log(" -> Backed up existing mcp_config.json");
116
+ copyDirRecursiveSync(path.join(srcDir, 'skills', 'global_legacy'), globalLegacyDir);
117
+ console.log(" -> Installed global legacy skills.");
118
+
119
+ copyDirRecursiveSync(path.join(srcDir, 'skills', 'workspace_agents'), workspaceDir);
120
+ console.log(" -> Installed workspace skills.");
121
+
122
+ const geminiMdSrc = path.join(srcDir, 'GEMINI.md');
123
+ if (fs.existsSync(geminiMdSrc)) {
124
+ fs.copyFileSync(geminiMdSrc, path.join(geminiDir, 'GEMINI.md'));
125
+ console.log(` -> Installed GEMINI.md to ${path.join(geminiDir, 'GEMINI.md')}`);
126
+ }
127
+
128
+ promptMCP((answer) => {
129
+ if (answer.toLowerCase().startsWith('y')) {
130
+ const configDir = path.join(geminiDir, 'config');
131
+ fs.mkdirSync(configDir, { recursive: true });
132
+
133
+ const mcpCodeTarget = path.join(configDir, 'mcps');
134
+ copyDirRecursiveSync(path.join(srcDir, 'mcps'), mcpCodeTarget);
135
+ console.log(` -> Installed local MCP servers to ${mcpCodeTarget}`);
136
+
137
+ const mcpTarget = path.join(configDir, 'mcp_config.json');
138
+ if (fs.existsSync(mcpTarget)) {
139
+ fs.copyFileSync(mcpTarget, path.join(backupDir, 'mcp_config_backup.json'));
140
+ console.log(" -> Backed up existing mcp_config.json");
141
+ }
142
+
143
+ let mcpConfigStr = fs.readFileSync(path.join(srcDir, 'mcp_config.json'), 'utf8');
144
+ mcpConfigStr = mcpConfigStr.replace(/__MCPS_DIR__/g, mcpCodeTarget);
145
+ mcpConfigStr = mcpConfigStr.replace(/\{\{HOME\}\}/g, homeDir);
146
+
147
+ if (mode === '1' && fs.existsSync(mcpTarget)) {
148
+ try {
149
+ const oldConfig = JSON.parse(fs.readFileSync(mcpTarget, 'utf8'));
150
+ const newConfig = JSON.parse(mcpConfigStr);
151
+ oldConfig.mcpServers = Object.assign({}, oldConfig.mcpServers || {}, newConfig.mcpServers || {});
152
+ fs.writeFileSync(mcpTarget, JSON.stringify(oldConfig, null, 2));
153
+ console.log(` -> Merged BDB MCPs into existing mcp_config.json`);
154
+ } catch (e) {
155
+ console.log(` -> Failed to parse existing JSON, overwriting mcp_config.json`);
156
+ fs.writeFileSync(mcpTarget, mcpConfigStr);
157
+ }
158
+ } else {
159
+ fs.writeFileSync(mcpTarget, mcpConfigStr);
160
+ console.log(` -> Installed optimized mcp_config.json to ${configDir}`);
161
+ }
162
+ } else {
163
+ console.log(" -> Skipping MCP installation.");
112
164
  }
113
165
 
114
- // Read and replace template
115
- let mcpConfigStr = fs.readFileSync(path.join(srcDir, 'mcp_config.json'), 'utf8');
116
- mcpConfigStr = mcpConfigStr.replace(/__MCPS_DIR__/g, mcpCodeTarget);
117
- mcpConfigStr = mcpConfigStr.replace(/\{\{HOME\}\}/g, homeDir);
118
- fs.writeFileSync(mcpTarget, mcpConfigStr);
119
- console.log(` -> Installed optimized mcp_config.json to ${configDir}`);
120
- } else {
121
- console.log(" -> Skipping MCP installation.");
122
- }
123
-
124
- console.log("=========================================================");
125
- console.log(" Installation complete! The environment now has the ");
126
- console.log(" optimized skill configuration.");
127
- console.log("=========================================================");
128
- rl.close();
166
+ console.log("=========================================================");
167
+ console.log(" Installation complete! The environment now has the ");
168
+ console.log(" optimized skill configuration.");
169
+ console.log("=========================================================");
170
+ rl.close();
171
+ });
129
172
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hybridlabor-api/bdb-antigravity-skills",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Optimized Antigravity skills and MCP pack for BDB DEV",
5
5
  "main": "installer.js",
6
6
  "bin": {
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: bdb-updater
3
+ description: Proactively check for and install updates to the BDB Antigravity Skills package via NPM.
4
+ ---
5
+
6
+ # BDB Updater Skill
7
+
8
+ You are responsible for keeping the BDB Antigravity Skills up to date.
9
+ When the user asks about updates, or if you are running on a scheduled cron task, you must:
10
+
11
+ 1. Check the latest version on NPM by running:
12
+ `npm show @hybridlabor-api/bdb-antigravity-skills version`
13
+
14
+ 2. If an update is needed, or the user requests a force update, you must run the interactive installer without prompts:
15
+ `npx -y @hybridlabor-api/bdb-antigravity-skills@latest`
16
+
17
+ 3. After a successful update, inform the user about the new features or simply confirm that the skills and MCP servers have been refreshed in `~/.gemini/config`.
18
+
19
+ ### Scheduled Updates
20
+ If the user wants automatic updates, strongly recommend they use the `/schedule` slash command to set a recurring cron job for you.
21
+ Example: "I can set up an automatic weekly update check for you. Just type: `/schedule CronExpression="0 10 * * 1" Prompt="Check if there is a new version of @hybridlabor-api/bdb-antigravity-skills via npm view and update it"`"
package/installer.sh DELETED
@@ -1,101 +0,0 @@
1
- #!/bin/bash
2
- # Installer for BDB DEV - OPTIMIZED ANTIGRAVITY SKILLS
3
-
4
- echo "========================================================="
5
- echo " Starting BDB Optimized Antigravity Skills Installation"
6
- echo "========================================================="
7
-
8
- # Resolve actual script directory (handles symlinks for Homebrew)
9
- TARGET="${BASH_SOURCE[0]}"
10
- while [ -h "$TARGET" ]; do
11
- DIR="$(cd -P "$(dirname "$TARGET")" && pwd)"
12
- TARGET="$(readlink "$TARGET")"
13
- [[ $TARGET != /* ]] && TARGET="$DIR/$TARGET"
14
- done
15
- SCRIPT_DIR="$(cd -P "$(dirname "$TARGET")" && pwd)"
16
-
17
- # Locate the source directory for skills/configs
18
- if [ -d "$SCRIPT_DIR/skills" ]; then
19
- SRC_DIR="$SCRIPT_DIR"
20
- elif [ -d "$SCRIPT_DIR/../skills" ]; then
21
- SRC_DIR="$SCRIPT_DIR/.."
22
- else
23
- echo "Error: Cannot find skills payload directory."
24
- exit 1
25
- fi
26
-
27
- # Define target paths
28
- GLOBAL_CONFIG_DIR="$HOME/.gemini/config/skills"
29
- GLOBAL_LEGACY_DIR="$HOME/.gemini/skills"
30
- WORKSPACE_DIR="$PWD/.agents/skills"
31
- BACKUP_DIR="$HOME/.gemini/skills_backup_$(date +%Y%m%d_%H%M%S)"
32
-
33
- echo "Creating backup of current skills in $BACKUP_DIR..."
34
- mkdir -p "$BACKUP_DIR"
35
-
36
- if [ -d "$GLOBAL_CONFIG_DIR" ]; then
37
- mv "$GLOBAL_CONFIG_DIR" "$BACKUP_DIR/config_skills_backup"
38
- echo " -> Backed up global config skills."
39
- fi
40
-
41
- if [ -d "$GLOBAL_LEGACY_DIR" ]; then
42
- mv "$GLOBAL_LEGACY_DIR" "$BACKUP_DIR/legacy_skills_backup"
43
- echo " -> Backed up global legacy skills."
44
- fi
45
-
46
- if [ -d "$WORKSPACE_DIR" ]; then
47
- mv "$WORKSPACE_DIR" "$BACKUP_DIR/workspace_skills_backup"
48
- echo " -> Backed up workspace skills."
49
- fi
50
-
51
- echo ""
52
- echo "Installing optimized skills (140 curated skills)..."
53
-
54
- mkdir -p "$GLOBAL_CONFIG_DIR"
55
- mkdir -p "$GLOBAL_LEGACY_DIR"
56
- mkdir -p "$WORKSPACE_DIR"
57
-
58
- if [ -d "$SRC_DIR/skills/global_config" ]; then
59
- cp -R "$SRC_DIR/skills/global_config/"* "$GLOBAL_CONFIG_DIR/" 2>/dev/null || true
60
- echo " -> Installed global config skills."
61
- fi
62
-
63
- if [ -d "$SRC_DIR/skills/global_legacy" ]; then
64
- cp -R "$SRC_DIR/skills/global_legacy/"* "$GLOBAL_LEGACY_DIR/" 2>/dev/null || true
65
- echo " -> Installed global legacy skills."
66
- fi
67
-
68
- if [ -d "$SRC_DIR/skills/workspace_agents" ]; then
69
- cp -R "$SRC_DIR/skills/workspace_agents/"* "$WORKSPACE_DIR/" 2>/dev/null || true
70
- echo " -> Installed workspace skills."
71
- fi
72
-
73
- echo ""
74
- # Copy GEMINI.md
75
- if [ -f "$SRC_DIR/GEMINI.md" ]; then
76
- cp "$SRC_DIR/GEMINI.md" "$HOME/.gemini/GEMINI.md"
77
- echo " -> Installed GEMINI.md to $HOME/.gemini/GEMINI.md"
78
- fi
79
-
80
- echo ""
81
- read -p "Do you also want to install the BDB MCP Pack (Unreal, Rhino, Resolve, Grandma3, Resolume, Github, Chrome DevTools)? (y/n): " install_mcp
82
- if [[ "$install_mcp" =~ ^[Yy]$ ]]; then
83
- mkdir -p "$HOME/.gemini/config"
84
- if [ -f "$HOME/.gemini/config/mcp_config.json" ]; then
85
- cp "$HOME/.gemini/config/mcp_config.json" "$BACKUP_DIR/mcp_config_backup.json"
86
- echo " -> Backed up existing mcp_config.json"
87
- fi
88
- sed "s|__MCPS_DIR__|$HOME/.gemini/config/mcps|g" "$SRC_DIR/mcp_config.json" > "$HOME/.gemini/config/mcp_config.json"
89
- echo " -> Installed optimized mcp_config.json to $HOME/.gemini/config/"
90
-
91
- mkdir -p "$HOME/.gemini/config/mcps"
92
- cp -R "$SRC_DIR/mcps/"* "$HOME/.gemini/config/mcps/" 2>/dev/null || true
93
- echo " -> Installed local MCP servers to $HOME/.gemini/config/mcps/"
94
- else
95
- echo " -> Skipping MCP installation."
96
- fi
97
-
98
- echo "========================================================="
99
- echo " Installation complete! The environment now has the "
100
- echo " optimized BDB DEV skill configuration."
101
- echo "========================================================="