You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: skills/bailian-cli/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ description: >-
17
17
18
18
## Version & updates (agent — do this BEFORE any other action)
19
19
20
-
**MANDATORY:** Before running any `bl` command, follow [`assets/versioning.md`](assets/versioning.md). If versions mismatch, ask the user whether to upgrade — do not proceed silently.
20
+
**MANDATORY:** Before running any `bl` command, complete the **Agent pre-flight checklist** in [`assets/versioning.md`](assets/versioning.md). Do NOT run any `bl` command until the checklist is complete. If versions mismatch, ask the user whether to upgrade — do not proceed silently.
Copy file name to clipboardExpand all lines: skills/bailian-cli/assets/versioning.md
+26-37Lines changed: 26 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,48 +8,37 @@
8
8
agent** (non-TTY stderr), so the user never learns their `bl` is outdated. The
9
9
agent must take over that responsibility.
10
10
11
-
Run this flow **once per session**, before the first `bl` command.
11
+
## Agent pre-flight checklist (MANDATORY)
12
12
13
-
---
14
-
15
-
## 1. Align the skill with the installed CLI
13
+
**Do NOT run any `bl` command until you complete this checklist.** Run it **once per session**, before the first `bl` command. Cache the result — do not re-check before every command.
16
14
17
-
1.**Skill version** — `metadata.version` in this skill's `SKILL.md` frontmatter.
3. If the two strings **differ**, refresh the skill first:
15
+
1. Read this skill's version from `SKILL.md` frontmatter: `metadata.version`.
16
+
2. Check the installed CLI version:
20
17
```bash
21
-
npx skills add modelstudioai/cli --all -g -y
18
+
bl --version
22
19
```
20
+
If this fails, see [Missing `bl`](#missing-bl) below.
21
+
3. Compare the two versions (ignore the `bl` prefix; compare only `X.Y.Z`):
22
+
- If `metadata.version` ≠ `bl --version`, refresh the skill before doing anything else:
23
+
```bash
24
+
npx skills add modelstudioai/cli --all -g -y
25
+
```
26
+
- Do not trust a stale `reference/` when versions mismatch — flags may be wrong.
27
+
4. Check the latest published CLI version:
28
+
```bash
29
+
npm view bailian-cli version
30
+
```
31
+
5. If the installed `bl` is **older** than the latest npm version, **STOP** the current task and **ask the user** (report skill version, installed CLI version, and npm latest):
32
+
> A newer version of bl is available (current: X.Y.Z, latest: A.B.C). Upgrade before continuing?
33
+
- **Do NOT auto-upgrade silently** — the user decides.
34
+
- If the user agrees: run `bl update`, then continue. (`bl update` upgrades `bailian-cli` via npm and, on success, also runs `npx skills add modelstudioai/cli --all -g -y` to keep the skill in lockstep across all agent apps.)
35
+
- If the user declines: continue with the current version and note it in the summary.
36
+
- If `npm view` / `bl update` fails (offline, registry blocked, permission): continue with the current `bl` and tell the user it could not be updated.
37
+
6. Only proceed with the user's actual task after the above is resolved.
23
38
24
-
Do not trust a stale `reference/` when versions mismatch — flags may be wrong.
25
-
26
-
## 2. Check the CLI against the latest published release
27
-
28
-
```bash
29
-
npm view bailian-cli version # latest on npm
30
-
```
31
-
32
-
Compare with `bl --version`. If the installed `bl` is **older** than the latest:
33
-
34
-
```bash
35
-
bl update
36
-
```
37
-
38
-
`bl update` upgrades `bailian-cli` via npm and, on success, also runs
39
-
`npx skills add modelstudioai/cli --all -g -y` to keep the skill in lockstep across all agent apps.
40
-
41
-
## 3. Update policy — always ask first
42
-
43
-
- When any version mismatch is detected, **stop and ask the user before proceeding**.
44
-
- Report: skill version, installed CLI version, and npm latest.
45
-
- Ask: "A newer version of bl is available (current: X.Y.Z, latest: A.B.C). Upgrade before continuing?"
46
-
-**Do NOT auto-upgrade silently** — the user decides.
47
-
- If the user agrees, run `bl update`, then continue the task.
48
-
- If the user declines, continue with the current version and note it in the summary.
49
-
- Do this **at most once per session** (cache the result; do not re-check before every command).
50
-
- If `npm view` / `bl update` fails (offline, registry blocked, permission), do **not** block the task — continue with the current `bl` and tell the user it could not be updated.
39
+
---
51
40
52
-
## 4. Missing `bl`
41
+
## Missing `bl`
53
42
54
43
If `bl --version` fails, install the CLI and skill:
55
44
@@ -58,7 +47,7 @@ npm install -g bailian-cli
58
47
npx skills add modelstudioai/cli --all -g
59
48
```
60
49
61
-
## 5. Mention it in the task summary
50
+
## Mention it in the task summary
62
51
63
52
If you ran `bl update`, include it in your end-of-task summary (see
64
53
[SKILL.md → Summarize what you did](../SKILL.md#summarize-what-you-did)), e.g.
0 commit comments