opencode-skills-antigravity 0.0.2 → 0.0.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.
Files changed (3) hide show
  1. package/README.md +6 -7
  2. package/dist/index.js +14 -20
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,16 +1,15 @@
1
1
  # opencode-skills-antigravity
2
2
 
3
- An [OpenCode CLI](https://opencode.ai/) plugin that automatically downloads and keeps the [Antigravity Awesome Skills](https://github.com/sickn33/antigravity-awesome-skills) repository up to date every time you start OpenCode.
3
+ An [OpenCode CLI](https://opencode.ai/) plugin that bundles and manages the [Antigravity Awesome Skills](https://github.com/sickn33/antigravity-awesome-skills) repository for instant use.
4
4
 
5
5
  ## ✨ How it works
6
6
 
7
- Every time OpenCode starts, this plugin runs silently in the background:
7
+ This plugin ensures you always have the latest skills without any network latency at startup.
8
8
 
9
- - **First run:** clones the full `antigravity-awesome-skills` repo into `~/.config/opencode/skills/antigravity-awesome-skills`
10
- - **Subsequent runs:** runs `git pull origin main` to silently fetch any new skills
11
- - **Offline:** if no network is available, a warning is shown and OpenCode continues normally
9
+ - **Automated Updates:** A GitHub Action checks for updates in the [Antigravity Awesome Skills](https://github.com/sickn33/antigravity-awesome-skills) repository every hour. If new skills are found, it automatically bundles them and publishes a new version of the NPM package.
10
+ - **Instant Deployment:** When you start OpenCode, the plugin instantly copies the pre-bundled skills to your local machine. This process works perfectly offline and ensures zero network latency during startup.
12
11
 
13
- OpenCode will then automatically detect all skills inside that folder and make them available to the AI agent.
12
+ OpenCode automatically detects all skills and makes them available to the AI agent.
14
13
 
15
14
  You can then invoke any skill explicitly in your prompt:
16
15
 
@@ -41,7 +40,7 @@ OpenCode will automatically download the npm package on next startup via Bun. No
41
40
  Skills are stored at:
42
41
 
43
42
  ```
44
- ~/.config/opencode/skills/
43
+ ~/.config/opencode/.agents/skills/
45
44
  ```
46
45
 
47
46
  OpenCode scans this directory automatically at startup.
package/dist/index.js CHANGED
@@ -3,26 +3,20 @@ import path from "path";
3
3
  import os from "os";
4
4
  import { fileURLToPath } from "url";
5
5
  const AntigravityAutoUpdater = async (_ctx) => {
6
- // Run asynchronously in background to not block OpenCode startup
7
- setTimeout(() => {
8
- try {
9
- console.log("🔄 [Antigravity Plugin] Syncing Awesome Skills...");
10
- // Resolve absolute path to the bundled-skills directory relative to this file
11
- // Works regardless of where OpenCode is launched from
12
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
13
- const bundledSkillsPath = path.join(__dirname, "..", "bundled-skills");
14
- // Resolve target path in OpenCode's config directory
15
- const skillsPath = path.join(os.homedir(), ".config", "opencode", ".agents", "skills");
16
- // Create destination directory and copy files
17
- fs.mkdirSync(skillsPath, { recursive: true });
18
- fs.cpSync(bundledSkillsPath, skillsPath, { recursive: true, force: true });
19
- console.log("✅ [Antigravity Plugin] Skills synced successfully.");
20
- }
21
- catch (error) {
22
- const message = error instanceof Error ? error.message : String(error);
23
- console.error("⚠️ [Antigravity Plugin] Could not sync skills:", message);
24
- }
25
- }, 0);
6
+ try {
7
+ // Resolve absolute path to the bundled-skills directory relative to this file
8
+ // Works regardless of where OpenCode is launched from
9
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
10
+ const bundledSkillsPath = path.join(__dirname, "..", "bundled-skills");
11
+ // Resolve target path in OpenCode's config directory
12
+ const skillsPath = path.join(os.homedir(), ".config", "opencode", ".agents", "skills");
13
+ // Create destination directory and copy files
14
+ fs.mkdirSync(skillsPath, { recursive: true });
15
+ fs.cpSync(bundledSkillsPath, skillsPath, { recursive: true, force: true });
16
+ }
17
+ catch (error) {
18
+ // silently fail
19
+ }
26
20
  return {};
27
21
  };
28
22
  export default AntigravityAutoUpdater;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-skills-antigravity",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "OpenCode CLI plugin that automatically downloads and keeps Antigravity Awesome Skills up to date.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",