docs(readme): refresh plugin badge layout and mirrors

- update plugin README badge rows and mirrored docs
- sync README template and scaffolder guidance

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
fujie
2026-03-16 01:21:11 +08:00
parent 4feb1bdd80
commit 64af4276a7
72 changed files with 2820 additions and 845 deletions

View File

@@ -0,0 +1,143 @@
# Batch Install Plugins from GitHub
| By [Fu-Jie](https://github.com/Fu-Jie) · v1.0.0 | [⭐ Star this repo](https://github.com/Fu-Jie/openwebui-extensions) |
| :--- | ---: |
| ![followers](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_followers.json&label=%F0%9F%91%A5&style=flat) | ![points](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_points.json&label=%E2%AD%90&style=flat) | ![top](https://img.shields.io/badge/%F0%9F%8F%86-0%25-10b981?style=flat) | ![contributions](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_contributions.json&label=%F0%9F%A7%A9&style=flat) | ![views](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_views.json&label=%F0%9F%91%81%EF%B8%8F&style=flat) | ![downloads](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_downloads.json&label=%E2%AC%87%EF%B8%8F&style=flat) | ![saves](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_saves.json&label=%F0%9F%92%BE&style=flat) |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
One-click batch install plugins from GitHub repositories to your OpenWebUI instance.
## Key Features
- **One-Click Install**: Install all plugins with a single command
- **Auto-Update**: Automatically updates previously installed plugins
- **Public GitHub Support**: Install plugins from any public GitHub repository
- **Multi-Type Support**: Supports Pipe, Action, Filter, and Tool plugins
- **Confirmation**: Shows plugin list before installing, allows selective installation
- **i18n**: Supports 11 languages
## Flow
```
User Input
┌─────────────────────────────────────┐
│ Discover Plugins from GitHub │
│ (fetch file tree + parse .py) │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ Filter by Type & Keywords │
│ (tool/filter/pipe/action) │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ Show Confirmation Dialog │
│ (list plugins + exclude hint) │
└─────────────────────────────────────┘
├── [Cancel] → End
┌─────────────────────────────────────┐
│ Install to OpenWebUI │
│ (update or create each plugin) │
└─────────────────────────────────────┘
Done
```
## How to Use
1. Open OpenWebUI and go to **Workspace > Tools**
2. Install **Batch Install Plugins from GitHub** from the marketplace
3. Enable this tool for your model/chat
4. Ask the model to install plugins
## Interactive Installation Workflow
Each request handles one repository. To mix repositories, send another request after the previous installation completes.
## Quick Start: Install Popular Collections
Copy any of these prompts and paste them into your chat:
```
# Install all from my collection (default)
Install all plugins
# Add popular community tools
Install all plugins from iChristGit/OpenWebui-Tools
# Add utility-focused extensions
Install all plugins from Haervwe/open-webui-tools
# Add mixed community implementations
Install all plugins from Classic298/open-webui-plugins
# Add function-based plugins
Install all plugins from suurt8ll/open_webui_functions
# Add OpenRouter pipe integration
Install all plugins from rbb-dev/Open-WebUI-OpenRouter-pipe
```
Each line is a separate request. Already installed plugins are automatically updated.
## Usage Examples
For more advanced usage patterns:
```
# Filter by plugin type
"Install only tool plugins from iChristGit/OpenWebui-Tools"
"Install only action plugins from Classic298/open-webui-plugins"
# Exclude specific plugins
"Install all plugins from Haervwe/open-webui-tools, exclude_keywords=test,deprecated"
# Install from your own repository
"Install all plugins from your-username/my-plugin-collection"
```
## Default Repository
When no repository is specified, the tool uses `Fu-Jie/openwebui-extensions` (my personal collection).
## Plugin Detection Rules
### Fu-Jie/openwebui-extensions (Strict)
For the default repository, the tool applies stricter filtering:
1. A `.py` file containing `class Tools:`, `class Filter:`, `class Pipe:`, or `class Action:`
2. A docstring with `title:`, `description:`, and **`openwebui_id:`** metadata
3. Filename must not end with `_cn`
### Other Public GitHub Repositories
For other repositories:
1. A `.py` file containing `class Tools:`, `class Filter:`, `class Pipe:`, or `class Action:`
2. A docstring with `title:` and `description:` fields
## Configuration (Valves)
| Parameter | Default | Description |
| --- | --- | --- |
| `SKIP_KEYWORDS` | `test,verify,example,template,mock` | Comma-separated keywords to skip |
| `TIMEOUT` | `20` | Request timeout in seconds |
## Confirmation Timeout
User confirmation dialogs have a default timeout of **2 minutes (120 seconds)**, allowing sufficient time for users to:
- Read and review the plugin list
- Make installation decisions
- Handle network delays
## Support
⭐ If this plugin has been useful, a star on [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions) is a big motivation for me. Thank you for the support.

View File

@@ -0,0 +1,143 @@
# Batch Install Plugins from GitHub
| 作者:[Fu-Jie](https://github.com/Fu-Jie) · v1.0.0 | [⭐ 点个 Star 支持项目](https://github.com/Fu-Jie/openwebui-extensions) |
| :--- | ---: |
| ![followers](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_followers.json&label=%F0%9F%91%A5&style=flat) | ![points](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_points.json&label=%E2%AD%90&style=flat) | ![top](https://img.shields.io/badge/%F0%9F%8F%86-0%25-10b981?style=flat) | ![contributions](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_contributions.json&label=%F0%9F%A7%A9&style=flat) | ![views](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_views.json&label=%F0%9F%91%81%EF%B8%8F&style=flat) | ![downloads](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_downloads.json&label=%E2%AC%87%EF%B8%8F&style=flat) | ![saves](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_saves.json&label=%F0%9F%92%BE&style=flat) |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
一键将 GitHub 仓库中的插件批量安装到你的 OpenWebUI 实例。
## 主要功能
- 一键安装:单个命令安装所有插件
- 自动更新:自动更新之前安装过的插件
- 公开 GitHub 支持:支持从任何公开 GitHub 仓库安装插件
- 多类型支持:支持 Pipe、Action、Filter 和 Tool 插件
- 安装确认:安装前显示插件列表,支持选择性安装
- 国际化:支持 11 种语言
## 流程
```
用户输入
┌─────────────────────────────────────┐
│ 从 GitHub 发现插件 │
│ (获取文件树 + 解析 .py 文件) │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ 按类型和关键词过滤 │
│ (tool/filter/pipe/action) │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ 显示确认对话框 │
│ (插件列表 + 排除提示) │
└─────────────────────────────────────┘
├── [取消] → 结束
┌─────────────────────────────────────┐
│ 安装到 OpenWebUI │
│ (更新或创建每个插件) │
└─────────────────────────────────────┘
完成
```
## 使用方法
1. 打开 OpenWebUI进入 **Workspace > Tools**
2. 从市场安装 **Batch Install Plugins from GitHub**
3. 为你的模型/对话启用此工具
4. 让模型调用工具来安装插件
## 交互式安装工作流
每次请求处理一个仓库。如需混合多个来源,请在上一次安装完成后再发起下一次请求。
## 快速开始:安装热门插件集
复制以下任一提示词,粘贴到你的对话框中:
```
# 安装我的默认集合
安装所有插件
# 添加热门社区工具
从 iChristGit/OpenWebui-Tools 安装所有插件
# 添加实用工具扩展
从 Haervwe/open-webui-tools 安装所有插件
# 添加混合社区实现
从 Classic298/open-webui-plugins 安装所有插件
# 添加基于函数的插件
从 suurt8ll/open_webui_functions 安装所有插件
# 添加 OpenRouter 管道集成
从 rbb-dev/Open-WebUI-OpenRouter-pipe 安装所有插件
```
每一行是一个独立的请求。已安装的插件会自动更新。
## 使用示例
更多高级用法:
```
# 按插件类型过滤
"从 iChristGit/OpenWebui-Tools 仅安装 tool 插件"
"从 Classic298/open-webui-plugins 仅安装 action 插件"
# 排除特定插件
"从 Haervwe/open-webui-tools 安装所有插件, exclude_keywords=test,deprecated"
# 从你自己的仓库安装
"从 your-username/my-plugin-collection 安装所有插件"
```
## 默认仓库
未指定仓库时,工具会使用 `Fu-Jie/openwebui-extensions`(我的个人合集)。
## 插件检测规则
### Fu-Jie/openwebui-extensions严格模式
对于默认仓库,工具会采用更严格的筛选规则:
1. 包含 `class Tools:``class Filter:``class Pipe:``class Action:``.py` 文件
2. Docstring 中包含 `title:``description:`**`openwebui_id:`** 元数据
3. 文件名不能以 `_cn` 结尾
### 其他公开 GitHub 仓库
其他仓库的插件必须满足:
1. 包含 `class Tools:``class Filter:``class Pipe:``class Action:``.py` 文件
2. Docstring 中包含 `title:``description:` 字段
## 配置Valves
| 参数 | 默认值 | 描述 |
| --- | --- | --- |
| `SKIP_KEYWORDS` | `test,verify,example,template,mock` | 逗号分隔的跳过关键词 |
| `TIMEOUT` | `20` | 请求超时时间(秒)|
## 确认超时时间
用户确认对话框的默认超时时间为 **2 分钟120 秒)**,为用户提供充足的时间来:
- 阅读和查看插件列表
- 做出安装决定
- 处理网络延迟
## 支持
⭐ 如果这个插件对你有帮助,欢迎到 [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions) 点个 Star这将是我持续改进的动力感谢支持。

View File

@@ -0,0 +1,292 @@
# 🧰 OpenWebUI Skills Manager Tool
| By [Fu-Jie](https://github.com/Fu-Jie) · v0.3.0 | [⭐ Star this repo](https://github.com/Fu-Jie/openwebui-extensions) |
| :--- | ---: |
| ![followers](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_followers.json&label=%F0%9F%91%A5&style=flat) | ![points](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_points.json&label=%E2%AD%90&style=flat) | ![top](https://img.shields.io/badge/%F0%9F%8F%86-0%25-10b981?style=flat) | ![contributions](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_contributions.json&label=%F0%9F%A7%A9&style=flat) | ![views](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_views.json&label=%F0%9F%91%81%EF%B8%8F&style=flat) | ![downloads](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_downloads.json&label=%E2%AC%87%EF%B8%8F&style=flat) | ![saves](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_saves.json&label=%F0%9F%92%BE&style=flat) |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
A standalone OpenWebUI Tool plugin to manage native **Workspace > Skills** for any model.
## What's New
- **🤖 Automatic Repo Root Discovery**: Install any GitHub repo by providing just the root URL (e.g., `https://github.com/owner/repo`). System auto-converts to discovery mode and installs all skills.
- **🔄 Batch Deduplication**: Automatically removes duplicate URLs from batch installations and detects duplicate skill names.
- Added GitHub skills-directory auto-discovery for `install_skill` (e.g., `.../tree/main/skills`) to install all child skills in one request.
- Fixed language detection with robust frontend-first fallback (`__event_call__` + timeout), request header fallback, and profile fallback.
## Key Features
- **🌐 Model-agnostic**: Can be enabled for any model that supports OpenWebUI Tools.
- **🛠️ Simple Skill Management**: Directly manage OpenWebUI skill records.
- **🔐 User-scoped Safety**: Operates on current user's accessible skills.
- **📡 Friendly Status Feedback**: Emits status bubbles for each operation.
- **🔍 Auto-Discovery**: Automatically discovers and installs all skills from GitHub repository trees.
- **⚙️ Smart Deduplication**: Removes duplicate URLs and detects conflicting skill names during batch installation.
## How to Use
1. Open OpenWebUI and go to **Workspace > Tools**.
2. Install **OpenWebUI Skills Manager Tool** from the official marketplace.
3. Enable this tool for your model/chat.
4. Ask the model to call tool operations, for example:
- "List my skills"
- "Show skill named docs-writer"
- "Create a skill named meeting-notes with content ..."
- "Update skill ..."
- "Delete skill ..."
### Manual Installation (Alternative)
- Create a new Tool and paste `openwebui_skills_manager.py`.
## Example: Install Skills
This tool can fetch and install skills directly from URLs (supporting GitHub repo roots, tree/blob, raw markdown, and .zip/.tar archives).
### Auto-discover all skills from a GitHub repo
- "Install skills from <https://github.com/nicobailon/visual-explainer>" ← Auto-discovers all subdirectories
- "Install all skills from <https://github.com/anthropics/skills>" ← Installs entire skills directory
### Install a single skill from GitHub
- "Install skill from <https://github.com/anthropics/skills/tree/main/skills/xlsx>"
- "Install skill from <https://github.com/Fu-Jie/openwebui-extensions/blob/main/.agent/skills/test-copilot-pipe/SKILL.md>"
### Batch install multiple skills
- "Install these skills: ['https://github.com/anthropics/skills/tree/main/skills/xlsx', 'https://github.com/anthropics/skills/tree/main/skills/docx']"
> **Tip**: For GitHub, the tool automatically resolves directory (tree) URLs by looking for `SKILL.md`.
## Installation Logic
### URL Type Recognition & Processing
The `install_skill` method automatically detects and handles different URL formats with the following logic:
#### **1. GitHub Repository Root** (Auto-Discovery)
**Format:** `https://github.com/owner/repo` or `https://github.com/owner/repo/`
**Processing:**
1. Detected via regex: `^https://github\.com/([^/]+)/([^/]+)/?$`
2. Automatically converted to: `https://github.com/owner/repo/tree/main`
3. API queries all subdirectories at `/repos/{owner}/{repo}/contents?ref=main`
4. For each subdirectory, creates skill URLs
5. Attempts to fetch `SKILL.md` from each directory
6. All discovered skills installed in **batch mode**
**Example Flow:**
```
Input: https://github.com/nicobailon/visual-explainer
↓ [Detect: repo root]
↓ [Convert: add /tree/main]
↓ [Query: GitHub API for subdirs]
Discover: skill1, skill2, skill3, ...
↓ [Batch mode]
Install: All skills found
```
#### **2. GitHub Tree (Directory) URL** (Auto-Discovery)
**Format:** `https://github.com/owner/repo/tree/branch/path/to/directory`
**Processing:**
1. Detected via regex: `/tree/` in URL
2. API queries directory contents: `/repos/{owner}/{repo}/contents/path?ref=branch`
3. Filters for subdirectories (skips `.hidden` dirs)
4. For each subdirectory, attempts to fetch `SKILL.md`
5. All discovered skills installed in **batch mode**
**Example:**
```
Input: https://github.com/anthropics/skills/tree/main/skills
↓ [Query: /repos/anthropics/skills/contents/skills?ref=main]
Discover: xlsx, docx, pptx, markdown, ...
Install: All 12 skills in batch mode
```
#### **3. GitHub Blob (File) URL** (Single Install)
**Format:** `https://github.com/owner/repo/blob/branch/path/to/SKILL.md`
**Processing:**
1. Detected via pattern: `/blob/` in URL
2. Converted to raw URL: `https://raw.githubusercontent.com/owner/repo/branch/path/to/SKILL.md`
3. Content fetched and parsed as single skill
4. Installed in **single mode**
**Example:**
```
Input: https://github.com/user/repo/blob/main/SKILL.md
↓ [Convert: /blob/ → raw.githubusercontent.com]
↓ [Fetch: raw markdown content]
Parse: Skill name, description, content
Install: Single skill
```
#### **4. Raw GitHub URL** (Single Install)
**Format:** `https://raw.githubusercontent.com/owner/repo/branch/path/to/SKILL.md`
**Processing:**
1. Direct download from raw content endpoint
2. Content parsed as markdown with frontmatter
3. Skill metadata extracted (name, description from frontmatter)
4. Installed in **single mode**
**Example:**
```
Input: https://raw.githubusercontent.com/Fu-Jie/openwebui-extensions/main/SKILL.md
↓ [Fetch: raw content directly]
Parse: Extract metadata
Install: Single skill
```
#### **5. Archive Files** (Single Install)
**Format:** `https://example.com/skill.zip` or `.tar`, `.tar.gz`, `.tgz`
**Processing:**
1. Detected via file extension: `.zip`, `.tar`, `.tar.gz`, `.tgz`
2. Downloaded and extracted safely:
- Validates member paths (prevents path traversal attacks)
- Extracts to temporary directory
3. Searches for `SKILL.md` in archive root
4. Content parsed and installed in **single mode**
**Example:**
```
Input: https://github.com/user/repo/releases/download/v1.0/my-skill.zip
↓ [Download: zip archive]
↓ [Extract safely: validate paths]
↓ [Search: SKILL.md]
Parse: Extract metadata
Install: Single skill
```
### Batch Mode vs Single Mode
| Mode | Triggered By | Behavior | Result |
|------|--------------|----------|--------|
| **Batch** | Repo root or tree URL | All subdirectories auto-discovered | List of { succeeded, failed, results } |
| **Single** | Blob, raw, or archive URL | Direct content fetch and parse | { success, id, name, ... } |
| **Batch** | List of URLs | Each URL processed individually | List of results |
### Deduplication During Batch Install
When multiple URLs are provided in batch mode:
1. **URL Deduplication**: Removes duplicate URLs (preserves order)
2. **Name Collision Detection**: Tracks installed skill names
- If same name appears multiple times → warning notification
- Action depends on `ALLOW_OVERWRITE_ON_CREATE` valve
**Example:**
```
Input URLs: [url1, url1, url2, url2, url3]
↓ [Deduplicate]
Unique: [url1, url2, url3]
Process: 3 URLs
Output: "Removed 2 duplicate URL(s)"
```
### Skill Name Resolution
During parsing, skill names are resolved in this order:
1. **User-provided name** (if specified in `name` parameter)
2. **Frontmatter metadata** (from `---` block at file start)
3. **Markdown h1 heading** (first `# Title` found)
4. **Extracted directory/file name** (from URL path)
5. **Fallback name:** `"installed-skill"` (last resort)
**Example:**
```
Markdown document structure:
───────────────────────────
---
title: "My Custom Skill"
description: "Does something useful"
---
# Alternative Title
Content here...
───────────────────────────
Resolution order:
1. Check frontmatter: title = "My Custom Skill" ✓ Use this
2. (Skip other options)
Result: Skill created as "My Custom Skill"
```
### Safety & Security
All installations enforce:
-**Domain Whitelist** (TRUSTED_DOMAINS): Only github.com, huggingface.co, githubusercontent.com allowed
-**Scheme Validation**: Only http/https URLs accepted
-**Path Traversal Prevention**: Archives validated before extraction
-**User Scope**: Operations isolated per user_id
-**Timeout Protection**: Configurable timeout (default 12s)
### Error Handling
| Error Case | Handling |
|-----------|----------|
| Unsupported scheme (ftp://, file://) | Blocked at validation |
| Untrusted domain | Rejected (domain not in whitelist) |
| URL fetch timeout | Timeout error with retry suggestion |
| Invalid archive | Error on extraction attempt |
| No SKILL.md found | Error per subdirectory (batch continues) |
| Duplicate skill name | Warning notification (depends on valve) |
| Missing skill name | Error (name is required) |
## Configuration (Valves)
| Parameter | Default | Description |
| --- | --- | --- |
| `SHOW_STATUS` | `True` | Show operation status updates in OpenWebUI status bar. |
| `ALLOW_OVERWRITE_ON_CREATE` | `False` | Allow `create_skill`/`install_skill` to overwrite same-name skill by default. |
| `INSTALL_FETCH_TIMEOUT` | `12.0` | URL fetch timeout in seconds for skill installation. |
| `TRUSTED_DOMAINS` | `github.com,huggingface.co,githubusercontent.com` | Comma-separated list of primary trusted domains for downloads (always enforced). Subdomains automatically allowed (e.g., `github.com` allows `api.github.com`). See [Domain Whitelist Guide](docs/DOMAIN_WHITELIST.md). |
## Supported Tool Methods
| Method | Purpose |
| --- | --- |
| `list_skills` | List current user's skills. |
| `show_skill` | Show one skill by `skill_id` or `name`. |
| `install_skill` | Install skill from URL into OpenWebUI native skills. |
| `create_skill` | Create a new skill (or overwrite when allowed). |
| `update_skill` | Modify an existing skill by id or name. Update any combination of: `new_name` (rename), `description`, `content`, or `is_active` (enable/disable). Validates name uniqueness. |
| `delete_skill` | Delete a skill by `skill_id` or `name`. |
## Support
If this plugin has been useful, a star on [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions) is a big motivation for me. Thank you for the support.
## Others
- This tool manages OpenWebUI native skill records and supports direct URL installation.
- For advanced orchestration, combine with other Pipe/Tool workflows.
## Changelog
See full history in the GitHub repository releases and commits.

View File

@@ -0,0 +1,292 @@
# 🧰 OpenWebUI Skills 管理工具
| 作者:[Fu-Jie](https://github.com/Fu-Jie) · v0.3.0 | [⭐ 点个 Star 支持项目](https://github.com/Fu-Jie/openwebui-extensions) |
| :--- | ---: |
| ![followers](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_followers.json&label=%F0%9F%91%A5&style=flat) | ![points](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_points.json&label=%E2%AD%90&style=flat) | ![top](https://img.shields.io/badge/%F0%9F%8F%86-0%25-10b981?style=flat) | ![contributions](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_contributions.json&label=%F0%9F%A7%A9&style=flat) | ![views](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_views.json&label=%F0%9F%91%81%EF%B8%8F&style=flat) | ![downloads](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_downloads.json&label=%E2%AC%87%EF%B8%8F&style=flat) | ![saves](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_saves.json&label=%F0%9F%92%BE&style=flat) |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
一个 OpenWebUI 原生 Tool 插件,用于让任意模型直接管理 **Workspace > Skills**
## 最新更新
- **🤖 自动发现仓库根目录**:现在可以直接提供 GitHub 仓库根 URL`https://github.com/owner/repo`),系统会自动转换为发现模式并安装所有 skill。
- **🔄 批量去重**:自动清除重复 URL检测重复的 skill 名称。
- `install_skill` 新增 GitHub 技能目录自动发现(例如 `.../tree/main/skills`),可一键安装目录下所有子技能。
- 修复语言获取逻辑:前端优先(`__event_call__` + 超时保护),并回退到请求头与用户资料。
## 核心特性
- **🌐 全模型可用**:只要模型启用了 OpenWebUI Tools即可调用。
- **🛠️ 简化技能管理**:直接管理 OpenWebUI Skills 记录。
- **🔐 用户范围安全**:仅操作当前用户可访问的技能。
- **📡 友好状态反馈**:每一步操作都有状态栏提示。
- **🔍 自动发现**:自动发现并安装 GitHub 仓库目录树中的所有 skill。
- **⚙️ 智能去重**:批量安装时自动清除重复 URL检测冲突的 skill 名称。
## 使用方法
1. 打开 OpenWebUI进入 **Workspace > Tools**
2. 在官方市场安装 **OpenWebUI Skills 管理工具**
3. 为当前模型/聊天启用该工具。
4. 在对话中让模型调用,例如:
- “列出我的 skills”
- “显示名为 docs-writer 的 skill”
- “创建一个 meeting-notes 技能,内容是 ...”
- “更新某个 skill ...”
- “删除某个 skill ...”
### 手动安装(备选)
- 新建 Tool粘贴 `openwebui_skills_manager.py`
## 示例:安装技能 (Install Skills)
该工具支持从 URL 直接抓取并安装技能(支持 GitHub 仓库根、tree/blob 链接、原始 Markdown 链接以及 .zip/.tar 压缩包)。
### 自动发现 GitHub 仓库中的所有 skill
- "从 <https://github.com/nicobailon/visual-explainer> 安装 skill" ← 自动发现所有子目录
- "从 <https://github.com/anthropics/skills> 安装所有 skill" ← 安装整个技能目录
### 从 GitHub 安装单个技能
- “从 <https://github.com/anthropics/skills/tree/main/skills/xlsx> 安装技能”
- “安装技能 <https://github.com/Fu-Jie/openwebui-extensions/blob/main/.agent/skills/test-copilot-pipe/SKILL.md”>
### 批量安装多个技能
- “安装这些技能:['https://github.com/anthropics/skills/tree/main/skills/xlsx', 'https://github.com/anthropics/skills/tree/main/skills/docx']”
> **提示**:对于 GitHub 链接工具会自动处理目录tree地址并尝试查找目录下的 `SKILL.md`。
>
## 安装逻辑
### URL 类型识别与处理
`install_skill` 方法自动检测和处理不同的 URL 格式,具体逻辑如下:
#### **1. GitHub 仓库根目录**(自动发现)
**格式:** `https://github.com/owner/repo``https://github.com/owner/repo/`
**处理流程:**
1. 通过正则表达式检测:`^https://github\.com/([^/]+)/([^/]+)/?$`
2. 自动转换为:`https://github.com/owner/repo/tree/main`
3. API 查询所有子目录:`/repos/{owner}/{repo}/contents?ref=main`
4. 为每个子目录创建技能 URL
5. 尝试从每个目录中获取 `SKILL.md`
6. 所有发现的技能以**批量模式**安装
**示例流程:**
```
输入https://github.com/nicobailon/visual-explainer
↓ [检测:仓库根]
↓ [转换:添加 /tree/main]
↓ [查询GitHub API 子目录]
发现skill1, skill2, skill3, ...
↓ [批量模式]
安装:所有发现的技能
```
#### **2. GitHub Tree目录URL**(自动发现)
**格式:** `https://github.com/owner/repo/tree/branch/path/to/directory`
**处理流程:**
1. 通过检测 `/tree/` 路径识别
2. API 查询目录内容:`/repos/{owner}/{repo}/contents/path?ref=branch`
3. 筛选子目录(跳过 `.hidden` 隐藏目录)
4. 为每个子目录尝试获取 `SKILL.md`
5. 所有发现的技能以**批量模式**安装
**示例:**
```
输入https://github.com/anthropics/skills/tree/main/skills
↓ [查询:/repos/anthropics/skills/contents/skills?ref=main]
发现xlsx, docx, pptx, markdown, ...
安装:批量安装所有 12 个技能
```
#### **3. GitHub Blob文件URL**(单个安装)
**格式:** `https://github.com/owner/repo/blob/branch/path/to/SKILL.md`
**处理流程:**
1. 通过 `/blob/` 模式检测
2. 转换为原始 URL`https://raw.githubusercontent.com/owner/repo/branch/path/to/SKILL.md`
3. 获取内容并作为单个技能解析
4. 以**单个模式**安装
**示例:**
```
输入https://github.com/user/repo/blob/main/SKILL.md
↓ [转换:/blob/ → raw.githubusercontent.com]
↓ [获取:原始 markdown 内容]
解析:技能名称、描述、内容
安装:单个技能
```
#### **4. GitHub Raw URL**(单个安装)
**格式:** `https://raw.githubusercontent.com/owner/repo/branch/path/to/SKILL.md`
**处理流程:**
1. 从原始内容端点直接下载
2. 作为 Markdown 格式解析(包括 frontmatter
3. 提取技能元数据(名称、描述等)
4. 以**单个模式**安装
**示例:**
```
输入https://raw.githubusercontent.com/Fu-Jie/openwebui-extensions/main/SKILL.md
↓ [直接获取原始内容]
解析:提取元数据
安装:单个技能
```
#### **5. 压缩包文件**(单个安装)
**格式:** `https://example.com/skill.zip``.tar`, `.tar.gz`, `.tgz`
**处理流程:**
1. 通过文件扩展名检测:`.zip`, `.tar`, `.tar.gz`, `.tgz`
2. 下载并安全解压:
- 验证成员路径(防止目录遍历攻击)
- 解压到临时目录
3. 在压缩包根目录查找 `SKILL.md`
4. 解析内容并以**单个模式**安装
**示例:**
```
输入https://github.com/user/repo/releases/download/v1.0/my-skill.zip
↓ [下载zip 压缩包]
↓ [安全解压:验证路径]
↓ [查找SKILL.md]
解析:提取元数据
安装:单个技能
```
### 批量模式 vs. 单个模式
| 模式 | 触发条件 | 行为 | 结果 |
|------|---------|------|------|
| **批量** | 仓库根或 tree URL | 自动发现所有子目录 | { succeeded, failed, results } |
| **单个** | Blob、Raw 或压缩包 URL | 直接获取并解析内容 | { success, id, name, ... } |
| **批量** | URL 列表 | 逐个处理每个 URL | 结果列表 |
### 批量安装时的去重
提供多个 URL 进行批量安装时:
1. **URL 去重**:移除重复 URL保持顺序
2. **名称冲突检测**:跟踪已安装的技能名称
- 相同名称出现多次 → 发送警告通知
- 行为取决于 `ALLOW_OVERWRITE_ON_CREATE` 参数
**示例:**
```
输入 URL[url1, url1, url2, url2, url3]
↓ [去重]
唯一: [url1, url2, url3]
处理: 3 个 URL
输出: 「已从批量队列中移除 2 个重复 URL」
```
### 技能名称识别
解析时,技能名称按以下优先级解析:
1. **用户指定的名称**(通过 `name` 参数)
2. **Frontmatter 元数据**(文件开头的 `---` 块)
3. **Markdown h1 标题**(第一个 `# 标题` 文本)
4. **提取的目录/文件名**(从 URL 路径)
5. **备用名称:** `"installed-skill"`(最后的选择)
**示例:**
```
Markdown 文档结构:
───────────────────────────
---
title: "我的自定义技能"
description: "做一些有用的事"
---
# 替代标题
内容...
───────────────────────────
识别优先级:
1. 检查 frontmattertitle = "我的自定义技能" ✓ 使用此项
2. (跳过其他选项)
结果:创建技能名为 "我的自定义技能"
```
### 安全与防护
所有安装都强制执行:
-**域名白名单**TRUSTED_DOMAINS仅允许 github.com、huggingface.co、githubusercontent.com
-**方案验证**:仅接受 http/https URL
-**路径遍历防护**:压缩包解压前验证
-**用户隔离**:每个用户的操作隔离
-**超时保护**:可配置超时(默认 12 秒)
### 错误处理
| 错误情况 | 处理方式 |
|---------|---------|
| 不支持的方案ftp://、file:// | 在验证阶段阻止 |
| 不可信的域名 | 拒绝(域名不在白名单中) |
| URL 获取超时 | 超时错误并建议重试 |
| 无效压缩包 | 解压时报错 |
| 未找到 SKILL.md | 每个子目录报错(批量继续) |
| 重复技能名 | 警告通知(取决于参数) |
| 缺少技能名称 | 错误(名称是必需的) |
## 配置参数Valves
| 参数 | 默认值 | 说明 |
| --- | --- | --- |
| `SHOW_STATUS` | `True` | 是否在 OpenWebUI 状态栏显示操作状态。 |
| `ALLOW_OVERWRITE_ON_CREATE` | `False` | 是否允许 `create_skill`/`install_skill` 默认覆盖同名技能。 |
| `INSTALL_FETCH_TIMEOUT` | `12.0` | 从 URL 安装技能时的请求超时时间(秒)。 |
| `TRUSTED_DOMAINS` | `github.com,huggingface.co,githubusercontent.com` | 逗号分隔的主信任域名清单(**必须启用**)。子域名会自动放行(如 `github.com` 允许 `api.github.com`)。详见 [域名白名单指南](docs/DOMAIN_WHITELIST.md)。 |
## 支持的方法
| 方法 | 用途 |
| --- | --- |
| `list_skills` | 列出当前用户的技能。 |
| `show_skill` | 通过 `skill_id``name` 查看单个技能。 |
| `install_skill` | 通过 URL 安装技能到 OpenWebUI 原生 Skills。 |
| `create_skill` | 创建新技能(或在允许时覆盖同名技能)。 |
| `update_skill` | 修改现有技能(通过 id 或 name。支持更新`new_name`(重命名)、`description``content``is_active`(启用/禁用)的任意组合。自动验证名称唯一性。 |
| `delete_skill` | 通过 `skill_id``name` 删除技能。 |
## 支持
如果这个插件对你有帮助,欢迎到 [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions) 点个 Star这将是我持续改进的动力感谢支持。
## 其他说明
- 本工具管理 OpenWebUI 原生 Skills 记录,并支持通过 URL 直接安装。
- 如需更复杂的工作流编排,可结合其他 Pipe/Tool 方案使用。
## 更新记录
完整历史请查看 GitHub 仓库的 commits 与 releases。

View File

@@ -1,14 +1,18 @@
# Smart Mind Map Tool - Knowledge Visualization & Structuring
Smart Mind Map Tool is the tool version of the popular Smart Mind Map plugin for OpenWebUI. It allows the model to proactively generate interactive mind maps during conversations by intelligently analyzing context and structuring knowledge into visual hierarchies.
Smart Mind Map Tool is the tool version of the popular Smart Mind Map action plugin for Open WebUI. It allows the model to proactively generate interactive mind maps during conversations by intelligently analyzing context and structuring knowledge into visual hierarchies.
> **Note**: Prefer the manual trigger button instead? Check out the [Smart Mind Map Action Version](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) here.
| By [Fu-Jie](https://github.com/Fu-Jie) · v1.0.0 | [⭐ Star this repo](https://github.com/Fu-Jie/openwebui-extensions) |
| :--- | ---: |
**Author:** [Fu-Jie](https://github.com/Fu-Jie) | **Version:** 1.0.0 | **Project:** [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions) | **License:** MIT
| ![followers](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_followers.json&label=%F0%9F%91%A5&style=flat) | ![points](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_points.json&label=%E2%AD%90&style=flat) | ![top](https://img.shields.io/badge/%F0%9F%8F%86-0%25-10b981?style=flat) | ![contributions](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_contributions.json&label=%F0%9F%A7%A9&style=flat) | ![views](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_views.json&label=%F0%9F%91%81%EF%B8%8F&style=flat) | ![downloads](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_downloads.json&label=%E2%AC%87%EF%B8%8F&style=flat) | ![saves](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_saves.json&label=%F0%9F%92%BE&style=flat) |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
> 💡 **Note**: Prefer using the manual trigger button instead? Check out the [Smart Mind Map Action Version](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) here.
---
## 🚀 Why is there a Tool version?
## Why is there a Tool version?
1. **Powered by OpenWebUI 0.8.0 Rich UI**: Previous versions of OpenWebUI did not support embedding custom HTML/iframes directly into the chat stream. Starting with 0.8.0, the platform introduced full Rich UI rendering support for **both Actions and Tools**, unleashing interactive frontend possibilities.
2. **AI Autonomous Invocation (vs. Action)**: While an **Action** is passive and requires a manual button click from the user, the **Tool** version gives the model **autonomy**. The AI can analyze the conversational context and decide on its own exactly when generating a mind map would be most helpful, offering a true "smart assistant" experience.

View File

@@ -2,9 +2,13 @@
思维导图工具Smart Mind Map Tool是广受好评的“思维导图”插件的工具Tool版本。它赋予了模型主动生成交互式思维导图的能力通过智能分析上下文将碎片化知识转化为层级分明的视觉架构。
> **说明**:如果您更倾向于手动点击按钮触发生成,可以获取 [思维导图 Action动作版本](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a)。
| 作者:[Fu-Jie](https://github.com/Fu-Jie) · v1.0.0 | [⭐ 点个 Star 支持项目](https://github.com/Fu-Jie/openwebui-extensions) |
| :--- | ---: |
**作者:** [Fu-Jie](https://github.com/Fu-Jie) | **版本:** 1.0.0 | **项目:** [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions) | **许可证:** MIT
| ![followers](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_followers.json&label=%F0%9F%91%A5&style=flat) | ![points](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_points.json&label=%E2%AD%90&style=flat) | ![top](https://img.shields.io/badge/%F0%9F%8F%86-0%25-10b981?style=flat) | ![contributions](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_contributions.json&label=%F0%9F%A7%A9&style=flat) | ![views](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_views.json&label=%F0%9F%91%81%EF%B8%8F&style=flat) | ![downloads](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_downloads.json&label=%E2%AC%87%EF%B8%8F&style=flat) | ![saves](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_saves.json&label=%F0%9F%92%BE&style=flat) |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
> 💡 **说明**:如果您更倾向于手动点击按钮触发生成,可以获取 [思维导图 Action动作版本](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a)。
---