ntn-skills 2.0.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/INSTALL.md CHANGED
@@ -33,9 +33,9 @@ ls -la ~/.config/ntn-skills/credentials.env ~/.config/ntn-skills/config.json 2>/
33
33
  Run the idempotent installer (add `--with-pi` if the user uses Pi; add `--install-bun` if Bun is missing and the user agrees):
34
34
 
35
35
  ```bash
36
- curl -fsSL https://raw.githubusercontent.com/yoyooyooo/ntn-skills/main/scripts/install.sh | bash -s -- </dev/null
36
+ curl -fsSL https://raw.githubusercontent.com/yoyooyooo/ntn-skills/main/scripts/install.sh | bash
37
37
  # For Pi users (enables $skill inline loading + skill_find / skill_load tools):
38
- # curl -fsSL https://raw.githubusercontent.com/yoyooyooo/ntn-skills/main/scripts/install.sh | bash -s -- --with-pi </dev/null
38
+ # curl -fsSL https://raw.githubusercontent.com/yoyooyooo/ntn-skills/main/scripts/install.sh | bash -s -- --with-pi
39
39
  ```
40
40
 
41
41
  Ensure `~/.local/bin` is on `PATH` (or invoke `~/.local/bin/ntn-skills` explicitly) and confirm:
@@ -75,7 +75,13 @@ Once `credentials.env` is in place and the user provides `<NOTION_PAGE_URL>`, ru
75
75
 
76
76
  - **Default setup** (exports to `~/.agents/skills` with `prefetch: discoverable`):
77
77
  ```bash
78
+ # New/small library (creates or binds 3 tables + runs initial sync):
78
79
  ntn-skills init --root "<NOTION_PAGE_URL>" --json </dev/null
80
+
81
+ # Existing large library (100+ skills or external Git sources):
82
+ # Bind config immediately (<2s), then run initial cold-start sync with a generous timeout (>=600s or background job):
83
+ # ntn-skills init --root "<NOTION_PAGE_URL>" --no-create --no-sync --json </dev/null
84
+ # ntn-skills sync --json </dev/null
79
85
  ```
80
86
  - **Custom or multi-surface export directories** (e.g., Grok Box `${HOME}/agent-data/workflows` using `copy` mode alongside `~/.agents/skills` using `symlink`, or `~/.claude/skills`):
81
87
  ```bash
package/README.md CHANGED
@@ -6,6 +6,7 @@
6
6
  <p align="center">
7
7
  <a href="#quick-start">Quick Start</a> ·
8
8
  <a href="#how-it-works">How It Works</a> ·
9
+ <a href="#how-it-compares">How It Compares</a> ·
9
10
  <a href="#cli-reference">CLI Reference</a> ·
10
11
  <a href="#security-privacy--data-boundaries">Security</a> ·
11
12
  <a href="./INSTALL.md">Agent Setup (<code>INSTALL.md</code>)</a> ·
@@ -179,6 +180,21 @@ ntn-skills info <name> [--json]
179
180
  ntn-skills load <name> [--refresh] [--path-only]
180
181
  ```
181
182
 
183
+ ### Targeted & Declarative Exports
184
+ ```bash
185
+ # Reconcile all configured exports (including config.json `include_exports`)
186
+ ntn-skills export [--json]
187
+
188
+ # Project an exact allowlist (name or slug; includes manual skills, auto-closes Requires, omits skill-catalog by default)
189
+ ntn-skills export --to <dir> --skills skill-a,skill-b [--exclude noisy-dep] [--with-requires | --no-requires] [--no-router] [--mode symlink|copy] [--json]
190
+
191
+ # Batch-project from a standalone JSON spec (`{ bundles?, exports }`, `ExportTarget[]`, or single `ExportTarget`)
192
+ # Relative target `dir` paths resolve against the spec file's directory; `copy` mode safely coexists with unmanaged folders
193
+ ntn-skills export --spec ./exports.spec.json [--json]
194
+ ```
195
+
196
+ In `~/.config/ntn-skills/config.json`, you can also declare reusable top-level `bundles` (`Record<string, string[]>`) and external manifest files via `include_exports` (`string[]`, supporting `~` and `${HOME}`). Each export target supports `skills`, `bundles`, `exclude`, and `include_requires` alongside `profiles`, `scenes`, `router`, and `mode`.
197
+
182
198
  ### Editing, Batch Metadata, Drafts & Overlay Tuning
