mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 03:03:44 +00:00
feat: Add skill slash commands and fuzzy matching for all commands
- Skills registered as /skill:name commands for quick access - Toggle via /settings or skills.enableSkillCommands in settings.json - Fuzzy matching for all slash command autocomplete (type /skbra for /skill:brave-search) - Moved fuzzy module from coding-agent to tui package for reuse Closes #630 by @Dwsy (reimplemented with fixes)
This commit is contained in:
parent
92486e026c
commit
9655907624
15 changed files with 244 additions and 127 deletions
|
|
@ -160,6 +160,7 @@ Configure skill loading in `~/.pi/agent/settings.json`:
|
|||
"enableClaudeProject": true,
|
||||
"enablePiUser": true,
|
||||
"enablePiProject": true,
|
||||
"enableSkillCommands": true,
|
||||
"customDirectories": ["~/my-skills-repo"],
|
||||
"ignoredSkills": ["deprecated-skill"],
|
||||
"includeSkills": ["git-*", "docker"]
|
||||
|
|
@ -175,6 +176,7 @@ Configure skill loading in `~/.pi/agent/settings.json`:
|
|||
| `enableClaudeProject` | `true` | Load from `<cwd>/.claude/skills/` |
|
||||
| `enablePiUser` | `true` | Load from `~/.pi/agent/skills/` |
|
||||
| `enablePiProject` | `true` | Load from `<cwd>/.pi/skills/` |
|
||||
| `enableSkillCommands` | `true` | Register skills as `/skill:name` commands |
|
||||
| `customDirectories` | `[]` | Additional directories to scan (supports `~` expansion) |
|
||||
| `ignoredSkills` | `[]` | Glob patterns to exclude (e.g., `["deprecated-*", "test-skill"]`) |
|
||||
| `includeSkills` | `[]` | Glob patterns to include (empty = all; e.g., `["git-*", "docker"]`) |
|
||||
|
|
@ -207,6 +209,31 @@ This overrides the `includeSkills` setting for the current session.
|
|||
|
||||
This is progressive disclosure: only descriptions are always in context, full instructions load on-demand.
|
||||
|
||||
## Skill Commands
|
||||
|
||||
Skills are automatically registered as slash commands with a `/skill:` prefix:
|
||||
|
||||
```bash
|
||||
/skill:brave-search # Load and execute the brave-search skill
|
||||
/skill:pdf-tools extract # Load skill with arguments
|
||||
```
|
||||
|
||||
Arguments after the command name are appended to the skill content as `User: <args>`.
|
||||
|
||||
Toggle skill commands via `/settings` or in `settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"skills": {
|
||||
"enableSkillCommands": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
| Setting | Default | Description |
|
||||
|---------|---------|-------------|
|
||||
| `enableSkillCommands` | `true` | Register skills as `/skill:name` commands |
|
||||
|
||||
## Validation Warnings
|
||||
|
||||
Pi validates skills against the Agent Skills standard and warns (but still loads) non-compliant skills:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue