skills-atlas-cli 0.4.1 → 0.4.2
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 +6 -5
- package/package.json +1 -1
- package/src/commands/hook.js +8 -2
- package/src/commands/install.js +7 -3
- package/src/commands/suggest.js +8 -5
package/README.md
CHANGED
|
@@ -113,11 +113,12 @@ skills-atlas hook on # enable (skills-atlas hook off / status)
|
|
|
113
113
|
Registers a Claude Code `UserPromptSubmit` hook. When what you ask matches the
|
|
114
114
|
territory of a catalog skill you don't have, the hook hands Claude a short
|
|
115
115
|
shortlist of candidates and **Claude decides** whether any genuinely fits — and
|
|
116
|
-
if so
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
116
|
+
if so, explains **what it does and why it fits your task**, then offers a choice:
|
|
117
|
+
use it now, see what it covers first (`skills-atlas info`), or skip. You don't
|
|
118
|
+
have to know the skill exists. The split is deliberate: the hook does **recall**
|
|
119
|
+
(a distinctive-word match against the catalog, so the right skill is on the
|
|
120
|
+
table), Claude does **precision** (it understands your intent and stays silent
|
|
121
|
+
unless one truly fits, or searches further itself). It's:
|
|
121
122
|
|
|
122
123
|
- **off by default** — you turn it on explicitly; `hook off` removes it cleanly.
|
|
123
124
|
- **quiet** — only fires on a distinctive match (greetings and generic actions
|
package/package.json
CHANGED
package/src/commands/hook.js
CHANGED
|
@@ -69,7 +69,13 @@ module.exports = async function hook(argv) {
|
|
|
69
69
|
if (values.json) { console.log(JSON.stringify({ enabled: sub === 'on', settings: p })); return; }
|
|
70
70
|
console.log(`${green('✓')} autopilot ${sub === 'on' ? 'enabled' : 'disabled'} ${dim(p)}`);
|
|
71
71
|
if (sub === 'on') {
|
|
72
|
-
console.log(
|
|
73
|
-
console.log(
|
|
72
|
+
console.log('\nHow it works: when what you ask lines up with a skill you don\'t have yet, Claude');
|
|
73
|
+
console.log('quietly gets a shortlist and — only if one truly fits — explains it and offers a choice:');
|
|
74
|
+
console.log(dim(' you: "run a pre-mortem before we launch"'));
|
|
75
|
+
console.log(dim(' claude: "that\'s exactly what the pre-mortem skill does — it stress-tests your plan'));
|
|
76
|
+
console.log(dim(' before launch. use it now / see what it covers / skip?"'));
|
|
77
|
+
console.log(dim('\nIt stays silent on greetings and generic asks, never repeats a skill, and Claude makes'));
|
|
78
|
+
console.log(dim('the final call on relevance. Nothing leaves your machine.'));
|
|
79
|
+
console.log(dim('\nneeds `skills-atlas` on PATH (npm i -g skills-atlas-cli). turn off: skills-atlas hook off'));
|
|
74
80
|
}
|
|
75
81
|
};
|
package/src/commands/install.js
CHANGED
|
@@ -275,12 +275,16 @@ module.exports = async function install(argv) {
|
|
|
275
275
|
if (values.inline) {
|
|
276
276
|
const body = readSkillMd(result.dest);
|
|
277
277
|
if (body) {
|
|
278
|
-
console.log('\n' + dim('─── SKILL.md
|
|
278
|
+
console.log('\n' + dim('─── SKILL.md — the skill\'s own instructions; apply them to the task now ───'));
|
|
279
279
|
console.log(body.trim());
|
|
280
280
|
console.log(dim('─── end SKILL.md ───'));
|
|
281
281
|
}
|
|
282
|
-
console.log(
|
|
282
|
+
console.log(`\n${green('✓')} ${bold(skill)} is now active — use the instructions above for the task at hand.`);
|
|
283
|
+
console.log(dim(` installed at ${fsu.tildify(result.dest)} (auto-loads in new sessions) · what it does: skills-atlas info ${skill} · remove: skills-atlas remove ${skill}`));
|
|
283
284
|
} else {
|
|
284
|
-
console.log(
|
|
285
|
+
console.log(`\n${bold(skill)} is installed but not loaded yet. To use it:`);
|
|
286
|
+
console.log(dim(` • now, in this session: skills-atlas use ${skill}`));
|
|
287
|
+
console.log(dim(' • or start a new Claude Code session — it auto-loads from ~/.claude/skills/'));
|
|
288
|
+
console.log(dim(` what it does: skills-atlas info ${skill} · remove: skills-atlas remove ${skill}`));
|
|
285
289
|
}
|
|
286
290
|
};
|
package/src/commands/suggest.js
CHANGED
|
@@ -63,16 +63,19 @@ module.exports = async function suggest() {
|
|
|
63
63
|
|
|
64
64
|
const lines = candidates.map(c => {
|
|
65
65
|
const uc = (c.row.use_case_en || c.row.use_case || '').replace(/\s+/g, ' ').trim().slice(0, 80);
|
|
66
|
-
return `- ${c.skill}${uc ? ` — ${uc}` : ''} (
|
|
66
|
+
return `- ${c.skill}${uc ? ` — ${uc}` : ''} (details: \`skills-atlas info ${c.skill}\` · use now: \`skills-atlas use ${c.skill} --yes\`)`;
|
|
67
67
|
}).join('\n');
|
|
68
68
|
const ctx =
|
|
69
69
|
`[Skills Atlas autopilot] The user may be doing something one of these installable agent ` +
|
|
70
70
|
`skills is built for. Judge for yourself — do NOT mention any of this unless one of them ` +
|
|
71
71
|
`genuinely fits what they actually asked:\n${lines}\n` +
|
|
72
|
-
`If one
|
|
73
|
-
`
|
|
74
|
-
|
|
75
|
-
`
|
|
72
|
+
`If one genuinely fits, DON'T just name it: in one line tell the user what it does and why it ` +
|
|
73
|
+
`fits THIS task (it's a curated skill from the Skills Atlas catalog, not something you made up), ` +
|
|
74
|
+
`then let them choose — activate it now (\`skills-atlas use <skill> --yes\` installs + applies it ` +
|
|
75
|
+
`immediately), see what it covers first (\`skills-atlas info <skill>\`), or skip and you'll just ` +
|
|
76
|
+
`do the task yourself. If none fit but the task plainly needs a specialized skill, you may run ` +
|
|
77
|
+
`\`skills-atlas search "<short intent>"\` to look further. If nothing fits, say nothing about this ` +
|
|
78
|
+
`at all — don't mention this hook, these skills, or that a suggestion was made.`;
|
|
76
79
|
console.log(JSON.stringify({ hookSpecificOutput: { hookEventName: 'UserPromptSubmit', additionalContext: ctx } }));
|
|
77
80
|
|
|
78
81
|
state.lastSuggestedCount = state.count;
|