pi-toggle-skills 0.1.0 → 0.1.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/README.md CHANGED
@@ -68,10 +68,18 @@ When a skill has `disable-model-invocation: true`, pi excludes it from the syste
68
68
 
69
69
  ## Installation
70
70
 
71
+ **With `pi install`** (recommended):
72
+
71
73
  ```bash
72
74
  pi install https://github.com/monotykamary/pi-toggle-skills
73
75
  ```
74
76
 
77
+ **With npm**:
78
+
79
+ ```bash
80
+ npm install pi-toggle-skills
81
+ ```
82
+
75
83
  Or in `~/.pi/agent/settings.json`:
76
84
 
77
85
  ```json
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-toggle-skills",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Toggle skill visibility in pi's system prompt — flip disable-model-invocation on skills via an interactive TUI",
5
5
  "type": "module",
6
6
  "author": "Tom X Nguyen",
@@ -12,19 +12,19 @@ import {
12
12
  isDisabled,
13
13
  deduplicateSkills,
14
14
  } from "./index.js";
15
+ import { getAgentDir } from "@earendil-works/pi-coding-agent";
15
16
  import matter from "gray-matter";
16
17
  import { readFileSync, writeFileSync, existsSync, readdirSync, statSync } from "node:fs";
17
18
  import { join, basename, dirname } from "node:path";
18
- import { homedir } from "node:os";
19
19
 
20
20
  // Skill directories to scan (in priority order, matching pi's discovery)
21
21
 
22
22
  function getGlobalPiSkillDirs(): string[] {
23
- return [join(homedir(), ".pi", "agent", "skills")];
23
+ return [join(getAgentDir(), "skills")];
24
24
  }
25
25
 
26
26
  function getGlobalAgentsSkillDirs(): string[] {
27
- return [join(homedir(), ".agents", "skills")];
27
+ return [join(getAgentDir(), "..", "agents", "skills")];
28
28
  }
29
29
 
30
30
  function getProjectSkillDirs(cwd: string): string[] {