@victortomaili/skill-cli 0.5.1 → 0.6.1
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 +30 -0
- package/README.md +12 -9
- package/package.json +1 -1
- package/src/cli.js +3 -3
- package/src/commands/defaults.js +27 -15
- package/src/lib/agents-md.js +26 -20
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
- Cursor adapter (`.cursor/rules` format) for `init -g` bootstrap.
|
|
12
12
|
- Per-agent hook adapters for automatic `/X` triggering (push model).
|
|
13
13
|
|
|
14
|
+
## [0.6.1] - 2026-07-07
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- Renamed the agent catalog command `skill defaults` → **`skill active`** (`skill
|
|
18
|
+
status` is an alias; `skill defaults` is kept as a legacy alias so already-bootstrapped
|
|
19
|
+
agents keep working). It now lists ONLY the skills active in the current project
|
|
20
|
+
(defaults + project allow, minus deny) with full descriptions — not every installed
|
|
21
|
+
skill. `skill default <name>` / `skill undefault <name>` (marking) are unchanged.
|
|
22
|
+
- AGENTS.md START GATE updated to run `skill active` and scope the catalog to
|
|
23
|
+
active skills.
|
|
24
|
+
|
|
25
|
+
## [0.6.0] - 2026-07-07
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
- **`skill defaults` is now a description-only catalog.** It lists EVERY installed
|
|
29
|
+
skill (name + full description + triggers; ★ marks defaults) — never the skill
|
|
30
|
+
body. The agent reads the catalog and decides per skill: functional for the task
|
|
31
|
+
→ `skill cat <name>`; context-altering (changes HOW the agent responds) → propose
|
|
32
|
+
and wait for the user's confirmation. This follows the existing SKILL.md standard
|
|
33
|
+
— no extra frontmatter field is required or expected on any skill.
|
|
34
|
+
- **Context-altering detection is the agent's judgment, from the description.** Any
|
|
35
|
+
skill can be context-altering (including ones installed later); the agent decides
|
|
36
|
+
from the description text, with no hardcoded list. (`skill cat` is unchanged — it
|
|
37
|
+
still loads a full skill on demand.)
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
- AGENTS.md START GATE now enforces **"LOADED ≠ LISTED"**: a skill is loaded only
|
|
41
|
+
if the agent ran `skill cat <name>` for it this session — listing/cataloging a
|
|
42
|
+
skill (or its ★ / `active` status) is not loading.
|
|
43
|
+
|
|
14
44
|
## [0.5.1] - 2026-07-07
|
|
15
45
|
|
|
16
46
|
### Fixed
|
package/README.md
CHANGED
|
@@ -83,7 +83,7 @@ short bootstrap block telling it to run `skill` on `/X`.
|
|
|
83
83
|
| `skill disable <name> [-g]` | Deny in project, or remove global default with `-g` |
|
|
84
84
|
| `skill default <name>` | Mark a default skill (global: active + auto-load) |
|
|
85
85
|
| `skill undefault <name>` | Remove the default flag |
|
|
86
|
-
| `skill
|
|
86
|
+
| `skill active` | List ACTIVE skills + descriptions (the command your agent runs on start; alias: `status`) |
|
|
87
87
|
| `skill list` | Show installed + active skills (cwd-aware, ★ = default) |
|
|
88
88
|
| `skill show <name>` | Skill metadata (path, triggers, version) |
|
|
89
89
|
| `skill cat <name>` | Dump skill content into context |
|
|
@@ -181,8 +181,8 @@ with no source also opens it.
|
|
|
181
181
|
A **default** is a skill that is **active by default in every project** AND
|
|
182
182
|
**auto-loaded on agent session start** — one unified global list in `config.yaml`
|
|
183
183
|
(`defaults:`). Mark one with `skill default <name>`, remove with
|
|
184
|
-
`skill undefault <name>`, list them with `skill
|
|
185
|
-
block tells your agent to run `skill
|
|
184
|
+
`skill undefault <name>`, list them with `skill active`. The AGENTS.md bootstrap
|
|
185
|
+
block tells your agent to run `skill active` on start, then `skill cat <name>`
|
|
186
186
|
for each.
|
|
187
187
|
|
|
188
188
|
Defaults are a **global** concept (never per-project). A project can still turn a
|
|
@@ -197,12 +197,15 @@ default; `space` toggles the per-project override.
|
|
|
197
197
|
instruction file (`CLAUDE.md`, `AGENTS.md`, `GEMINI.md`):
|
|
198
198
|
|
|
199
199
|
> **START GATE:** on the first user message, your VERY FIRST action — BEFORE
|
|
200
|
-
> ANYTHING ELSE (before thinking, before any tool call) — is `skill
|
|
201
|
-
>
|
|
202
|
-
>
|
|
203
|
-
>
|
|
204
|
-
> **
|
|
205
|
-
>
|
|
200
|
+
> ANYTHING ELSE (before thinking, before any tool call) — is `skill active`, the
|
|
201
|
+
> skill **catalog** (every skill's name + full description; never the body). Read
|
|
202
|
+
> it and decide per skill from its description: **functional** for the task → load
|
|
203
|
+
> it (`skill cat <name>`); **context-altering** (changes HOW you respond —
|
|
204
|
+
> style/mode) → **propose**, apply only after the user confirms (`/X` = confirm).
|
|
205
|
+
> **LOADED ≠ LISTED**: a skill is loaded only if you `cat`-ed it this session —
|
|
206
|
+
> listing it (or its ★ / `active` status) is not loading. Any skill can be
|
|
207
|
+
> context-altering; the agent judges from the description (no flag, no fixed list).
|
|
208
|
+
> `/X` → `skill trigger X`.
|
|
206
209
|
|
|
207
210
|
It's wrapped in `<!-- BEGIN skill-cli --> … <!-- END skill-cli -->` markers, never
|
|
208
211
|
duplicates, and preserves your existing file content. Re-run `init -g` any time —
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@victortomaili/skill-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Cross-agent skill manager — one global store, clean agent folders, activation via skill.config",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Victor Tomaili <victor@tomaili.com>",
|
package/src/cli.js
CHANGED
|
@@ -12,7 +12,7 @@ import { cmdUpdate } from './commands/update.js'
|
|
|
12
12
|
import { cmdRemove } from './commands/remove.js'
|
|
13
13
|
import { cmdSearch } from './commands/search.js'
|
|
14
14
|
import { cmdManager } from './commands/manager.js'
|
|
15
|
-
import {
|
|
15
|
+
import { cmdActive, cmdDefault, cmdUndefault } from './commands/defaults.js'
|
|
16
16
|
import { isInteractive } from './lib/interactive.js'
|
|
17
17
|
import { VERSION } from './lib/version.js'
|
|
18
18
|
|
|
@@ -33,11 +33,11 @@ ${c.bold('Activation')}
|
|
|
33
33
|
${c.cyan('skill enable')} ${c.gray('<name> [-g]')} allow in project, or global default (-g)
|
|
34
34
|
${c.cyan('skill disable')} ${c.gray('<name> [-g]')} deny in project, or remove global default (-g)
|
|
35
35
|
${c.cyan('skill list')} installed + active skills (cwd-aware)
|
|
36
|
+
${c.cyan('skill active')} active skills + descriptions (agent runs on start; alias: status)
|
|
36
37
|
|
|
37
38
|
${c.bold('Defaults (active + auto-load)')}
|
|
38
39
|
${c.cyan('skill default')} ${c.gray('<name>')} mark a default skill (global: active in every project)
|
|
39
40
|
${c.cyan('skill undefault')} ${c.gray('<name>')} remove the default flag
|
|
40
|
-
${c.cyan('skill defaults')} list default skills (agent runs this on start)
|
|
41
41
|
|
|
42
42
|
${c.bold('Usage (agent)')}
|
|
43
43
|
${c.cyan('skill show')} ${c.gray('<name>')} metadata + path + triggers
|
|
@@ -90,7 +90,7 @@ async function main() {
|
|
|
90
90
|
case 'enable': cmdEnable(rest); break
|
|
91
91
|
case 'disable': cmdDisable(rest); break
|
|
92
92
|
case 'list': case 'ls': cmdList(rest); break
|
|
93
|
-
case 'defaults':
|
|
93
|
+
case 'active': case 'status': case 'defaults': cmdActive(rest); break
|
|
94
94
|
case 'default': case 'def': cmdDefault(rest); break
|
|
95
95
|
case 'undefault': case 'undef': cmdUndefault(rest); break
|
|
96
96
|
case 'show': case 'info': cmdShow(rest); break
|
package/src/commands/defaults.js
CHANGED
|
@@ -1,34 +1,46 @@
|
|
|
1
1
|
import c from 'picocolors'
|
|
2
2
|
import { listStore } from '../lib/store.js'
|
|
3
|
-
import { readGlobalConfig, writeGlobalConfig,
|
|
4
|
-
import { trunc } from '../lib/format.js'
|
|
3
|
+
import { readGlobalConfig, writeGlobalConfig, readProjectConfig, computeEffective } from '../lib/config.js'
|
|
5
4
|
|
|
6
|
-
// `skill
|
|
7
|
-
//
|
|
8
|
-
// agent
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
|
|
5
|
+
// `skill active` (aliases: `status`, legacy `defaults`) — the description-only
|
|
6
|
+
// catalog of ACTIVE skills in the current project (defaults + project allow,
|
|
7
|
+
// minus deny). The agent runs this at session start: it lists each active skill's
|
|
8
|
+
// name + FULL description (never the body), then the agent itself decides per
|
|
9
|
+
// skill — functional → `skill cat`, context-altering → propose. Detection of
|
|
10
|
+
// context-altering is the agent's judgment from the description (no flag, no fixed
|
|
11
|
+
// list), so it works for any skill, including ones installed later.
|
|
12
|
+
export function cmdActive() {
|
|
12
13
|
const installed = listStore()
|
|
13
14
|
const globalCfg = readGlobalConfig()
|
|
14
|
-
const
|
|
15
|
+
const projCfg = readProjectConfig()
|
|
16
|
+
const eff = computeEffective(installed, globalCfg, projCfg)
|
|
17
|
+
const defs = new Set((globalCfg.defaults || []).map(d => String(d).toLowerCase()))
|
|
15
18
|
|
|
16
|
-
console.log(c.bold('skill
|
|
19
|
+
console.log(c.bold('skill active') + c.gray(' — active skills in this project (descriptions only; functional → `skill cat`, context-altering → propose)'))
|
|
17
20
|
console.log()
|
|
18
21
|
|
|
19
22
|
if (eff.length === 0) {
|
|
20
|
-
console.log(c.gray(' No
|
|
23
|
+
console.log(c.gray(' No active skills in this project.'))
|
|
21
24
|
return
|
|
22
25
|
}
|
|
23
26
|
|
|
27
|
+
// CATALOG of ACTIVE skills only (not all installed): defaults + project allow,
|
|
28
|
+
// minus deny. Print each one's name + FULL description (one line) + triggers —
|
|
29
|
+
// never the body. The agent reads descriptions and itself decides per skill:
|
|
30
|
+
// load (skill cat) if functional for the task, or PROPOSE if context-altering
|
|
31
|
+
// (changes HOW the agent responds). Detection is the agent's judgment from the
|
|
32
|
+
// description, so it works for any skill — including ones installed later —
|
|
33
|
+
// with no hardcoded list or flag.
|
|
24
34
|
for (const name of eff) {
|
|
25
35
|
const s = installed.find(x => x.name === name)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
if (!s) continue
|
|
37
|
+
const star = defs.has(s.name.toLowerCase()) ? c.yellow('★') + ' ' : ' '
|
|
38
|
+
const trg = s.triggers.length ? ' ' + c.gray('/' + s.triggers.join(', /')) : ''
|
|
39
|
+
console.log(` ${star}${c.bold(s.name)}${trg}`)
|
|
40
|
+
if (s.description) console.log(c.gray(' ' + String(s.description).replace(/[\r\n]+/g, ' ').trim()))
|
|
29
41
|
}
|
|
30
42
|
console.log()
|
|
31
|
-
console.log(c.gray('Load
|
|
43
|
+
console.log(c.yellow('★') + c.gray(' = default. Load a skill: ') + c.cyan('skill cat <name>'))
|
|
32
44
|
}
|
|
33
45
|
|
|
34
46
|
// `skill default <name>` — mark a skill as a default (active by default in every
|
package/src/lib/agents-md.js
CHANGED
|
@@ -6,8 +6,10 @@ const BEGIN = '<!-- BEGIN skill-cli -->'
|
|
|
6
6
|
const END = '<!-- END skill-cli -->'
|
|
7
7
|
|
|
8
8
|
// Global instruction block — injected into each agent's global instruction file.
|
|
9
|
-
//
|
|
10
|
-
//
|
|
9
|
+
// `skill active` (alias: `status`) is a description-only CATALOG of ACTIVE skills;
|
|
10
|
+
// decides per skill: functional → `skill cat`, context-altering → propose. No flag
|
|
11
|
+
// or fixed list — detection is the agent's judgment from the description, so it
|
|
12
|
+
// covers any skill (including ones installed later).
|
|
11
13
|
export const AGENTS_BLOCK = `## skill-cli
|
|
12
14
|
|
|
13
15
|
This machine uses the \`skill\` command to manage skills (instruction / workflow
|
|
@@ -23,25 +25,29 @@ Usage:
|
|
|
23
25
|
|
|
24
26
|
START GATE (mandatory): On the FIRST user message of a session, your VERY FIRST
|
|
25
27
|
action — BEFORE ANYTHING ELSE: before you start thinking/reasoning about the task
|
|
26
|
-
and before any tool call — MUST be to run \`skill
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
and before any tool call — MUST be to run \`skill active\`. It prints the skill
|
|
29
|
+
CATALOG — every ACTIVE skill's name + FULL description (NOT the skill body).
|
|
30
|
+
Read it, then for EACH skill decide FROM ITS DESCRIPTION:
|
|
31
|
+
- Functional / useful for THIS task → load it: \`skill cat <name>\`.
|
|
32
|
+
- Changes HOW you respond (a style, tone, format, or persistent MODE — e.g. a
|
|
33
|
+
brevity/compression style) → it is CONTEXT-ALTERING: PROPOSE it to the user and
|
|
34
|
+
apply ONLY after they confirm (\`/X\` = confirm). Do NOT load/apply it yourself.
|
|
35
|
+
LOADED ≠ LISTED. A skill is loaded ONLY if you have run \`skill cat <name>\` for
|
|
36
|
+
it THIS session. Seeing a skill in \`skill active\` / \`skill list\` does NOT load
|
|
37
|
+
it — you then know only its name + description, nothing more. Never infer a skill
|
|
38
|
+
is in your context from its name, the \u2605 marker, or an \`active\` status: if you
|
|
39
|
+
haven't catted it, treat it as NOT loaded (then decide: cat it, or propose it).
|
|
40
|
+
Do not assume a skill is already applied — \`active\`/\u2605-default = AVAILABLE, not
|
|
41
|
+
APPLIED. ANY skill can be context-altering; judge from the description — there is
|
|
42
|
+
no fixed list and no flag. Do this even if the task looks trivial: skills shape
|
|
43
|
+
how you approach it, so you cannot reason about it correctly until you've reviewed
|
|
44
|
+
them.
|
|
30
45
|
|
|
31
|
-
Discovery (
|
|
32
|
-
|
|
33
|
-
\`skill
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
re-evaluate the current message and load/propose any newly-relevant skill.
|
|
37
|
-
|
|
38
|
-
Context-altering skills (HARD RULE): Some skills change HOW you respond — output
|
|
39
|
-
style, tone, format, or a persistent mode (e.g. a terseness/compression style) —
|
|
40
|
-
rather than just adding task knowledge. These are PROPOSE-ONLY. You MUST propose
|
|
41
|
-
such a skill and apply it ONLY after the user confirms; an explicit \`/X\` trigger
|
|
42
|
-
counts as confirmation. \`active\` / \u2605-default means AVAILABLE, not APPLIED —
|
|
43
|
-
propose \u2260 auto-apply. This rule overrides any other skill's "always use" rule for
|
|
44
|
-
context-altering skills.
|
|
46
|
+
Discovery (every message): On EVERY later user message, re-check the catalog
|
|
47
|
+
against the new request; load any newly-relevant functional skill
|
|
48
|
+
(\`skill cat <name>\`), and PROPOSE any newly-relevant context-altering one.
|
|
49
|
+
Load each skill only ONCE per session (\`skill trigger <keyword>\` resolves a
|
|
50
|
+
keyword to a skill).
|
|
45
51
|
|
|
46
52
|
Triggers: when the user types \`/X\`, run \`skill trigger X\`.
|
|
47
53
|
- Single match → apply the output directly.
|