@howaboua/pi-better-skills-tool 0.0.11 → 0.0.12

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 CHANGED
@@ -1,5 +1,10 @@
1
1
  # @howaboua/pi-better-skills-tool
2
2
 
3
+ ## 0.0.12
4
+
5
+ - - Skills now shows its exact discovery call in Code and Notebook modes and clarifies batch-read syntax in help.
6
+ - GPT mode uses note-style skill discovery and reading guidance.
7
+
3
8
  ## 0.0.11
4
9
 
5
10
  - - Skills help and catalog results now explain reference-only reads and batching skill bodies with references.
@@ -29,7 +34,6 @@
29
34
  ## 0.0.6
30
35
 
31
36
  - Requires Pi 1.0.0 or later.
32
-
33
37
  - Skill reads now resolve shorthand references within the selected skill and accept semicolon-separated read/list groups.
34
38
  - Large results now return bounded pages with explicit continuation commands instead of failing.
35
39
 
@@ -50,13 +54,11 @@
50
54
  - Batch independent skill reads in one execution cell.
51
55
 
52
56
  - Keep tool results actionable.
53
-
54
57
  - Browser evaluation errors preserve JavaScript exception details instead of a generic “Uncaught”.
55
58
  - Skill path inventories omit installed dependencies; reference reads list only the requested sources instead of repeating the full inventory.
56
59
 
57
60
  ## 0.0.1
58
61
 
59
62
  - Initial release of Better Skills for progressive skill discovery in normal Pi, Code Mode, and Notebook Mode.
60
-
61
63
  - List the available catalog first, then load only the requested skill and references.
62
64
  - Combine global, project, and package-provided skills while respecting invocation visibility and local precedence.
package/README.md CHANGED
@@ -21,12 +21,14 @@ Remove `--no-skills` from an existing wrapper or alias. An additional catalog-cl
21
21
  Normal Pi uses one structured `command` parameter. Code Mode and Notebook Mode use the compact string surface:
22
22
 
23
23
  ```js
24
- await tools.skills("list")
25
- await tools.skills("list code session")
26
- await tools.skills("read code-review")
27
- await tools.skills("read communication codebase-hygiene")
28
- await tools.skills("read codebase-hygiene testing js-ts")
29
- await tools.skills("read communication conversation writing; read codebase-hygiene testing")
24
+ await tools.skills("list");
25
+ await tools.skills("list code session");
26
+ await tools.skills("read code-review");
27
+ await tools.skills("read communication codebase-hygiene");
28
+ await tools.skills("read codebase-hygiene testing js-ts");
29
+ await tools.skills(
30
+ "read communication conversation writing; read codebase-hygiene testing",
31
+ );
30
32
  ```
31
33
 
32
34
  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.
package/biome.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/2.5.15/schema.json",
2
+ "$schema": "https://biomejs.dev/schemas/2.6.3/schema.json",
3
3
  "vcs": {
4
4
  "enabled": true,
5
5
  "clientKind": "git",
package/index.ts CHANGED
@@ -40,6 +40,7 @@ export default async function skillsExtension(pi: ExtensionAPI): Promise<void> {
40
40
  getLoadedSkills: () => loadedSkills,
41
41
  isGpt: () => gpt,
42
42
  });
43
+ const ordinaryGuidelines = tool.promptGuidelines;
43
44
  pi.registerTool(tool);
