* feat(github-copilot-sdk): add workspace skills support - Introduce ENABLE_WORKSPACE_SKILLS valve to enable/disable workspace custom tools discovery - Modify _build_session_config() to auto-load tools from .copilot-skills/ directory - Add workspace_skills_example.py template with 3 working example tools - Update README.md and README_CN.md with Workspace Skills guide and usage examples - Create v0.9.0.md and v0.9.0_CN.md release notes - Sync version to all docs files (index.md, index.zh.md, and main docs) - Bump version from 0.8.0 to 0.9.0 across all 7+ locations * docs: establish temp files handling policy (project-based, not /tmp) - Add TEMP_FILES_POLICY.md guideline for all skills and workflows - Update pr-submitter skill to use .temp/ directory instead of /tmp - Update release-prep skill documentation with temp file convention - Add .temp/ and .build/ entries to .gitignore - Create internal policy memo in /memories/repo/ This policy ensures: - All temporary files stay within project workspace (not system /tmp) - Alignment with OpenWebUI workspace isolation principles - Multi-user safety and cleanup traceability - Consistent handling across all skills and development workflows * fix(terminology): rename 'workspace skills' to 'workspace custom tools' for accuracy The term 'Skills' in Anthropic context refers to instruction-based frameworks (SKILL.md files with YAML frontmatter + markdown), not custom tool functions. Our implementation uses @define_tool decorator to define custom tools that the SDK auto-discovers from .copilot-skills/ directory. These are Tools, not Skills. Changes: - Rename ENABLE_WORKSPACE_SKILLS valve -> ENABLE_WORKSPACE_TOOLS - Update all documentation (README, README_CN, docs, release notes) - Fix section headings and descriptions throughout - Ensure consistent terminology across all files This is a terminology-only change; functionality remains identical. * feat(pipes): release v0.9.0 of GitHub Copilot SDK Pipe - Integrated OpenWebUI Skills Bridge and manage_skills tool - Reinforced status bar stability with session_finalized logic - Added persistent SDK config directory support * docs(pipes): add comprehensive guides and v0.9.0 notes for Copilot SDK - Added skill manager and best practices guides - Added publishing tool documentation - Included v0.9.0 release notes and deployment script - Updated usage guides
129 lines
4.3 KiB
Markdown
129 lines
4.3 KiB
Markdown
# manage_skills Tool Guide
|
|
|
|
This document describes the `manage_skills` **tool** in GitHub Copilot SDK Pipe.
|
|
|
|
> Important: `manage_skills` is a tool, not a skill.
|
|
|
|
---
|
|
|
|
## Core Model
|
|
|
|
The plugin uses **one** install/sync location for skills:
|
|
|
|
- `OPENWEBUI_SKILLS_SHARED_DIR/shared/`
|
|
|
|
There is no separate install target for "manager skill" or per-workspace skill buckets.
|
|
|
|
---
|
|
|
|
## Skill Directory Layout
|
|
|
|
All skills live under the same directory:
|
|
|
|
```text
|
|
{OPENWEBUI_SKILLS_SHARED_DIR}/shared/
|
|
├── finance-reporting/
|
|
│ ├── SKILL.md
|
|
│ ├── .owui_id
|
|
│ ├── scripts/
|
|
│ └── templates/
|
|
├── docs-writer/
|
|
│ ├── SKILL.md
|
|
│ └── .owui_id
|
|
└── ...
|
|
```
|
|
|
|
- `SKILL.md` is required.
|
|
- `.owui_id` links local folder to OpenWebUI DB record.
|
|
- Extra files (`scripts/`, `templates/`, `references/`) are optional resources.
|
|
|
|
---
|
|
|
|
## What `manage_skills` Does
|
|
|
|
`manage_skills` provides deterministic skill lifecycle operations:
|
|
|
|
- `list`
|
|
- `install`
|
|
- `create`
|
|
- `edit`
|
|
- `show`
|
|
- `delete`
|
|
|
|
Use this tool for all skill CRUD operations instead of ad-hoc shell workflows.
|
|
|
|
---
|
|
|
|
## Sync Mechanism (Local Files ↔ OpenWebUI DB)
|
|
|
|
The SDK performs **real-time bidirectional sync** between the local filesystem and the OpenWebUI database to ensure consistency.
|
|
|
|
### How it works
|
|
|
|
1. **Identity Link**: Each local skill folder contains a hidden `.owui_id` file. This is the "glue" that links the folder to a specific record in the OpenWebUI database.
|
|
2. **Conflict Resolution**:
|
|
- **Content Hash**: The SDK first compares the MD5 hash of the local `SKILL.md` content against the DB record. If they match, no sync occurs.
|
|
- **Timestamp Check**: If content differs, it compares the file's `mtime` with the database's `updated_at`. The newer version wins.
|
|
3. **Operation Sync**:
|
|
- **Manual Edit (Filesystem)**: If you edit `SKILL.md` via VS Code or terminal, the next SDK request will push those changes to the OpenWebUI UI.
|
|
- **UI Edit (OpenWebUI)**: If you update instructions in the OpenWebUI workspace, the SDK will pull those changes and overwrite the local `SKILL.md`.
|
|
- **Tool Actions**: Actions like `manage_skills(action="create")` or `action="delete"` trigger an immediate atomic sync to the database.
|
|
|
|
> **Warning**: Do not manually delete the `.owui_id` file unless you want to "unlink" the skill and force the SDK to re-register it as a new entry.
|
|
|
|
---
|
|
|
|
## Typical Flows (Example Queries)
|
|
|
|
### 1. Install Skill from GitHub URL
|
|
|
|
**User Query:** "Help me install the data-visualizer skill from `https://github.com/user/skills/blob/main/data-visualizer/SKILL.md`"
|
|
**Tool Call:** `manage_skills(action="install", url="https://github.com/user/skills/blob/main/data-visualizer/SKILL.md")`
|
|
**Result:**
|
|
|
|
- Files downloaded to `{OPENWEBUI_SKILLS_SHARED_DIR}/shared/data-visualizer/`
|
|
- Skill metadata automatically synced to OpenWebUI Database.
|
|
|
|
### 2. Install Multiple Skills from Different URLs at Once
|
|
|
|
**User Query:** "Install these three skills: URL1, URL2, URL3"
|
|
**Tool Call:** `manage_skills(action="install", url=["URL1", "URL2", "URL3"])`
|
|
**Result:**
|
|
|
|
- Each URL is downloaded, extracted, and installed sequentially into `shared/`.
|
|
- A single DB sync runs after all installs complete.
|
|
- If one URL fails, the others still proceed. Failed URLs are listed in `errors`.
|
|
|
|
### 3. Install All Skills from One Repository
|
|
|
|
**User Query:** "Install everything under `https://github.com/myorg/skill-pack/tree/main/`"
|
|
**Tool Call:** `manage_skills(action="install", url="https://github.com/myorg/skill-pack/tree/main/")`
|
|
**Result:**
|
|
|
|
- All subdirectories containing a `SKILL.md` are discovered and installed in one shot.
|
|
|
|
### 4. Create Skill from Current Conversation
|
|
|
|
**User Query:** "Remember the Python cleanup logic we just discussed as a new skill called 'py-clean'"
|
|
**Tool Call:** `manage_skills(action="create", name="py-clean", content="...")`
|
|
**Result:**
|
|
|
|
- New directory `{OPENWEBUI_SKILLS_SHARED_DIR}/shared/py-clean/` created.
|
|
- `SKILL.md` written and synced to Database.
|
|
|
|
---
|
|
|
|
## Recommended Settings
|
|
|
|
- `ENABLE_OPENWEBUI_SKILLS=True`
|
|
- `OPENWEBUI_SKILLS_SHARED_DIR=/app/backend/data/cache/copilot-openwebui-skills`
|
|
- Optional blacklist: `DISABLED_SKILLS=skill-a,skill-b`
|
|
|
|
---
|
|
|
|
## Notes
|
|
|
|
- Do not run skill names as shell commands.
|
|
- Use `manage_skills` for lifecycle control.
|
|
- Keep all installed skills in one directory: `.../shared/`.
|