183
199
  ```bash
184
200
  # Safe isolated edit workflow (never mutates read-only store/)
@@ -219,6 +235,36 @@ ntn-skills schedule export --target dagu|github-actions|crontab
219
235
 
220
236
  ---
221
237
 
238
+ ## Built-in Read-Only MCP Server (`ntn-skills mcp`)
239
+
240
+ Any MCP-compatible agent host (such as Antigravity `agy`, Claude Code, Cursor, or Windsurf) can discover and load skills on demand over standard `stdio` JSON-RPC 2.0 without duplicating `skill-catalog` prompts:
241
+
242
+ ```bash
243
+ ntn-skills mcp [--library <uuid>] [--scenes ops,coding] [--instructions "<text>"]
244
+ ```
245
+
246
+ Exposes two read-only tools (`readOnlyHint: true`):
247
+ - **`skill_find`**: Empty call returns a compact per-scene discoverable count overview; keyword/scene queries return ranked, truncated matches.
248
+ - **`skill_load`**: Materializes and returns a matched skill (by canonical name or slug) along with its local directory and `Requires` paths.
249
+
250
+ Example `mcp_config.json` (with `eager: true` for hosts such as `agy` that support eager tool loading):
251
+
252
+ ```json
253
+ {
254
+ "mcpServers": {
255
+ "ntn-skills": {
256
+ "command": "ntn-skills",
257
+ "args": ["mcp"],
258
+ "eager": true
259
+ }
260
+ }
261
+ }
262
+ ```
263
+
264
+ Use `"args": ["mcp", "--scenes", "ops,coding"]` to scope a host or profile to specific scenes.
265
+
266
+ ---
267
+
222
268
  ## Pi Extension
223
269
 
224
270
  Install with `--with-pi` (or link `packages/pi-extension` into `~/.pi/agent/extensions/ntn-skills`) to unlock:
@@ -227,6 +273,48 @@ Install with `--with-pi` (or link `packages/pi-extension` into `~/.pi/agent/exte
227
273
 
228
274
  ---
229
275
 