44
45
  try {
45
46
  const { registerGptPromptMode } = await import(
@@ -47,6 +48,12 @@ export default async function skillsExtension(pi: ExtensionAPI): Promise<void> {
47
48
  );
48
49
  registerGptPromptMode(pi, (active) => {
49
50
  gpt = active;
51
+ if (active)
52
+ tool.promptGuidelines = [
53
+ "skills: List once/session start; before work read always-applicable+task-relevant skills",
54
+ ];
55
+ else if (ordinaryGuidelines) tool.promptGuidelines = ordinaryGuidelines;
56
+ else delete tool.promptGuidelines;
50
57
  return [tool];
51
58
  });
52
59
  } catch (error) {
@@ -81,8 +88,9 @@ async function registerSkillsInCodeMode(
81
88
  return registerCodeModeExtensionTools(pi, () => [
82
89
  adaptToolForCodeMode(tool, {
83
90
  kind: "freeform",
91
+ inputOptional: true,
84
92
  prepareInput: prepareSkillsCodeModeInput,
85
- discovery: "help",
93
+ usage: "await tools.skills() // discover skills and calling syntax",
86
94
  }),
87
95
  ]);
88
96
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@howaboua/pi-better-skills-tool",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "description": "Progressive skill discovery for Pi, Code Mode and Notebook Mode.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -39,7 +39,7 @@
39
39
  "pack:dry": "npm pack --dry-run"
40
40
  },
41
41
  "peerDependencies": {
42
- "@howaboua/pi-codex-conversion": ">=4.0.3",
42
+ "@howaboua/pi-codex-conversion": ">=4.0.5",
43
43
  "@earendil-works/pi-coding-agent": ">=1.0.0",
44
44
  "@earendil-works/pi-tui": ">=1.0.0",
45
45
  "typebox": "*"
@@ -50,12 +50,12 @@
50
50
  }
51
51
  },
52
52
  "devDependencies": {
53
- "@howaboua/pi-codex-conversion": "4.0.3",
54
- "@biomejs/biome": "^2.5.15",
55
- "@earendil-works/pi-coding-agent": "1.3.0",
56
- "@earendil-works/pi-tui": "1.3.0",
53
+ "@howaboua/pi-codex-conversion": "4.0.5",
54
+ "@biomejs/biome": "^2.6.3",
55
+ "@earendil-works/pi-coding-agent": "1.4.0",
56
+ "@earendil-works/pi-tui": "1.4.0",
57
57
  "@types/node": "^26.6.5",
58
- "typebox": "1.3.37",
58
+ "typebox": "1.4.3",
59
59
  "typescript": "^7.0.2"
60
60
  },
61
61
  "pi": {
package/src/catalog.ts CHANGED
@@ -17,7 +17,7 @@ const MAX_COMMAND_BYTES = 4 * 1024;
17
17
  const READ_HELP =
18
18
  "Reference-only selectors omit the initial skill body. To read a body plus references, use separate commands: read skill; read other/references/topic";
19
19
  const GPT_READ_HELP =
20
- "Reference-only selectors→no initial skill body; body+refs→separate commands: read skill; read other/references/topic";
20
+ "Reference-only selectors→NO initial skill body; body+refs→separate commands: read skill; read other/references/topic";
21
21
 
22
22
  type SkillRequest =
23
23
  | { action: "help" }
@@ -206,7 +206,7 @@ export function runSkills(
206
206
  } else {
207
207
  result.output +=
208
208
  command.action === "help"
209
- ? `${gpt ? 'list [category...] | read <skill> [skill-or-reference...] | help; separator ;\nJS: tools.skills("read <skill>")' : 'Commands: list [category...] | read <skill> [skill-or-reference...] | help. Join commands with ;\nJS: tools.skills("read <skill>")'}\n${gpt ? GPT_READ_HELP : READ_HELP}\n\n${formatSkillList(skills)}`
209
+ ? `${gpt ? "" : "Commands: "}list [category...] | read <skill> [skill-or-reference...] | help\nJS: tools.skills("read <skill>")\n${gpt ? "Batch: read skill-a skill-b; full commands→read skill-a; read skill-b" : "Batch: read skill-a skill-b; semicolons separate full commands: read skill-a; read skill-b"}\n${gpt ? GPT_READ_HELP : READ_HELP}\n\n${formatSkillList(skills)}`
210
210
  : `${gpt ? GPT_READ_HELP : READ_HELP}\n\n${formatSkillList(skills, command.categories)}`;
211
211
  }
212
212
  }