@xynogen/pix-skills 0.4.13 → 0.4.15
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 +2 -1
- package/package.json +1 -1
- package/skills/environment.md +69 -0
- package/skills/handoff.md +21 -13
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Pi coding agent extension — skill loader tool + skills bundle.
|
|
|
7
7
|
| Resource | Type | Description |
|
|
8
8
|
|---|---|---|
|
|
9
9
|
| `read_skills` | tool | Browse and load bundled skills. No args → list all. `name` only → description. `name + full=true` → full instructions. |
|
|
10
|
-
| `skills/` | skills |
|
|
10
|
+
| `skills/` | skills | 29 bundled skills (auto-loaded by pi at startup — names + descriptions in system prompt) |
|
|
11
11
|
|
|
12
12
|
## How it works
|
|
13
13
|
|
|
@@ -37,6 +37,7 @@ All skills are model-invocable — pi auto-loads each one on description match.
|
|
|
37
37
|
| `commit` | Split, write, and maintain Conventional-Commit-style commits |
|
|
38
38
|
| `debug` | Root-cause analysis and self-annealing error resolution |
|
|
39
39
|
| `diff` | Review current git changes via pre-populated status + staged/unstaged diffs |
|
|
40
|
+
| `environment` | Detect OS/distro/kernel/arch/user/CPU before running platform-specific commands |
|
|
40
41
|
| `explain` | Technical deconstruction and logic tracing of existing code |
|
|
41
42
|
| `finish` | Structured branch completion — verify, decide, clean up |
|
|
42
43
|
| `graphify` | Codebase questions via a persistent knowledge graph |
|
package/package.json
CHANGED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: environment
|
|
3
|
+
description: "Establish clean awareness of the user's working environment — OS, distro, kernel, arch, user, and CPU — before running or suggesting commands. Use whenever a request depends on the platform such as installing packages, system services, file paths, downloading arch-specific binaries, or any command whose syntax differs across systems. Load this first so actions match the actual machine instead of a guessed default."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Environment Skill
|
|
7
|
+
|
|
8
|
+
The blocks below are populated with **live** system facts at skill-load time via
|
|
9
|
+
`\!`cmd`` directives. Read them first — they are the ground truth about the
|
|
10
|
+
machine you are operating on. Do not assume a default platform.
|
|
11
|
+
|
|
12
|
+
## OS release
|
|
13
|
+
|
|
14
|
+
!`cat /etc/os-release`
|
|
15
|
+
|
|
16
|
+
## Kernel, arch, hostname
|
|
17
|
+
|
|
18
|
+
!`uname -srn`
|
|
19
|
+
|
|
20
|
+
## CPU count
|
|
21
|
+
|
|
22
|
+
!`nproc`
|
|
23
|
+
|
|
24
|
+
## Current user
|
|
25
|
+
|
|
26
|
+
!`id -un`
|
|
27
|
+
|
|
28
|
+
## Working directory
|
|
29
|
+
|
|
30
|
+
!`pwd`
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## How to use this context
|
|
35
|
+
|
|
36
|
+
**Know the environment, then act inside it.** The facts above tell you the
|
|
37
|
+
distro family (`ID` / `ID_LIKE`), kernel, CPU architecture, user, and where you
|
|
38
|
+
are. Let them shape every platform-sensitive decision — paths, privilege,
|
|
39
|
+
binary selection, parallelism, and command syntax.
|
|
40
|
+
|
|
41
|
+
**Reconcile the user's intent with the real machine.** If a request assumes a
|
|
42
|
+
different platform, surface the mismatch and offer the equivalent rather than
|
|
43
|
+
silently running the wrong thing.
|
|
44
|
+
|
|
45
|
+
*Example — package managers.* `ID`/`ID_LIKE` maps to a specific manager; never
|
|
46
|
+
assume `apt`:
|
|
47
|
+
|
|
48
|
+
| `ID` / `ID_LIKE` | Manager | Refresh index | Install |
|
|
49
|
+
|-------------------------------------|----------|--------------------|----------------------|
|
|
50
|
+
| `debian`, `ubuntu` | `apt` | `apt update` | `apt install <pkg>` |
|
|
51
|
+
| `fedora`, `rhel`, `centos`, `rocky` | `dnf` | `dnf check-update` | `dnf install <pkg>` |
|
|
52
|
+
| `arch`, `manjaro` | `pacman` | `pacman -Sy` | `pacman -S <pkg>` |
|
|
53
|
+
| `opensuse`, `suse` | `zypper` | `zypper refresh` | `zypper install` |
|
|
54
|
+
| `alpine` | `apk` | `apk update` | `apk add <pkg>` |
|
|
55
|
+
| macOS (kernel `Darwin`) | `brew` | `brew update` | `brew install <pkg>` |
|
|
56
|
+
|
|
57
|
+
So if the user says `apt update` on a `fedora` box, say so and run
|
|
58
|
+
`sudo dnf check-update` instead — once confirmed.
|
|
59
|
+
|
|
60
|
+
The same principle applies beyond packages:
|
|
61
|
+
|
|
62
|
+
- **Arch** — pick `x86_64` vs `aarch64` release artifacts to match `uname`.
|
|
63
|
+
- **Privilege** — system changes need root; prefer the `sudo_run` tool over
|
|
64
|
+
inlining `sudo` in a bash command.
|
|
65
|
+
- **Parallelism** — size builds/jobs to the CPU count above (`make -j`, etc.).
|
|
66
|
+
- **Paths** — respect the actual user and home, not a hardcoded `/home/user`.
|
|
67
|
+
|
|
68
|
+
If a fact is missing, blank, or shows `[blocked: …]`, ask the user instead of
|
|
69
|
+
guessing the platform.
|
package/skills/handoff.md
CHANGED
|
@@ -13,14 +13,26 @@ Single-agent session handoff via toggle. One session closes, next picks up exact
|
|
|
13
13
|
|
|
14
14
|
## Below are what agent MUST do
|
|
15
15
|
|
|
16
|
-
### Step 1:
|
|
16
|
+
### Step 1: Determine Repo Root
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
Resolve the directory where `HANDOFF.md` should live:
|
|
19
|
+
|
|
20
|
+
- User mentioned a specific path/repo in the prompt? Use that as root.
|
|
21
|
+
- Otherwise: use the `bash` tool to run `git rev-parse --show-toplevel` from the relevant directory.
|
|
22
|
+
- Still unclear? Ask: "Which directory is the repo root for this handoff?"
|
|
23
|
+
|
|
24
|
+
Call this resolved path **REPO_ROOT** in your reasoning only — never pass it as a shell variable.
|
|
25
|
+
|
|
26
|
+
### Step 2: Detect Mode
|
|
27
|
+
|
|
28
|
+
Use the `bash` tool to check if `HANDOFF.md` exists in REPO_ROOT:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
bash: ls <REPO_ROOT>/HANDOFF.md
|
|
20
32
|
```
|
|
21
33
|
|
|
22
|
-
-
|
|
23
|
-
-
|
|
34
|
+
- File found → **Receiving Mode**
|
|
35
|
+
- File not found (error/empty) → **Giving Mode**
|
|
24
36
|
|
|
25
37
|
---
|
|
26
38
|
|
|
@@ -39,7 +51,7 @@ Collect all of the following — summarize if long, but never drop critical deci
|
|
|
39
51
|
- Every failed attempt with its reason — **most critical section**
|
|
40
52
|
- Single next concrete action for next session
|
|
41
53
|
|
|
42
|
-
**Step 2: Write `HANDOFF.md` in repo root using this exact structure**
|
|
54
|
+
**Step 2: Write `HANDOFF.md` in the resolved repo root using this exact structure**
|
|
43
55
|
|
|
44
56
|
```markdown
|
|
45
57
|
# Handoff — [feature / work area name]
|
|
@@ -67,7 +79,7 @@ Collect all of the following — summarize if long, but never drop critical deci
|
|
|
67
79
|
**Step 3: Confirm to user**
|
|
68
80
|
|
|
69
81
|
```
|
|
70
|
-
Handoff written → HANDOFF.md
|
|
82
|
+
Handoff written → <REPO_ROOT>/HANDOFF.md
|
|
71
83
|
Next session: call this skill again to resume.
|
|
72
84
|
```
|
|
73
85
|
|
|
@@ -79,9 +91,7 @@ Next session: call this skill again to resume.
|
|
|
79
91
|
|
|
80
92
|
**Step 1: Read the file**
|
|
81
93
|
|
|
82
|
-
|
|
83
|
-
cat HANDOFF.md
|
|
84
|
-
```
|
|
94
|
+
Use the `read` tool on `<REPO_ROOT>/HANDOFF.md`.
|
|
85
95
|
|
|
86
96
|
**Step 2: Internalize before doing anything**
|
|
87
97
|
|
|
@@ -92,9 +102,7 @@ cat HANDOFF.md
|
|
|
92
102
|
|
|
93
103
|
**Step 3: Delete the file**
|
|
94
104
|
|
|
95
|
-
|
|
96
|
-
rm HANDOFF.md
|
|
97
|
-
```
|
|
105
|
+
Use the `bash` tool: `rm <REPO_ROOT>/HANDOFF.md`
|
|
98
106
|
|
|
99
107
|
Deleted immediately so next session starts fresh in giving mode.
|
|
100
108
|
|