@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.
Files changed (207) hide show
  1. package/CHANGELOG.md +99 -1
  2. package/README.md +310 -1230
  3. package/dist/cli/args.d.ts +5 -0
  4. package/dist/cli/args.d.ts.map +1 -1
  5. package/dist/cli/args.js +57 -23
  6. package/dist/cli/args.js.map +1 -1
  7. package/dist/cli/config-selector.d.ts +14 -0
  8. package/dist/cli/config-selector.d.ts.map +1 -0
  9. package/dist/cli/config-selector.js +31 -0
  10. package/dist/cli/config-selector.js.map +1 -0
  11. package/dist/cli/session-picker.d.ts.map +1 -1
  12. package/dist/cli/session-picker.js +1 -1
  13. package/dist/cli/session-picker.js.map +1 -1
  14. package/dist/core/agent-session.d.ts +53 -34
  15. package/dist/core/agent-session.d.ts.map +1 -1
  16. package/dist/core/agent-session.js +262 -67
  17. package/dist/core/agent-session.js.map +1 -1
  18. package/dist/core/auth-storage.d.ts +8 -18
  19. package/dist/core/auth-storage.d.ts.map +1 -1
  20. package/dist/core/auth-storage.js +39 -55
  21. package/dist/core/auth-storage.js.map +1 -1
  22. package/dist/core/bash-executor.d.ts.map +1 -1
  23. package/dist/core/bash-executor.js +2 -1
  24. package/dist/core/bash-executor.js.map +1 -1
  25. package/dist/core/diagnostics.d.ts +15 -0
  26. package/dist/core/diagnostics.d.ts.map +1 -0
  27. package/dist/core/diagnostics.js +2 -0
  28. package/dist/core/diagnostics.js.map +1 -0
  29. package/dist/core/export-html/template.css +9 -0
  30. package/dist/core/export-html/template.js +6 -4
  31. package/dist/core/extensions/index.d.ts +1 -1
  32. package/dist/core/extensions/index.d.ts.map +1 -1
  33. package/dist/core/extensions/index.js.map +1 -1
  34. package/dist/core/extensions/loader.d.ts +1 -1
  35. package/dist/core/extensions/loader.d.ts.map +1 -1
  36. package/dist/core/extensions/loader.js +10 -1
  37. package/dist/core/extensions/loader.js.map +1 -1
  38. package/dist/core/extensions/runner.d.ts +9 -3
  39. package/dist/core/extensions/runner.d.ts.map +1 -1
  40. package/dist/core/extensions/runner.js +39 -12
  41. package/dist/core/extensions/runner.js.map +1 -1
  42. package/dist/core/extensions/types.d.ts +112 -1
  43. package/dist/core/extensions/types.d.ts.map +1 -1
  44. package/dist/core/extensions/types.js.map +1 -1
  45. package/dist/core/footer-data-provider.d.ts +9 -2
  46. package/dist/core/footer-data-provider.d.ts.map +1 -1
  47. package/dist/core/footer-data-provider.js +13 -0
  48. package/dist/core/footer-data-provider.js.map +1 -1
  49. package/dist/core/model-registry.d.ts +42 -2
  50. package/dist/core/model-registry.d.ts.map +1 -1
  51. package/dist/core/model-registry.js +154 -44
  52. package/dist/core/model-registry.js.map +1 -1
  53. package/dist/core/model-resolver.d.ts.map +1 -1
  54. package/dist/core/model-resolver.js +3 -2
  55. package/dist/core/model-resolver.js.map +1 -1
  56. package/dist/core/package-manager.d.ts +129 -0
  57. package/dist/core/package-manager.d.ts.map +1 -0
  58. package/dist/core/package-manager.js +1148 -0
  59. package/dist/core/package-manager.js.map +1 -0
  60. package/dist/core/prompt-templates.d.ts +6 -0
  61. package/dist/core/prompt-templates.d.ts.map +1 -1
  62. package/dist/core/prompt-templates.js +114 -54
  63. package/dist/core/prompt-templates.js.map +1 -1
  64. package/dist/core/resource-loader.d.ts +160 -0
  65. package/dist/core/resource-loader.d.ts.map +1 -0
  66. package/dist/core/resource-loader.js +604 -0
  67. package/dist/core/resource-loader.js.map +1 -0
  68. package/dist/core/sdk.d.ts +14 -105
  69. package/dist/core/sdk.d.ts.map +1 -1
  70. package/dist/core/sdk.js +52 -304
  71. package/dist/core/sdk.js.map +1 -1
  72. package/dist/core/session-manager.d.ts.map +1 -1
  73. package/dist/core/session-manager.js +45 -1
  74. package/dist/core/session-manager.js.map +1 -1
  75. package/dist/core/settings-manager.d.ts +34 -16
  76. package/dist/core/settings-manager.d.ts.map +1 -1
  77. package/dist/core/settings-manager.js +104 -25
  78. package/dist/core/settings-manager.js.map +1 -1
  79. package/dist/core/skills.d.ts +18 -10
  80. package/dist/core/skills.d.ts.map +1 -1
  81. package/dist/core/skills.js +126 -93
  82. package/dist/core/skills.js.map +1 -1
  83. package/dist/core/system-prompt.d.ts +3 -27
  84. package/dist/core/system-prompt.d.ts.map +1 -1
  85. package/dist/core/system-prompt.js +16 -103
  86. package/dist/core/system-prompt.js.map +1 -1
  87. package/dist/core/tools/bash.d.ts.map +1 -1
  88. package/dist/core/tools/bash.js +2 -1
  89. package/dist/core/tools/bash.js.map +1 -1
  90. package/dist/core/tools/read.d.ts.map +1 -1
  91. package/dist/core/tools/read.js +4 -4
  92. package/dist/core/tools/read.js.map +1 -1
  93. package/dist/index.d.ts +12 -7
  94. package/dist/index.d.ts.map +1 -1
  95. package/dist/index.js +8 -6
  96. package/dist/index.js.map +1 -1
  97. package/dist/main.d.ts.map +1 -1
  98. package/dist/main.js +209 -97
  99. package/dist/main.js.map +1 -1
  100. package/dist/modes/interactive/components/bordered-loader.d.ts +5 -1
  101. package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
  102. package/dist/modes/interactive/components/bordered-loader.js +29 -9
  103. package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
  104. package/dist/modes/interactive/components/config-selector.d.ts +71 -0
  105. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -0
  106. package/dist/modes/interactive/components/config-selector.js +468 -0
  107. package/dist/modes/interactive/components/config-selector.js.map +1 -0
  108. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  109. package/dist/modes/interactive/components/footer.js +4 -0
  110. package/dist/modes/interactive/components/footer.js.map +1 -1
  111. package/dist/modes/interactive/components/index.d.ts +1 -0
  112. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  113. package/dist/modes/interactive/components/index.js +1 -0
  114. package/dist/modes/interactive/components/index.js.map +1 -1
  115. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  116. package/dist/modes/interactive/components/oauth-selector.js +3 -4
  117. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  118. package/dist/modes/interactive/components/session-selector.d.ts +18 -1
  119. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  120. package/dist/modes/interactive/components/session-selector.js +195 -87
  121. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  122. package/dist/modes/interactive/components/skill-invocation-message.d.ts +17 -0
  123. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -0
  124. package/dist/modes/interactive/components/skill-invocation-message.js +47 -0
  125. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -0
  126. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  127. package/dist/modes/interactive/components/tool-execution.js +5 -5
  128. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  129. package/dist/modes/interactive/interactive-mode.d.ts +42 -2
  130. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  131. package/dist/modes/interactive/interactive-mode.js +535 -200
  132. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  133. package/dist/modes/interactive/theme/dark.json +1 -1
  134. package/dist/modes/interactive/theme/light.json +1 -1
  135. package/dist/modes/interactive/theme/theme-schema.json +8 -1
  136. package/dist/modes/interactive/theme/theme.d.ts +8 -1
  137. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  138. package/dist/modes/interactive/theme/theme.js +72 -25
  139. package/dist/modes/interactive/theme/theme.js.map +1 -1
  140. package/dist/modes/print-mode.d.ts.map +1 -1
  141. package/dist/modes/print-mode.js +25 -89
  142. package/dist/modes/print-mode.js.map +1 -1
  143. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  144. package/dist/modes/rpc/rpc-mode.js +32 -92
  145. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  146. package/dist/utils/git.d.ts +2 -0
  147. package/dist/utils/git.d.ts.map +1 -0
  148. package/dist/utils/git.js +6 -0
  149. package/dist/utils/git.js.map +1 -0
  150. package/dist/utils/shell.d.ts +1 -0
  151. package/dist/utils/shell.d.ts.map +1 -1
  152. package/dist/utils/shell.js +14 -1
  153. package/dist/utils/shell.js.map +1 -1
  154. package/dist/utils/sleep.d.ts +5 -0
  155. package/dist/utils/sleep.d.ts.map +1 -0
  156. package/dist/utils/sleep.js +17 -0
  157. package/dist/utils/sleep.js.map +1 -0
  158. package/docs/compaction.md +23 -21
  159. package/docs/custom-provider.md +538 -0
  160. package/docs/development.md +69 -0
  161. package/docs/extensions.md +180 -118
  162. package/docs/images/doom-extension.png +0 -0
  163. package/docs/images/interactive-mode.png +0 -0
  164. package/docs/images/tree-view.png +0 -0
  165. package/docs/json.md +79 -0
  166. package/docs/keybindings.md +162 -0
  167. package/docs/models.md +193 -0
  168. package/docs/packages.md +163 -0
  169. package/docs/prompt-templates.md +67 -0
  170. package/docs/providers.md +147 -0
  171. package/docs/sdk.md +111 -178
  172. package/docs/session.md +167 -16
  173. package/docs/settings.md +216 -0
  174. package/docs/shell-aliases.md +13 -0
  175. package/docs/skills.md +111 -202
  176. package/docs/terminal-setup.md +65 -0
  177. package/docs/themes.md +295 -0
  178. package/docs/tui.md +36 -5
  179. package/docs/windows.md +17 -0
  180. package/examples/README.md +1 -0
  181. package/examples/extensions/README.md +22 -2
  182. package/examples/extensions/bookmark.ts +50 -0
  183. package/examples/extensions/custom-provider-anthropic/index.ts +604 -0
  184. package/examples/extensions/custom-provider-anthropic/package-lock.json +24 -0
  185. package/examples/extensions/custom-provider-anthropic/package.json +19 -0
  186. package/examples/extensions/custom-provider-gitlab-duo/index.ts +349 -0
  187. package/examples/extensions/custom-provider-gitlab-duo/package.json +16 -0
  188. package/examples/extensions/custom-provider-gitlab-duo/test.ts +82 -0
  189. package/examples/extensions/doom-overlay/doom/build.sh +1 -1
  190. package/examples/extensions/event-bus.ts +43 -0
  191. package/examples/extensions/message-renderer.ts +59 -0
  192. package/examples/extensions/session-name.ts +27 -0
  193. package/examples/extensions/with-deps/package-lock.json +2 -2
  194. package/examples/extensions/with-deps/package.json +1 -1
  195. package/examples/sdk/02-custom-model.ts +3 -3
  196. package/examples/sdk/03-custom-prompt.ts +20 -9
  197. package/examples/sdk/04-skills.ts +26 -27
  198. package/examples/sdk/06-extensions.ts +15 -6
  199. package/examples/sdk/07-context-files.ts +22 -18
  200. package/examples/sdk/08-prompt-templates.ts +19 -14
  201. package/examples/sdk/09-api-keys-and-oauth.ts +5 -12
  202. package/examples/sdk/10-settings.ts +3 -3
  203. package/examples/sdk/12-full-control.ts +16 -7
  204. package/examples/sdk/README.md +24 -30
  205. package/package.json +4 -4
  206. package/docs/theme.md +0 -617
  207. 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