276
+ ## How It Compares
277
+
278
+ Different setups manage Agent Skills at different scales and along different layers of the stack. Rather than competing with local dotfiles or multi-agent control planes, `ntn-skills` focuses specifically on the **large-scale skill knowledge, upstream tracking, and tiered local distribution layer**.
279
+
280
+ Three common paradigms:
281
+
282
+ 1. **Plain local / Git symlinks** (e.g. dotfiles, `skills.sh`, manual symlinks): Fastest to start, zero external dependencies, and full Git/editor transparency.
283
+ 2. **Multi-agent control planes / gateways** (e.g. [Magpie](https://usemagpie.ai)): All-in-one control planes for model routing/fallbacks, local gateways and budgets, shared MCP servers (including an MCP router), global instructions, and local skill distribution/routing (`magpie-skills`) — offline-first, zero external SaaS required, out-of-the-box setup (with optional end-to-end encrypted WebDAV, S3, or GitHub sync).
284
+ 3. **`ntn-skills`**: A Notion 3-table skill control plane (`Sources`, `Skills`, `Files`) paired with upstream Git tracking and non-destructive overlay hot-patching, 3-tier visibility (`always` / `discoverable` / `manual`) over zero-hash `by-name/` links, exact allowlist / `Requires` dependency-closed multi-target exports, and on-demand local materialization via the Pi extension or `ntn-skills mcp`.
285
+
286
+ | Dimension | Plain local / Git symlinks | Multi-agent control planes (e.g. [Magpie](https://usemagpie.ai)) | `ntn-skills` |
287
+ | :--- | :--- | :--- | :--- |
288
+ | **Source of truth & authoring UX** | Local folders and Git commits; full editor/PR control, manual cross-machine sync | Local library folder + config (`library.json`), desktop/TUI/web UI and CLI; optional encrypted WebDAV/S3/GitHub sync | Notion 3-table database + Git upstreams; visual web/mobile metadata & draft editing, pulled one-way into immutable local snapshots (`0444/0555`) |
289
+ | **Scale & multi-view governance** | Transparent for a flat list; lacks structured filtering, usage visibility, or lifecycle states at scale | Per-agent toggles, per-machine `off-here`, per-project assignment, and optional single-skill router (`routed` / `direct`); filesystem-centric rather than relational views | Built for 50–1,000+ skills; filter and group in Notion by `Scenes`, `Profiles`, `Visibility`, `Kind`, `Origin`, and `Status`, backed by local 30-day `Hot Loads`, `Overlays`, and `Draft Buffer` reports |
290
+ | **Upstream tracking & hot-patching** | Git submodules, forks, or re-running installers; customizing upstream skills usually requires maintaining forks | Built-in GitHub/git skill updates and optional `auto-update`; locally edited skills are preserved (skipped unless overwritten with `--replace-edits`) rather than overlay-merged | Multi-skill repo tracking (`track` / `pinned` / `manual`) with subtree-hash pruning; non-destructive Notion overlays (`Custom Main` + `Files` diffs) merged over upstream Git, one-command `reset-overlay`, and clean graduation back to Git |
291
+ | **Context budget & multi-target slicing** | Linked skills sit at the top level unless split manually; dependency closure and per-runtime slicing are DIY | Per-agent & per-project assignment (`link` / `copy`) plus `magpie-skills` router (`routed` / `direct`) to keep prompts compact | 3-tier visibility, zero-hash `by-name/` symlinks with compact `skill-catalog`, declarative multi-directory slicing (`--skills`, `bundles`, `--spec`, `symlink` / `copy`) with automatic `Requires` closure, plus `ntn-skills mcp` and Pi `$skill` on-demand loading |
292
+ | **External dependencies & best fit** | Filesystem + Git only; ideal for `< 20` stable skills or single-repo teams | Offline-first, zero SaaS dependency, out-of-the-box; ideal when you want one tool for models, routing, MCPs, global instructions, and a lightweight-to-moderate skill library | **Trade-off**: requires a Notion account/token and periodic sync; heavier than needed for `< 20` skills. Best for curating 50–1,000+ skills across multiple upstreams, machines, and hosts with zero consumer-time network calls |
293
+
294
+ ### Honest Trade-Offs
295
+
296
+ - **Requires Notion & periodic sync**: `ntn-skills` relies on a Notion Integration token for its control plane, and web edits propagate on the next background sync (or manual `ntn-skills sync`) rather than instantaneously offline.
297
+ - **Heavier than needed below ~20 skills**: If you only maintain a small set of stable skills, plain local/Git symlinks or a control plane like Magpie is lighter and simpler to operate.
298
+ - **Single-responsibility by design**: `ntn-skills` intentionally leaves model routing, API gateways, shared global instructions, and general MCP proxying to dedicated control planes.
299
+
300
+ ### Recommended Combination
301
+
302
+ `ntn-skills` and multi-agent control planes such as [Magpie](https://usemagpie.ai) complement each other cleanly at different layers:
303
+
304
+ - **Use Magpie for the runtime & gateway layer**: model subscriptions and API keys, routing groups and fallbacks, local gateway budgets, shared global instructions, and distributing MCP servers to every local agent.
305
+ - **Use `ntn-skills` for the large-scale skill knowledge layer**: visual Notion evolution across hundreds to thousands of skills, upstream Git tracking with reversible overlays, and tiered local materialization (`~/.agents/skills`, `:copy` sandboxes, and allowlist/`Requires` slices).
306
+ - **Wiring them together**: register `ntn-skills mcp` in Magpie with `--local` (kept to this machine so cross-machine sync never overwrites machine-local paths) and, if Magpie's MCP Router is enabled, mark it `direct` so each agent connects directly to the local stdio server — while `ntn-skills export` remains the single writer for skill directories:
307
+
308
+ ```bash
309
+ # Distribute `ntn-skills mcp` locally via Magpie (never synced to other machines)
310
+ magpie library mcp add ntn-skills ntn-skills mcp agents=claude,codex --local
311
+
312
+ # If Magpie MCP Router is enabled, keep `ntn-skills` as a direct per-agent stdio entry
313
+ magpie library mcp router ntn-skills direct
314
+ ```
315
+
316
+ ---
317
+
230
318
  ## Security, Privacy & Data Boundaries
231
319
 
232
320
  - **Zero Consumer-Time Network Access**: Everyday skill consumption reads immutable local files (`0444/0555`) under `$XDG_DATA_HOME/ntn-skills/store/` (default `~/.local/share/ntn-skills/store/`). Network requests to `api.notion.com` and your configured Git remotes happen only during explicit CLI invocations or scheduled sync jobs.
package/README.zh-CN.md CHANGED
@@ -6,6 +6,7 @@
6
6
  <p align="center">
7
7
  <a href="#快速开始">快速开始</a> ·
8
8
  <a href="#双视角工作流">双视角工作流</a> ·
9
+ <a href="#生态位与方案对比">生态位与方案对比</a> ·
9
10
  <a href="#命令速查">命令速查</a> ·
10
11
  <a href="#安全与数据边界">安全与数据边界</a> ·
11
12
  <a href="./INSTALL.md">Agent 安装协议 (<code>INSTALL.md</code>)</a> ·
@@ -180,6 +181,21 @@ ntn-skills info <name> [--json]
180
181
  ntn-skills load <name> [--refresh] [--path-only]
181
182
  ```
182
183
 
184
+ ### 精确白名单与声明式投影导出
185
+ ```bash
186
+ # 对账同步配置中的全部导出目标(包含 config.json 的 `include_exports`)
187
+ ntn-skills export [--json]
188
+
189
+ # 按精确技能白名单投影(支持正本名或 slug,可选中 manual 技能并自动按需物化,默认展开 Requires 闭包且不生成 skill-catalog)
190
+ ntn-skills export --to <dir> --skills skill-a,skill-b [--exclude noisy-dep] [--with-requires | --no-requires] [--no-router] [--mode symlink|copy] [--json]
191
+
192
+ # 按独立 JSON 声明文件批量投影(支持 `{ bundles?, exports }`、`ExportTarget[]` 或单个 `ExportTarget`)
193
+ # spec 文件中的相对 `dir` 相对该 spec 文件所在目录解析;`copy` 模式仅接管含 `.ntn-managed-copy.json` 的目录,与原有非受管目录安全共存
194
+ ntn-skills export --spec ./exports.spec.json [--json]
195
+ ```
196
+
197
+ 在 `~/.config/ntn-skills/config.json` 中还可声明顶层复用的 `bundles`(`Record<string, string[]>`)以及外部清单文件 `include_exports`(`string[]`,支持 `~` 与 `${HOME}` 展开)。每个导出目标均可配置 `skills`、`bundles`、`exclude` 与 `include_requires`,与既有 `profiles`、`scenes`、`router`、`mode` 完全兼容。
198
+
183
199
  ### 草稿创建、批量元数据、Overlay 调优与入仓毕业
184
200
  ```bash
185
201
  # 隔离工作区编辑闭环(严禁直接修改只读 store/)
@@ -220,6 +236,36 @@ ntn-skills schedule export --target dagu|github-actions|crontab
220
236
 
221
237
  ---
222
238
 
239
+ ## 内置只读 MCP Server(`ntn-skills mcp`)
240
+
241
+ 任意支持标准 `stdio` JSON-RPC 2.0 MCP 的 Agent 宿主(如 Antigravity `agy`、Claude Code、Cursor、Windsurf 等)均可直接按需检索与加载本地技能库:
242
+
243
+ ```bash
244
+ ntn-skills mcp [--library <uuid>] [--scenes ops,coding] [--instructions "<text>"]
245
+ ```
246
+
247
+ 仅暴露 2 个只读工具(`readOnlyHint: true`):
248
+ - **`skill_find`**:空调用返回各场景 `discoverable` 数量概览防止刷屏;关键词/场景查询返回按相关性打分且截断的紧凑列表。
249
+ - **`skill_load`**:按技能正本名或连字符 slug 按需物化并返回完整 `SKILL.md` 正文、本地目录及 `Requires` 依赖路径。
250
+
251
+ 通用 `mcp_config.json` 配置示例(`agy` 等支持即时加载的宿主可加 `"eager": true`):
252
+
253
+ ```json
254
+ {
255
+ "mcpServers": {
256
+ "ntn-skills": {
257
+ "command": "ntn-skills",
258
+ "args": ["mcp"],
259
+ "eager": true
260
+ }
261
+ }
262
+ }
263
+ ```
264
+
265
+ 如需限定某宿主仅可见特定场景,可将 `args` 设为 `["mcp", "--scenes", "ops,coding"]`。
266
+
267
+ ---
268
+
223
269
  ## Pi 扩展
224
270
 
225
271
  安装时追加 `--with-pi`(或将 `packages/pi-extension` 软链至 `~/.pi/agent/extensions/ntn-skills`),即可在 Pi 中获得:
@@ -228,6 +274,48 @@ ntn-skills schedule export --target dagu|github-actions|crontab
228
274
 
229
275
  ---
230
276
 
277
+ ## 生态位与方案对比
278
+
279
+ 不同规模的技能库与不同层级的 Agent 基础设施,适合不同的管理范式。`ntn-skills` 并不试图取代本地软链或多 Agent 控制面,而是专注解决**大规模 Skill 资产的可视化治理、上游演进与分层物化**。
280
+
281
+ 常见的三类方案各有清晰定位:
282
+
283
+ 1. **纯本地 / Git 软链**(dotfiles、`skills.sh`、手工软链):启动最快、零外部依赖,所有变更完全透明地留在本地文件与 Git 历史中。
284
+ 2. **多 Agent 控制面 / 网关**(如 [Magpie](https://usemagpie.ai)):一体化管理多 Agent 模型路由与回退、本地 Gateway 与配额预算、共享 MCP 服务器(含 MCP Router)、全局指令以及本地 Skill 分发与路由(`magpie-skills`);离线优先、零外部知识库服务依赖、开箱即用,并支持可选的端到端加密 WebDAV / S3 / GitHub 跨机同步。
285
+ 3. **`ntn-skills`**:以 Notion 3 表(`Sources`、`Skills`、`Files`)作为可视化知识中台,结合上游 Git 追踪与非破坏性 Overlay 热补丁、三层可见性(`always` / `discoverable` / `manual`)与零哈希 `by-name/` 稳定目录、精确白名单与 `Requires` 依赖自动闭合的多目录切片导出,以及 Pi 扩展与内置 `ntn-skills mcp` 按需物化。
286
+
287
+ | 对比维度 | 纯本地 / Git 软链 | 多 Agent 控制面(如 [Magpie](https://usemagpie.ai)) | `ntn-skills` |
288
+ | :--- | :--- | :--- | :--- |
289
+ | **真相源与编辑体验** | 本地目录与 Git 提交;完全受控于编辑器与 PR,但跨机同步需自行维护 | 本地 Library 目录与配置(`library.json`),支持桌面 / TUI / Web 与 CLI 管理,以及可选的加密 WebDAV / S3 / GitHub 同步 | Notion 3 表数据库 + Git 上游源;支持网页与手机端随时编辑元数据与草稿,单向同步至本机不可变快照(`0444/0555`) |
290
+ | **规模与多视图治理** | 扁平清单直观透明;规模扩大后缺少结构化筛选、使用热度与生命周期视图 | 支持按 Agent 勾选、单机禁用(`off-here`)、按项目挂载与单一 Skill 路由(`routed` / `direct`);偏文件系统清单视角,无关系型多视图 | 面向 50–1,000+ 技能;可在 Notion 按 `Scenes`、`Profiles`、`Visibility`、`Kind`、`Origin`、`Status` 多维筛选分组,配合本机 30 天 `Hot Loads`、`Overlays` 与 `Draft Buffer` 治理报表 |
291
+ | **上游追踪与热补丁** | 依赖 Git submodule、Fork 或重跑安装脚本;微调上游技能通常需要维护 Fork | 内置从 GitHub / Git 更新技能与可选 `auto-update`;检测到本地改动时会保留本地版本并跳过更新(除非显式 `--replace-edits` 覆盖),不提供结构化补丁层 | 支持 `track` / `pinned` / `manual` 策略与子树哈希剪枝;可在不 Fork 的前提下用 Notion Overlay(`Custom Main` + `Files` 差异层)叠加上游实测,一键 `reset-overlay` 或干净导出回仓 |
292
+ | **上下文与多目录切片** | 链接的技能默认全部落在顶层;按目录切片与依赖闭合需手工维护 | 支持按 Agent / 项目以软链或副本分发,并可用 `magpie-skills` 路由(`routed` / `direct`)收口提示词开销 | 三层可见性、零哈希 `by-name/` 软链与极简 `skill-catalog`、声明式多目录切片(`--skills`、`bundles`、`--spec`、`symlink` / `copy`)且自动展开 `Requires` 闭包,外加 `ntn-skills mcp` 与 Pi `$skill` 按需加载 |
293
+ | **外部依赖与适用场景** | 仅依赖本地文件系统与 Git;适合 `< 20` 个稳定技能或单仓小团队 | 离线优先、零外部 SaaS 依赖、开箱即用;适合希望用一个工具同时管模型、路由、MCP、全局指令与中小规模技能库 | **代价**:需要 Notion 账号/令牌与后台同步;技能 `< 20` 个时纯本地或 Magpie 更轻量。适合跨多上游源、多机器与多宿主沉淀 50–1,000+ 技能且追求日常消费零网络请求 |
294
+
295
+ ### 坦诚的边界与取舍
296
+
297
+ - **引入 Notion 与同步链路**:`ntn-skills` 需要 Notion 账号和 Integration Token 作为控制面,网页端修改需等待后台定时同步(或手动执行 `ntn-skills sync`)才在本机生效,并非纯离线零外部账户方案。
298
+ - **小规模场景不必过重**:如果你的活跃技能不到 20 个且很少跨多个上游大仓做二次定制,纯本地 / Git 软链或 Magpie 内置的 Library 往往更轻便、维护面更小。
299
+ - **刻意保持单一职责**:`ntn-skills` 不负责模型路由、API Gateway、全局共享指令或通用 MCP 代理,这些能力交给专业控制面更合适。
300
+
301
+ ### 推荐互补组合
302
+
303
+ `ntn-skills` 与 [Magpie](https://usemagpie.ai) 这类多 Agent 控制面天然处于不同层级,搭配使用可以各取所长:
304
+
305
+ - **Magpie 负责运行底座与统一分发**:集中管理模型订阅与 API 密钥、路由组与回退策略、本地 Gateway 与预算、全局共享指令,以及向本机各 Agent 统一分发 MCP 服务器。
306
+ - **`ntn-skills` 负责百级至千级 Skill 知识中台**:在 Notion 中可视化整理、演进与追踪多上游技能并打可回退热补丁,再按三层可见性与精确白名单 / `Requires` 闭包物化到 `~/.agents/skills`、`:copy` 沙盒或项目专属目录。
307
+ - **推荐衔接方式**:用 Magpie 以 `local` 模式将 `ntn-skills mcp` 注册并分发给本机各 Agent(仅留在本机,不随跨机同步覆盖其他机器路径);若已开启 Magpie 的 MCP Router,将其设为 `direct` 模式保持各 Agent 直连本地 stdio;同时让 `ntn-skills export` 单独接管本地 Skill 目录,避免两端重复管理同一目录:
308
+
309
+ ```bash
310
+ # 通过 Magpie 向本机指定 Agent 分发 `ntn-skills mcp`(`--local` 使其仅留在本机,不参与跨机同步)
311
+ magpie library mcp add ntn-skills ntn-skills mcp agents=claude,codex --local
312
+
313
+ # 若已开启 Magpie MCP Router,将 `ntn-skills` 设为直连模式,由各 Agent 直接拉起本地 stdio
314
+ magpie library mcp router ntn-skills direct
315
+ ```
316
+
317
+ ---
318
+
231
319
  ## 安全与数据边界
232
320
 
233
321
  - **日常消费零网络请求**:日常会话仅读取 `$XDG_DATA_HOME/ntn-skills/store/`(默认 `~/.local/share/ntn-skills/store/`)下的只读不可变快照(`0444/0555`);仅在显式运行同步/维护 CLI 或系统定时任务时访问 `api.notion.com` 与用户配置的 Git 远端。
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "ntn-skills"
3
- description: "Manage, maintain, synchronize, and schedule Notion 3-table Skills (v2). Use ONLY when the user asks to create, edit, diff, push, configure metadata, detach, reset overlays, or retire Skills in Notion, onboard/update upstream Git Sources, or inspect/install/export background sync timers, Dagu DAGs, GitHub Actions, and request telemetry. Do NOT load for ordinary Skill consumption."
3
+ description: "Maintain Notion 3-table Skills library, upstream Git sources, and sync schedules via ntn-skills CLI. Use ONLY to manage skills/sources/timers; NEVER load for consuming skills."
4
4
  ---
5
5
 
6
6
  # ntn-skills (v2) — 控制面维护与调度运维手册
@@ -41,8 +41,10 @@ ntn-skills load <name> [--refresh] [--path-only] [--json] </dev/null
41
41
  # 增量同步(默认 2 分钟重叠窗口)或全量对账(--full)
42
42
  ntn-skills sync [--full] [--coalesce] [--json] </dev/null
43
43
 
44
- # 幂等导出到指定宿主目录(symlink 或 copy)
45
- ntn-skills export [--to <dir>] [--profile <p>] [--scene <s>] [--mode symlink|copy] [--include-non-default] </dev/null
44
+ # 幂等导出到指定宿主目录(支持属性过滤、精确 --skills 白名单、--exclude 排除、Requires 依赖闭合与 --spec 声明文件批量投影)
45
+ # 注:精确白名单模式忽略全局 visibility/profiles/scenes,默认闭合 Requires(--no-requires 可关)且默认不生成 skill-catalog;对未预物化的 manual 技能会自动按需物化;copy 模式与目标目录中的非受管子目录安全共存
46
+ ntn-skills export [--to <dir>] [--skills <a,b>] [--exclude <c>] [--with-requires | --no-requires] [--no-router] [--profile <p>] [--scene <s>] [--mode symlink|copy] [--include-non-default] [--json] </dev/null
47
+ ntn-skills export --spec <export-spec.json> [--exclude <c>] [--with-requires | --no-requires] [--no-router] [--mode symlink|copy] [--json] </dev/null
46
48
 
47
49
  # 初始化新库(空白 Notion 页自动创建纯净 3 表及双向关系;已有 3 表则直接绑定)或扩展新机器
48
50
  # 支持任意宿主目录(如 Grok Box 的 ${HOME}/agent-data/workflows:copy 实体拷贝模式 + ~/.agents/skills 软链双面同时导出)
@@ -54,6 +56,9 @@ ntn-skills doctor [--json] </dev/null
54
56
  # 演进池治理总览(Visibility 分布、草稿缓冲池、活跃 Overlay 热补丁、近 30 天按需加载热度榜)
55
57
  ntn-skills status [--days 30] [--json] </dev/null
56
58
 
59
+ # 启动内置只读 stdio MCP Server(向 Claude Desktop / Cursor / agy 等任意 MCP 宿主暴露 skill_find 与 skill_load)
60
+ ntn-skills mcp [--library <uuid>] [--scenes <a,b>] [--instructions "<text>"]
61
+
57
62
  # 查看上游源列表 / 孤儿编辑工作区 / 请求遥测统计
58
63
  ntn-skills source list [--json] </dev/null
59
64
  ntn-skills work list [--json] </dev/null
@@ -96,8 +101,9 @@ ntn-skills push "$WORKDIR" </dev/null
96
101
  # 从含合法 SKILL.md(带 name/description frontmatter)的本地目录创建纯 Notion 草稿/自有 Skill
97
102
  # 注:--profiles / --scenes / --add-profile / --add-scene / --require 既支持逗号分隔(ops,ci)也支持重复传参(--add-scene ops --add-scene ci)
98
103
  # 注:new / set / push / attach / detach / reset-overlay / rm / source add / upstream apply 成功后均会自动同步本地 catalog.json 并刷新已配置的 exports 软链,无需额外手动跑 sync 或 export!
104
+ # 注:未显式指定单技能可见性时默认 discoverable,含 disable-model-invocation: true 的技能会自动归入 manual
99
105
  # 若 <dir> 直接位于导出目录内(如先在 ~/.agents/skills/<name> 本地孵化试跑),上传成功后会自动将该本地目录移入废纸篓并原地接管为受管软链或编入 skill-catalog;其他临时目录可加 --adopt 自动回收
100
- ntn-skills new <dir> [--name <name>] [--visibility always|discoverable|manual] [--kind skill|router|prompt] [--profiles default,mini] [--scenes ops,ci] [--adopt] </dev/null
106
+ ntn-skills new <dir> [--name <name>] [--visibility always|discoverable|manual | --always | --discoverable | --manual] [--kind skill|router|prompt] [--profiles default,mini] [--scenes ops,ci] [--adopt | --no-adopt] </dev/null
101
107
 
102
108
  # 声明式修改单个或批量技能元数据(支持多个 <name...> 或 --source <源名> 批量修改,无需 edit/push)
103
109
  ntn-skills set [<name...>] [--source <source-name-or-id>] \
@@ -142,6 +148,7 @@ ntn-skills rm <name> </dev/null
142
148
  ### 5.1 接入与更新上游 Git 源
143
149
  ```bash
144
150
  # 注册新 Git 仓库源并自动扫描导入其中所有 SKILL.md(可用 --root 仅扫指定子目录,自动跳过 dist/skill-snapshots 等历史产物目录)
151
+ # 注:即使传入 --discoverable(或 --visibility always)整仓导入,含 disable-model-invocation: true 的子技能也会自动归入 manual
145
152
  ntn-skills source add <repo-url> [--name <source-name>] [--ref main] [--policy track|pinned|manual] [--root skills] [--visibility manual|discoverable|always | --discoverable] [--scenes ops,coding] </dev/null
146
153
 
147
154
  # 调整已有上游源的策略、分支或启停状态