@howaboua/pi-better-skills-tool 0.0.1 → 0.0.2
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/CHANGELOG.md +9 -1
- package/README.md +2 -2
- package/package.json +5 -5
- package/src/skill-package.ts +9 -3
- package/src/tool.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
# @howaboua/pi-better-skills-tool
|
|
2
2
|
|
|
3
|
+
## 0.0.2
|
|
4
|
+
|
|
5
|
+
- Batch independent skill reads in one execution cell.
|
|
6
|
+
|
|
7
|
+
- Keep tool results actionable.
|
|
8
|
+
|
|
9
|
+
- Browser evaluation errors preserve JavaScript exception details instead of a generic “Uncaught”.
|
|
10
|
+
- Skill path inventories omit installed dependencies; reference reads list only the requested sources instead of repeating the full inventory.
|
|
11
|
+
|
|
3
12
|
## 0.0.1
|
|
4
13
|
|
|
5
14
|
- Initial release of Better Skills for progressive skill discovery in normal Pi, Code Mode, and Notebook Mode.
|
|
6
15
|
|
|
7
16
|
- List the available catalog first, then load only the requested skill and references.
|
|
8
17
|
- Combine global, project, and package-provided skills while respecting invocation visibility and local precedence.
|
|
9
|
-
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Progressive skill discovery for Pi, Code Mode and Notebook Mode. The `skills` to
|
|
|
8
8
|
pi install npm:@howaboua/pi-better-skills-tool
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Install `@howaboua/pi-codex-conversion` 3.0.
|
|
11
|
+
Requires Pi 0.84.3 or newer. Install `@howaboua/pi-codex-conversion` 3.0.25 or newer too for Code Mode and Notebook Mode. The extension remains a normal Pi tool when Codex conversion is absent.
|
|
12
12
|
|
|
13
13
|
## Start Pi without native skills
|
|
14
14
|
|
|
@@ -45,7 +45,7 @@ await tools.skills("read code-review")
|
|
|
45
45
|
await tools.skills("read codebase-hygiene testing js-ts")
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
Pi's loaded skill catalog is authoritative during normal use. When Pi has no loaded skills, including `--no-skills` sessions, the tool falls back to the standard global `skills/` directory under Pi's agent directory and `$PWD/.pi/skills/`. A same-named session skill overrides the global skill.
|
|
48
|
+
Pi's loaded skill catalog is authoritative during normal use. When Pi has no loaded skills, including `--no-skills` sessions, the tool falls back to the standard global `skills/` directory under Pi's agent directory and `$PWD/.pi/skills/`. A same-named session skill overrides the global skill. Skill reads include absolute package paths for later reference, script, or asset access. Reference reads return only the requested Markdown and its source paths, without repeating the package inventory.
|
|
49
49
|
|
|
50
50
|
Remove or disable any legacy `codex-conversion-custom-tools/skills.toml` after installing this extension. Keeping both definitions gives Code Mode two tools named `skills`, which it rejects.
|
|
51
51
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@howaboua/pi-better-skills-tool",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Progressive skill discovery for Pi, Code Mode and Notebook Mode.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"pack:dry": "npm pack --dry-run"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@howaboua/pi-codex-conversion": ">=3.0.
|
|
43
|
+
"@howaboua/pi-codex-conversion": ">=3.0.26",
|
|
44
44
|
"@earendil-works/pi-coding-agent": ">=0.84.3",
|
|
45
45
|
"@earendil-works/pi-tui": ">=0.84.3",
|
|
46
46
|
"typebox": "*"
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@howaboua/pi-codex-conversion": "3.0.
|
|
54
|
+
"@howaboua/pi-codex-conversion": "3.0.26",
|
|
55
55
|
"@biomejs/biome": "^2.5.10",
|
|
56
|
-
"@earendil-works/pi-coding-agent": "0.
|
|
57
|
-
"@earendil-works/pi-tui": "0.
|
|
56
|
+
"@earendil-works/pi-coding-agent": "0.85.0",
|
|
57
|
+
"@earendil-works/pi-tui": "0.85.0",
|
|
58
58
|
"@types/node": "^26.2.0",
|
|
59
59
|
"tsx": "^4.23.12",
|
|
60
60
|
"typebox": "1.3.18",
|
package/src/skill-package.ts
CHANGED
|
@@ -141,6 +141,7 @@ function packageFiles(skill: CatalogSkill): string[] {
|
|
|
141
141
|
}
|
|
142
142
|
if (!isWithin(root, realPath)) continue;
|
|
143
143
|
if (kind === "directory") {
|
|
144
|
+
if (entry.name === "node_modules") continue;
|
|
144
145
|
if (directory === skill.directory && entry.name === "assets")
|
|
145
146
|
listAssetEntries(path);
|
|
146
147
|
else visit(path);
|
|
@@ -187,7 +188,8 @@ function readReferences(
|
|
|
187
188
|
path,
|
|
188
189
|
]),
|
|
189
190
|
);
|
|
190
|
-
const selected: Array<{ reference: string; content: string }> =
|
|
191
|
+
const selected: Array<{ reference: string; path: string; content: string }> =
|
|
192
|
+
[];
|
|
191
193
|
const seen = new Set<string>();
|
|
192
194
|
for (const requestedReference of references) {
|
|
193
195
|
const absoluteReference = isAbsolute(requestedReference)
|
|
@@ -220,7 +222,11 @@ function readReferences(
|
|
|
220
222
|
}
|
|
221
223
|
if (seen.has(reference)) continue;
|
|
222
224
|
seen.add(reference);
|
|
223
|
-
selected.push({
|
|
225
|
+
selected.push({
|
|
226
|
+
reference,
|
|
227
|
+
path,
|
|
228
|
+
content: readFileSync(path, "utf8").trim(),
|
|
229
|
+
});
|
|
224
230
|
}
|
|
225
231
|
const content =
|
|
226
232
|
selected.length === 1
|
|
@@ -230,7 +236,7 @@ function readReferences(
|
|
|
230
236
|
({ reference, content: body }) => `--- ${reference} ---\n${body}`,
|
|
231
237
|
)
|
|
232
238
|
.join("\n\n");
|
|
233
|
-
return `${content}\n\n${
|
|
239
|
+
return `${content}\n\n---\nSources:\n${selected.map(({ path }) => `- ${path}`).join("\n")}`;
|
|
234
240
|
}
|
|
235
241
|
|
|
236
242
|
export function readSkillPackage(
|
package/src/tool.ts
CHANGED
|
@@ -37,7 +37,7 @@ export function createSkillsTool(options: SkillsToolOptions = {}) {
|
|
|
37
37
|
description: "Active skill catalog, selected references and package paths.",
|
|
38
38
|
promptSnippet: "List or read skill instructions and references",
|
|
39
39
|
promptGuidelines: [
|
|
40
|
-
'skills: At session start call skills once with "list". Before work read
|
|
40
|
+
'skills: At session start call skills once with "list". Before work read always-applicable and task-relevant skills, one skill plus its references per tools.skills call. Batch independent calls in one exec cell.',
|
|
41
41
|
],
|
|
42
42
|
parameters: SkillsParameters,
|
|
43
43
|
async execute(_toolCallId, params, _signal, _onUpdate, ctx) {
|