@mariozechner/pi-coding-agent 0.49.3 → 0.50.0
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 +99 -1
- package/README.md +310 -1230
- package/dist/cli/args.d.ts +5 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +57 -23
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts +14 -0
- package/dist/cli/config-selector.d.ts.map +1 -0
- package/dist/cli/config-selector.js +31 -0
- package/dist/cli/config-selector.js.map +1 -0
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js +1 -1
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/core/agent-session.d.ts +53 -34
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +262 -67
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts +8 -18
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +39 -55
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +2 -1
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/diagnostics.d.ts +15 -0
- package/dist/core/diagnostics.d.ts.map +1 -0
- package/dist/core/diagnostics.js +2 -0
- package/dist/core/diagnostics.js.map +1 -0
- package/dist/core/export-html/template.css +9 -0
- package/dist/core/export-html/template.js +6 -4
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +10 -1
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +9 -3
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +39 -12
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +112 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +9 -2
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +13 -0
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/model-registry.d.ts +42 -2
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +154 -44
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +3 -2
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/package-manager.d.ts +129 -0
- package/dist/core/package-manager.d.ts.map +1 -0
- package/dist/core/package-manager.js +1148 -0
- package/dist/core/package-manager.js.map +1 -0
- package/dist/core/prompt-templates.d.ts +6 -0
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +114 -54
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/resource-loader.d.ts +160 -0
- package/dist/core/resource-loader.d.ts.map +1 -0
- package/dist/core/resource-loader.js +604 -0
- package/dist/core/resource-loader.js.map +1 -0
- package/dist/core/sdk.d.ts +14 -105
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +52 -304
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +45 -1
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +34 -16
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +104 -25
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts +18 -10
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +126 -93
- package/dist/core/skills.js.map +1 -1
- package/dist/core/system-prompt.d.ts +3 -27
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +16 -103
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +2 -1
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +4 -4
- package/dist/core/tools/read.js.map +1 -1
- package/dist/index.d.ts +12 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +209 -97
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts +5 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.js +29 -9
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts +71 -0
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/config-selector.js +468 -0
- package/dist/modes/interactive/components/config-selector.js.map +1 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +4 -0
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +1 -0
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +3 -4
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +18 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +195 -87
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +17 -0
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/skill-invocation-message.js +47 -0
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +5 -5
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +42 -2
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +535 -200
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/dark.json +1 -1
- package/dist/modes/interactive/theme/light.json +1 -1
- package/dist/modes/interactive/theme/theme-schema.json +8 -1
- package/dist/modes/interactive/theme/theme.d.ts +8 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +72 -25
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +25 -89
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +32 -92
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/utils/git.d.ts +2 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +6 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/shell.d.ts +1 -0
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +14 -1
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/sleep.d.ts +5 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/sleep.js +17 -0
- package/dist/utils/sleep.js.map +1 -0
- package/docs/compaction.md +23 -21
- package/docs/custom-provider.md +538 -0
- package/docs/development.md +69 -0
- package/docs/extensions.md +180 -118
- package/docs/images/doom-extension.png +0 -0
- package/docs/images/interactive-mode.png +0 -0
- package/docs/images/tree-view.png +0 -0
- package/docs/json.md +79 -0
- package/docs/keybindings.md +162 -0
- package/docs/models.md +193 -0
- package/docs/packages.md +163 -0
- package/docs/prompt-templates.md +67 -0
- package/docs/providers.md +147 -0
- package/docs/sdk.md +111 -178
- package/docs/session.md +167 -16
- package/docs/settings.md +216 -0
- package/docs/shell-aliases.md +13 -0
- package/docs/skills.md +111 -202
- package/docs/terminal-setup.md +65 -0
- package/docs/themes.md +295 -0
- package/docs/tui.md +36 -5
- package/docs/windows.md +17 -0
- package/examples/README.md +1 -0
- package/examples/extensions/README.md +22 -2
- package/examples/extensions/bookmark.ts +50 -0
- package/examples/extensions/custom-provider-anthropic/index.ts +604 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +24 -0
- package/examples/extensions/custom-provider-anthropic/package.json +19 -0
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +349 -0
- package/examples/extensions/custom-provider-gitlab-duo/package.json +16 -0
- package/examples/extensions/custom-provider-gitlab-duo/test.ts +82 -0
- package/examples/extensions/doom-overlay/doom/build.sh +1 -1
- package/examples/extensions/event-bus.ts +43 -0
- package/examples/extensions/message-renderer.ts +59 -0
- package/examples/extensions/session-name.ts +27 -0
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/sdk/02-custom-model.ts +3 -3
- package/examples/sdk/03-custom-prompt.ts +20 -9
- package/examples/sdk/04-skills.ts +26 -27
- package/examples/sdk/06-extensions.ts +15 -6
- package/examples/sdk/07-context-files.ts +22 -18
- package/examples/sdk/08-prompt-templates.ts +19 -14
- package/examples/sdk/09-api-keys-and-oauth.ts +5 -12
- package/examples/sdk/10-settings.ts +3 -3
- package/examples/sdk/12-full-control.ts +16 -7
- package/examples/sdk/README.md +24 -30
- package/package.json +4 -4
- package/docs/theme.md +0 -617
- package/examples/extensions/chalk-logger.ts +0 -26
package/docs/skills.md
CHANGED
|
@@ -4,54 +4,98 @@
|
|
|
4
4
|
|
|
5
5
|
Skills are self-contained capability packages that the agent loads on-demand. A skill provides specialized workflows, setup instructions, helper scripts, and reference documentation for specific tasks.
|
|
6
6
|
|
|
7
|
-
Pi implements the [Agent Skills standard](https://agentskills.io/specification).
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
7
|
+
Pi implements the [Agent Skills standard](https://agentskills.io/specification), warning about violations but remaining lenient.
|
|
8
|
+
|
|
9
|
+
## Table of Contents
|
|
10
|
+
|
|
11
|
+
- [Locations](#locations)
|
|
12
|
+
- [How Skills Work](#how-skills-work)
|
|
13
|
+
- [Skill Commands](#skill-commands)
|
|
14
|
+
- [Skill Structure](#skill-structure)
|
|
15
|
+
- [Frontmatter](#frontmatter)
|
|
16
|
+
- [Validation](#validation)
|
|
17
|
+
- [Example](#example)
|
|
18
|
+
- [Skill Repositories](#skill-repositories)
|
|
19
|
+
|
|
20
|
+
## Locations
|
|
21
|
+
|
|
22
|
+
> **Security:** Skills can instruct the model to perform any action and may include executable code the model invokes. Review skill content before use.
|
|
23
|
+
|
|
24
|
+
Pi loads skills from:
|
|
25
|
+
|
|
26
|
+
- Global: `~/.pi/agent/skills/`
|
|
27
|
+
- Project: `.pi/skills/`
|
|
28
|
+
- Packages: `skills/` directories or `pi.skills` entries in `package.json`
|
|
29
|
+
- Settings: `skills` array with files or directories
|
|
30
|
+
- CLI: `--skill <path>` (repeatable, additive even with `--no-skills`)
|
|
31
|
+
|
|
32
|
+
Discovery rules:
|
|
33
|
+
- Direct `.md` files in the skills directory root
|
|
34
|
+
- Recursive `SKILL.md` files under subdirectories
|
|
35
|
+
|
|
36
|
+
Disable discovery with `--no-skills` (explicit `--skill` paths still load).
|
|
37
|
+
|
|
38
|
+
### Using Skills from Other Harnesses
|
|
39
|
+
|
|
40
|
+
To use skills from Claude Code or OpenAI Codex, add their directories to settings:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"skills": [
|
|
45
|
+
"~/.claude/skills",
|
|
46
|
+
"~/.codex/skills"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
For project-level Claude Code skills, add to `.pi/settings.json`:
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"skills": ["../.claude/skills"]
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## How Skills Work
|
|
60
|
+
|
|
61
|
+
1. At startup, pi scans skill locations and extracts names and descriptions
|
|
62
|
+
2. The system prompt includes available skills in XML format per the [specification](https://agentskills.io/integrate-skills)
|
|
63
|
+
3. When a task matches, the agent uses `read` to load the full SKILL.md (models don't always do this; use prompting or `/skill:name` to force it)
|
|
64
|
+
4. The agent follows the instructions, using relative paths to reference scripts and assets
|
|
65
|
+
|
|
66
|
+
This is progressive disclosure: only descriptions are always in context, full instructions load on-demand.
|
|
67
|
+
|
|
68
|
+
## Skill Commands
|
|
69
|
+
|
|
70
|
+
Skills register as `/skill:name` commands:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
/skill:brave-search # Load and execute the skill
|
|
74
|
+
/skill:pdf-tools extract # Load skill with arguments
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Arguments after the command are appended to the skill content as `User: <args>`.
|
|
78
|
+
|
|
79
|
+
Toggle skill commands via `/settings` in interactive mode or in `settings.json`:
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"enableSkillCommands": true
|
|
84
|
+
}
|
|
85
|
+
```
|
|
42
86
|
|
|
43
87
|
## Skill Structure
|
|
44
88
|
|
|
45
|
-
A skill is a directory with a `SKILL.md` file. Everything else is freeform.
|
|
89
|
+
A skill is a directory with a `SKILL.md` file. Everything else is freeform.
|
|
46
90
|
|
|
47
91
|
```
|
|
48
92
|
my-skill/
|
|
49
93
|
├── SKILL.md # Required: frontmatter + instructions
|
|
50
|
-
├── scripts/ # Helper scripts
|
|
94
|
+
├── scripts/ # Helper scripts
|
|
51
95
|
│ └── process.sh
|
|
52
96
|
├── references/ # Detailed docs loaded on-demand
|
|
53
97
|
│ └── api-reference.md
|
|
54
|
-
└── assets/
|
|
98
|
+
└── assets/
|
|
55
99
|
└── template.json
|
|
56
100
|
```
|
|
57
101
|
|
|
@@ -77,46 +121,46 @@ cd /path/to/skill && npm install
|
|
|
77
121
|
\`\`\`bash
|
|
78
122
|
./scripts/process.sh <input>
|
|
79
123
|
\`\`\`
|
|
124
|
+
```
|
|
80
125
|
|
|
81
|
-
|
|
126
|
+
Use relative paths from the skill directory:
|
|
82
127
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
3. Third step
|
|
128
|
+
```markdown
|
|
129
|
+
See [the reference guide](references/REFERENCE.md) for details.
|
|
86
130
|
```
|
|
87
131
|
|
|
88
|
-
|
|
132
|
+
## Frontmatter
|
|
89
133
|
|
|
90
134
|
Per the [Agent Skills specification](https://agentskills.io/specification#frontmatter-required):
|
|
91
135
|
|
|
92
|
-
| Field | Required |
|
|
136
|
+
| Field | Required | Description |
|
|
93
137
|
|-------|----------|-------------|
|
|
94
|
-
| `name` | Yes | Max 64 chars. Lowercase a-z, 0-9, hyphens
|
|
138
|
+
| `name` | Yes | Max 64 chars. Lowercase a-z, 0-9, hyphens. Must match parent directory. |
|
|
95
139
|
| `description` | Yes | Max 1024 chars. What the skill does and when to use it. |
|
|
96
|
-
| `license` | No | License name or reference to bundled
|
|
97
|
-
| `compatibility` | No | Max 500 chars. Environment requirements
|
|
98
|
-
| `metadata` | No | Arbitrary key-value mapping
|
|
140
|
+
| `license` | No | License name or reference to bundled file. |
|
|
141
|
+
| `compatibility` | No | Max 500 chars. Environment requirements. |
|
|
142
|
+
| `metadata` | No | Arbitrary key-value mapping. |
|
|
99
143
|
| `allowed-tools` | No | Space-delimited list of pre-approved tools (experimental). |
|
|
144
|
+
| `disable-model-invocation` | No | When `true`, skill is hidden from system prompt. Users must use `/skill:name`. |
|
|
100
145
|
|
|
101
|
-
|
|
146
|
+
### Name Rules
|
|
102
147
|
|
|
103
|
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
- Match the parent directory name exactly
|
|
148
|
+
- 1-64 characters
|
|
149
|
+
- Lowercase letters, numbers, hyphens only
|
|
150
|
+
- No leading/trailing hyphens
|
|
151
|
+
- No consecutive hyphens
|
|
152
|
+
- Must match parent directory name
|
|
109
153
|
|
|
110
154
|
Valid: `pdf-processing`, `data-analysis`, `code-review`
|
|
111
155
|
Invalid: `PDF-Processing`, `-pdf`, `pdf--processing`
|
|
112
156
|
|
|
113
|
-
|
|
157
|
+
### Description Best Practices
|
|
114
158
|
|
|
115
|
-
The
|
|
159
|
+
The description determines when the agent loads the skill. Be specific.
|
|
116
160
|
|
|
117
161
|
Good:
|
|
118
162
|
```yaml
|
|
119
|
-
description: Extracts text and tables from PDF files, fills PDF forms, and merges multiple PDFs. Use when working with PDF documents
|
|
163
|
+
description: Extracts text and tables from PDF files, fills PDF forms, and merges multiple PDFs. Use when working with PDF documents.
|
|
120
164
|
```
|
|
121
165
|
|
|
122
166
|
Poor:
|
|
@@ -124,130 +168,21 @@ Poor:
|
|
|
124
168
|
description: Helps with PDFs.
|
|
125
169
|
```
|
|
126
170
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
Use relative paths from the skill directory:
|
|
130
|
-
|
|
131
|
-
```markdown
|
|
132
|
-
See [the reference guide](references/REFERENCE.md) for details.
|
|
133
|
-
|
|
134
|
-
Run the extraction script:
|
|
135
|
-
\`\`\`bash
|
|
136
|
-
./scripts/extract.py input.pdf
|
|
137
|
-
\`\`\`
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
## Skill Locations
|
|
141
|
-
|
|
142
|
-
Skills are discovered from these locations (later wins on name collision):
|
|
171
|
+
## Validation
|
|
143
172
|
|
|
144
|
-
|
|
145
|
-
2. `~/.claude/skills/*/SKILL.md` (Claude Code user, one level)
|
|
146
|
-
3. `<cwd>/.claude/skills/*/SKILL.md` (Claude Code project, one level)
|
|
147
|
-
4. `~/.pi/agent/skills/**/SKILL.md` (Pi user, recursive)
|
|
148
|
-
5. `<cwd>/.pi/skills/**/SKILL.md` (Pi project, recursive)
|
|
149
|
-
|
|
150
|
-
## Configuration
|
|
151
|
-
|
|
152
|
-
Configure skill loading in `~/.pi/agent/settings.json`:
|
|
153
|
-
|
|
154
|
-
```json
|
|
155
|
-
{
|
|
156
|
-
"skills": {
|
|
157
|
-
"enabled": true,
|
|
158
|
-
"enableCodexUser": true,
|
|
159
|
-
"enableClaudeUser": true,
|
|
160
|
-
"enableClaudeProject": true,
|
|
161
|
-
"enablePiUser": true,
|
|
162
|
-
"enablePiProject": true,
|
|
163
|
-
"enableSkillCommands": true,
|
|
164
|
-
"customDirectories": ["~/my-skills-repo"],
|
|
165
|
-
"ignoredSkills": ["deprecated-skill"],
|
|
166
|
-
"includeSkills": ["git-*", "docker"]
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
| Setting | Default | Description |
|
|
172
|
-
|---------|---------|-------------|
|
|
173
|
-
| `enabled` | `true` | Master toggle for all skills |
|
|
174
|
-
| `enableCodexUser` | `true` | Load from `~/.codex/skills/` |
|
|
175
|
-
| `enableClaudeUser` | `true` | Load from `~/.claude/skills/` |
|
|
176
|
-
| `enableClaudeProject` | `true` | Load from `<cwd>/.claude/skills/` |
|
|
177
|
-
| `enablePiUser` | `true` | Load from `~/.pi/agent/skills/` |
|
|
178
|
-
| `enablePiProject` | `true` | Load from `<cwd>/.pi/skills/` |
|
|
179
|
-
| `enableSkillCommands` | `true` | Register skills as `/skill:name` commands |
|
|
180
|
-
| `customDirectories` | `[]` | Additional directories to scan (supports `~` expansion) |
|
|
181
|
-
| `ignoredSkills` | `[]` | Glob patterns to exclude (e.g., `["deprecated-*", "test-skill"]`) |
|
|
182
|
-
| `includeSkills` | `[]` | Glob patterns to include (empty = all; e.g., `["git-*", "docker"]`) |
|
|
183
|
-
|
|
184
|
-
**Note:** `ignoredSkills` takes precedence over both `includeSkills` in settings and the `--skills` CLI flag. A skill matching any ignore pattern will be excluded regardless of include patterns.
|
|
185
|
-
|
|
186
|
-
### CLI Filtering
|
|
187
|
-
|
|
188
|
-
Use `--skills` to filter skills for a specific invocation:
|
|
189
|
-
|
|
190
|
-
```bash
|
|
191
|
-
# Only load specific skills
|
|
192
|
-
pi --skills git,docker
|
|
193
|
-
|
|
194
|
-
# Glob patterns
|
|
195
|
-
pi --skills "git-*,docker-*"
|
|
196
|
-
|
|
197
|
-
# All skills matching a prefix
|
|
198
|
-
pi --skills "aws-*"
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
This overrides the `includeSkills` setting for the current session.
|
|
202
|
-
|
|
203
|
-
## How Skills Work
|
|
204
|
-
|
|
205
|
-
1. At startup, pi scans skill locations and extracts names + descriptions
|
|
206
|
-
2. The system prompt includes available skills in XML format
|
|
207
|
-
3. When a task matches, the agent uses `read` to load the full SKILL.md
|
|
208
|
-
4. The agent follows the instructions, using relative paths to reference scripts/assets
|
|
209
|
-
|
|
210
|
-
This is progressive disclosure: only descriptions are always in context, full instructions load on-demand.
|
|
211
|
-
|
|
212
|
-
## Skill Commands
|
|
213
|
-
|
|
214
|
-
Skills are automatically registered as slash commands with a `/skill:` prefix:
|
|
215
|
-
|
|
216
|
-
```bash
|
|
217
|
-
/skill:brave-search # Load and execute the brave-search skill
|
|
218
|
-
/skill:pdf-tools extract # Load skill with arguments
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
Arguments after the command name are appended to the skill content as `User: <args>`.
|
|
222
|
-
|
|
223
|
-
Toggle skill commands via `/settings` or in `settings.json`:
|
|
224
|
-
|
|
225
|
-
```json
|
|
226
|
-
{
|
|
227
|
-
"skills": {
|
|
228
|
-
"enableSkillCommands": true
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
| Setting | Default | Description |
|
|
234
|
-
|---------|---------|-------------|
|
|
235
|
-
| `enableSkillCommands` | `true` | Register skills as `/skill:name` commands |
|
|
236
|
-
|
|
237
|
-
## Validation Warnings
|
|
238
|
-
|
|
239
|
-
Pi validates skills against the Agent Skills standard and warns (but still loads) non-compliant skills:
|
|
173
|
+
Pi validates skills against the Agent Skills standard. Most issues produce warnings but still load the skill:
|
|
240
174
|
|
|
241
175
|
- Name doesn't match parent directory
|
|
242
|
-
- Name exceeds 64 characters
|
|
243
|
-
- Name contains invalid characters
|
|
176
|
+
- Name exceeds 64 characters or contains invalid characters
|
|
244
177
|
- Name starts/ends with hyphen or has consecutive hyphens
|
|
245
|
-
- Description
|
|
178
|
+
- Description exceeds 1024 characters
|
|
246
179
|
- Unknown frontmatter fields
|
|
247
180
|
|
|
181
|
+
**Exception:** Skills with missing description are not loaded.
|
|
182
|
+
|
|
248
183
|
Name collisions (same name from different locations) warn and keep the first skill found.
|
|
249
184
|
|
|
250
|
-
## Example
|
|
185
|
+
## Example
|
|
251
186
|
|
|
252
187
|
```
|
|
253
188
|
brave-search/
|
|
@@ -285,33 +220,7 @@ cd /path/to/brave-search && npm install
|
|
|
285
220
|
\`\`\`
|
|
286
221
|
```
|
|
287
222
|
|
|
288
|
-
## Compatibility
|
|
289
|
-
|
|
290
|
-
**Claude Code**: Pi reads skills from `~/.claude/skills/*/SKILL.md`. The `allowed-tools` and `model` frontmatter fields are ignored.
|
|
291
|
-
|
|
292
|
-
**Codex CLI**: Pi reads skills from `~/.codex/skills/` recursively. Hidden files/directories and symlinks are skipped.
|
|
293
|
-
|
|
294
223
|
## Skill Repositories
|
|
295
224
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
- [Anthropic Skills](https://github.com/anthropics/skills) - Official skills for document processing (docx, pdf, pptx, xlsx), web development, and more
|
|
299
|
-
- [Pi Skills](https://github.com/badlogic/pi-skills) - Skills for web search, browser automation, Google APIs, transcription
|
|
300
|
-
|
|
301
|
-
## Disabling Skills
|
|
302
|
-
|
|
303
|
-
CLI:
|
|
304
|
-
```bash
|
|
305
|
-
pi --no-skills
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
Settings (`~/.pi/agent/settings.json`):
|
|
309
|
-
```json
|
|
310
|
-
{
|
|
311
|
-
"skills": {
|
|
312
|
-
"enabled": false
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
Use the granular `enable*` flags to disable individual sources (e.g., `enableClaudeUser: false` to skip `~/.claude/skills`).
|
|
225
|
+
- [Anthropic Skills](https://github.com/anthropics/skills) - Document processing (docx, pdf, pptx, xlsx), web development
|
|
226
|
+
- [Pi Skills](https://github.com/badlogic/pi-skills) - Web search, browser automation, Google APIs, transcription
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Terminal Setup
|
|
2
|
+
|
|
3
|
+
Pi uses the [Kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/) for reliable modifier key detection. Most modern terminals support this protocol, but some require configuration.
|
|
4
|
+
|
|
5
|
+
## Kitty, iTerm2
|
|
6
|
+
|
|
7
|
+
Work out of the box.
|
|
8
|
+
|
|
9
|
+
## Ghostty
|
|
10
|
+
|
|
11
|
+
Add to your Ghostty config (`~/.config/ghostty/config`):
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
keybind = alt+backspace=text:\x1b\x7f
|
|
15
|
+
keybind = shift+enter=text:\n
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## WezTerm
|
|
19
|
+
|
|
20
|
+
Create `~/.wezterm.lua`:
|
|
21
|
+
|
|
22
|
+
```lua
|
|
23
|
+
local wezterm = require 'wezterm'
|
|
24
|
+
local config = wezterm.config_builder()
|
|
25
|
+
config.enable_kitty_keyboard = true
|
|
26
|
+
return config
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## VS Code (Integrated Terminal)
|
|
30
|
+
|
|
31
|
+
Add to `keybindings.json` to enable `Shift+Enter` for multi-line input:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"key": "shift+enter",
|
|
36
|
+
"command": "workbench.action.terminal.sendSequence",
|
|
37
|
+
"args": { "text": "\u001b[13;2u" },
|
|
38
|
+
"when": "terminalFocus"
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Windows Terminal
|
|
43
|
+
|
|
44
|
+
Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file):
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"actions": [
|
|
49
|
+
{
|
|
50
|
+
"command": { "action": "sendInput", "input": "\u001b[13;2u" },
|
|
51
|
+
"keys": "shift+enter"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
If you already have an `actions` array, add the object to it.
|
|
58
|
+
|
|
59
|
+
## IntelliJ IDEA (Integrated Terminal)
|
|
60
|
+
|
|
61
|
+
The built-in terminal has limited escape sequence support. Shift+Enter cannot be distinguished from Enter in IntelliJ's terminal.
|
|
62
|
+
|
|
63
|
+
If you want the hardware cursor visible, set `PI_HARDWARE_CURSOR=1` before running pi (disabled by default for compatibility).
|
|
64
|
+
|
|
65
|
+
Consider using a dedicated terminal emulator for the best experience.
|