@oh-my-pi/pi-coding-agent 1.337.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 +1228 -0
- package/README.md +1041 -0
- package/docs/compaction.md +403 -0
- package/docs/custom-tools.md +541 -0
- package/docs/extension-loading.md +1004 -0
- package/docs/hooks.md +867 -0
- package/docs/rpc.md +1040 -0
- package/docs/sdk.md +994 -0
- package/docs/session-tree-plan.md +441 -0
- package/docs/session.md +240 -0
- package/docs/skills.md +290 -0
- package/docs/theme.md +637 -0
- package/docs/tree.md +197 -0
- package/docs/tui.md +341 -0
- package/examples/README.md +21 -0
- package/examples/custom-tools/README.md +124 -0
- package/examples/custom-tools/hello/index.ts +20 -0
- package/examples/custom-tools/question/index.ts +84 -0
- package/examples/custom-tools/subagent/README.md +172 -0
- package/examples/custom-tools/subagent/agents/planner.md +37 -0
- package/examples/custom-tools/subagent/agents/reviewer.md +35 -0
- package/examples/custom-tools/subagent/agents/scout.md +50 -0
- package/examples/custom-tools/subagent/agents/worker.md +24 -0
- package/examples/custom-tools/subagent/agents.ts +156 -0
- package/examples/custom-tools/subagent/commands/implement-and-review.md +10 -0
- package/examples/custom-tools/subagent/commands/implement.md +10 -0
- package/examples/custom-tools/subagent/commands/scout-and-plan.md +9 -0
- package/examples/custom-tools/subagent/index.ts +1002 -0
- package/examples/custom-tools/todo/index.ts +212 -0
- package/examples/hooks/README.md +56 -0
- package/examples/hooks/auto-commit-on-exit.ts +49 -0
- package/examples/hooks/confirm-destructive.ts +59 -0
- package/examples/hooks/custom-compaction.ts +116 -0
- package/examples/hooks/dirty-repo-guard.ts +52 -0
- package/examples/hooks/file-trigger.ts +41 -0
- package/examples/hooks/git-checkpoint.ts +53 -0
- package/examples/hooks/handoff.ts +150 -0
- package/examples/hooks/permission-gate.ts +34 -0
- package/examples/hooks/protected-paths.ts +30 -0
- package/examples/hooks/qna.ts +119 -0
- package/examples/hooks/snake.ts +343 -0
- package/examples/hooks/status-line.ts +40 -0
- package/examples/sdk/01-minimal.ts +22 -0
- package/examples/sdk/02-custom-model.ts +49 -0
- package/examples/sdk/03-custom-prompt.ts +44 -0
- package/examples/sdk/04-skills.ts +44 -0
- package/examples/sdk/05-tools.ts +90 -0
- package/examples/sdk/06-hooks.ts +61 -0
- package/examples/sdk/07-context-files.ts +36 -0
- package/examples/sdk/08-slash-commands.ts +42 -0
- package/examples/sdk/09-api-keys-and-oauth.ts +55 -0
- package/examples/sdk/10-settings.ts +38 -0
- package/examples/sdk/11-sessions.ts +48 -0
- package/examples/sdk/12-full-control.ts +95 -0
- package/examples/sdk/README.md +154 -0
- package/package.json +81 -0
- package/src/cli/args.ts +246 -0
- package/src/cli/file-processor.ts +72 -0
- package/src/cli/list-models.ts +104 -0
- package/src/cli/plugin-cli.ts +650 -0
- package/src/cli/session-picker.ts +41 -0
- package/src/cli.ts +10 -0
- package/src/commands/init.md +20 -0
- package/src/config.ts +159 -0
- package/src/core/agent-session.ts +1900 -0
- package/src/core/auth-storage.ts +236 -0
- package/src/core/bash-executor.ts +196 -0
- package/src/core/compaction/branch-summarization.ts +343 -0
- package/src/core/compaction/compaction.ts +742 -0
- package/src/core/compaction/index.ts +7 -0
- package/src/core/compaction/utils.ts +154 -0
- package/src/core/custom-tools/index.ts +21 -0
- package/src/core/custom-tools/loader.ts +248 -0
- package/src/core/custom-tools/types.ts +169 -0
- package/src/core/custom-tools/wrapper.ts +28 -0
- package/src/core/exec.ts +129 -0
- package/src/core/export-html/index.ts +211 -0
- package/src/core/export-html/template.css +781 -0
- package/src/core/export-html/template.html +54 -0
- package/src/core/export-html/template.js +1185 -0
- package/src/core/export-html/vendor/highlight.min.js +1213 -0
- package/src/core/export-html/vendor/marked.min.js +6 -0
- package/src/core/hooks/index.ts +16 -0
- package/src/core/hooks/loader.ts +312 -0
- package/src/core/hooks/runner.ts +434 -0
- package/src/core/hooks/tool-wrapper.ts +99 -0
- package/src/core/hooks/types.ts +773 -0
- package/src/core/index.ts +52 -0
- package/src/core/mcp/client.ts +158 -0
- package/src/core/mcp/config.ts +154 -0
- package/src/core/mcp/index.ts +45 -0
- package/src/core/mcp/loader.ts +68 -0
- package/src/core/mcp/manager.ts +181 -0
- package/src/core/mcp/tool-bridge.ts +148 -0
- package/src/core/mcp/transports/http.ts +316 -0
- package/src/core/mcp/transports/index.ts +6 -0
- package/src/core/mcp/transports/stdio.ts +252 -0
- package/src/core/mcp/types.ts +220 -0
- package/src/core/messages.ts +189 -0
- package/src/core/model-registry.ts +317 -0
- package/src/core/model-resolver.ts +393 -0
- package/src/core/plugins/doctor.ts +59 -0
- package/src/core/plugins/index.ts +38 -0
- package/src/core/plugins/installer.ts +189 -0
- package/src/core/plugins/loader.ts +338 -0
- package/src/core/plugins/manager.ts +672 -0
- package/src/core/plugins/parser.ts +105 -0
- package/src/core/plugins/paths.ts +32 -0
- package/src/core/plugins/types.ts +190 -0
- package/src/core/sdk.ts +760 -0
- package/src/core/session-manager.ts +1128 -0
- package/src/core/settings-manager.ts +443 -0
- package/src/core/skills.ts +437 -0
- package/src/core/slash-commands.ts +248 -0
- package/src/core/system-prompt.ts +439 -0
- package/src/core/timings.ts +25 -0
- package/src/core/tools/ask.ts +211 -0
- package/src/core/tools/bash-interceptor.ts +120 -0
- package/src/core/tools/bash.ts +250 -0
- package/src/core/tools/context.ts +32 -0
- package/src/core/tools/edit-diff.ts +475 -0
- package/src/core/tools/edit.ts +208 -0
- package/src/core/tools/exa/company.ts +59 -0
- package/src/core/tools/exa/index.ts +64 -0
- package/src/core/tools/exa/linkedin.ts +59 -0
- package/src/core/tools/exa/logger.ts +56 -0
- package/src/core/tools/exa/mcp-client.ts +368 -0
- package/src/core/tools/exa/render.ts +196 -0
- package/src/core/tools/exa/researcher.ts +90 -0
- package/src/core/tools/exa/search.ts +337 -0
- package/src/core/tools/exa/types.ts +168 -0
- package/src/core/tools/exa/websets.ts +248 -0
- package/src/core/tools/find.ts +261 -0
- package/src/core/tools/grep.ts +555 -0
- package/src/core/tools/index.ts +202 -0
- package/src/core/tools/ls.ts +140 -0
- package/src/core/tools/lsp/client.ts +605 -0
- package/src/core/tools/lsp/config.ts +147 -0
- package/src/core/tools/lsp/edits.ts +101 -0
- package/src/core/tools/lsp/index.ts +804 -0
- package/src/core/tools/lsp/render.ts +447 -0
- package/src/core/tools/lsp/rust-analyzer.ts +145 -0
- package/src/core/tools/lsp/types.ts +463 -0
- package/src/core/tools/lsp/utils.ts +486 -0
- package/src/core/tools/notebook.ts +229 -0
- package/src/core/tools/path-utils.ts +61 -0
- package/src/core/tools/read.ts +240 -0
- package/src/core/tools/renderers.ts +540 -0
- package/src/core/tools/task/agents.ts +153 -0
- package/src/core/tools/task/artifacts.ts +114 -0
- package/src/core/tools/task/bundled-agents/browser.md +71 -0
- package/src/core/tools/task/bundled-agents/explore.md +82 -0
- package/src/core/tools/task/bundled-agents/plan.md +54 -0
- package/src/core/tools/task/bundled-agents/reviewer.md +59 -0
- package/src/core/tools/task/bundled-agents/task.md +53 -0
- package/src/core/tools/task/bundled-commands/architect-plan.md +10 -0
- package/src/core/tools/task/bundled-commands/implement-with-critic.md +11 -0
- package/src/core/tools/task/bundled-commands/implement.md +11 -0
- package/src/core/tools/task/commands.ts +213 -0
- package/src/core/tools/task/discovery.ts +208 -0
- package/src/core/tools/task/executor.ts +367 -0
- package/src/core/tools/task/index.ts +388 -0
- package/src/core/tools/task/model-resolver.ts +115 -0
- package/src/core/tools/task/parallel.ts +38 -0
- package/src/core/tools/task/render.ts +232 -0
- package/src/core/tools/task/types.ts +99 -0
- package/src/core/tools/truncate.ts +265 -0
- package/src/core/tools/web-fetch.ts +2370 -0
- package/src/core/tools/web-search/auth.ts +193 -0
- package/src/core/tools/web-search/index.ts +537 -0
- package/src/core/tools/web-search/providers/anthropic.ts +198 -0
- package/src/core/tools/web-search/providers/exa.ts +302 -0
- package/src/core/tools/web-search/providers/perplexity.ts +195 -0
- package/src/core/tools/web-search/render.ts +182 -0
- package/src/core/tools/web-search/types.ts +180 -0
- package/src/core/tools/write.ts +99 -0
- package/src/index.ts +176 -0
- package/src/main.ts +464 -0
- package/src/migrations.ts +135 -0
- package/src/modes/index.ts +43 -0
- package/src/modes/interactive/components/armin.ts +382 -0
- package/src/modes/interactive/components/assistant-message.ts +86 -0
- package/src/modes/interactive/components/bash-execution.ts +196 -0
- package/src/modes/interactive/components/bordered-loader.ts +41 -0
- package/src/modes/interactive/components/branch-summary-message.ts +42 -0
- package/src/modes/interactive/components/compaction-summary-message.ts +45 -0
- package/src/modes/interactive/components/custom-editor.ts +122 -0
- package/src/modes/interactive/components/diff.ts +147 -0
- package/src/modes/interactive/components/dynamic-border.ts +25 -0
- package/src/modes/interactive/components/footer.ts +381 -0
- package/src/modes/interactive/components/hook-editor.ts +117 -0
- package/src/modes/interactive/components/hook-input.ts +64 -0
- package/src/modes/interactive/components/hook-message.ts +96 -0
- package/src/modes/interactive/components/hook-selector.ts +91 -0
- package/src/modes/interactive/components/model-selector.ts +247 -0
- package/src/modes/interactive/components/oauth-selector.ts +120 -0
- package/src/modes/interactive/components/plugin-settings.ts +479 -0
- package/src/modes/interactive/components/queue-mode-selector.ts +56 -0
- package/src/modes/interactive/components/session-selector.ts +204 -0
- package/src/modes/interactive/components/settings-selector.ts +453 -0
- package/src/modes/interactive/components/show-images-selector.ts +45 -0
- package/src/modes/interactive/components/theme-selector.ts +62 -0
- package/src/modes/interactive/components/thinking-selector.ts +64 -0
- package/src/modes/interactive/components/tool-execution.ts +675 -0
- package/src/modes/interactive/components/tree-selector.ts +866 -0
- package/src/modes/interactive/components/user-message-selector.ts +159 -0
- package/src/modes/interactive/components/user-message.ts +18 -0
- package/src/modes/interactive/components/visual-truncate.ts +50 -0
- package/src/modes/interactive/components/welcome.ts +183 -0
- package/src/modes/interactive/interactive-mode.ts +2516 -0
- package/src/modes/interactive/theme/dark.json +101 -0
- package/src/modes/interactive/theme/light.json +98 -0
- package/src/modes/interactive/theme/theme-schema.json +308 -0
- package/src/modes/interactive/theme/theme.ts +998 -0
- package/src/modes/print-mode.ts +128 -0
- package/src/modes/rpc/rpc-client.ts +527 -0
- package/src/modes/rpc/rpc-mode.ts +483 -0
- package/src/modes/rpc/rpc-types.ts +203 -0
- package/src/utils/changelog.ts +99 -0
- package/src/utils/clipboard.ts +265 -0
- package/src/utils/fuzzy.ts +108 -0
- package/src/utils/mime.ts +30 -0
- package/src/utils/shell.ts +276 -0
- package/src/utils/tools-manager.ts +274 -0
package/docs/skills.md
ADDED
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
> pi can create skills. Ask it to build one for your use case.
|
|
2
|
+
|
|
3
|
+
# Skills
|
|
4
|
+
|
|
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
|
+
|
|
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 slash command
|
|
41
|
+
- Need user confirmation dialogs or custom TUI rendering → make a custom tool
|
|
42
|
+
|
|
43
|
+
## Skill Structure
|
|
44
|
+
|
|
45
|
+
A skill is a directory with a `SKILL.md` file. Everything else is freeform. Example structure:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
my-skill/
|
|
49
|
+
├── SKILL.md # Required: frontmatter + instructions
|
|
50
|
+
├── scripts/ # Helper scripts (bash, python, node)
|
|
51
|
+
│ └── process.sh
|
|
52
|
+
├── references/ # Detailed docs loaded on-demand
|
|
53
|
+
│ └── api-reference.md
|
|
54
|
+
└── assets/ # Templates, images, etc.
|
|
55
|
+
└── template.json
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### SKILL.md Format
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
---
|
|
62
|
+
name: my-skill
|
|
63
|
+
description: What this skill does and when to use it. Be specific.
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
# My Skill
|
|
67
|
+
|
|
68
|
+
## Setup
|
|
69
|
+
|
|
70
|
+
Run once before first use:
|
|
71
|
+
\`\`\`bash
|
|
72
|
+
cd /path/to/skill && npm install
|
|
73
|
+
\`\`\`
|
|
74
|
+
|
|
75
|
+
## Usage
|
|
76
|
+
|
|
77
|
+
\`\`\`bash
|
|
78
|
+
./scripts/process.sh <input>
|
|
79
|
+
\`\`\`
|
|
80
|
+
|
|
81
|
+
## Workflow
|
|
82
|
+
|
|
83
|
+
1. First step
|
|
84
|
+
2. Second step
|
|
85
|
+
3. Third step
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Frontmatter Fields
|
|
89
|
+
|
|
90
|
+
Per the [Agent Skills specification](https://agentskills.io/specification#frontmatter-required):
|
|
91
|
+
|
|
92
|
+
| Field | Required | Constraints |
|
|
93
|
+
|-------|----------|-------------|
|
|
94
|
+
| `name` | Yes | Max 64 chars. Lowercase a-z, 0-9, hyphens only. Must match parent directory name. |
|
|
95
|
+
| `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. |
|
|
99
|
+
| `allowed-tools` | No | Space-delimited list of pre-approved tools (experimental). |
|
|
100
|
+
|
|
101
|
+
#### Name Validation
|
|
102
|
+
|
|
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
|
|
109
|
+
|
|
110
|
+
Valid: `pdf-processing`, `data-analysis`, `code-review`
|
|
111
|
+
Invalid: `PDF-Processing`, `-pdf`, `pdf--processing`
|
|
112
|
+
|
|
113
|
+
#### Description Best Practices
|
|
114
|
+
|
|
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.
|
|
116
|
+
|
|
117
|
+
Good:
|
|
118
|
+
```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.
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Poor:
|
|
123
|
+
```yaml
|
|
124
|
+
description: Helps with PDFs.
|
|
125
|
+
```
|
|
126
|
+
|
|
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):
|
|
143
|
+
|
|
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
|
+
"customDirectories": ["~/my-skills-repo"],
|
|
164
|
+
"ignoredSkills": ["deprecated-skill"],
|
|
165
|
+
"includeSkills": ["git-*", "docker"]
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
| Setting | Default | Description |
|
|
171
|
+
|---------|---------|-------------|
|
|
172
|
+
| `enabled` | `true` | Master toggle for all skills |
|
|
173
|
+
| `enableCodexUser` | `true` | Load from `~/.codex/skills/` |
|
|
174
|
+
| `enableClaudeUser` | `true` | Load from `~/.claude/skills/` |
|
|
175
|
+
| `enableClaudeProject` | `true` | Load from `<cwd>/.claude/skills/` |
|
|
176
|
+
| `enablePiUser` | `true` | Load from `~/.pi/agent/skills/` |
|
|
177
|
+
| `enablePiProject` | `true` | Load from `<cwd>/.pi/skills/` |
|
|
178
|
+
| `customDirectories` | `[]` | Additional directories to scan (supports `~` expansion) |
|
|
179
|
+
| `ignoredSkills` | `[]` | Glob patterns to exclude (e.g., `["deprecated-*", "test-skill"]`) |
|
|
180
|
+
| `includeSkills` | `[]` | Glob patterns to include (empty = all; e.g., `["git-*", "docker"]`) |
|
|
181
|
+
|
|
182
|
+
**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.
|
|
183
|
+
|
|
184
|
+
### CLI Filtering
|
|
185
|
+
|
|
186
|
+
Use `--skills` to filter skills for a specific invocation:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
# Only load specific skills
|
|
190
|
+
pi --skills git,docker
|
|
191
|
+
|
|
192
|
+
# Glob patterns
|
|
193
|
+
pi --skills "git-*,docker-*"
|
|
194
|
+
|
|
195
|
+
# All skills matching a prefix
|
|
196
|
+
pi --skills "aws-*"
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
This overrides the `includeSkills` setting for the current session.
|
|
200
|
+
|
|
201
|
+
## How Skills Work
|
|
202
|
+
|
|
203
|
+
1. At startup, pi scans skill locations and extracts names + descriptions
|
|
204
|
+
2. The system prompt includes available skills in XML format
|
|
205
|
+
3. When a task matches, the agent uses `read` to load the full SKILL.md
|
|
206
|
+
4. The agent follows the instructions, using relative paths to reference scripts/assets
|
|
207
|
+
|
|
208
|
+
This is progressive disclosure: only descriptions are always in context, full instructions load on-demand.
|
|
209
|
+
|
|
210
|
+
## Validation Warnings
|
|
211
|
+
|
|
212
|
+
Pi validates skills against the Agent Skills standard and warns (but still loads) non-compliant skills:
|
|
213
|
+
|
|
214
|
+
- Name doesn't match parent directory
|
|
215
|
+
- Name exceeds 64 characters
|
|
216
|
+
- Name contains invalid characters
|
|
217
|
+
- Name starts/ends with hyphen or has consecutive hyphens
|
|
218
|
+
- Description missing or exceeds 1024 characters
|
|
219
|
+
- Unknown frontmatter fields
|
|
220
|
+
|
|
221
|
+
Name collisions (same name from different locations) warn and keep the first skill found.
|
|
222
|
+
|
|
223
|
+
## Example: Web Search Skill
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
brave-search/
|
|
227
|
+
├── SKILL.md
|
|
228
|
+
├── search.js
|
|
229
|
+
└── content.js
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
**SKILL.md:**
|
|
233
|
+
```markdown
|
|
234
|
+
---
|
|
235
|
+
name: brave-search
|
|
236
|
+
description: Web search and content extraction via Brave Search API. Use for searching documentation, facts, or any web content.
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
# Brave Search
|
|
240
|
+
|
|
241
|
+
## Setup
|
|
242
|
+
|
|
243
|
+
\`\`\`bash
|
|
244
|
+
cd /path/to/brave-search && npm install
|
|
245
|
+
\`\`\`
|
|
246
|
+
|
|
247
|
+
## Search
|
|
248
|
+
|
|
249
|
+
\`\`\`bash
|
|
250
|
+
./search.js "query" # Basic search
|
|
251
|
+
./search.js "query" --content # Include page content
|
|
252
|
+
\`\`\`
|
|
253
|
+
|
|
254
|
+
## Extract Page Content
|
|
255
|
+
|
|
256
|
+
\`\`\`bash
|
|
257
|
+
./content.js https://example.com
|
|
258
|
+
\`\`\`
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
## Compatibility
|
|
262
|
+
|
|
263
|
+
**Claude Code**: Pi reads skills from `~/.claude/skills/*/SKILL.md`. The `allowed-tools` and `model` frontmatter fields are ignored.
|
|
264
|
+
|
|
265
|
+
**Codex CLI**: Pi reads skills from `~/.codex/skills/` recursively. Hidden files/directories and symlinks are skipped.
|
|
266
|
+
|
|
267
|
+
## Skill Repositories
|
|
268
|
+
|
|
269
|
+
For inspiration and ready-to-use skills:
|
|
270
|
+
|
|
271
|
+
- [Anthropic Skills](https://github.com/anthropics/skills) - Official skills for document processing (docx, pdf, pptx, xlsx), web development, and more
|
|
272
|
+
- [Pi Skills](https://github.com/badlogic/pi-skills) - Skills for web search, browser automation, Google APIs, transcription
|
|
273
|
+
|
|
274
|
+
## Disabling Skills
|
|
275
|
+
|
|
276
|
+
CLI:
|
|
277
|
+
```bash
|
|
278
|
+
pi --no-skills
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Settings (`~/.pi/agent/settings.json`):
|
|
282
|
+
```json
|
|
283
|
+
{
|
|
284
|
+
"skills": {
|
|
285
|
+
"enabled": false
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
Use the granular `enable*` flags to disable individual sources (e.g., `enableClaudeUser: false` to skip `~/.claude/skills`).
|