@heart-of-gold/toolkit 0.1.2 → 0.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 +15 -2
- package/package.json +4 -3
- package/src/commands/install.ts +1 -1
- package/src/index.ts +2 -2
- package/src/targets/index.ts +2 -0
- package/src/targets/pi.ts +35 -0
- package/src/utils/transform.ts +6 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Don't Panic.**
|
|
4
4
|
|
|
5
|
-
25 skills for AI coding agents. Five plugins. Works with **Claude Code, Codex, OpenCode**, and any tool supporting the [agentskills.io](https://agentskills.io) standard. Named after *The Hitchhiker's Guide to the Galaxy* because the universe is absurd and your tools should at least have personality.
|
|
5
|
+
25 skills for AI coding agents. Five plugins. Works with **Claude Code, Codex, OpenCode, Pi**, and any tool supporting the [agentskills.io](https://agentskills.io) standard. Named after *The Hitchhiker's Guide to the Galaxy* because the universe is absurd and your tools should at least have personality.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -22,6 +22,13 @@ bunx @heart-of-gold/toolkit install --to codex
|
|
|
22
22
|
bunx @heart-of-gold/toolkit install --to opencode
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
### Pi Coding Agent
|
|
26
|
+
```bash
|
|
27
|
+
bunx @heart-of-gold/toolkit install --to pi
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Pi also discovers skills from the shared `~/.agents/skills/` location, so installs done with the OpenCode target are usable from Pi too.
|
|
31
|
+
|
|
25
32
|
### List available skills
|
|
26
33
|
```bash
|
|
27
34
|
bunx @heart-of-gold/toolkit list
|
|
@@ -116,10 +123,16 @@ ICF-grounded coaching methodology. Powerful questions, anti-sycophancy, structur
|
|
|
116
123
|
|
|
117
124
|
The toolkit ships as an npm package with a CLI for installing skills into any supported tool:
|
|
118
125
|
|
|
126
|
+
- `--to pi` installs to Pi's native `~/.pi/agent/skills/`
|
|
127
|
+
- `--to opencode` installs to shared `~/.agents/skills/`, which Pi also discovers
|
|
128
|
+
|
|
119
129
|
```bash
|
|
120
130
|
# Install all plugins into Codex
|
|
121
131
|
bunx @heart-of-gold/toolkit install --to codex
|
|
122
132
|
|
|
133
|
+
# Install all plugins into Pi
|
|
134
|
+
bunx @heart-of-gold/toolkit install --to pi
|
|
135
|
+
|
|
123
136
|
# Install a specific plugin
|
|
124
137
|
bunx @heart-of-gold/toolkit install deep-thought --to codex
|
|
125
138
|
|
|
@@ -135,7 +148,7 @@ bunx @heart-of-gold/toolkit targets
|
|
|
135
148
|
|
|
136
149
|
## Requirements
|
|
137
150
|
|
|
138
|
-
- **Codex/OpenCode**: Bun runtime (for `bunx`)
|
|
151
|
+
- **Codex/OpenCode/Pi**: Bun runtime (for `bunx`)
|
|
139
152
|
- **Claude Code**: No additional requirements
|
|
140
153
|
- **Guide plugin**: Python 3.10+, `feedparser`, `pyyaml`, `jq`, `curl`
|
|
141
154
|
- **Babel Fish audio**: ElevenLabs API key
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heart-of-gold/toolkit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "Cross-platform installer for Heart of Gold skills — works with Codex, OpenCode, Claude Code, and more",
|
|
5
|
+
"description": "Cross-platform installer for Heart of Gold skills — works with Codex, OpenCode, Pi, Claude Code, and more",
|
|
6
6
|
"bin": {
|
|
7
7
|
"heart-of-gold": "src/index.ts"
|
|
8
8
|
},
|
|
@@ -17,13 +17,14 @@
|
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
20
|
-
"url": "https://github.com/ondrej-svec/heart-of-gold-toolkit"
|
|
20
|
+
"url": "git+https://github.com/ondrej-svec/heart-of-gold-toolkit.git"
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://github.com/ondrej-svec/heart-of-gold-toolkit",
|
|
23
23
|
"keywords": [
|
|
24
24
|
"codex",
|
|
25
25
|
"claude-code",
|
|
26
26
|
"opencode",
|
|
27
|
+
"pi",
|
|
27
28
|
"ai-agents",
|
|
28
29
|
"skills",
|
|
29
30
|
"agents-md",
|
package/src/commands/install.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -7,9 +7,9 @@ import { targetsCommand } from "./commands/targets";
|
|
|
7
7
|
const main = defineCommand({
|
|
8
8
|
meta: {
|
|
9
9
|
name: "heart-of-gold",
|
|
10
|
-
version: "0.1.
|
|
10
|
+
version: "0.1.3",
|
|
11
11
|
description:
|
|
12
|
-
"Cross-platform installer for Heart of Gold skills — Codex, OpenCode, Claude Code, and more",
|
|
12
|
+
"Cross-platform installer for Heart of Gold skills — Codex, OpenCode, Pi, Claude Code, and more",
|
|
13
13
|
},
|
|
14
14
|
subCommands: {
|
|
15
15
|
install: installCommand,
|
package/src/targets/index.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { TargetHandler } from "../types";
|
|
2
2
|
import { codexTarget } from "./codex";
|
|
3
3
|
import { opencodeTarget } from "./opencode";
|
|
4
|
+
import { piTarget } from "./pi";
|
|
4
5
|
|
|
5
6
|
export const targets: Record<string, TargetHandler> = {
|
|
6
7
|
codex: codexTarget,
|
|
7
8
|
opencode: opencodeTarget,
|
|
9
|
+
pi: piTarget,
|
|
8
10
|
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { cpSync, readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
|
|
2
|
+
import { join } from "path";
|
|
3
|
+
import { homedir } from "os";
|
|
4
|
+
import { transformContentForPi } from "../utils/transform";
|
|
5
|
+
import type { Plugin, TargetHandler } from "../types";
|
|
6
|
+
|
|
7
|
+
export const piTarget: TargetHandler = {
|
|
8
|
+
name: "pi",
|
|
9
|
+
description: "Pi Coding Agent — installs to ~/.pi/agent/skills/",
|
|
10
|
+
defaultRoot: join(homedir(), ".pi", "agent"),
|
|
11
|
+
|
|
12
|
+
async write(outputRoot: string, plugin: Plugin): Promise<number> {
|
|
13
|
+
const skillsRoot = join(outputRoot, "skills");
|
|
14
|
+
mkdirSync(skillsRoot, { recursive: true });
|
|
15
|
+
let installed = 0;
|
|
16
|
+
|
|
17
|
+
for (const skill of plugin.skills) {
|
|
18
|
+
const destDir = join(skillsRoot, skill.name);
|
|
19
|
+
cpSync(skill.sourceDir, destDir, { recursive: true });
|
|
20
|
+
|
|
21
|
+
const skillMdPath = join(destDir, "SKILL.md");
|
|
22
|
+
if (existsSync(skillMdPath)) {
|
|
23
|
+
const content = readFileSync(skillMdPath, "utf-8");
|
|
24
|
+
const transformed = transformContentForPi(content);
|
|
25
|
+
if (transformed !== content) {
|
|
26
|
+
writeFileSync(skillMdPath, transformed);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
installed++;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return installed;
|
|
34
|
+
},
|
|
35
|
+
};
|
package/src/utils/transform.ts
CHANGED
|
@@ -12,3 +12,9 @@ export function transformContentForOpenCode(content: string): string {
|
|
|
12
12
|
.replace(/~\/\.claude\//g, "~/.agents/")
|
|
13
13
|
.replace(/\.claude\//g, ".agents/");
|
|
14
14
|
}
|
|
15
|
+
|
|
16
|
+
export function transformContentForPi(content: string): string {
|
|
17
|
+
return content
|
|
18
|
+
.replace(/~\/\.claude\//g, "~/.pi/agent/")
|
|
19
|
+
.replace(/\.claude\//g, ".pi/agent/");
|
|
20
|
+
}
|