@xynogen/pix-skills 0.4.14 → 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/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.
|