install-agent-skill 1.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/README.bigtech.md +191 -0
- package/README.md +164 -0
- package/bin/add-skill.js +5 -0
- package/bin/add-skill.modular.js +5 -0
- package/bin/add-skill.v1.backup.js +1904 -0
- package/bin/cli.js +100 -0
- package/bin/lib/commands/analyze.js +70 -0
- package/bin/lib/commands/cache.js +65 -0
- package/bin/lib/commands/doctor.js +75 -0
- package/bin/lib/commands/help.js +42 -0
- package/bin/lib/commands/info.js +38 -0
- package/bin/lib/commands/init.js +39 -0
- package/bin/lib/commands/install.js +297 -0
- package/bin/lib/commands/list.js +43 -0
- package/bin/lib/commands/lock.js +57 -0
- package/bin/lib/commands/uninstall.js +48 -0
- package/bin/lib/commands/update.js +55 -0
- package/bin/lib/commands/validate.js +69 -0
- package/bin/lib/commands/verify.js +56 -0
- package/bin/lib/config.js +80 -0
- package/bin/lib/helpers.js +155 -0
- package/bin/lib/installer.js +49 -0
- package/bin/lib/skills.js +114 -0
- package/bin/lib/types.js +82 -0
- package/bin/lib/ui.js +132 -0
- package/package.json +56 -0
- package/specs/ADD_SKILL_SPEC.md +333 -0
- package/specs/REGISTRY_V2_SPEC.md +334 -0
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
# ADD_SKILL_SPEC.md
|
|
2
|
+
## Enterprise Agent Skill Specification
|
|
3
|
+
|
|
4
|
+
**Status:** Stable
|
|
5
|
+
**Version:** 1.0
|
|
6
|
+
**Applies to:** `@dataguruin/add-skill >= 1.0`
|
|
7
|
+
**Audience:** Tool authors, skill publishers, platform engineers, AI agents
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 1. Purpose & Scope
|
|
12
|
+
|
|
13
|
+
`@dataguruin/add-skill` defines a **deterministic, secure, and auditable system** for managing **Agent Skills**.
|
|
14
|
+
|
|
15
|
+
A **Skill** is a **versioned, verifiable intelligence artifact** that extends an agent’s capabilities without executing code or mutating the host environment.
|
|
16
|
+
|
|
17
|
+
This specification is **normative** and defines:
|
|
18
|
+
|
|
19
|
+
- Skill format and lifecycle
|
|
20
|
+
- Deterministic installation and locking
|
|
21
|
+
- Security and trust guarantees
|
|
22
|
+
- CLI behavior and invariants
|
|
23
|
+
- Explicitly forbidden practices
|
|
24
|
+
|
|
25
|
+
Any implementation that violates this specification is considered **non-compliant**.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 2. Terminology
|
|
30
|
+
|
|
31
|
+
| Term | Definition |
|
|
32
|
+
|---|---|
|
|
33
|
+
| Skill | A folder containing agent instructions and static resources |
|
|
34
|
+
| Publisher | Entity that authors and optionally signs a skill |
|
|
35
|
+
| Skill Source | Git repository + immutable ref |
|
|
36
|
+
| Workspace Scope | `.agent/skills` |
|
|
37
|
+
| Global Scope | `~/.gemini/antigravity/skills` |
|
|
38
|
+
| Lock File | `skill-lock.json`, ensures deterministic environments |
|
|
39
|
+
| Deterministic | Same inputs always produce the same skill environment |
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 3. Skill Format (MANDATORY)
|
|
44
|
+
|
|
45
|
+
### 3.1 Required Files
|
|
46
|
+
|
|
47
|
+
Every skill **MUST** contain the following files:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
<skill-name>/
|
|
52
|
+
├─ SKILL.md # Human- and agent-readable instructions
|
|
53
|
+
├─ .skill-source.json # Auto-generated metadata (DO NOT EDIT)
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
If any required file is missing:
|
|
58
|
+
|
|
59
|
+
- `add-skill install` → **FAIL**
|
|
60
|
+
- `add-skill doctor` → **ERROR**
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### 3.2 Optional Files
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
├─ README.md
|
|
69
|
+
├─ assets/
|
|
70
|
+
├─ examples/
|
|
71
|
+
├─ docs/
|
|
72
|
+
|
|
73
|
+
````
|
|
74
|
+
|
|
75
|
+
Optional files **MUST NOT**:
|
|
76
|
+
|
|
77
|
+
- Execute automatically
|
|
78
|
+
- Mutate the system environment
|
|
79
|
+
- Perform network calls
|
|
80
|
+
- Contain secrets or credentials
|
|
81
|
+
|
|
82
|
+
All optional content must be **inert by default**.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 4. SKILL.md Rules (NON-NEGOTIABLE)
|
|
87
|
+
|
|
88
|
+
`SKILL.md`:
|
|
89
|
+
|
|
90
|
+
- MUST be plain Markdown
|
|
91
|
+
- MUST contain instructions only
|
|
92
|
+
- MUST NOT contain:
|
|
93
|
+
- secrets or credentials
|
|
94
|
+
- API keys
|
|
95
|
+
- executable code
|
|
96
|
+
- shell commands that mutate the system
|
|
97
|
+
|
|
98
|
+
**Design Rule:**
|
|
99
|
+
|
|
100
|
+
> A skill must be safe to read, safe to load, and safe to reason about.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## 5. Skill Metadata — `.skill-source.json`
|
|
105
|
+
|
|
106
|
+
Generated automatically at install time by `add-skill`.
|
|
107
|
+
|
|
108
|
+
### Schema (v1)
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"repo": "org/repo",
|
|
113
|
+
"skill": "skill-name",
|
|
114
|
+
"ref": "v1.2.3",
|
|
115
|
+
"checksum": "sha256:…",
|
|
116
|
+
"publisher": "org",
|
|
117
|
+
"installedAt": "ISO-8601"
|
|
118
|
+
}
|
|
119
|
+
````
|
|
120
|
+
|
|
121
|
+
### Rules
|
|
122
|
+
|
|
123
|
+
* MUST NOT be manually edited
|
|
124
|
+
* `checksum` is a Merkle SHA-256 hash of the entire skill directory
|
|
125
|
+
* Any checksum drift is an **integrity violation**
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## 6. Skill Lifecycle
|
|
130
|
+
|
|
131
|
+
### 6.1 Install
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
add-skill install org/repo#skill@ref
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Guarantees:**
|
|
138
|
+
|
|
139
|
+
* Skill content matches the declared source
|
|
140
|
+
* Checksum is computed and recorded
|
|
141
|
+
* Scope resolution is deterministic
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
### 6.2 Verify
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
add-skill verify
|
|
149
|
+
add-skill verify --strict
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Verification checks:**
|
|
153
|
+
|
|
154
|
+
* Directory integrity
|
|
155
|
+
* Checksum validity
|
|
156
|
+
* Metadata presence
|
|
157
|
+
|
|
158
|
+
In `--strict` mode, **any violation results in failure**.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
### 6.3 Upgrade
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
add-skill upgrade-all
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
or
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
add-skill install org/repo#skill@new-ref --upgrade
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Rules:**
|
|
175
|
+
|
|
176
|
+
* Upgrades must be explicit
|
|
177
|
+
* Silent or implicit upgrades are forbidden
|
|
178
|
+
* Lock file must be regenerated after upgrades
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
### 6.4 Lock (Deterministic Environments)
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
add-skill lock
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Generates:
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
.agent/skill-lock.json
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
**Purpose:**
|
|
195
|
+
|
|
196
|
+
> Ensure identical skill environments across machines, CI pipelines, and production agents.
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
### 6.5 Locked Install (CI / Production Mode)
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
add-skill install --locked
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
**Rules:**
|
|
207
|
+
|
|
208
|
+
* Only skills listed in `skill-lock.json` are allowed
|
|
209
|
+
* Ref overrides are forbidden
|
|
210
|
+
* Any checksum mismatch results in immediate failure
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## 7. Security Model
|
|
215
|
+
|
|
216
|
+
### 7.1 Integrity
|
|
217
|
+
|
|
218
|
+
* Merkle SHA-256 hashing
|
|
219
|
+
* Directory-wide and order-independent
|
|
220
|
+
* Any file modification invalidates the checksum
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
### 7.2 Trust Model
|
|
225
|
+
|
|
226
|
+
* Skills are verified locally
|
|
227
|
+
* Registries and publishers may provide signatures
|
|
228
|
+
* Trust is **explicit**, never implicit
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
### 7.3 Execution Model
|
|
233
|
+
|
|
234
|
+
* Skills MUST NOT execute code
|
|
235
|
+
* No scripts are run during install
|
|
236
|
+
* No network calls are allowed during install or verification
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## 8. add-skill doctor (Audit & Repair)
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
add-skill doctor
|
|
244
|
+
add-skill doctor --fix
|
|
245
|
+
add-skill doctor --strict
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
**Doctor checks:**
|
|
249
|
+
|
|
250
|
+
* Missing required files
|
|
251
|
+
* Checksum drift
|
|
252
|
+
* Lock mismatches
|
|
253
|
+
* Orphaned cache entries
|
|
254
|
+
|
|
255
|
+
**Guarantee:**
|
|
256
|
+
|
|
257
|
+
> No mutation occurs unless `--fix` is explicitly provided.
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## 9. CLI Contract (STABILITY GUARANTEE)
|
|
262
|
+
|
|
263
|
+
The following flags have **guaranteed semantics**:
|
|
264
|
+
|
|
265
|
+
| Flag | Meaning |
|
|
266
|
+
| ----------- | -------------------------------- |
|
|
267
|
+
| `--verify` | Read-only integrity verification |
|
|
268
|
+
| `--strict` | Fail on any violation |
|
|
269
|
+
| `--locked` | Enforce deterministic lock |
|
|
270
|
+
| `--dry-run` | No filesystem changes |
|
|
271
|
+
| `--fix` | Apply safe, explicit repairs |
|
|
272
|
+
|
|
273
|
+
Breaking changes require:
|
|
274
|
+
|
|
275
|
+
* Major version bump
|
|
276
|
+
* Specification update
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## 10. CI/CD Integration (RECOMMENDED)
|
|
281
|
+
|
|
282
|
+
```yaml
|
|
283
|
+
- name: Install skills
|
|
284
|
+
run: add-skill install --locked
|
|
285
|
+
|
|
286
|
+
- name: Verify skills
|
|
287
|
+
run: add-skill verify --strict
|
|
288
|
+
|
|
289
|
+
- name: Audit environment
|
|
290
|
+
run: add-skill doctor --strict
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## 11. Forbidden Practices (HARD FAIL)
|
|
296
|
+
|
|
297
|
+
The following practices are explicitly forbidden:
|
|
298
|
+
|
|
299
|
+
* ❌ Auto-updating skills
|
|
300
|
+
* ❌ Executable scripts inside skills
|
|
301
|
+
* ❌ Mutable skills without checksum update
|
|
302
|
+
* ❌ Network calls during install
|
|
303
|
+
* ❌ Hidden side effects
|
|
304
|
+
* ❌ Silent security bypass
|
|
305
|
+
|
|
306
|
+
Violation results in failure by design.
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## 12. Design Philosophy
|
|
311
|
+
|
|
312
|
+
Skills are **intelligence artifacts**, not scripts.
|
|
313
|
+
Trust must be explicit.
|
|
314
|
+
Reproducibility is mandatory.
|
|
315
|
+
Silence is a bug.
|
|
316
|
+
|
|
317
|
+
`@dataguruin/add-skill` treats agent skills with the same rigor as binaries, containers, or infrastructure code.
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## 13. Forward Compatibility
|
|
322
|
+
|
|
323
|
+
This specification is designed to be compatible with:
|
|
324
|
+
|
|
325
|
+
* Signed skill registries
|
|
326
|
+
* Organization-level registries
|
|
327
|
+
* Policy enforcement engines
|
|
328
|
+
* Paid and licensed skills
|
|
329
|
+
* Enterprise governance systems
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
333
|
+
**END OF SPEC**
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
# REGISTRY_V2_SPEC.md
|
|
2
|
+
## Signed Remote Skill Registry Specification
|
|
3
|
+
|
|
4
|
+
**Status:** Stable
|
|
5
|
+
**Version:** 2.0
|
|
6
|
+
**Applies to:** `@dataguruin/add-skill >= 1.0`
|
|
7
|
+
**Audience:** Registry operators, platform engineers, security engineers, AI agents
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 1. Purpose
|
|
12
|
+
|
|
13
|
+
Registry v2 defines a **signed, remote, read-only index** for discovering and resolving **Agent Skills**.
|
|
14
|
+
|
|
15
|
+
The registry provides **metadata only**.
|
|
16
|
+
It never distributes executables, never installs code, and never mutates environments.
|
|
17
|
+
|
|
18
|
+
Registry v2 exists to enable:
|
|
19
|
+
|
|
20
|
+
- Global skill discovery
|
|
21
|
+
- Publisher attribution
|
|
22
|
+
- Version resolution
|
|
23
|
+
- Cryptographic integrity guarantees
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 2. Design Principles (NON-NEGOTIABLE)
|
|
28
|
+
|
|
29
|
+
1. Registry data is **read-only**
|
|
30
|
+
2. Registry index is **cryptographically signed**
|
|
31
|
+
3. Registry is **advisory**, never authoritative
|
|
32
|
+
4. Lock files always override registry data
|
|
33
|
+
5. Registry never executes or distributes code
|
|
34
|
+
6. Verification is mandatory, silence is forbidden
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 3. Threat Model
|
|
39
|
+
|
|
40
|
+
Registry v2 explicitly defends against:
|
|
41
|
+
|
|
42
|
+
- Registry tampering
|
|
43
|
+
- CDN compromise
|
|
44
|
+
- Man-in-the-middle attacks
|
|
45
|
+
- Skill version substitution
|
|
46
|
+
- Silent metadata modification
|
|
47
|
+
|
|
48
|
+
Registry v2 does **not** attempt to:
|
|
49
|
+
|
|
50
|
+
- Protect against compromised publishers
|
|
51
|
+
- Enforce business logic or licensing
|
|
52
|
+
- Execute or sandbox code
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 4. Architecture Overview
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
[ Registry Operator ]
|
|
61
|
+
|
|
|
62
|
+
| (signed index.json)
|
|
63
|
+
v
|
|
64
|
+
[ Static Hosting / CDN ]
|
|
65
|
+
|
|
|
66
|
+
v
|
|
67
|
+
[ add-skill Client ]
|
|
68
|
+
|
|
69
|
+
````
|
|
70
|
+
|
|
71
|
+
Characteristics:
|
|
72
|
+
|
|
73
|
+
- Static file hosting only
|
|
74
|
+
- HTTPS transport
|
|
75
|
+
- Offline-cacheable
|
|
76
|
+
- No authentication required for read access
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 5. Registry Index File
|
|
81
|
+
|
|
82
|
+
### 5.1 File Name
|
|
83
|
+
|
|
84
|
+
```txt
|
|
85
|
+
index.json
|
|
86
|
+
````
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
### 5.2 Canonical Schema
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"registryVersion": 2,
|
|
95
|
+
"generatedAt": "2026-01-23T14:00:00Z",
|
|
96
|
+
"registryPublisher": "dataguruin",
|
|
97
|
+
"signature": {
|
|
98
|
+
"algorithm": "ed25519",
|
|
99
|
+
"keyId": "dataguruin-registry-v1",
|
|
100
|
+
"value": "BASE64_SIGNATURE"
|
|
101
|
+
},
|
|
102
|
+
"skills": {
|
|
103
|
+
"coinpika-swipe-tabs": {
|
|
104
|
+
"repo": "dataguruin/coinpika-skills",
|
|
105
|
+
"publisher": "dataguruin",
|
|
106
|
+
"description": "Universal swipe-tab architecture for mobile PWA",
|
|
107
|
+
"latest": "1.2.3",
|
|
108
|
+
"versions": {
|
|
109
|
+
"1.2.3": {
|
|
110
|
+
"ref": "v1.2.3",
|
|
111
|
+
"checksum": "sha256:abcd...",
|
|
112
|
+
"engines": ["antigravity", "gemini"],
|
|
113
|
+
"tags": ["ui", "mobile", "swipe"]
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## 6. Signature Model
|
|
124
|
+
|
|
125
|
+
### 6.1 Signed Payload
|
|
126
|
+
|
|
127
|
+
The registry signature covers **all fields except `signature` itself**, including:
|
|
128
|
+
|
|
129
|
+
* `registryVersion`
|
|
130
|
+
* `generatedAt`
|
|
131
|
+
* `registryPublisher`
|
|
132
|
+
* Entire `skills` object
|
|
133
|
+
|
|
134
|
+
Any modification to these fields invalidates the signature.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
### 6.2 Algorithm Requirements
|
|
139
|
+
|
|
140
|
+
* **Required:** `ed25519`
|
|
141
|
+
* **Encoding:** Base64
|
|
142
|
+
* **Key identification:** `keyId` MUST be globally unique per registry
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
### 6.3 Public Key Trust Store
|
|
147
|
+
|
|
148
|
+
Registry public keys are stored locally at:
|
|
149
|
+
|
|
150
|
+
```txt
|
|
151
|
+
~/.add-skill/trusted-registries.json
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Example:
|
|
155
|
+
|
|
156
|
+
```json
|
|
157
|
+
{
|
|
158
|
+
"dataguruin": {
|
|
159
|
+
"keys": {
|
|
160
|
+
"dataguruin-registry-v1": "BASE64_PUBLIC_KEY"
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Rules:
|
|
167
|
+
|
|
168
|
+
* Unknown registry → WARN (FAIL in `--strict`)
|
|
169
|
+
* Invalid signature → FAIL (always)
|
|
170
|
+
* Expired or rotated keys MUST be explicitly trusted
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## 7. Client Resolution Flow
|
|
175
|
+
|
|
176
|
+
### 7.1 Fetch & Cache
|
|
177
|
+
|
|
178
|
+
1. Download `index.json`
|
|
179
|
+
2. Verify signature
|
|
180
|
+
3. Cache locally
|
|
181
|
+
4. Use cached copy when offline
|
|
182
|
+
|
|
183
|
+
Signature verification is mandatory even when using cached data.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
### 7.2 Install Resolution Order
|
|
188
|
+
|
|
189
|
+
When installing a skill, the client resolves metadata in the following order:
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
1. skill-lock.json (--locked mode)
|
|
193
|
+
2. Local registry (registry.json)
|
|
194
|
+
3. Remote registry v2 (signed index)
|
|
195
|
+
4. Explicit org/repo reference
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
The first successful resolution wins.
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## 8. Registry Semantics
|
|
203
|
+
|
|
204
|
+
### 8.1 Registry vs Lock File
|
|
205
|
+
|
|
206
|
+
| Aspect | Registry | Lock File |
|
|
207
|
+
| ---------- | --------- | ----------- |
|
|
208
|
+
| Purpose | Discovery | Determinism |
|
|
209
|
+
| Mutability | Mutable | Immutable |
|
|
210
|
+
| Authority | Advisory | Absolute |
|
|
211
|
+
| CI Usage | Optional | Mandatory |
|
|
212
|
+
|
|
213
|
+
Registry data must **never** override lock file constraints.
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
### 8.2 Version Semantics
|
|
218
|
+
|
|
219
|
+
* Each version entry is immutable
|
|
220
|
+
* Checksum MUST NOT change after publication
|
|
221
|
+
* `latest` is a convenience pointer, not authoritative
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## 9. Client Commands (Registry-Aware)
|
|
226
|
+
|
|
227
|
+
### 9.1 Add Registry
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
add-skill registry add https://registry.example.com/index.json
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
### 9.2 List Registries
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
add-skill registry list
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
### 9.3 Search Skills
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
add-skill search <query>
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
Search includes:
|
|
250
|
+
|
|
251
|
+
* Skill name
|
|
252
|
+
* Description
|
|
253
|
+
* Tags
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
### 9.4 Skill Information
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
add-skill info <skill-name>
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Displays:
|
|
264
|
+
|
|
265
|
+
* Publisher
|
|
266
|
+
* Repository
|
|
267
|
+
* Available versions
|
|
268
|
+
* Registry source
|
|
269
|
+
* Signature status
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## 10. Security Guarantees
|
|
274
|
+
|
|
275
|
+
Registry v2 guarantees:
|
|
276
|
+
|
|
277
|
+
* Registry tampering is detectable
|
|
278
|
+
* Skill substitution is prevented by checksum verification
|
|
279
|
+
* CDN compromise does not bypass trust
|
|
280
|
+
* Silent metadata modification is impossible
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## 11. Failure Modes (EXPLICIT)
|
|
285
|
+
|
|
286
|
+
| Condition | Client Behavior |
|
|
287
|
+
| ------------------- | ------------------------ |
|
|
288
|
+
| Invalid signature | FAIL |
|
|
289
|
+
| Unknown registry | WARN / FAIL (`--strict`) |
|
|
290
|
+
| Network unavailable | Use cached registry |
|
|
291
|
+
| Skill missing | FAIL |
|
|
292
|
+
| Checksum mismatch | FAIL |
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## 12. Governance Recommendations
|
|
297
|
+
|
|
298
|
+
* One registry per publisher identity
|
|
299
|
+
* Separate keys for:
|
|
300
|
+
|
|
301
|
+
* Registry signing
|
|
302
|
+
* Skill signing
|
|
303
|
+
* Key rotation via `keyId`
|
|
304
|
+
* Public audit of registry history
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## 13. Forward Compatibility
|
|
309
|
+
|
|
310
|
+
Registry v2 is designed to support future extensions, including:
|
|
311
|
+
|
|
312
|
+
* Paid skills
|
|
313
|
+
* License metadata
|
|
314
|
+
* Organization namespaces
|
|
315
|
+
* Policy enforcement
|
|
316
|
+
* Audit logs
|
|
317
|
+
* Marketplace integration
|
|
318
|
+
|
|
319
|
+
Backward compatibility must be preserved.
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
## 14. Design Philosophy
|
|
324
|
+
|
|
325
|
+
Registry metadata is **signed policy**, not documentation.
|
|
326
|
+
|
|
327
|
+
Trust must be explicit.
|
|
328
|
+
Verification must be mandatory.
|
|
329
|
+
Distribution must be passive.
|
|
330
|
+
Silence is a bug.
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
**END OF REGISTRY V2 SPEC**
|