@robot-inventor/agent-skills 0.7.0 → 0.7.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/package.json +3 -2
- package/plugin.json +2 -2
- package/scripts/codex.ts +35 -0
- package/scripts/skills.ts +6 -0
- package/scripts/syncVersion.ts +10 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robot-inventor/agent-skills",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Roboin's personal collection of Agent Skills.",
|
|
5
5
|
"homepage": "https://github.com/Robot-Inventor/agent-skills#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"author": "Robot-Inventor",
|
|
15
15
|
"type": "module",
|
|
16
|
-
"
|
|
16
|
+
"main": "./scripts/opencode.ts",
|
|
17
|
+
"files": ["./plugin.json", "./skills/", "./scripts/"],
|
|
17
18
|
"publishConfig": {
|
|
18
19
|
"access": "public",
|
|
19
20
|
"provenance": true
|
package/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
|
-
"name": "
|
|
4
|
-
"version": "0.7.
|
|
3
|
+
"name": "agent-skills",
|
|
4
|
+
"version": "0.7.1",
|
|
5
5
|
"description": "My personal collection of Agent Skills.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Robot-Inventor",
|
package/scripts/codex.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { exists, readFile } from "node:fs/promises";
|
|
2
|
+
import { dirname, join, parse } from "node:path";
|
|
3
|
+
import { SKILLS } from "./skills";
|
|
4
|
+
|
|
5
|
+
const main = async () => {
|
|
6
|
+
let input = "";
|
|
7
|
+
process.stdin.setEncoding("utf8");
|
|
8
|
+
for await (const chunk of process.stdin) {
|
|
9
|
+
input += chunk;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { cwd } = JSON.parse(input) as { cwd: string };
|
|
13
|
+
|
|
14
|
+
const isWebProject = await exists(join(cwd, "package.json"));
|
|
15
|
+
const skills = isWebProject ? SKILLS.web : SKILLS.nonWeb;
|
|
16
|
+
|
|
17
|
+
const pluginRoot = process.env.PLUGIN_ROOT;
|
|
18
|
+
if (!pluginRoot) {
|
|
19
|
+
throw new Error("PLUGIN_ROOT is not set");
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const skillContentPromises = skills.map(async (skill) => {
|
|
23
|
+
const skillPath = join(pluginRoot, "skills", skill, "SKILL.md");
|
|
24
|
+
const skillContent = await readFile(skillPath, "utf8");
|
|
25
|
+
|
|
26
|
+
return [`<forced-skill name="${skill}">`, skillContent, "</forced-skill>"].join("\n");
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const skillContents = await Promise.all(skillContentPromises);
|
|
30
|
+
const content = skillContents.join("\n\n");
|
|
31
|
+
|
|
32
|
+
process.stdout.write(content);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
await main();
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import fs from "fs/promises";
|
|
2
|
+
import packageJson from "../package.json";
|
|
3
|
+
import pluginJson from "../plugin.json";
|
|
4
|
+
|
|
5
|
+
const main = async () => {
|
|
6
|
+
pluginJson.version = packageJson.version;
|
|
7
|
+
await fs.writeFile("plugin.json", JSON.stringify(pluginJson, null, 4));
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
await main();
|