@counterposition/skill-pi 0.1.0 → 0.2.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/README.md +5 -0
- package/package.json +13 -11
- package/skills/pi/README.md +10 -4
- package/skills/pi/SKILL.md +58 -25
- package/skills/pi/references/extensions.md +149 -242
- 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 +105 -125
- package/skills/pi/references/settings.md +121 -99
- package/skills/pi/references/skills.md +83 -73
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@counterposition/skill-pi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Pi skill package for pi install",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"pi-package"
|
|
7
|
+
],
|
|
5
8
|
"homepage": "https://github.com/counterposition/pi/tree/main/packages/skill-pi",
|
|
6
9
|
"bugs": {
|
|
7
10
|
"url": "https://github.com/counterposition/pi/issues"
|
|
@@ -21,22 +24,21 @@
|
|
|
21
24
|
"publishConfig": {
|
|
22
25
|
"access": "public"
|
|
23
26
|
},
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=24"
|
|
29
|
+
},
|
|
30
|
+
"pi": {
|
|
31
|
+
"skills": [
|
|
32
|
+
"skills/pi"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
24
35
|
"scripts": {
|
|
25
36
|
"lint": "pnpm run lint:docs",
|
|
26
37
|
"lint:docs": "markdownlint-cli2 \"README.md\"",
|
|
27
38
|
"lint:docs:fix": "markdownlint-cli2 --fix \"README.md\"",
|
|
28
39
|
"format": "oxfmt \"README.md\" \"package.json\"",
|
|
29
40
|
"format:check": "oxfmt \"README.md\" \"package.json\" --check",
|
|
30
|
-
"prepack": "node ../../scripts/sync-skill-package.mjs",
|
|
31
41
|
"check": "pnpm run lint && pnpm run format:check && pnpm run pack:check",
|
|
32
42
|
"pack:check": "pnpm pack --pack-destination ../../.pack"
|
|
33
|
-
},
|
|
34
|
-
"engines": {
|
|
35
|
-
"node": ">=24"
|
|
36
|
-
},
|
|
37
|
-
"pi": {
|
|
38
|
-
"skills": [
|
|
39
|
-
"skills/pi"
|
|
40
|
-
]
|
|
41
43
|
}
|
|
42
|
-
}
|
|
44
|
+
}
|
package/skills/pi/README.md
CHANGED
|
@@ -12,16 +12,22 @@ Reference skill for the Pi coding agent.
|
|
|
12
12
|
# multi-skill repo
|
|
13
13
|
npx skills add counterposition/pi --skill pi
|
|
14
14
|
|
|
15
|
-
# local checkout
|
|
16
|
-
npx skills add /absolute/path/to/pi --skill pi
|
|
17
|
-
|
|
18
15
|
# pi install from npm
|
|
19
16
|
pi install npm:@counterposition/skill-pi
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Maintainer smoke tests:
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
```bash
|
|
22
|
+
# canonical skill from a local checkout
|
|
23
|
+
npx skills add /absolute/path/to/pi --skill pi
|
|
24
|
+
|
|
25
|
+
# packaged Pi install from the monorepo root
|
|
22
26
|
pi install ./packages/skill-pi
|
|
23
27
|
```
|
|
24
28
|
|
|
29
|
+
If you are developing inside this repo, Pi already loads the canonical skill via `.pi/settings.json`, so you usually do not need `pi install`.
|
|
30
|
+
|
|
25
31
|
## Covers
|
|
26
32
|
|
|
27
33
|
- Pi architecture and package layout
|
package/skills/pi/SKILL.md
CHANGED
|
@@ -7,13 +7,13 @@ compatibility: "Pi-specific guidance for agents that support Agent Skills"
|
|
|
7
7
|
|
|
8
8
|
# Pi Coding Agent
|
|
9
9
|
|
|
10
|
-
Pi is a minimal
|
|
10
|
+
Pi is a minimal terminal coding harness. It ships four default tools (`read`, `write`, `edit`, `bash`) and four execution modes (interactive TUI, print, JSON/RPC, SDK). Features like sub-agents, plan mode, permission flows, and MCP are intentionally left to extensions and Pi packages.
|
|
11
11
|
|
|
12
12
|
Pi's philosophy: **adapt Pi to your workflows, not the other way around**. Users extend it via TypeScript extensions, skills, prompt templates, themes, and shareable Pi packages.
|
|
13
13
|
|
|
14
14
|
## Architecture at a Glance
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
The coding-agent stack centers on four core packages. The monorepo also includes adjacent packages such as `pi-web-ui`, `pi-mom`, and `pi-pods`.
|
|
17
17
|
|
|
18
18
|
| Package | npm | Purpose |
|
|
19
19
|
|---------|-----|---------|
|
|
@@ -76,6 +76,12 @@ Bundles of extensions, skills, prompts, and themes distributed via npm, git, or
|
|
|
76
76
|
|
|
77
77
|
Read `references/packages.md` for the package structure, `pi` manifest field, installation, and publishing.
|
|
78
78
|
|
|
79
|
+
### Context Files & Prompt Templates
|
|
80
|
+
|
|
81
|
+
Pi loads `AGENTS.md` or `CLAUDE.md` from the global agent dir and from `cwd` up through parent directories. `.pi/SYSTEM.md` replaces the default system prompt, and `APPEND_SYSTEM.md` appends to it. Prompt templates in `prompts/` directories become slash commands.
|
|
82
|
+
|
|
83
|
+
Read `references/settings.md` for discovery rules and config keys, and `references/packages.md` for how prompts/themes ship in packages.
|
|
84
|
+
|
|
79
85
|
### SDK
|
|
80
86
|
|
|
81
87
|
Programmatic embedding via `createAgentSession()`. Gives full control over models, tools, extensions, sessions, and event streaming.
|
|
@@ -117,7 +123,7 @@ Compaction walks backward from the newest message, keeping `keepRecentTokens` (d
|
|
|
117
123
|
| `find` | Find files by glob pattern |
|
|
118
124
|
| `ls` | List directory contents |
|
|
119
125
|
|
|
120
|
-
**
|
|
126
|
+
**Common tool sets:** `codingTools()` = `[read, bash, edit, write]`, `readOnlyTools()` = `[read, grep, find, ls]`. When you provide a custom `cwd` and explicit tools in the SDK, use `createCodingTools(cwd)` / `createReadOnlyTools(cwd)` so path resolution stays correct.
|
|
121
127
|
|
|
122
128
|
## Execution Modes
|
|
123
129
|
|
|
@@ -125,34 +131,60 @@ Compaction walks backward from the newest message, keeping `keepRecentTokens` (d
|
|
|
125
131
|
|------|-----------|----------|
|
|
126
132
|
| Interactive | `pi` | Full TUI with editor, streaming, keybindings |
|
|
127
133
|
| Print | `pi -p "prompt"` | Single-shot text output |
|
|
128
|
-
| JSON | `pi --mode json
|
|
134
|
+
| JSON | `pi --mode json "prompt"` | Newline-delimited event stream |
|
|
129
135
|
| RPC | `pi --mode rpc` | JSON-RPC over stdin/stdout for IDE integration |
|
|
130
136
|
| SDK | `createAgentSession()` | Embed in Node.js applications |
|
|
131
137
|
|
|
132
138
|
## Quick Reference: CLI Flags
|
|
133
139
|
|
|
134
140
|
```text
|
|
135
|
-
pi [options] [
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
--
|
|
147
|
-
--
|
|
148
|
-
--
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
141
|
+
pi [options] [@files...] [messages...]
|
|
142
|
+
|
|
143
|
+
# package commands
|
|
144
|
+
install <source> [-l]
|
|
145
|
+
remove <source> [-l]
|
|
146
|
+
uninstall <source> [-l]
|
|
147
|
+
update [source]
|
|
148
|
+
list
|
|
149
|
+
config
|
|
150
|
+
|
|
151
|
+
# modes and output
|
|
152
|
+
-p, --print
|
|
153
|
+
--mode json|rpc
|
|
154
|
+
--export <in> [out]
|
|
155
|
+
|
|
156
|
+
# model selection
|
|
157
|
+
--provider <name>
|
|
158
|
+
--model <pattern>
|
|
159
|
+
--api-key <key>
|
|
160
|
+
--thinking <level>
|
|
161
|
+
--models <patterns>
|
|
162
|
+
--list-models [search]
|
|
163
|
+
|
|
164
|
+
# sessions
|
|
165
|
+
-c, --continue
|
|
166
|
+
-r, --resume
|
|
167
|
+
--session <path|id>
|
|
168
|
+
--fork <path|id>
|
|
169
|
+
--session-dir <dir>
|
|
170
|
+
--no-session
|
|
171
|
+
|
|
172
|
+
# tools and resources
|
|
173
|
+
--tools <list>
|
|
174
|
+
--no-tools
|
|
175
|
+
-e, --extension <source>
|
|
176
|
+
--skill <path>
|
|
177
|
+
--prompt-template <path>
|
|
178
|
+
--theme <path>
|
|
179
|
+
--no-extensions
|
|
180
|
+
--no-skills
|
|
181
|
+
--no-prompt-templates
|
|
182
|
+
--no-themes
|
|
183
|
+
|
|
184
|
+
# prompts and misc
|
|
185
|
+
--system-prompt <text>
|
|
186
|
+
--append-system-prompt <text>
|
|
187
|
+
--verbose
|
|
156
188
|
```
|
|
157
189
|
|
|
158
190
|
## How to Use This Skill
|
|
@@ -164,6 +196,7 @@ When working with Pi, read the appropriate reference file for the task at hand:
|
|
|
164
196
|
| Writing an extension (tools, commands, events, UI) | `references/extensions.md` |
|
|
165
197
|
| Creating a skill (SKILL.md authoring) | `references/skills.md` |
|
|
166
198
|
| Configuring Pi (settings.json options) | `references/settings.md` |
|
|
199
|
+
| Context files, prompt templates, themes, and resource discovery | `references/settings.md` and `references/packages.md` |
|
|
167
200
|
| Building a shareable package | `references/packages.md` |
|
|
168
201
|
| Embedding Pi programmatically | `references/sdk.md` |
|
|
169
202
|
| Adding LLM providers or models | `references/providers.md` |
|