- **Example use cases:**
10
- - Web search and content extraction (Brave Search API)
11
- - Browser automation via Chrome DevTools Protocol
12
- - Google Calendar, Gmail, Drive integration
13
- - PDF/DOCX processing and creation
14
- - Speech-to-text transcription
15
- - YouTube transcript extraction
16
-
17
- See [Skill Repositories](#skill-repositories) for ready-to-use skills.
18
-
19
- ## When to Use Skills
20
-
21
- | Need | Solution |
22
- |------|----------|
23
- | Always-needed context (conventions, commands) | AGENTS.md |
24
- | User triggers a specific prompt template | Slash command |
25
- | Additional tool directly callable by the LLM (like read/write/edit/bash) | Custom tool |
26
- | On-demand capability package (workflows, scripts, setup) | Skill |
27
-
28
- Skills are loaded when:
29
- - The agent decides the task matches a skill's description
30
- - The user explicitly asks to use a skill (e.g., "use the pdf skill to extract tables")
31
-
32
- **Good skill examples:**
33
- - Browser automation with helper scripts and CDP workflow
34
- - Google Calendar CLI with setup instructions and usage patterns
35
- - PDF processing with multiple tools and extraction patterns
36
- - Speech-to-text transcription with API setup
37
-
38
- **Not a good fit for skills:**
39
- - "Always use TypeScript strict mode" → put in AGENTS.md
40
- - "Review my code" make a prompt template
41
- - Need user confirmation dialogs or custom TUI rendering → make a custom tool
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. Example structure:
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 (bash, python, node)
94
+ ├── scripts/ # Helper scripts
51
95
  │ └── process.sh
52
96
  ├── references/ # Detailed docs loaded on-demand
53
97
  │ └── api-reference.md
54
- └── assets/ # Templates, images, etc.
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
- ## Workflow
126
+ Use relative paths from the skill directory:
82
127
 
83
- 1. First step
84
- 2. Second step
85
- 3. Third step
128
+ ```markdown
129
+ See [the reference guide](references/REFERENCE.md) for details.
86
130
  ```
87
131
 
88
- ### Frontmatter Fields
132
+ ## Frontmatter
89
133
 
90
134
  Per the [Agent Skills specification](https://agentskills.io/specification#frontmatter-required):
91
135
 
92
- | Field | Required | Constraints |
136
+ | Field | Required | Description |
93
137
  |-------|----------|-------------|
94
- | `name` | Yes | Max 64 chars. Lowercase a-z, 0-9, hyphens only. Must match parent directory name. |
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 license file. |
97
- | `compatibility` | No | Max 500 chars. Environment requirements (system packages, network access, etc.). |
98
- | `metadata` | No | Arbitrary key-value mapping for additional metadata. |
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
- #### Name Validation
146
+ ### Name Rules
102
147
 
103
- The `name` field must:
104
- - Be 1-64 characters
105
- - Contain only lowercase letters (a-z), numbers (0-9), and hyphens
106
- - Not start or end with a hyphen
107
- - Not contain consecutive hyphens (--)
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
- #### Description Best Practices
157
+ ### Description Best Practices
114
158
 
115
- The `description` is critical. It determines when the agent loads the skill. Be specific about both what it does and when to use it.
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 or when the user mentions PDFs, forms, or document extraction.
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
- ### File References
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
- 1. `~/.codex/skills/**/SKILL.md` (Codex CLI, recursive)
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 missing or exceeds 1024 characters
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: Web Search Skill
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
- For inspiration and ready-to-use skills:
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.