ntn-skills 0.2.0 → 2.0.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/CHANGELOG.md +13 -83
- package/CONTRIBUTING.md +19 -43
- package/INSTALL.md +132 -0
- package/LICENSE +1 -1
- package/README.md +212 -132
- package/README.zh-CN.md +215 -134
- package/SECURITY.md +13 -32
- package/assets/ntn-skills/SKILL.md +187 -0
- package/dist/bin.js +9054 -0
- package/package.json +26 -44
- package/THIRD_PARTY_NOTICES.md +0 -25
- package/dist/ntn-skills.js +0 -6223
- package/docs/README.md +0 -14
- package/docs/host-integration.md +0 -68
- package/docs/protocol.md +0 -199
- package/docs/releasing.md +0 -94
- package/docs/usage.md +0 -243
- package/skills/ntn-skills/SKILL.md +0 -53
- package/skills/ntn-skills/references/commands.md +0 -100
- package/skills/ntn-skills/references/integration.md +0 -44
package/README.md
CHANGED
|
@@ -1,190 +1,270 @@
|
|
|
1
1
|
<h1 align="center">ntn-skills</h1>
|
|
2
|
-
|
|
3
|
-
<p align="center">Bring your Notion workflow library into an Agent or terminal.<br>Discover the right Skill, read its instructions, and keep one version for the whole task.</p>
|
|
4
|
-
|
|
2
|
+
<p align="center">Notion 3-table control plane and zero-latency local skill runtime for AI coding agents.</p>
|
|
5
3
|
<p align="center">
|
|
6
4
|
<a href="./README.md">English</a> · <a href="./README.zh-CN.md">简体中文</a>
|
|
7
5
|
</p>
|
|
8
|
-
|
|
9
|
-
<p align="center">
|
|
10
|
-
<a href="#installation">Install</a> · <a href="#quick-start">Quick start</a> · <a href="#common-workflows">Workflows</a> · <a href="#agent-integration">Agent integration</a> · <a href="./docs/README.md">Docs</a>
|
|
11
|
-
</p>
|
|
12
|
-
|
|
13
6
|
<p align="center">
|
|
14
|
-
<a href="
|
|
15
|
-
<a href="
|
|
16
|
-
<a href="
|
|
7
|
+
<a href="#quick-start">Quick Start</a> ·
|
|
8
|
+
<a href="#how-it-works">How It Works</a> ·
|
|
9
|
+
<a href="#cli-reference">CLI Reference</a> ·
|
|
10
|
+
<a href="#security-privacy--data-boundaries">Security</a> ·
|
|
11
|
+
<a href="./INSTALL.md">Agent Setup (<code>INSTALL.md</code>)</a> ·
|
|
12
|
+
<a href="./assets/ntn-skills/SKILL.md">Built-in Guide (<code>SKILL.md</code>)</a>
|
|
17
13
|
</p>
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
ntn-skills list
|
|
21
|
-
ntn-skills read 'Release Review'
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
`Release Review` is an example title; choose a Skill returned by your own `list`. The npm package, executable and bootstrap Skill are all **`ntn-skills`**.
|
|
25
|
-
|
|
26
|
-
Available on [npm](https://www.npmjs.com/package/ntn-skills). For source builds, see [Contributing](CONTRIBUTING.md#development-setup).
|
|
15
|
+
---
|
|
27
16
|
|
|
28
|
-
|
|
17
|
+
`ntn-skills` turns a **3-table Notion database** (`Sources`, `Skills`, `Files`) into a visual, cross-machine control plane for your AI Agent skills — while keeping **everyday skill consumption 100% local, immutable, and zero-latency** via standard symlinks (`~/.agents/skills`), managed directory copies (e.g. cloud sandboxes), and an auto-synthesized local directory skill (`skill-catalog`).
|
|
29
18
|
|
|
30
|
-
|
|
19
|
+
No MCP tool overhead on every prompt. No bloated git-submodule choreography across machines. Just clean local files for every agent host, and a clean Notion cockpit for you.
|
|
31
20
|
|
|
32
|
-
|
|
21
|
+
---
|
|
33
22
|
|
|
34
|
-
|
|
35
|
-
| --- | --- |
|
|
36
|
-
| Find a workflow without loading the whole library | `list` |
|
|
37
|
-
| Read instructions and supporting files from one version | `read`, then `files` |
|
|
38
|
-
| Move a complete Skill between local files and Notion | `import`, `export` |
|
|
39
|
-
| Add a new Skill or replace one file deliberately | `create`, `write` |
|
|
40
|
-
| Keep an existing page and local Skill directory in sync | `sync bind`, `sync plan`, `sync apply` |
|
|
23
|
+
## Quick Start
|
|
41
24
|
|
|
42
|
-
|
|
25
|
+
Paste this single sentence into **Claude Code, Cursor, Pi, Codex, Grok Bot, Antigravity**, or any coding agent with shell access:
|
|
43
26
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Install the published release from the official npm registry:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
npm install --global ntn-skills --registry https://registry.npmjs.org
|
|
50
|
-
ntn-skills --version
|
|
51
|
-
ntn-skills --help
|
|
27
|
+
```text
|
|
28
|
+
Read https://raw.githubusercontent.com/yoyooyooo/ntn-skills/main/INSTALL.md and set up ntn-skills for me.
|
|
52
29
|
```
|
|
53
30
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
To produce a package yourself, follow [the contributor setup and build instructions](CONTRIBUTING.md#development-setup). Bun is the development/build tool.
|
|
57
|
-
|
|
58
|
-
## Quick start
|
|
31
|
+
Your agent will inspect your machine, install the CLI (linking the built-in `ntn-skills` guide), help you store your Notion token in a `0600` local file (never pasted into chat), automatically create the 3 Notion tables on a blank page, enable background sync, and verify everything with `ntn-skills doctor` (`6/6 pass`).
|
|
59
32
|
|
|
60
|
-
|
|
33
|
+
<details>
|
|
34
|
+
<summary>Prefer manual installation?</summary>
|
|
61
35
|
|
|
62
|
-
|
|
36
|
+
```bash
|
|
37
|
+
# 1. Install CLI via npm / Bun (Node >= 20 or Bun >= 1.2), or use install.sh --with-pi for Pi extension
|
|
38
|
+
npm install -g ntn-skills && ntn-skills skill --install
|
|
39
|
+
# Alternative (with Pi extension): curl -fsSL https://raw.githubusercontent.com/yoyooyooo/ntn-skills/main/scripts/install.sh | bash -s -- --with-pi
|
|
63
40
|
|
|
64
|
-
|
|
41
|
+
# 2. Save your Notion Integration token (0600 permissions; respects XDG_CONFIG_HOME)
|
|
42
|
+
mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/ntn-skills"
|
|
43
|
+
cat > "${XDG_CONFIG_HOME:-$HOME/.config}/ntn-skills/credentials.env" <<'EOF'
|
|
44
|
+
NOTION_TOKEN=ntn_your_token_here
|
|
45
|
+
# Optional: GITHUB_TOKEN=ghp_...
|
|
46
|
+
EOF
|
|
47
|
+
chmod 600 "${XDG_CONFIG_HOME:-$HOME/.config}/ntn-skills/credentials.env"
|
|
65
48
|
|
|
66
|
-
|
|
49
|
+
# 3. Bootstrap a blank Notion page (defaults to prefetch=discoverable) + initial sync
|
|
50
|
+
ntn-skills init --root "https://www.notion.so/your-page-url"
|
|
67
51
|
|
|
68
|
-
|
|
52
|
+
# 4. Enable native background sync (launchd on macOS / systemd on Linux)
|
|
53
|
+
ntn-skills schedule install
|
|
69
54
|
|
|
70
|
-
|
|
55
|
+
# 5. Verify health (expect 0 fail)
|
|
71
56
|
ntn-skills doctor
|
|
72
|
-
ntn-skills
|
|
57
|
+
ntn-skills skill # Print built-in agent guide shipped with this binary
|
|
73
58
|
```
|
|
74
59
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
60
|
+
</details>
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Prerequisites & Supported Platforms
|
|
65
|
+
|
|
66
|
+
- **OS**: macOS (launchd background timer, Finder Trash) and Linux (systemd user timer, XDG Trash). Windows is supported via WSL2.
|
|
67
|
+
- **Runtime**: `git` plus **Node.js `>= 20`** (via `npm install -g ntn-skills`) or **[Bun](https://bun.sh) `>= 1.2.0`**.
|
|
68
|
+
- **Notion**: A [Notion Internal Integration](https://www.notion.so/profile/integrations) token granted access to one blank Notion page (or an existing `ntn-skills` root page).
|
|
69
|
+
- **Host Compatibility**: Works out of the box with Claude Code, Codex, Cursor, Pi, Antigravity, Grok Bot (`${HOME}/agent-data/workflows:copy`), and any agent reading Markdown skills from disk.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## How It Works
|
|
74
|
+
|
|
75
|
+
You do **not** need to memorize CLI flags for daily use. `ntn-skills` separates **what you do as a human** from **how your agents consume or maintain skills**.
|
|
76
|
+
|
|
77
|
+
### 1. The Human Perspective (What You Care About)
|
|
78
|
+
|
|
79
|
+
1. **Tweaking Properties Directly in Notion (Desktop or Mobile)**
|
|
80
|
+
- **What you do**: Change `Visibility` (`always` for top-level daily skills, `discoverable` for curated on-demand skills indexed into `skill-catalog`, `manual` for silent external reserves), edit `Description` triggers, organize `Scenes` / `Profiles`, or uncheck `Enabled`.
|
|
81
|
+
- **How it takes effect**: Just close the tab. Each machine's 12-minute background sync updates local symlinks and rebuilds `skill-catalog` automatically — or tell your agent *"sync my skills"* (`ntn-skills sync`) to apply immediately.
|
|
82
|
+
|
|
83
|
+
2. **Editing `SKILL.md` Body Text in Notion (One Important Distinction)**
|
|
84
|
+
- **Notion-native draft skills (`Origin` is empty)**: The Notion page body *is* the single source of truth. Any edit you make in Notion flows straight to your machines on sync (`ntn-skills sync --full` forces an immediate body refresh if Notion omits page-body timestamps).
|
|
85
|
+
- **Upstream Git skills (`Origin` is set)**: By default (`Custom Main` unchecked), the Notion page body is a **read-only preview mirror** of the upstream Git file, and local consumption follows Git. If you intentionally edit an upstream skill's body in Notion and want machines to consume your version, **check `Custom Main`** (otherwise `sync` surfaces a drift warning so you never wonder why a web edit didn't go live).
|
|
86
|
+
|
|
87
|
+
3. **Live-Patching an Upstream Skill Without Forking Its Repo**
|
|
88
|
+
- **What you do**: Tell your agent in plain language: *"Add our local directory conventions and a helper script to the `dagu` skill and push the patch to Notion so I can test it this week."*
|
|
89
|
+
- **What happens**: Your agent runs an isolated `edit -> diff --remote -> push` cycle, setting `Custom Main = true` and recording `override / delete` entries in `Files`. Every machine immediately consumes the merged UnionFS snapshot (Upstream Git + Notion overlay).
|
|
90
|
+
- **Two clean exits**:
|
|
91
|
+
- Discard the experiment: say *"Revert local overlays on `dagu`"* (`reset-overlay`) to snap back to clean upstream in one second.
|
|
92
|
+
- Graduate into your personal Git repo: say *"Export `dagu` cleanly into my personal skills repo"* (`pull --clean` + `attach` / `upstream apply`). Once upstream Git catches up, redundant Notion overlays auto-archive back to zero.
|
|
93
|
+
|
|
94
|
+
4. **Incubating a Temporary Local Skill First, Then Saving It to Notion**
|
|
95
|
+
- **Incubate locally**: Have your agent create a plain local skill folder right inside `~/.agents/skills/<temp-skill>/` and iterate across local sessions without touching Notion (background sync never touches unmanaged local folders, and `sync` reports unmanaged local candidates under `Local Pending`).
|
|
96
|
+
- **Save & adopt in place**: Once happy, tell your agent *"Save `<temp-skill>` to Notion"* (`ntn-skills new ~/.agents/skills/<temp-skill> [--always | --discoverable]`). After Notion upload succeeds, `ntn-skills` automatically moves the temporary folder to OS Trash and seamlessly replaces it with an immutable managed symlink (`always`) or indexes it into `skill-catalog` (`discoverable`).
|
|
97
|
+
|
|
98
|
+
5. **Collecting Huge External Repos + Checking Governance Health**
|
|
99
|
+
- Import 200-skill community repos safely as `manual` (zero context cost); import your own primary repo with `--discoverable`.
|
|
100
|
+
- Run `ntn-skills status` anytime to see 30-day on-demand `Hot Loads` (promote frequent winners to `always`), active `Overlays`, and `Draft Buffer` candidates ready to graduate to Git.
|
|
101
|
+
|
|
102
|
+
### 2. The Agent Perspective (99% Consumer Mode vs. 1% Maintainer Mode)
|
|
103
|
+
|
|
104
|
+
| Mode | When Active | What the Agent Sees & Does |
|
|
105
|
+
| :--- | :--- | :--- |
|
|
106
|
+
| **Consumer Mode (99% of sessions)** | Normal coding, research, design, and ops tasks | **Zero Notion awareness, zero network calls**:<br>1. **`always` skills**: Linked directly at `~/.agents/skills/<name>` (or copied for `:copy` targets) for `0 ms` reads.<br>2. **`discoverable` skills**: Every host sees one auto-synthesized read-only skill **`skill-catalog`**. When a specialized task arises, the agent reads `skill-catalog/SKILL.md` -> `references/<scene>.md` -> directly `Read`s the pre-materialized local `store/.../SKILL.md` (two pure file reads, no plugins required).<br>3. **`manual` skills**: Hidden from default context and `skill-catalog`; woken on demand via `$skill` / `skill_find` / `skill_load` in Pi, strategy routers, or `ntn-skills load`.<br>4. **Read-only rule**: `store/` snapshots are `0444/0555` immutable; agents never edit them in place. |
|
|
107
|
+
| **Maintainer Mode (1% of sessions)** | Only when you ask to set up, import, create, patch, or diagnose skills | Reads the built-in **`ntn-skills`** guide shipped with the CLI (or runs `ntn-skills skill`), executes isolated `new / set / edit / diff --remote / push` workflows, and moves temporary workdirs to OS Trash on completion. |
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Architecture
|
|
112
|
+
|
|
113
|
+
```mermaid
|
|
114
|
+
flowchart LR
|
|
115
|
+
subgraph Control["Notion Control Plane (Human Visual Cockpit)"]
|
|
116
|
+
SRC["Sources
|
|
117
|
+
(Upstream & Private Git Repos)"]
|
|
118
|
+
SKL["Skills
|
|
119
|
+
(Visibility / Scenes / SKILL.md)"]
|
|
120
|
+
FIL["Files
|
|
121
|
+
(Draft Assets & Overlay Diffs)"]
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
subgraph Local["Local Runtime ($XDG_DATA_HOME/ntn-skills)"]
|
|
125
|
+
CAT["catalog.json & manifest.json
|
|
126
|
+
(Delta Watermark + Static Lockfile)"]
|
|
127
|
+
STO["Immutable Store
|
|
128
|
+
(0444/0555 · always + discoverable prefetched)"]
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
subgraph Hosts["Host-Agnostic Zero-Latency Consumption"]
|
|
132
|
+
EXP["~/.agents/skills/ or :copy target
|
|
133
|
+
(always skills + auto skill-catalog)"]
|
|
134
|
+
ANY["Any Agent Host (Claude Code / Codex / Grok Bot / Cursor / Antigravity)
|
|
135
|
+
2-hop pure file Read"]
|
|
136
|
+
PI["Pi Extension
|
|
137
|
+
($skill inline injection + skill_find / skill_load)"]
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
SRC --> SKL
|
|
141
|
+
FIL --> SKL
|
|
142
|
+
Control -- "12m delta sync
|
|
143
|
+
(launchd / systemd)" --> CAT
|
|
144
|
+
CAT --> STO
|
|
145
|
+
STO -- "Atomic Symlink / Copy" --> EXP
|
|
146
|
+
EXP --> ANY
|
|
147
|
+
CAT --> PI
|
|
148
|
+
STO --> PI
|
|
85
149
|
```
|
|
86
150
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
### 4. Read supporting files from the same version
|
|
151
|
+
---
|
|
90
152
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
ntn-skills files 'SNAPSHOT_ID_FROM_READ'
|
|
95
|
-
ntn-skills read 'ATTACHMENT_REF_FROM_FILES'
|
|
96
|
-
```
|
|
153
|
+
## Minimal 3-Table Notion Schema
|
|
97
154
|
|
|
98
|
-
|
|
155
|
+
Created automatically by `ntn-skills init --root <blank-page-url>`:
|
|
99
156
|
|
|
100
|
-
|
|
157
|
+
| Table | Purpose | Key Properties |
|
|
158
|
+
| :--- | :--- | :--- |
|
|
159
|
+
| **`Sources`** | Upstream & private Git skill repositories | `Name`, `Repo URL`, `Ref`, `Pinned Commit`, `Policy` (`track \| pinned \| manual`), `Enabled`, `Last Checked`, `Skills` |
|
|
160
|
+
| **`Skills`** | Master catalog, 3-tier routing & `SKILL.md` body | `Name`, `Description`, `Enabled`, `Visibility` (`always \| discoverable \| manual`), `Kind` (`skill \| router \| prompt`), `Profiles`, `Scenes`, `Requires`, `Origin`, `Source Path`, `Custom Main`, `Revision`, `Preview Hash`, `Status`, `Supporting Files` |
|
|
161
|
+
| **`Files`** | Draft supporting files & upstream diff overlays | `Name`, `Skill`, `Path`, `Status` (`override \| delete`), `Executable`, `SHA256`, `External URL`, `Attachment` |
|
|
101
162
|
|
|
102
|
-
|
|
163
|
+
> **Subtree-Hash Pruning & Zero Redundancy**: Unmodified upstream skills store **0 rows** in `Files` (an auto-maintained read-only `Upstream Files` child page at row 1 of each Skill page shows the upstream file tree). When a multi-skill upstream repo gets a new commit, untouched sibling skills incur **0 Notion writes** and keep a stable `effectiveRev`.
|
|
103
164
|
|
|
104
|
-
|
|
165
|
+
---
|
|
105
166
|
|
|
106
|
-
|
|
167
|
+
## CLI Reference
|
|
107
168
|
|
|
169
|
+
### Setup, Built-in Guide & Diagnostics
|
|
108
170
|
```bash
|
|
109
|
-
|
|
110
|
-
ntn-skills
|
|
111
|
-
ntn-skills
|
|
171
|
+
# Omit --root when re-initializing if default_library is already set in XDG config
|
|
172
|
+
ntn-skills init [--root <notion-page-url>] [--export ~/.agents/skills] [--export '${HOME}/agent-data/workflows:copy'] [--profile default] [--prefetch discoverable]
|
|
173
|
+
ntn-skills skill [--path] [--install [--dest ~/.agents/skills] [--force]] [--uninstall]
|
|
174
|
+
ntn-skills doctor [--json]
|
|
175
|
+
ntn-skills status [--days 30] [--json]
|
|
176
|
+
ntn-skills sync [--full] [--coalesce] [--json]
|
|
177
|
+
ntn-skills find [query] [--scene <scene>] [--visibility always|discoverable|manual] [--kind skill|router|prompt] [--json]
|
|
178
|
+
ntn-skills info <name> [--json]
|
|
179
|
+
ntn-skills load <name> [--refresh] [--path-only]
|
|
112
180
|
```
|
|
113
181
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
### Import, export or update a Skill
|
|
117
|
-
|
|
118
|
-
A Skill can be a folder, ZIP, or Markdown file. Preview remote changes before applying them:
|
|
119
|
-
|
|
182
|
+
### Editing, Batch Metadata, Drafts & Overlay Tuning
|
|
120
183
|
```bash
|
|
121
|
-
|
|
122
|
-
ntn-skills
|
|
123
|
-
ntn-skills
|
|
124
|
-
ntn-skills
|
|
184
|
+
# Safe isolated edit workflow (never mutates read-only store/)
|
|
185
|
+
WORKDIR=$(ntn-skills edit "<name>")
|
|
186
|
+
ntn-skills diff "$WORKDIR" --remote
|
|
187
|
+
ntn-skills push "$WORKDIR" [--dry-run]
|
|
188
|
+
ntn-skills abort "$WORKDIR"
|
|
189
|
+
|
|
190
|
+
# Create/adopt a Notion-native draft skill & single/batch update metadata
|
|
191
|
+
ntn-skills new <dir> [--name <name>] [--visibility always|discoverable|manual] [--profiles default] [--scenes ops] [--no-adopt]
|
|
192
|
+
ntn-skills set [<name...>] [--source <source-name>] \
|
|
193
|
+
[--visibility always|discoverable|manual | --always | --discoverable | --manual] \
|
|
194
|
+
[--kind skill|router|prompt] [--enable|--disable] [--add-profile <p>] [--add-scene <s>] [--require <dep>]
|
|
195
|
+
|
|
196
|
+
# Graduate draft or overlay back to Git, or revert overlays
|
|
197
|
+
ntn-skills pull <name> <git-repo-skill-dir> --clean
|
|
198
|
+
ntn-skills attach <name> --source <source-name> [--path <repo-relative-dir>]
|
|
199
|
+
ntn-skills detach <name>
|
|
200
|
+
ntn-skills reset-overlay <name> [<file-path>]
|
|
201
|
+
ntn-skills rm <name> # Soft retire (never hard-deletes)
|
|
125
202
|
```
|
|
126
203
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
Use `import ./my-skill --target 'CURRENT_PAGE_ID_OR_PINNED_MAIN_REF' --database ops --dry-run` to replace a selected existing page deliberately. `--target` preserves that page identity even when imported name/description changes; a missing, inaccessible or stale target fails without creating a page or falling back to its imported name.
|
|
130
|
-
|
|
131
|
-
### Synchronize a local distribution directory
|
|
132
|
-
|
|
133
|
-
Replace `PAGE_ID` and `PLAN_ID` with actual returned identities. The binding label is local configuration, separate from a Skill's invocation alias.
|
|
134
|
-
|
|
204
|
+
### Upstream Git Sources & Scheduling
|
|
135
205
|
```bash
|
|
136
|
-
|
|
137
|
-
ntn-skills
|
|
138
|
-
ntn-skills
|
|
139
|
-
ntn-skills sync
|
|
140
|
-
ntn-skills
|
|
141
|
-
ntn-skills
|
|
142
|
-
|
|
143
|
-
|
|
206
|
+
# Onboard Git repos (community repos default to manual; pass --discoverable for personal primary repos)
|
|
207
|
+
ntn-skills source add <repo-url> [--name <name>] [--ref main] [--root skills] [--policy track|pinned|manual] [--discoverable] [--scenes ops,coding]
|
|
208
|
+
ntn-skills source list
|
|
209
|
+
ntn-skills source sync <name> [--update-pinned]
|
|
210
|
+
ntn-skills upstream check [<source>]
|
|
211
|
+
ntn-skills upstream apply [<source>] [--dry-run] [--max-sources 10] [--timeout-sec 180]
|
|
212
|
+
|
|
213
|
+
# Native OS background timers (macOS launchd / Linux systemd) & CI/CD exports
|
|
214
|
+
ntn-skills schedule install [--sync-every 12m] [--full-at 04:12] [--upstream-every 6h]
|
|
215
|
+
ntn-skills schedule status
|
|
216
|
+
ntn-skills schedule uninstall
|
|
217
|
+
ntn-skills schedule export --target dagu|github-actions|crontab
|
|
144
218
|
```
|
|
145
219
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
### Maintain reference pages in Notion
|
|
149
|
-
|
|
150
|
-
Add page mentions or links to the rich-text `References` property. A link labeled `references/guide.md` fixes the local path; otherwise the page title determines its filename. Write normal Notion page links in the instructions: reads and exports turn links to included pages into relative paths such as `./references/guide.md`. Links between reference files resolve from the containing file, and CLI writes restore the Notion URLs. Other websites and code examples remain unchanged.
|
|
220
|
+
---
|
|
151
221
|
|
|
152
|
-
|
|
222
|
+
## Pi Extension
|
|
153
223
|
|
|
224
|
+
Install with `--with-pi` (or link `packages/pi-extension` into `~/.pi/agent/extensions/ntn-skills`) to unlock:
|
|
225
|
+
- **Inline `$skill-name` triggers**: Type `$my-long-tail-skill` in any prompt — even if its `Visibility` is `discoverable` or `manual` — and Pi automatically materializes it into the immutable local store and injects its path into the turn;
|
|
226
|
+
- **`skill_find` & `skill_load` tools**: Search the local catalog by keyword, `scene`, `visibility`, or `kind` (0 network requests), load long-tail skills on demand, and record `Hot Loads` usage counts.
|
|
154
227
|
|
|
155
|
-
|
|
228
|
+
---
|
|
156
229
|
|
|
157
|
-
|
|
230
|
+
## Security, Privacy & Data Boundaries
|
|
158
231
|
|
|
159
|
-
|
|
232
|
+
- **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.
|
|
233
|
+
- **Local-Only Credentials & Telemetry**: `credentials.env` lives under `$XDG_CONFIG_HOME/ntn-skills/` (default `~/.config/ntn-skills/credentials.env`) with enforced `0600` permissions. Usage counters (`telemetry/usage.jsonl`) and bounded sync logs (`2 MiB` rotation) never leave your machine.
|
|
234
|
+
- **Foreign Directory Guard & Trash-Only Cleanup**: `export` never overwrites unmanaged files or symlinks inside host skill directories. Workdir and expired cache cleanups move files to the OS Trash rather than permanently unlinking them; retiring skills in Notion marks `Status = retired`.
|
|
235
|
+
- **Formal Verification**: Core concurrency locks, overlap-window delta sync, and atomic snapshot switching are verified with TLA+ specifications under [`verification/`](https://github.com/yoyooyooo/ntn-skills/tree/main/verification).
|
|
160
236
|
|
|
161
|
-
|
|
237
|
+
---
|
|
162
238
|
|
|
163
|
-
##
|
|
239
|
+
## Scope & Non-Goals
|
|
164
240
|
|
|
165
|
-
-
|
|
166
|
-
-
|
|
167
|
-
- Configuration defaults to `~/.config/ntn-skills/config.json`; retained snapshots, uploads and sync recovery state to `~/.local/state/ntn-skills`; disposable observations to `~/.cache/ntn-skills`. Freshness defaults are five minutes for content and 60 seconds for catalogs. [Cache policy and cleanup](docs/usage.md#cache-policy-and-cleanup) explain overrides and system Trash retention.
|
|
168
|
-
- Online operations use `ntn` and Notion's signed download URLs. Safe local identity is required for unpinned offline lookup; official-login identity may still require online checks. A cached observation does not prove present access. The CLI sends no telemetry requests of its own; `ntn` has its own policies. Imported scripts are never executed automatically.
|
|
241
|
+
- **Focused on Agent Skills**: `ntn-skills` governs Markdown/script-based Agent Skills (`SKILL.md` + supporting references/scripts). It is **not** an MCP server proxy, secret manager, or general machine provisioning tool.
|
|
242
|
+
- **One-Way Sync by Design**: `ntn-skills sync` strictly pulls from Notion/Git to local snapshots and reports `Local Pending` items without silently pushing local scratch edits to Notion. Publishing always requires explicit `new` or `edit -> diff --remote -> push`.
|
|
169
243
|
|
|
170
|
-
|
|
244
|
+
---
|
|
171
245
|
|
|
172
|
-
## Upgrade
|
|
246
|
+
## Upgrade & Uninstall
|
|
173
247
|
|
|
174
|
-
|
|
248
|
+
```bash
|
|
249
|
+
# Upgrade to the latest release (preserves config, credentials, and local store)
|
|
250
|
+
npm install -g ntn-skills@latest # or re-run scripts/install.sh if installed from source
|
|
175
251
|
|
|
176
|
-
|
|
252
|
+
# Uninstall cleanly (never deletes your Notion database)
|
|
253
|
+
ntn-skills schedule uninstall
|
|
254
|
+
ntn-skills skill --uninstall
|
|
255
|
+
# Then move ~/.local/share/ntn-skills, ~/.config/ntn-skills, and ~/.local/bin/ntn-skills to Trash
|
|
256
|
+
```
|
|
177
257
|
|
|
178
|
-
|
|
258
|
+
---
|
|
179
259
|
|
|
180
|
-
|
|
181
|
-
| --- | --- |
|
|
182
|
-
| Installation variants and everyday CLI usage | [Usage guide](docs/usage.md) |
|
|
183
|
-
| Selectors, JSON output, storage and errors | [CLI and ref contract](docs/protocol.md) |
|
|
184
|
-
| Startup metadata and Read/Write adapters | [Host integration](docs/host-integration.md) |
|
|
185
|
-
| Development setup and compatibility policy | [Contributing](CONTRIBUTING.md) |
|
|
186
|
-
| Publishing and release verification | [Releasing](docs/releasing.md) |
|
|
260
|
+
## Development, Contributing & License
|
|
187
261
|
|
|
188
|
-
|
|
262
|
+
```bash
|
|
263
|
+
bun install
|
|
264
|
+
bun run check # Runs biome lint + tsc typecheck + 28 invariant & unit tests
|
|
265
|
+
```
|
|
189
266
|
|
|
190
|
-
[
|
|
267
|
+
- [Contributing Guide (`CONTRIBUTING.md`)](./CONTRIBUTING.md)
|
|
268
|
+
- [Security Policy (`SECURITY.md`)](./SECURITY.md)
|
|
269
|
+
- [Changelog (`CHANGELOG.md`)](./CHANGELOG.md)
|
|
270
|
+
- [MIT License (`LICENSE`)](./LICENSE)
|