feat(ui): add a refresh button to the Hubs page (#814)

The Hubs page keeps a hub's skill list for two minutes and does not
refetch on window focus. The server reads the index fresh on every
request (git hubs are re-cloned), so after someone pushes an updated
skillshare-hub.json the only way to see it was to wait or reload the
whole page.

A refresh icon button next to the filter refetches the list on demand.
It spins and is disabled while loading; the current list stays on screen,
and a failed fetch shows the existing error note above it. Your own
(draft) Hubs are local and do not get the button.
This commit is contained in:
Willie
2026-11-09 18:08:25 +08:00
committed by GitHub
parent 2bc791ed19
commit 0580bd79bd
17 changed files with 30 additions and 6 deletions
+14 -1
View File
@@ -1,7 +1,7 @@
import { useEffect, useMemo, useRef, useState } from 'react';
import type { ReactNode } from 'react';
import { useQuery, useQueryClient } from '@tanstack/react-query';
import { Search, Tag } from 'lucide-react';
import { RefreshCw, Search, Tag } from 'lucide-react';
import { api } from '../../api/client';
import type { SearchResult } from '../../api/client';
import { hubDrafts } from '../../api/hubDrafts';
@@ -114,6 +114,19 @@ export default function HubView({ title, draftId, url, actions }: Props) {
<Search size={14} className="shrink-0 text-ink-3" />
<input value={filter} onChange={(e) => setFilter(e.target.value)} placeholder={t('hubs.browse.filter')} aria-label={t('hubs.browse.filter')} />
</span>
{/* The hosted list is cached for two minutes; this fetches it again now. */}
{!draftId && (
<button
type="button"
className="ss-btn !w-[34px] !px-0"
aria-label={t('hubs.view.refresh')}
title={t('hubs.view.refresh')}
disabled={hosted.isFetching}
onClick={() => void hosted.refetch()}
>
<RefreshCw size={15} className={hosted.isFetching ? 'animate-spin' : ''} />
</button>
)}
{actions}
</span>
</div>
+1
View File
@@ -2366,6 +2366,7 @@
"hubs.view.edit": "Bearbeiten",
"hubs.view.share": "Teilen",
"hubs.view.more": "Weitere Aktionen",
"hubs.view.refresh": "Aktualisieren",
"hubs.view.version": "Version",
"hubs.view.delete": "Hub löschen",
"hubs.view.deleteHint": "Diesen Hub endgültig löschen? Installierte Skills und gehostete Dateien bleiben unberührt.",
+1
View File
@@ -2366,6 +2366,7 @@
"hubs.view.edit": "Edit",
"hubs.view.share": "Share",
"hubs.view.more": "More actions",
"hubs.view.refresh": "Refresh",
"hubs.view.version": "Version",
"hubs.view.delete": "Delete Hub",
"hubs.view.deleteHint": "Delete this Hub permanently? Installed skills and hosted files are not affected.",
+1
View File
@@ -2366,6 +2366,7 @@
"hubs.view.edit": "Editar",
"hubs.view.share": "Compartir",
"hubs.view.more": "Más acciones",
"hubs.view.refresh": "Actualizar",
"hubs.view.version": "Versión",
"hubs.view.delete": "Eliminar Hub",
"hubs.view.deleteHint": "¿Eliminar este Hub para siempre? Los skills instalados y los archivos alojados no se ven afectados.",
+1
View File
@@ -2366,6 +2366,7 @@
"hubs.view.edit": "ویرایش",
"hubs.view.share": "هم‌رسانی",
"hubs.view.more": "کارهای بیشتر",
"hubs.view.refresh": "تازه‌سازی",
"hubs.view.version": "نسخه",
"hubs.view.delete": "حذف Hub",
"hubs.view.deleteHint": "این Hub برای همیشه حذف شود؟ skills نصب‌شده و فایل‌های میزبانی‌شده تغییری نمی‌کنند.",
+1
View File
@@ -2366,6 +2366,7 @@
"hubs.view.edit": "Modifier",
"hubs.view.share": "Partager",
"hubs.view.more": "Plus d'actions",
"hubs.view.refresh": "Actualiser",
"hubs.view.version": "Version",
"hubs.view.delete": "Supprimer le Hub",
"hubs.view.deleteHint": "Supprimer définitivement ce Hub ? Les skills installés et les fichiers hébergés ne sont pas touchés.",
+1
View File
@@ -2366,6 +2366,7 @@
"hubs.view.edit": "Edit",
"hubs.view.share": "Bagikan",
"hubs.view.more": "Tindakan lain",
"hubs.view.refresh": "Segarkan",
"hubs.view.version": "Versi",
"hubs.view.delete": "Hapus Hub",
"hubs.view.deleteHint": "Hapus Hub ini secara permanen? Skills yang terpasang dan file yang di-host tidak terpengaruh.",
+1
View File
@@ -2366,6 +2366,7 @@
"hubs.view.edit": "編集",
"hubs.view.share": "共有",
"hubs.view.more": "その他の操作",
"hubs.view.refresh": "更新",
"hubs.view.version": "バージョン",
"hubs.view.delete": "Hub を削除",
"hubs.view.deleteHint": "この Hub を完全に削除しますか?インストール済みの skills や公開先のファイルには影響しません。",
+1
View File
@@ -2366,6 +2366,7 @@
"hubs.view.edit": "편집",
"hubs.view.share": "공유",
"hubs.view.more": "더 보기",
"hubs.view.refresh": "새로고침",
"hubs.view.version": "버전",
"hubs.view.delete": "Hub 삭제",
"hubs.view.deleteHint": "이 Hub를 영구히 삭제할까요? 설치된 skills와 호스팅된 파일은 영향을 받지 않습니다.",
+1
View File
@@ -2366,6 +2366,7 @@
"hubs.view.edit": "Editar",
"hubs.view.share": "Compartilhar",
"hubs.view.more": "Mais ações",
"hubs.view.refresh": "Atualizar",
"hubs.view.version": "Versão",
"hubs.view.delete": "Excluir Hub",
"hubs.view.deleteHint": "Excluir este Hub permanentemente? Skills instalados e arquivos hospedados não são afetados.",
+1
View File
@@ -2366,6 +2366,7 @@
"hubs.view.edit": "编辑",
"hubs.view.share": "分享",
"hubs.view.more": "更多操作",
"hubs.view.refresh": "刷新",
"hubs.view.version": "版本",
"hubs.view.delete": "删除 Hub",
"hubs.view.deleteHint": "要永久删除这个 Hub 吗?已安装的 skills 和放在别处的文件不受影响。",
+1
View File
@@ -2366,6 +2366,7 @@
"hubs.view.edit": "編輯",
"hubs.view.share": "分享",
"hubs.view.more": "更多動作",
"hubs.view.refresh": "重新整理",
"hubs.view.version": "版本",
"hubs.view.delete": "刪除 Hub",
"hubs.view.deleteHint": "要永久刪除這個 Hub 嗎?已安裝的 skills 和放在別處的檔案不受影響。",
+1 -1
View File
@@ -90,7 +90,7 @@ Some pages show a count in the sidebar when they need attention. The counts refr
| **Dashboard** | Counts for skills, agents, extras, MCP servers, hooks, plugins, and targets, plus items that need attention. Uninstalling a tracked repo with uncommitted changes, or whose git status can't be read, explains why and asks again before moving it to the trash as it is, like `uninstall --force` |
| **Sync** | Preview every change per target before writing. Choose which parts to include (Skills, Agents, Extras, MCP). Files edited inside a target are kept unless **Force** is on. Items that exist only in a target can be collected back to source from here. Each sync backs up target folders first. When a target fails, the others still sync: the page lists each failed target with its part (Skills, Agents, Extras or Config), a plain-language explanation when the cause is a common one (a symlink that points elsewhere, permission denied, a read-only file system, a missing file or folder, invalid target settings) and the error, above the other warnings, offers **Turn on Force** for a skills symlink that points elsewhere, and marks the target in the change list. Even when every target fails, the page lists them the same way. The **Last sync** card names the targets that failed in the latest sync. Targets that get the same changes share one card that lists the skills by folder. **Discard all** moves skills that no target has received yet to the trash, after a confirmation. When a target's `include` filter matches no skill, a notice says the target gets no skills, and **Edit filter** opens the place where that filter is set; Git Sync shows the same notice after a pull |
| **Git Sync** | Commit and push the source repo, push commits that aren't on the remote yet, and pull. Opening the page fetches from the remote, so **Pull** shows how many commits the remote has. When both computers have new commits, **Pull and merge** preserves both histories before you push. With uncommitted changes and remote updates, **Commit and pull** saves your changes first. Pull syncs what the repo scope holds (`skills`, `agents`, `extras`, or `root`), like [`pull`](/docs/reference/commands/pull). **Sync both ways** commits local changes, pulls and merges, syncs targets, then pushes, like [`push --pull`](/docs/reference/commands/push#push-and-pull-together); a conflict stops it before pushing. Conflicting files open a version comparison; choose the local or remote version of each whole file (or keep all local or all remote at once), then **Apply choices and pull**. Cancel leaves your files unchanged. When a first pull can't merge with the remote, it offers a force pull that replaces local files with the remote branch |
| **Hubs** | Reached from the Skills page. Lists the built-in hub, saved hubs, and your own Hubs (**Mine**); pick one to filter its skills and install them. **Add or create a Hub** adds an existing hub, creates a new Hub, or imports a `skillshare-hub.json`. Your own Hubs are changed with **Edit**; **Share** downloads the index and builds the `hub add` command. See [`hub`](/docs/reference/commands/hub) |
| **Hubs** | Reached from the Skills page. Lists the built-in hub, saved hubs, and your own Hubs (**Mine**); pick one to filter its skills and install them. **Add or create a Hub** adds an existing hub, creates a new Hub, or imports a `skillshare-hub.json`. Your own Hubs are changed with **Edit**; **Share** downloads the index and builds the `hub add` command. **Refresh** reloads a saved or built-in hub's list now instead of waiting for the two-minute cache. See [`hub`](/docs/reference/commands/hub) |
| **Skills** / **Agents** | Installed items, the **Updates** tab, and the **Trash** tab. Skills also have an **Analyze** tab that estimates how many tokens each skill adds to a target's context. **Install** searches GitHub or installs from a URL or path; its menu also holds **New skill**, which opens the creation wizard, and **Link folder**. When the config lists entries that are not installed, the **Updates** tab and the install dialog offer **Install all**, like a bare [`install`](/docs/reference/commands/install). After a check, skills deleted from their source repo are listed with **Prune** and **Prune all**, which move them to the trash. **Link folder** links a folder into the skills source like [`link`](/docs/reference/commands/link): it takes a path, an optional link name and, while `follow_source_links` is off, a checkbox that turns it on, and a refused folder shows the same reason as the command. A linked folder is listed as its own group with the link icon and the folder it points at; the icon button on its row (the link icon turns into an unlink icon on hover) asks for confirmation and then unlinks it like [`unlink`](/docs/reference/commands/unlink): the folder is not touched and the link can be restored from the **Trash** tab. A skill inside a linked folder can still be uninstalled on its own, which moves it out of that folder to the trash; linked folders have no **Update repo** or **Uninstall repo**. The list and card views can filter by **Folder** (a tracked repo, a folder such as `frontend/react`, or **Root**) and group by **Folder**, with the root first and folders A→Z. In the list view, a skill inside another skill's folder is listed under that skill: the count button after the package's name opens its skills below it, joined to the package by a faint tree line (packages start collapsed), and deeper packages are indented further. A search opens the packages that hold a match, shows counts such as `1 / 3`, and marks the matched text in names; packages you close during a search open again when the search changes, and the packages you opened before stay as they were. Paging counts only top-level rows. Each row shows the `description` from the skill's frontmatter on one line, in full while the row has keyboard focus; **Group and sort** → **Show** → **Descriptions** hides them. **Expand all** / **Collapse all** also opens and closes packages, and the selection bar says how many selected items are not shown. Only a name opens the detail page. Uninstalling a package also moves the skills inside its folder to the trash, and the confirmation says how many. The **tree** view shows the source folders on the left and details on the right: click a folder or skill to select it, Cmd/Ctrl-click to add to the selection, Shift-click for a range, and double-click a skill to open it. The right side turns everything selected on or off with one switch (an item that a `!` rule in `.skillignore.local` keeps on is reported as failed, with the reason), sets its targets (tracked repos and their subfolders included), and lists each skill with its own switch; a tracked repo also offers **Update repo** and **Uninstall repo**. A skill with `disable-model-invocation: true` carries a **manual only** tag in the list, on its tile and on its detail page, the same state [`list`](/docs/reference/commands/list) toggles with `m`. A skill installed from a branch other than the remote default (`install --branch`) shows that branch as a tag in the list, on its tile and on the **Updates** tab. On the detail page of a skill installed from a remote source (not a tracked repo, which changes branch on **Git Sync**), **Branch** lists the source's branches, for any Git remote (HTTPS or SSH, on any host). Picking one asks for confirmation, then reinstalls the skill from that branch with the same security audit and local-changes check as an update. If that branch has no such skill, the install stays as it was. In a project, a successful switch also records the branch in `.skillshare/config.yaml`, so teammates install from it. In the skill editor, **Add field** describes what each frontmatter field does. **Sync skills** / **Sync agents** previews, then syncs only that kind to every target; the same dialog opens from **Sync Now** after an update, an uninstall or a collect. The file browser lists `SKILL.md` and attachments through followed source links, including when the link itself is the skill root. |
| **Extras** | **Folders & files**: rules, commands, and other files synced alongside skills. **Edit target** changes a target's folder, file name, mode, flatten setting and [file filters](./extras.md#choosing-files) with a preview; **Edit extra** renames an extra or points it at another source folder. **AGENTS.md**: in global mode, shared `AGENTS.md` files and which targets use them; in a project, the project's `./AGENTS.md` and whether each target reads it. See [Share one AGENTS.md across your tools](../../how-to/daily-tasks/sharing-instructions.md). **Memory**: browse, search, preview, edit, and delete shared Markdown notes; add INDEX links, preserve drafts on conflicts, open Backup Files history, and connect agents through reviewed instruction-file changes. Configured status does not prove a read. See the [Memory walkthrough](../../how-to/daily-tasks/sharing-memory.md) |
| **MCP** | One row per server, with the Agents it syncs to as chips; the count button on the row opens their toggles. **Add server** takes a URL, a command, a pasted snippet or a file; **Import from a target** reads what an installed Agent already has. Each server's menu has **View what each Agent gets**, which lists the source and every Agent's file and shows the one you pick, including unsaved edits. Conflicts offer **Import from** the Agent or **Replace with source**. The server dialog's **Tools** section sets the [tool policy](./mcp.md#tool-policy): **Load tools**, which starts the server once with the dialog's settings, saved or not, and lists its tools to tick; an **Exclude rules** row for `*` patterns; it lists each selected Agent that does not apply part of the policy, and the row shows a tag when a policy is set. For a Pi server, the dialog also has [Pi's built-in MCP](./mcp.md#pi) settings: tool exposure and other Pi settings, which take [`piOptions`](./mcp.md#pi-options) as JSON, with their help in info tooltips. **Defaults** edits `mcp.targets`. **Sync MCP**, in the Sync box, lists the pending changes and writes only the MCP config files, keeping a backup of each; below it, [**Check**](./mcp.md#check-servers-before-an-agent-starts-them) checks the servers and **Backups and restore** previews and restores those backups. |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -90,7 +90,7 @@ skillshare ui start --clear-cache
| **Dashboard** | skills、agents、extras、MCP servers、hooks、plugins 和 targets 的计数,以及需要关注的项目。卸载有未提交更改、或读不到 git 状态的 tracked repo 时,会说明原因并再次确认,然后把 repo 原样移入回收站,等同 `uninstall --force` |
| **Sync** | 在写入之前,按 Target 预览每一处变更。选择要包含的部分(Skills、Agents、Extras、MCP)。在 Target 内部编辑过的文件会被保留,除非开启了 **Force**。只存在于某个 Target 中的项目可以从这里收集回 Source。每次 sync 会先备份 Target 目录。某个 Target 失败时,其他 Target 仍会 sync:页面会在其他警告上方列出每个失败的 Target 及其部分(Skills、Agents、Extras 或 Config)和错误,常见原因(symlink 指向别处、权限不足、只读文件系统、文件或文件夹不存在、Target 设置无效)还会附上一句易懂的说明;若 Skills 的 symlink 指向别处,会提供 **开启 Force**;变更列表中也会标出该 Target。即使所有 Target 都失败,也会以同样方式列出。**上次同步** 卡片会列出最近一次 sync 中失败的 Target。收到相同变更的 Target 会合并成一张卡片,按文件夹列出 skills。**Discard all** 会在确认后,把还没有任何 Target 收到的 skills 移到回收站。当某个 Target 的 `include` 过滤条件没有匹配任何 skill 时,会显示提示说明该 Target 收不到任何 skill,**Edit filter** 会打开设置该过滤条件的地方;Git Sync 在 pull 之后也会显示同样的提示 |
| **Git Sync** | 提交并推送 source 仓库,推送尚未上 remote 的提交,并拉取。打开页面时会先从 remote fetch,所以 **Pull** 会显示 remote 有多少个新提交。Pull 会同步该仓库 scope 所涵盖的内容(`skills`、`agents`、`extras` 或 `root`),与 [`pull`](/docs/reference/commands/pull) 相同。**Sync both ways** 会提交本地更改、拉取并合并、同步 targets,然后推送,与 [`push --pull`](/docs/reference/commands/push#push-and-pull-together) 相同;遇到冲突时会在推送前停止。当 remote 因为有更新的提交而拒绝 push 时,错误提示会提供 **Pull**。当首次 pull 无法与 remote 合并时,它会提供一个强制 pull 选项,用 remote 分支替换本地文件 |
| **Hubs** | 从 Skill 页面进入。列出内置 hub、已保存的 hubs 与你自己的 Hub(**我的**);选择一个即可过滤并安装其中的 skills。**添加或创建 Hub** 可添加已有的 hub、创建新的 Hub,或导入 `skillshare-hub.json`。自己的 Hub 通过 **编辑** 修改;**分享** 会下载索引并生成 `hub add` 命令。参见 [`hub`](/docs/reference/commands/hub) |
| **Hubs** | 从 Skill 页面进入。列出内置 hub、已保存的 hubs 与你自己的 Hub(**我的**);选择一个即可过滤并安装其中的 skills。**添加或创建 Hub** 可添加已有的 hub、创建新的 Hub,或导入 `skillshare-hub.json`。自己的 Hub 通过 **编辑** 修改;**分享** 会下载索引并生成 `hub add` 命令。已保存与内置的 hub 可点 **刷新**,不必等两分钟缓存过期就重新读取列表。参见 [`hub`](/docs/reference/commands/hub) |
| **Skills** / **Agents** | 已安装的项目、**Updates** 标签页,以及 **Trash** 标签页。Skills 还有一个 **Analyze** 标签页,估算每个 skill 为某个 target 的上下文增加了多少 token。**Install** 可从 GitHub 搜索,或从 URL 或路径安装。菜单里还有打开创建向导的 **New skill** 和 **Link folder**。config 中有尚未安装的条目时,**Updates** 标签页和安装对话框会提供 **Install all**,效果同不带参数的 [`install`](/docs/reference/commands/install)。执行检查后,已从来源 repo 删除的 skills 会列出并提供 **Prune** 和 **Prune all**,把它们移到回收站。**Link folder** 与 [`link`](/docs/reference/commands/link) 一样把文件夹链接到 skills Source:填写路径、可选的链接名,`follow_source_links` 关闭时还有一个开启它的复选框;被拒绝的文件夹会显示与命令相同的原因。链接的文件夹会以独立分组列出,带有链接图标和它指向的文件夹;该行的图标按钮(悬停时链接图标变为取消链接图标)会先确认,再像 [`unlink`](/docs/reference/commands/unlink) 一样取消链接:文件夹本身不受影响,链接可以从 **Trash** 标签页恢复。链接文件夹里的 skill 仍可单独卸载,它会从该文件夹移到 trash;链接的文件夹没有 **Update repo** 和 **Uninstall repo**。列表和卡片视图可以按 **Folder**(tracked repo、`frontend/react` 这类文件夹,或 **Root**)过滤,也可以按 **Folder** 分组,Root 排在最前,其余文件夹按名称 A→Z 排序。列表视图中,位于另一个 skill 文件夹里的 skill 会列在那个 skill 下方:点 package 名称后面的数量按钮,会在下方展开它的 skill,并用淡淡的树状线连到 package(package 默认折叠),更深的 package 再往内缩进。搜索时会展开含有匹配项的 package,显示 `1 / 3` 这样的数量,并标出名称里匹配的文字;搜索中收起的 package 在搜索改变后会重新展开,搜索前展开的 package 保持不变。分页只计算顶层的行。每一行以一行显示 frontmatter 里的 `description`,该行获得键盘焦点时显示全文;可在 **分组与排序** → **显示** → **描述** 隐藏。**全部展开** / **全部折叠**也会展开和折叠 package,选择栏会显示已选但未显示的项目数。只有点名称才会打开详情页。卸载 package 时,它文件夹里的 skill 也会一起移到 trash,确认对话框会显示数量。**tree** 视图左侧显示 source 文件夹,右侧显示详情:点击文件夹或 skill 进行选择,Cmd/Ctrl 点击加入选择,Shift 点击选择范围,双击 skill 打开它。右侧可以用一个开关启用或停用所有选中的项目(被 `.skillignore.local` 的 `!` 规则保持启用的项目会报告为失败并附上原因)、设置它们的 targets(包括 tracked repo 及其子文件夹),并列出每个 skill 各自的开关;tracked repo 还提供 **Update repo** 和 **Uninstall repo**。带有 `disable-model-invocation: true` 的 skill 会在列表、卡片和详情页上带有 **manual only** 标签,这与 [`list`](/docs/reference/commands/list) 用 `m` 切换的状态相同。从远程默认分支以外的分支安装的 skill(`install --branch`)会在列表、卡片和 **Updates** 标签页上以标签显示该分支。从远程来源安装的 skill(tracked repo 除外,它在 **Git Sync** 切换分支)在详情页的 **Branch** 中列出来源的分支,适用于任何主机上的 Git 远程(HTTPS 或 SSH)。选择分支后会先确认,再经过与 update 相同的安全审计和本地修改检查,从该分支重新安装。如果该分支没有这个 skill,会保留当前的安装。在项目中,切换成功后也会把分支记录到 `.skillshare/config.yaml`,让团队成员从该分支安装。在 skill 编辑器中,**Add field** 会描述每个 frontmatter 字段的作用。**Sync skills** / **Sync agents** 会先预览,然后只将该类型 sync 到每个 target;在更新、卸载或 collect 之后,点击 **Sync Now** 也会打开同一个对话框。文件浏览器会通过被跟随的 source 链接列出 `SKILL.md` 和附件,包括链接本身就是 skill 根目录的情况。 |
| **Extras** | **文件夹**:与 skills 一起同步的 rules、commands 和其他目录。**Edit target** 可修改 Target 的文件夹、文件名、模式、flatten 设置和[文件过滤](./extras.md#choosing-files),并实时预览;**Edit extra** 可重命名 extra,或改为指向另一个来源文件夹。**AGENTS.md**:在 global mode 下是共享 `AGENTS.md` 以及哪些 target 在使用它们;在项目中是项目的 `./AGENTS.md` 以及每个 target 是否会读取它。参见[让多个工具共用一份 AGENTS.md](../../how-to/daily-tasks/sharing-instructions.md) **Memory**: [记忆共享教程](../../how-to/daily-tasks/sharing-memory.md)(英文截图)。搜索、预览、编辑、删除笔记、INDEX 链接、冲突时保留草稿、Backup Files 历史与恢复,以及 **Connect to agents** → **Review changes** → **Apply changes**;配置状态不代表已读取 |
| **MCP** | 每个 server 一行,并以 chip 显示它同步到的 Agents;行上的计数按钮会打开它们的开关。**添加服务器** 接受 URL、命令、粘贴的片段或文件;**从目标导入** 会读取某个已安装 Agent 现有的配置。每个 server 的菜单都有 **查看各 Agent 会写入的配置**,会列出来源和每个 Agent 的文件,并显示你选中的那一个,包括尚未保存的编辑。冲突会提供 **从该 Agent 导入** 或 **使用来源覆盖**。server 对话框的 **工具** 区块用于设置[工具策略](./mcp.md#tool-policy):**加载工具**,它会用对话框当前的设置(无论是否已保存)启动 server 一次并列出工具供勾选;用于 `*` 通配符的 **排除规则** 行;该区块会列出每个未应用部分策略的所选 Agent,设置了策略时该行会显示一个标签。对于 Pi server,对话框还提供 [Pi 内置 MCP](./mcp.md#pi) 的设置:工具暴露方式和其他 Pi 设置,后者以 JSON 形式填写 [`piOptions`](./mcp.md#pi-options),说明位于信息提示中。**默认值** 用于编辑 `mcp.targets`。Sync 框中的 **Sync MCP** 会列出待写入的更改,并只写入 MCP 配置文件,同时为每个文件保留一份备份;其下方的 [**检查**](./mcp.md#check-servers-before-an-agent-starts-them) 用于检查 server,**备份与还原** 用于预览并恢复这些备份。 |
@@ -90,7 +90,7 @@ skillshare ui start --clear-cache
| **Dashboard** | Skills、agents、extras、MCP servers、hooks、plugins 與 targets 的數量,以及需要注意的項目。解除安裝有未提交變更、或讀不到 git 狀態的 tracked repo 時,會說明原因並再次確認,然後把 repo 原樣移到垃圾桶,等同 `uninstall --force` |
| **Sync** | 在寫入前預覽每個 target 的每項變更。選擇要包含的部分(Skills、Agents、Extras、MCP)。在 target 內編輯過的檔案,除非開啟 **Force**,否則會保留。只存在於 target 中的項目可以從這裡收集回 source。每次同步都會先備份 target 資料夾。某個 target 失敗時,其他 target 仍會同步:頁面會在其他警告上方列出每個失敗的 target,以及它的部分(Skills、Agents、Extras 或 Config)和錯誤,常見原因(symlink 指向別處、權限不足、唯讀檔案系統、檔案或資料夾不存在、target 設定無效)還會附上一句易懂的說明;若 Skills 的 symlink 指向別處,會提供 **開啟 Force**;變更清單中也會標出該 target。即使所有 target 都失敗,也會以同樣方式列出。**上次同步** 卡片會列出最近一次同步中失敗的 target。收到相同變更的 targets 會合併成一張卡片,依資料夾列出 skills。**Discard all** 會在確認後,把還沒有任何 target 收到的 skills 移到垃圾桶。當某個 target 的 `include` 篩選條件沒有符合任何 skill 時,會顯示提示說明這個 target 收不到任何 skill,**Edit filter** 會開啟設定該篩選條件的地方;Git Sync 在 pull 之後也會顯示同樣的提示 |
| **Git Sync** | Commit 並 push source repo、push 尚未在 remote 上的 commits,以及 pull。開啟頁面時會先從 remote fetch,所以 **Pull** 按鈕會顯示 remote 有幾個新的 commits。Pull 會同步 repo scope 所涵蓋的內容(`skills`、`agents`、`extras` 或 `root`),如同 [`pull`](/docs/reference/commands/pull)。**Sync both ways** 會 commit 本機變更、pull 並合併、sync targets,然後 push,如同 [`push --pull`](/docs/reference/commands/push#push-and-pull-together);遇到衝突時會在 push 前停止。當 remote 因為有較新的 commits 而拒絕 push 時,錯誤訊息會提供 **Pull**。當第一次 pull 無法與 remote 合併時,會提供強制 pull 以本機檔案取代 remote 分支 |
| **Hubs** | 從 Skills 頁面進入。列出內建 hub、已儲存的 hubs 與你自己的 Hub(**我的**);選擇一個即可篩選並安裝其中的 skills。**加入或建立 Hub** 可加入現有的 hub、建立新的 Hub,或匯入 `skillshare-hub.json`。自己的 Hub 以 **編輯** 修改;**分享** 會下載索引並產生 `hub add` 指令。參見 [`hub`](/docs/reference/commands/hub) |
| **Hubs** | 從 Skills 頁面進入。列出內建 hub、已儲存的 hubs 與你自己的 Hub(**我的**);選擇一個即可篩選並安裝其中的 skills。**加入或建立 Hub** 可加入現有的 hub、建立新的 Hub,或匯入 `skillshare-hub.json`。自己的 Hub 以 **編輯** 修改;**分享** 會下載索引並產生 `hub add` 指令。已儲存與內建的 hub 可按 **重新整理**,不必等兩分鐘快取過期就重新讀取清單。參見 [`hub`](/docs/reference/commands/hub) |
| **Skills** / **Agents** | 已安裝的項目、**Updates** 分頁與 **Trash** 分頁。Skills 還有一個 **Analyze** 分頁,用來估算每個 skill 為 target 的 context 增加多少 tokens。**Install** 可搜尋 GitHub,或從 URL 或路徑安裝。選單裡也有開啟建立精靈的 **New skill** 和 **Link folder**。config 裡有尚未安裝的項目時,**Updates** 分頁和安裝對話框會提供 **Install all**,效果同不帶參數的 [`install`](/docs/reference/commands/install)。執行檢查後,已從來源 repo 刪除的 skills 會列出並提供 **Prune** 與 **Prune all**,把它們移到垃圾桶。**Link folder** 與 [`link`](/docs/reference/commands/link) 一樣把資料夾連結進 skills source:填入路徑、選填的連結名稱,`follow_source_links` 關閉時另有一個開啟它的核取方塊;被拒絕的資料夾會顯示與指令相同的原因。連結的資料夾會以獨立群組列出,帶有連結圖示與它指向的資料夾;該列的圖示按鈕(hover 時連結圖示會變成取消連結圖示)會先確認,再像 [`unlink`](/docs/reference/commands/unlink) 一樣取消連結:資料夾本身不受影響,連結可從 **Trash** 分頁還原。連結資料夾裡的 skill 仍可單獨解除安裝,它會從該資料夾移到 trash;連結的資料夾沒有 **Update repo** 與 **Uninstall repo**。列表與卡片檢視可依 **Folder**(tracked repo、`frontend/react` 這類資料夾,或 **Root**)篩選,也能依 **Folder** 分組,Root 排最前,其餘資料夾依名稱 A→Z 排序。列表檢視中,位在另一個 skill 資料夾裡的 skill 會列在那個 skill 底下:點 package 名稱後面的數量按鈕,會在下方展開它的 skill,並用淡淡的樹狀線連到 package(package 預設收合),更深的 package 再往內縮排。搜尋時會展開含有符合項目的 package,顯示 `1 / 3` 這樣的數量,並標出名稱裡符合的文字;搜尋中收合的 package 在搜尋改變後會重新展開,搜尋前展開的 package 維持不變。分頁只計算最上層的列。每一列以一行顯示 frontmatter 裡的 `description`,該列取得鍵盤焦點時顯示全文;可在 **分組與排序** → **顯示** → **描述** 隱藏。**全部展開** / **全部收合**也會展開和收合 package,選取列會顯示已選取但沒有顯示的項目數。只有點名稱才會開啟詳細頁面。解除安裝 package 時,它資料夾裡的 skill 也會一起移到 trash,確認對話框會顯示數量。**tree** 檢視左邊顯示 source 資料夾,右邊顯示詳細資訊:點資料夾或 skill 來選取,Cmd/Ctrl 點擊加入選取,Shift 點擊選取範圍,雙擊 skill 開啟它。右邊可用一個開關啟用或停用所有選取的項目(被 `.skillignore.local` 的 `!` 規則保持啟用的項目會回報為失敗並附上原因)、設定它們的 targets(包括 tracked repo 與其子資料夾),並列出每個 skill 各自的開關;tracked repo 另外提供 **Update repo** 與 **Uninstall repo**。帶有 `disable-model-invocation: true` 的 skill 會在列表、其磚塊(tile)與詳細頁面上帶有 **manual only** 標籤,這與 [`list`](/docs/reference/commands/list) 中用 `m` 切換的狀態相同。從遠端預設分支以外的分支安裝的 skill(`install --branch`)會在列表、卡片和 **Updates** 分頁上以標籤顯示該分支。從遠端來源安裝的 skill(tracked repo 除外,它在 **Git Sync** 切換分支)在詳細頁面的 **Branch** 中列出來源的分支,適用於任何主機上的 Git 遠端(HTTPS 或 SSH)。選擇分支後會先確認,再經過與 update 相同的安全稽核和本機修改檢查,從該分支重新安裝。如果該分支沒有這個 skill,會保留目前的安裝。在專案中,切換成功後也會把分支記錄到 `.skillshare/config.yaml`,讓團隊成員從該分支安裝。在 skill 編輯器中,**Add field** 說明每個 frontmatter 欄位的作用。**Sync skills** / **Sync agents** 會先預覽,再只把該類型同步到所有 targets;更新、解除安裝或 collect 之後,從 **Sync Now** 也會開啟同一個對話框。檔案瀏覽器會透過被跟隨的 source 連結列出 `SKILL.md` 與附件,包含連結本身就是 skill 根目錄的情況。 |
| **Extras** | **目錄**:與 skills 一同同步的 rules、commands 及其他資料夾。**Edit target** 可修改 target 的資料夾、檔名、模式、flatten 設定與[檔案篩選](./extras.md#choosing-files),並即時預覽;**Edit extra** 可重新命名 extra,或改指向另一個來源資料夾。**AGENTS.md**:在 global mode 中是共用 `AGENTS.md` 與使用它們的 targets;在專案中則是專案的 `./AGENTS.md`,以及每個 target 是否讀得到它。詳見[讓多個工具共用一份 AGENTS.md](../../how-to/daily-tasks/sharing-instructions.md) **Memory**: [記憶共用教學](../../how-to/daily-tasks/sharing-memory.md)(英文截圖)。搜尋、預覽、編輯、刪除筆記、INDEX 連結、衝突時保留草稿、Backup Files 歷史與還原,以及 **Connect to agents** → **Review changes** → **Apply changes**;設定狀態不代表已讀取 |
| **MCP** | 每個 server 一列,並以 chips 顯示它同步至哪些 Agents;列上的計數按鈕會開啟它們的切換開關。**新增伺服器** 接受 URL、指令、貼上的片段或檔案;**從目標匯入** 讀取已安裝 Agent 目前的設定。每個 server 的選單都有 **檢視各 Agent 會寫入的設定**,會列出來源與每個 Agent 的檔案,並顯示你選取的那一個(含尚未儲存的編輯內容)。衝突時提供 **從該 Agent 匯入** 或 **以來源覆寫**。server 對話框的 **工具** 區塊用來設定[工具政策](./mcp.md#tool-policy):**載入工具**,它會用對話框目前的設定(不論是否已儲存)啟動 server 一次並列出工具供勾選;用於 `*` 萬用字元的 **排除規則** 列;區塊會列出每個不套用部分政策的已選 Agent,設定政策後該列也會顯示標籤。對於 Pi server,對話框另有 [Pi 內建 MCP](./mcp.md#pi) 的設定:工具曝光模式與其他 Pi 設定,後者以 JSON 填入 [`piOptions`](./mcp.md#pi-options),說明則放在資訊提示中。**預設值** 用來編輯 `mcp.targets`。Sync 框中的 **Sync MCP** 會列出待寫入的變更,只寫入 MCP 設定檔,並為每個檔案保留備份;它下方的 [**檢查**](./mcp.md#check-servers-before-an-agent-starts-them) 會檢查 servers,**備份與還原** 則可預覽並還原這些備份。 |