mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-19 12:04:08 +00:00
Improve system prompt docs, clean up theme/skills/hooks docs, fix toolResults type
- System prompt: clearer pointers to specific doc files - theme.md: added thinkingXhigh, bashMode tokens, fixed Theme class methods - skills.md: rewrote with better framing, examples, and skill repositories - hooks.md: fixed timeout/error handling docs, added custom tool interception note - Breaking: turn_end event toolResults changed from AppMessage[] to ToolResultMessage[]
This commit is contained in:
parent
5cc0126991
commit
5e5bdadbf9
8 changed files with 232 additions and 141 deletions
|
|
@ -488,66 +488,41 @@ Usage: `/component Button "onClick handler" "disabled support"`
|
|||
|
||||
### Skills
|
||||
|
||||
Skills are instruction files loaded on-demand when tasks match their descriptions. Compatible with Claude Code and Codex CLI skill formats.
|
||||
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. Skills are loaded when the agent decides a task matches the description, or when you explicitly ask to use one.
|
||||
|
||||
**Skill locations:**
|
||||
- Pi user: `~/.pi/agent/skills/**/SKILL.md` (recursive, colon-separated names)
|
||||
- Pi project: `.pi/skills/**/SKILL.md` (recursive, colon-separated names)
|
||||
- Claude Code user: `~/.claude/skills/*/SKILL.md` (one level)
|
||||
- Claude Code project: `.claude/skills/*/SKILL.md` (one level)
|
||||
- Pi user: `~/.pi/agent/skills/**/SKILL.md` (recursive)
|
||||
- Pi project: `.pi/skills/**/SKILL.md` (recursive)
|
||||
- Claude Code: `~/.claude/skills/*/SKILL.md` and `.claude/skills/*/SKILL.md`
|
||||
- Codex CLI: `~/.codex/skills/**/SKILL.md` (recursive)
|
||||
|
||||
Later locations win on name collisions (Pi skills override Claude/Codex).
|
||||
|
||||
Pi skills in subdirectories use colon-separated names: `~/.pi/agent/skills/db/migrate/SKILL.md` → `db:migrate`
|
||||
|
||||
**Format:**
|
||||
|
||||
```markdown
|
||||
---
|
||||
description: Extract text and tables from PDF files
|
||||
description: Web search via Brave Search API. Use for documentation, facts, or web content.
|
||||
---
|
||||
|
||||
# PDF Processing
|
||||
# Brave Search
|
||||
|
||||
Use `pdftotext` for plain text extraction.
|
||||
For tables, use `tabula-py`.
|
||||
## Setup
|
||||
\`\`\`bash
|
||||
cd {baseDir} && npm install
|
||||
\`\`\`
|
||||
|
||||
Helper scripts: {baseDir}/scripts/
|
||||
## Usage
|
||||
\`\`\`bash
|
||||
{baseDir}/search.js "query" # Basic search
|
||||
{baseDir}/search.js "query" --content # Include page content
|
||||
\`\`\`
|
||||
```
|
||||
|
||||
- `description`: Required. Shown in system prompt for agent to decide when to load.
|
||||
- `name`: Optional. Overrides directory name.
|
||||
- `{baseDir}`: Placeholder for the skill's directory. Agent substitutes it when following instructions.
|
||||
- `description`: Required. Determines when the skill is loaded.
|
||||
- `{baseDir}`: Placeholder for the skill's directory.
|
||||
|
||||
**How it works:**
|
||||
**Disable skills:** `pi --no-skills` or set `skills.enabled: false` in settings.
|
||||
|
||||
Skills are listed in the system prompt with descriptions:
|
||||
|
||||
```
|
||||
<available_skills>
|
||||
- pdf-extract: Extract text and tables from PDF files
|
||||
File: ~/.pi/agent/skills/pdf-extract/SKILL.md
|
||||
Base directory: ~/.pi/agent/skills/pdf-extract
|
||||
</available_skills>
|
||||
```
|
||||
|
||||
Agent uses `read` tool to load full instructions when needed.
|
||||
|
||||
**Disable skills:**
|
||||
|
||||
CLI: `pi --no-skills`
|
||||
|
||||
Settings (`~/.pi/agent/settings.json`):
|
||||
```json
|
||||
{
|
||||
"skills": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
See [docs/skills.md](docs/skills.md) for details.
|
||||
See [docs/skills.md](docs/skills.md) for details, examples, and links to skill repositories.
|
||||
|
||||
### Hooks
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue