@lythos/skill-deck 0.5.1 → 0.6.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.md +21 -15
- package/package.json +1 -1
- package/src/link.ts +33 -1
package/README.md
CHANGED
|
@@ -129,21 +129,27 @@ Different agents look for skills in different directories. `skill-deck.toml` con
|
|
|
129
129
|
|
|
130
130
|
> **If you are an agent**: verify where your platform scans for skills, then set `working_set` to that path before running `deck link`.
|
|
131
131
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
132
|
+
### Troubleshooting
|
|
133
|
+
|
|
134
|
+
| Symptom | Cause | Fix |
|
|
135
|
+
|---------|-------|-----|
|
|
136
|
+
| `❌ Skill not found: <name>` | Skill declared in deck but not in cold pool | `bunx @lythos/skill-deck add github.com/owner/repo/skill` or clone manually into cold pool |
|
|
137
|
+
| `link` skips entries with warnings | Real files/directories exist in working set (not symlinks) | Delete the real directories in `working_set` and re-run `link`. Never create directories manually there |
|
|
138
|
+
| `link` refuses with "budget exceeded" | Declared skills > `max_cards` | Increase `max_cards` in `skill-deck.toml` or remove unused skills |
|
|
139
|
+
| `link` refuses with "unsafe working_set" | `working_set` resolves to `~` or `/` | Check `skill-deck.toml` has correct relative path (e.g. `.claude/skills/`) |
|
|
140
|
+
| Agent doesn't see skills after `link` | `working_set` path doesn't match agent's scan location | Claude Code: `.claude/skills/`; Cursor: `.cursor/skills/`; Kimi: check your platform docs. Set `working_set` correctly |
|
|
141
|
+
| Broken symlinks in working set | Skill moved or deleted from cold pool | Re-run `link` — it recreates symlinks automatically |
|
|
142
|
+
| `deck add` fails with 404 | Locator format wrong or repo doesn't exist | Format: `github.com/owner/repo/skill-name` (path to skill directory inside repo) |
|
|
143
|
+
| `skill-deck.toml not found` | Running `link` outside project tree | Run from project root, or use `--deck ./path/to/skill-deck.toml` |
|
|
144
|
+
|
|
145
|
+
## More Documentation
|
|
146
|
+
|
|
147
|
+
- **Skill layer** (agent-facing instructions):
|
|
148
|
+
[`packages/lythoskill-deck/skill/SKILL.md`](https://github.com/lythos-labs/lythoskill/blob/main/packages/lythoskill-deck/skill/SKILL.md)
|
|
149
|
+
- **Full project README** (ecosystem overview, cold pool setup):
|
|
150
|
+
[`README.md`](https://github.com/lythos-labs/lythoskill#readme)
|
|
151
|
+
- **Architecture** (thin-skill pattern, three-layer separation):
|
|
152
|
+
[`AGENTS.md`](https://github.com/lythos-labs/lythoskill/blob/main/AGENTS.md)
|
|
147
153
|
|
|
148
154
|
## License
|
|
149
155
|
|
package/package.json
CHANGED
package/src/link.ts
CHANGED
|
@@ -172,8 +172,36 @@ for (const [key, value] of Object.entries(deck.transient || {})) {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
if (errors.length > 0) {
|
|
175
|
-
for (const e of errors)
|
|
175
|
+
for (const e of errors) {
|
|
176
|
+
console.error(`❌ ${e}`);
|
|
177
|
+
// 智能引导:如果 skill 在工作集中以真实目录存在,提示移到冷池
|
|
178
|
+
const match = e.match(/^Skill not found: (.+)$/);
|
|
179
|
+
if (match) {
|
|
180
|
+
const skillName = match[1];
|
|
181
|
+
const wsEntry = join(WORKING_SET, skillName);
|
|
182
|
+
if (existsSync(wsEntry)) {
|
|
183
|
+
const st = lstatSync(wsEntry);
|
|
184
|
+
if (st.isDirectory() && !st.isSymbolicLink()) {
|
|
185
|
+
console.error(` → Found a real directory at ${relative(PROJECT_DIR, wsEntry)}`);
|
|
186
|
+
const cpRel = relative(PROJECT_DIR, COLD_POOL);
|
|
187
|
+
const cpHint = cpRel === "" ? `skills/${skillName}` : `${cpRel}/${skillName}`;
|
|
188
|
+
console.error(` Move it to your cold pool (${cpHint}) and retry.`);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
176
193
|
// 继续执行已找到的 skill,不因个别缺失中断全部
|
|
194
|
+
|
|
195
|
+
// 引导:如果 cold pool 为空,给出更明确的指引
|
|
196
|
+
const hasSkills = existsSync(COLD_POOL) && readdirSync(COLD_POOL).filter(e => !e.startsWith('.')).length > 0;
|
|
197
|
+
if (!hasSkills) {
|
|
198
|
+
console.error(`\n💡 Cold pool is empty. To add skills:`);
|
|
199
|
+
console.error(` bunx @lythos/skill-deck add github.com/owner/repo/skill`);
|
|
200
|
+
console.error(` # or manually: git clone <repo> ~/.agents/skill-repos/github.com/owner/repo`);
|
|
201
|
+
} else {
|
|
202
|
+
console.error(`\n💡 To install missing skills:`);
|
|
203
|
+
console.error(` bunx @lythos/skill-deck add github.com/owner/repo/skill`);
|
|
204
|
+
}
|
|
177
205
|
}
|
|
178
206
|
|
|
179
207
|
// ── 预算检查(硬约束,链接前检查)──────────────────────────
|
|
@@ -222,6 +250,10 @@ try {
|
|
|
222
250
|
const st = lstatSync(entryPath);
|
|
223
251
|
if (!st.isSymbolicLink()) {
|
|
224
252
|
console.warn(`⚠️ Skipping non-symlink entry: ${entry}`);
|
|
253
|
+
console.warn(` → ${entry} is a real directory, not a symlink. Deck only manages symlinks.`);
|
|
254
|
+
const cpRel2 = relative(PROJECT_DIR, COLD_POOL);
|
|
255
|
+
const cpHint2 = cpRel2 === "" ? `skills/${entry}` : `${cpRel2}/${entry}`;
|
|
256
|
+
console.warn(` Move it to your cold pool (${cpHint2}) and run link again.`);
|
|
225
257
|
continue;
|
|
226
258
|
}
|
|
227
259
|
} catch { continue; }
|