@counterposition/skill-pi 0.1.1 → 0.65.1
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 +3 -0
- package/package.json +1 -1
- package/skills/pi/README.md +24 -20
- package/skills/pi/SKILL.md +59 -25
- package/skills/pi/references/extensions.md +150 -234
- package/skills/pi/references/packages.md +89 -59
- package/skills/pi/references/patterns.md +4 -4
- package/skills/pi/references/providers.md +101 -153
- package/skills/pi/references/sdk.md +174 -118
- package/skills/pi/references/settings.md +119 -100
- package/skills/pi/references/skills.md +83 -73
|
@@ -1,26 +1,61 @@
|
|
|
1
1
|
# Skills
|
|
2
2
|
|
|
3
|
-
Skills are self-contained capability packages that Pi
|
|
3
|
+
Skills are self-contained capability packages that Pi loads on demand. Pi follows the [Agent Skills specification](https://agentskills.io/specification) and stays fairly lenient, warning on many violations instead of hard-failing.
|
|
4
4
|
|
|
5
5
|
## How Skills Work
|
|
6
6
|
|
|
7
|
-
1. At startup, Pi
|
|
8
|
-
2.
|
|
9
|
-
3.
|
|
7
|
+
1. At startup, Pi scans skill locations and extracts each skill's name and description.
|
|
8
|
+
2. The system prompt includes those skills in XML form.
|
|
9
|
+
3. When a task matches, the agent uses `read` to load the full `SKILL.md`.
|
|
10
|
+
4. The skill body can route to `references/`, `scripts/`, or `assets/` files via relative paths.
|
|
10
11
|
|
|
11
|
-
This progressive disclosure
|
|
12
|
+
This is progressive disclosure: descriptions stay in prompt context, full instructions are loaded only when needed.
|
|
13
|
+
|
|
14
|
+
## Locations
|
|
15
|
+
|
|
16
|
+
Pi discovers skills from:
|
|
17
|
+
|
|
18
|
+
- Global:
|
|
19
|
+
- `~/.pi/agent/skills/`
|
|
20
|
+
- `~/.agents/skills/`
|
|
21
|
+
- Project:
|
|
22
|
+
- `.pi/skills/`
|
|
23
|
+
- `.agents/skills/` in `cwd` and ancestor directories
|
|
24
|
+
- Packages:
|
|
25
|
+
- `skills/` directories or `pi.skills` entries in `package.json`
|
|
26
|
+
- Settings:
|
|
27
|
+
- `skills` array in `settings.json`
|
|
28
|
+
- CLI:
|
|
29
|
+
- `--skill <path>` (repeatable, still additive even with `--no-skills`)
|
|
30
|
+
|
|
31
|
+
Discovery rules:
|
|
32
|
+
|
|
33
|
+
- Root `.md` files in `.pi/skills/` and `~/.pi/agent/skills/` are loaded as standalone skills.
|
|
34
|
+
- Directories containing `SKILL.md` are discovered recursively in all skill locations.
|
|
35
|
+
- Root `.md` files in `.agents/skills/` locations are ignored.
|
|
36
|
+
|
|
37
|
+
## Skill Commands
|
|
38
|
+
|
|
39
|
+
Every skill can register as `/skill:name` when `enableSkillCommands` is enabled:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
/skill:my-skill
|
|
43
|
+
/skill:my-skill extra arguments
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Arguments after the command are appended to the skill body as `User: ...`.
|
|
12
47
|
|
|
13
48
|
## Directory Structure
|
|
14
49
|
|
|
15
50
|
```text
|
|
16
51
|
my-skill/
|
|
17
|
-
├── SKILL.md
|
|
18
|
-
├── scripts/
|
|
19
|
-
│ └──
|
|
20
|
-
├── references/
|
|
21
|
-
│ └── api
|
|
22
|
-
└── assets/
|
|
23
|
-
└── template.
|
|
52
|
+
├── SKILL.md
|
|
53
|
+
├── scripts/
|
|
54
|
+
│ └── process.sh
|
|
55
|
+
├── references/
|
|
56
|
+
│ └── api.md
|
|
57
|
+
└── assets/
|
|
58
|
+
└── template.json
|
|
24
59
|
```
|
|
25
60
|
|
|
26
61
|
## SKILL.md Format
|
|
@@ -28,84 +63,59 @@ my-skill/
|
|
|
28
63
|
```markdown
|
|
29
64
|
---
|
|
30
65
|
name: my-skill
|
|
31
|
-
description: "What this skill does and when to use it. Be specific
|
|
66
|
+
description: "What this skill does and when to use it. Be specific."
|
|
32
67
|
license: MIT
|
|
33
|
-
compatibility: "Requires bash
|
|
68
|
+
compatibility: "Requires bash"
|
|
34
69
|
---
|
|
35
70
|
|
|
36
71
|
# My Skill
|
|
37
72
|
|
|
38
|
-
|
|
39
|
-
Use markdown formatting. Reference supporting files with relative paths.
|
|
40
|
-
|
|
41
|
-
## Step 1: Do the thing
|
|
42
|
-
|
|
43
|
-
Read `references/api-reference.md` for the full API spec, then...
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Frontmatter Fields
|
|
47
|
-
|
|
48
|
-
| Field | Required | Constraints | Notes |
|
|
49
|
-
|-------|----------|------------|-------|
|
|
50
|
-
| `name` | Yes | 1–64 chars, lowercase `[a-z0-9-]` | Should match directory name |
|
|
51
|
-
| `description` | Yes | Max 1024 chars | Primary trigger mechanism — include trigger phrases |
|
|
52
|
-
| `license` | No | String | License identifier |
|
|
53
|
-
| `compatibility` | No | String | Tool/dependency requirements |
|
|
54
|
-
| `allowed-tools` | No | List | Restrict which tools the skill can use |
|
|
55
|
-
| `disable-model-invocation` | No | Boolean | If true, agent cannot auto-invoke this skill |
|
|
56
|
-
|
|
57
|
-
## Discovery Locations
|
|
73
|
+
## Setup
|
|
58
74
|
|
|
59
|
-
|
|
75
|
+
Run `npm install` in this directory before first use.
|
|
60
76
|
|
|
61
|
-
|
|
62
|
-
2. `~/.pi/agent/skills/` — global
|
|
63
|
-
3. Installed packages (via `pi install`)
|
|
64
|
-
4. `settings.json` → `skills` array
|
|
65
|
-
5. `pi --skills <path>` CLI argument
|
|
77
|
+
## Usage
|
|
66
78
|
|
|
67
|
-
|
|
79
|
+
Read `references/api.md` for the full details.
|
|
80
|
+
```
|
|
68
81
|
|
|
69
|
-
##
|
|
82
|
+
## Frontmatter
|
|
70
83
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
84
|
+
| Field | Required | Notes |
|
|
85
|
+
|-------|----------|-------|
|
|
86
|
+
| `name` | Yes | 1-64 chars, lowercase letters/numbers/hyphens, must match parent dir |
|
|
87
|
+
| `description` | Yes | Max 1024 chars; primary trigger text |
|
|
88
|
+
| `license` | No | License name or bundled reference |
|
|
89
|
+
| `compatibility` | No | Environment requirements |
|
|
90
|
+
| `metadata` | No | Arbitrary key-value mapping |
|
|
91
|
+
| `allowed-tools` | No | Experimental, space-delimited list of pre-approved tools |
|
|
92
|
+
| `disable-model-invocation` | No | Hides skill from system prompt; user must use `/skill:name` |
|
|
74
93
|
|
|
75
94
|
## Writing Good Skills
|
|
76
95
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
96
|
+
- Make the description specific and assertive. It is the main trigger.
|
|
97
|
+
- Keep `SKILL.md` focused and move bulk detail into `references/`.
|
|
98
|
+
- Use imperative instructions and explain why when it changes the workflow.
|
|
99
|
+
- Use relative links/paths so the agent can open supporting files reliably.
|
|
100
|
+
- Put deterministic helper logic in `scripts/` instead of asking the model to recreate it.
|
|
82
101
|
|
|
83
|
-
|
|
102
|
+
## Using Skills from Other Harnesses
|
|
84
103
|
|
|
85
|
-
|
|
104
|
+
To reuse Claude Code or Codex skill directories, add them to settings:
|
|
86
105
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
### Reference Files
|
|
94
|
-
|
|
95
|
-
- Reference with relative paths: `Read references/aws.md for AWS-specific steps.`
|
|
96
|
-
- For files over 300 lines, include a table of contents at the top.
|
|
97
|
-
- The model reads these with the `read` tool — they don't go into the system prompt.
|
|
98
|
-
|
|
99
|
-
### Helper Scripts
|
|
100
|
-
|
|
101
|
-
Place in `scripts/`. The model can execute them via the `bash` tool. This avoids the model reinventing the wheel for deterministic operations.
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"skills": ["~/.claude/skills", "~/.codex/skills"]
|
|
109
|
+
}
|
|
110
|
+
```
|
|
102
111
|
|
|
103
112
|
## Validation
|
|
104
113
|
|
|
105
|
-
Pi
|
|
114
|
+
Pi warns on most issues but still loads the skill when possible:
|
|
115
|
+
|
|
116
|
+
- Name and parent-directory mismatch
|
|
117
|
+
- Name too long or invalid
|
|
118
|
+
- Description too long
|
|
119
|
+
- Duplicate names, where first discovered wins
|
|
106
120
|
|
|
107
|
-
|
|
108
|
-
- Name > 64 chars → warning
|
|
109
|
-
- Description > 1024 chars → warning
|
|
110
|
-
- Name-directory mismatch → warning
|
|
111
|
-
- Duplicate names → first discovered wins, warning issued
|
|
121
|
+
One hard failure remains: a skill without `description` is not loaded.
|