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.
- package/README.md +6 -7
- package/dist/index.js +14 -20
- 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
|
|
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
|
-
|
|
7
|
+
This plugin ensures you always have the latest skills without any network latency at startup.
|
|
8
8
|
|
|
9
|
-
- **
|
|
10
|
-
- **
|
|
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
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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