codebyplan 1.13.32 → 1.13.34
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/dist/cli.js +2 -2
- package/package.json +1 -1
- package/templates/hooks/cbp-statusline.mjs +25 -43
- package/templates/hooks/cbp-statusline.py +24 -31
- package/templates/hooks/cbp-statusline.sh +28 -33
- package/templates/hooks/cbp-subagent-statusline.mjs +1 -0
- package/templates/hooks/cbp-subagent-statusline.py +1 -0
- package/templates/hooks/cbp-subagent-statusline.sh +1 -0
- package/templates/skills/cbp-build-cc-mode/SKILL.md +38 -54
- package/templates/skills/cbp-build-cc-skill/SKILL.md +1 -1
- package/templates/skills/cbp-build-cc-skill/reference/frontmatter-fields.md +1 -1
- package/templates/skills/cbp-build-cc-skill/scripts/validate-skill.sh +8 -4
- package/templates/skills/cbp-build-cc-skill/templates/skill.md +2 -2
- package/templates/skills/cbp-merge-main/SKILL.md +0 -1
- package/templates/skills/cbp-setup-e2e/SKILL.md +0 -1
- package/templates/skills/cbp-setup-eslint/SKILL.md +0 -1
- package/templates/skills/cbp-ship-main/SKILL.md +0 -1
- package/templates/skills/cbp-supabase-branch-check/SKILL.md +0 -1
- package/templates/skills/cbp-supabase-migrate/SKILL.md +0 -1
package/dist/cli.js
CHANGED
|
@@ -14,7 +14,7 @@ var VERSION, PACKAGE_NAME;
|
|
|
14
14
|
var init_version = __esm({
|
|
15
15
|
"src/lib/version.ts"() {
|
|
16
16
|
"use strict";
|
|
17
|
-
VERSION = "1.13.
|
|
17
|
+
VERSION = "1.13.34";
|
|
18
18
|
PACKAGE_NAME = "codebyplan";
|
|
19
19
|
}
|
|
20
20
|
});
|
|
@@ -394,7 +394,7 @@ var init_statusline_config = __esm({
|
|
|
394
394
|
lines: {
|
|
395
395
|
identity: true,
|
|
396
396
|
context: true,
|
|
397
|
-
cost:
|
|
397
|
+
cost: false,
|
|
398
398
|
rate_limits: true,
|
|
399
399
|
repo_pr: true,
|
|
400
400
|
worktree: true,
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
// @scope: org-shared
|
|
2
3
|
// @hook: NOT-A-HOOK (statusLine renderer, invoked via the cbp-statusline.sh dispatcher)
|
|
3
4
|
// Claude Code Status Line — node renderer (ESM; .mjs forces ESM regardless of the
|
|
4
5
|
// host repo's package.json "type", so the script is portable into any consumer).
|
|
@@ -42,7 +43,10 @@ function main() {
|
|
|
42
43
|
};
|
|
43
44
|
|
|
44
45
|
const MODEL_ID = get(data, ["model", "id"], "");
|
|
45
|
-
const MODEL_NAME = get(data, ["model", "display_name"], "")
|
|
46
|
+
const MODEL_NAME = get(data, ["model", "display_name"], "").replace(
|
|
47
|
+
/\s*\(1M context\)\s*$/,
|
|
48
|
+
""
|
|
49
|
+
);
|
|
46
50
|
const CWD = get(data, ["cwd"], "");
|
|
47
51
|
const WS_CURRENT_DIR = get(data, ["workspace", "current_dir"], "");
|
|
48
52
|
const WS_REPO_HOST = get(data, ["workspace", "repo", "host"], "");
|
|
@@ -55,26 +59,6 @@ function main() {
|
|
|
55
59
|
const LINES_DEL = get(data, ["cost", "total_lines_removed"], 0);
|
|
56
60
|
const CTX_SIZE = get(data, ["context_window", "context_window_size"], 200000);
|
|
57
61
|
const CTX_PCT = get(data, ["context_window", "used_percentage"], 0);
|
|
58
|
-
const CUR_IN = get(
|
|
59
|
-
data,
|
|
60
|
-
["context_window", "current_usage", "input_tokens"],
|
|
61
|
-
0
|
|
62
|
-
);
|
|
63
|
-
const CUR_OUT = get(
|
|
64
|
-
data,
|
|
65
|
-
["context_window", "current_usage", "output_tokens"],
|
|
66
|
-
0
|
|
67
|
-
);
|
|
68
|
-
const CACHE_CREATE = get(
|
|
69
|
-
data,
|
|
70
|
-
["context_window", "current_usage", "cache_creation_input_tokens"],
|
|
71
|
-
0
|
|
72
|
-
);
|
|
73
|
-
const CACHE_READ = get(
|
|
74
|
-
data,
|
|
75
|
-
["context_window", "current_usage", "cache_read_input_tokens"],
|
|
76
|
-
0
|
|
77
|
-
);
|
|
78
62
|
const EXCEEDS_200K = get(data, ["exceeds_200k_tokens"], false);
|
|
79
63
|
const EFFORT = get(data, ["effort", "level"], "");
|
|
80
64
|
const RATE_5H_PCT = get(
|
|
@@ -113,7 +97,7 @@ function main() {
|
|
|
113
97
|
const cfg = {
|
|
114
98
|
identity: true,
|
|
115
99
|
context: true,
|
|
116
|
-
cost:
|
|
100
|
+
cost: false,
|
|
117
101
|
rate_limits: true,
|
|
118
102
|
repo_pr: true,
|
|
119
103
|
worktree: true,
|
|
@@ -234,7 +218,8 @@ function main() {
|
|
|
234
218
|
const delta = Math.trunc(Number(epoch)) - cbpNow();
|
|
235
219
|
if (delta <= 0) return "now";
|
|
236
220
|
if (delta >= 86400) return `${Math.floor(delta / 86400)}d`;
|
|
237
|
-
if (delta >= 3600)
|
|
221
|
+
if (delta >= 3600)
|
|
222
|
+
return `${Math.floor(delta / 3600)}h${Math.floor((delta % 3600) / 60)}m`;
|
|
238
223
|
return `${Math.floor(delta / 60)}m`;
|
|
239
224
|
};
|
|
240
225
|
|
|
@@ -266,10 +251,11 @@ function main() {
|
|
|
266
251
|
// LINE 1 — Identity
|
|
267
252
|
// ============================================================
|
|
268
253
|
if (shouldShow("IDENTITY", cfg.identity)) {
|
|
254
|
+
// Line A — location: folder + branch + wt/session/agent prefix
|
|
269
255
|
let L1 = "";
|
|
270
256
|
if (FOLDER) {
|
|
271
|
-
L1 =
|
|
272
|
-
if (BRANCH) L1 += ` ${C.DIM}
|
|
257
|
+
L1 = `📂 ${C.BOLD}${C.BLUE}${FOLDER}${C.RST}`;
|
|
258
|
+
if (BRANCH) L1 += ` ${C.DIM}🔀${C.RST} ${C.CYAN}${BRANCH}${C.RST}`;
|
|
273
259
|
L1 += " ";
|
|
274
260
|
}
|
|
275
261
|
if (WT_NAME) {
|
|
@@ -279,16 +265,19 @@ function main() {
|
|
|
279
265
|
} else if (AGENT_NAME) {
|
|
280
266
|
L1 += `${C.DIM}agent:${C.RST}${C.MAGENTA}${AGENT_NAME}${C.RST} `;
|
|
281
267
|
}
|
|
268
|
+
// Line B — model: display name + effort + style + vim
|
|
269
|
+
let L1B = "";
|
|
282
270
|
if (MODEL_NAME) {
|
|
283
|
-
|
|
271
|
+
L1B += `${C.BOLD}${C.CYAN}${MODEL_NAME}${C.RST}`;
|
|
284
272
|
} else if (MODEL_ID) {
|
|
285
|
-
|
|
273
|
+
L1B += `${C.BOLD}${C.CYAN}${MODEL_ID}${C.RST}`;
|
|
286
274
|
}
|
|
287
|
-
if (EFFORT)
|
|
275
|
+
if (EFFORT) L1B += ` ${C.DIM}effort:${C.RST}${EFFORT}`;
|
|
288
276
|
if (OUTPUT_STYLE && OUTPUT_STYLE !== "default")
|
|
289
|
-
|
|
290
|
-
if (VIM_MODE)
|
|
277
|
+
L1B += ` ${C.DIM}style:${C.RST}${OUTPUT_STYLE}`;
|
|
278
|
+
if (VIM_MODE) L1B += ` ${C.DIM}[${VIM_MODE}]${C.RST}`;
|
|
291
279
|
if (L1) out.push(L1);
|
|
280
|
+
if (L1B) out.push(L1B);
|
|
292
281
|
}
|
|
293
282
|
|
|
294
283
|
// ============================================================
|
|
@@ -306,7 +295,6 @@ function main() {
|
|
|
306
295
|
const bar = "▓".repeat(filled) + "░".repeat(empty);
|
|
307
296
|
|
|
308
297
|
let L2 = `${barColor}${bar}${C.RST} ${barColor}${numStr(CTX_PCT)}%${C.RST}${C.DIM}/${fmtK(CTX_SIZE)}${C.RST}`;
|
|
309
|
-
L2 += ` ${C.DIM}in:${C.RST}${C.BLUE}${fmtK(CUR_IN)}${C.RST} ${C.DIM}out:${C.RST}${C.MAGENTA}${fmtK(CUR_OUT)}${C.RST} ${C.DIM}cache_cr:${C.RST}${fmtK(CACHE_CREATE)} ${C.DIM}cache_rd:${C.RST}${fmtK(CACHE_READ)}`;
|
|
310
298
|
if (EXCEEDS_200K === true) L2 += ` ${C.YELLOW}⚠ 200k+${C.RST}`;
|
|
311
299
|
out.push(L2);
|
|
312
300
|
}
|
|
@@ -333,7 +321,7 @@ function main() {
|
|
|
333
321
|
if (gte(r5, 80)) c5 = C.RED;
|
|
334
322
|
else if (gte(r5, 60)) c5 = C.YELLOW;
|
|
335
323
|
else c5 = C.GREEN;
|
|
336
|
-
L4 = `${C.DIM}5h:${C.RST}${c5}${r5}%${C.RST} ${C.DIM}
|
|
324
|
+
L4 = `${C.DIM}5h:${C.RST}${c5}${r5}%${C.RST} ${C.DIM}⏱${C.RST} ${fmtRelTime(RATE_5H_RESETS)}`;
|
|
337
325
|
}
|
|
338
326
|
if (has7d) {
|
|
339
327
|
const r7 = fmtPct(RATE_7D_PCT);
|
|
@@ -341,7 +329,7 @@ function main() {
|
|
|
341
329
|
if (gte(r7, 80)) c7 = C.RED;
|
|
342
330
|
else if (gte(r7, 60)) c7 = C.YELLOW;
|
|
343
331
|
else c7 = C.GREEN;
|
|
344
|
-
const seg7 = `${C.DIM}7d:${C.RST}${c7}${r7}%${C.RST} ${C.DIM}
|
|
332
|
+
const seg7 = `${C.DIM}7d:${C.RST}${c7}${r7}%${C.RST} ${C.DIM}⏱${C.RST} ${fmtRelTime(RATE_7D_RESETS)}`;
|
|
345
333
|
L4 = L4 ? `${L4} ${C.DIM}|${C.RST} ${seg7}` : seg7;
|
|
346
334
|
}
|
|
347
335
|
out.push(L4);
|
|
@@ -489,9 +477,9 @@ function main() {
|
|
|
489
477
|
typeof pParsed?.version === "string" ? pParsed.version : "";
|
|
490
478
|
installed = iVer;
|
|
491
479
|
if (mVer && iVer && mVer !== iVer) {
|
|
492
|
-
// manifest ≠ installed → .claude is out of sync
|
|
493
|
-
// (
|
|
494
|
-
//
|
|
480
|
+
// manifest ≠ installed → .claude is out of sync. The ⟳ nag was removed
|
|
481
|
+
// (CHK-195); only the bare version renders. inSync is retained for the
|
|
482
|
+
// guard shape but no longer drives any output.
|
|
495
483
|
inSync = false;
|
|
496
484
|
}
|
|
497
485
|
} catch {
|
|
@@ -502,13 +490,7 @@ function main() {
|
|
|
502
490
|
}
|
|
503
491
|
|
|
504
492
|
if (!guarded && installed) {
|
|
505
|
-
|
|
506
|
-
if (newer && latest) {
|
|
507
|
-
L8 += ` ${C.YELLOW}↑${latest}${C.RST}`;
|
|
508
|
-
}
|
|
509
|
-
if (!inSync) {
|
|
510
|
-
L8 += ` ${C.YELLOW}⟳ run claude update${C.RST}`;
|
|
511
|
-
}
|
|
493
|
+
const L8 = `${C.DIM}cbp${C.RST} ${installed}`;
|
|
512
494
|
out.push(L8);
|
|
513
495
|
}
|
|
514
496
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
+
# @scope: org-shared
|
|
2
3
|
# @hook: NOT-A-HOOK (statusLine renderer, invoked via the cbp-statusline.sh dispatcher)
|
|
3
4
|
# Claude Code Status Line — python renderer.
|
|
4
5
|
# Byte-identical output to the bash renderer in cbp-statusline.sh and the node
|
|
@@ -11,6 +12,7 @@
|
|
|
11
12
|
import json
|
|
12
13
|
import math
|
|
13
14
|
import os
|
|
15
|
+
import re
|
|
14
16
|
import subprocess
|
|
15
17
|
import sys
|
|
16
18
|
import time
|
|
@@ -41,7 +43,7 @@ def main():
|
|
|
41
43
|
root = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", ".."))
|
|
42
44
|
|
|
43
45
|
MODEL_ID = _get(data, ["model", "id"], "")
|
|
44
|
-
MODEL_NAME = _get(data, ["model", "display_name"], "")
|
|
46
|
+
MODEL_NAME = re.sub(r"\s*\(1M context\)\s*$", "", _get(data, ["model", "display_name"], ""))
|
|
45
47
|
CWD = _get(data, ["cwd"], "")
|
|
46
48
|
WS_CURRENT_DIR = _get(data, ["workspace", "current_dir"], "")
|
|
47
49
|
WS_REPO_HOST = _get(data, ["workspace", "repo", "host"], "")
|
|
@@ -54,10 +56,6 @@ def main():
|
|
|
54
56
|
LINES_DEL = _get(data, ["cost", "total_lines_removed"], 0)
|
|
55
57
|
CTX_SIZE = _get(data, ["context_window", "context_window_size"], 200000)
|
|
56
58
|
CTX_PCT = _get(data, ["context_window", "used_percentage"], 0)
|
|
57
|
-
CUR_IN = _get(data, ["context_window", "current_usage", "input_tokens"], 0)
|
|
58
|
-
CUR_OUT = _get(data, ["context_window", "current_usage", "output_tokens"], 0)
|
|
59
|
-
CACHE_CREATE = _get(data, ["context_window", "current_usage", "cache_creation_input_tokens"], 0)
|
|
60
|
-
CACHE_READ = _get(data, ["context_window", "current_usage", "cache_read_input_tokens"], 0)
|
|
61
59
|
EXCEEDS_200K = _get(data, ["exceeds_200k_tokens"], False)
|
|
62
60
|
EFFORT = _get(data, ["effort", "level"], "")
|
|
63
61
|
RATE_5H_PCT = _get(data, ["rate_limits", "five_hour", "used_percentage"], "")
|
|
@@ -78,7 +76,7 @@ def main():
|
|
|
78
76
|
|
|
79
77
|
# ---- Config: line toggles + no_color -------------------------------------
|
|
80
78
|
cfg = {
|
|
81
|
-
"identity": True, "context": True, "cost":
|
|
79
|
+
"identity": True, "context": True, "cost": False,
|
|
82
80
|
"rate_limits": True, "repo_pr": True, "worktree": True,
|
|
83
81
|
"infra_drift": True, "package_freshness": True, "no_color": False,
|
|
84
82
|
}
|
|
@@ -172,7 +170,7 @@ def main():
|
|
|
172
170
|
if delta >= 86400:
|
|
173
171
|
return "%dd" % (delta // 86400)
|
|
174
172
|
if delta >= 3600:
|
|
175
|
-
return "%dh" % (delta // 3600)
|
|
173
|
+
return "%dh%dm" % (delta // 3600, (delta % 3600) // 60)
|
|
176
174
|
return "%dm" % (delta // 60)
|
|
177
175
|
|
|
178
176
|
def gte(v, t):
|
|
@@ -202,11 +200,12 @@ def main():
|
|
|
202
200
|
|
|
203
201
|
# ===== LINE 1 — Identity =====
|
|
204
202
|
if should_show("IDENTITY", cfg["identity"]):
|
|
203
|
+
# Line A — location: folder + branch + wt/session/agent prefix
|
|
205
204
|
l1 = ""
|
|
206
205
|
if folder:
|
|
207
|
-
l1 = "%s%s%s%s" % (BOLD, BLUE, folder, RST)
|
|
206
|
+
l1 = "📂 %s%s%s%s" % (BOLD, BLUE, folder, RST)
|
|
208
207
|
if branch:
|
|
209
|
-
l1 += " %s
|
|
208
|
+
l1 += " %s🔀%s %s%s%s" % (DIM, RST, CYAN, branch, RST)
|
|
210
209
|
l1 += " "
|
|
211
210
|
if WT_NAME:
|
|
212
211
|
l1 += "%swt:%s%s%s%s " % (DIM, RST, MAGENTA, WT_NAME, RST)
|
|
@@ -214,18 +213,22 @@ def main():
|
|
|
214
213
|
l1 += "%ssession:%s%s%s%s " % (DIM, RST, MAGENTA, SESSION_NAME, RST)
|
|
215
214
|
elif AGENT_NAME:
|
|
216
215
|
l1 += "%sagent:%s%s%s%s " % (DIM, RST, MAGENTA, AGENT_NAME, RST)
|
|
216
|
+
# Line B — model: display name + effort + style + vim
|
|
217
|
+
l1b = ""
|
|
217
218
|
if MODEL_NAME:
|
|
218
|
-
|
|
219
|
+
l1b += "%s%s%s%s" % (BOLD, CYAN, MODEL_NAME, RST)
|
|
219
220
|
elif MODEL_ID:
|
|
220
|
-
|
|
221
|
+
l1b += "%s%s%s%s" % (BOLD, CYAN, MODEL_ID, RST)
|
|
221
222
|
if EFFORT:
|
|
222
|
-
|
|
223
|
+
l1b += " %seffort:%s%s" % (DIM, RST, EFFORT)
|
|
223
224
|
if OUTPUT_STYLE and OUTPUT_STYLE != "default":
|
|
224
|
-
|
|
225
|
+
l1b += " %sstyle:%s%s" % (DIM, RST, OUTPUT_STYLE)
|
|
225
226
|
if VIM_MODE:
|
|
226
|
-
|
|
227
|
+
l1b += " %s[%s]%s" % (DIM, VIM_MODE, RST)
|
|
227
228
|
if l1:
|
|
228
229
|
out.append(l1)
|
|
230
|
+
if l1b:
|
|
231
|
+
out.append(l1b)
|
|
229
232
|
|
|
230
233
|
# ===== LINE 2 — Context window =====
|
|
231
234
|
if should_show("CONTEXT", cfg["context"]):
|
|
@@ -245,12 +248,6 @@ def main():
|
|
|
245
248
|
l2 = "%s%s%s %s%s%%%s%s/%s%s" % (
|
|
246
249
|
bar_color, bar, RST, bar_color, num_str(CTX_PCT), RST, DIM, fmt_k(CTX_SIZE), RST,
|
|
247
250
|
)
|
|
248
|
-
l2 += " %sin:%s%s%s%s %sout:%s%s%s%s %scache_cr:%s%s %scache_rd:%s%s" % (
|
|
249
|
-
DIM, RST, BLUE, fmt_k(CUR_IN), RST,
|
|
250
|
-
DIM, RST, MAGENTA, fmt_k(CUR_OUT), RST,
|
|
251
|
-
DIM, RST, fmt_k(CACHE_CREATE),
|
|
252
|
-
DIM, RST, fmt_k(CACHE_READ),
|
|
253
|
-
)
|
|
254
251
|
if EXCEEDS_200K is True:
|
|
255
252
|
l2 += " %s⚠ 200k+%s" % (YELLOW, RST)
|
|
256
253
|
out.append(l2)
|
|
@@ -281,8 +278,8 @@ def main():
|
|
|
281
278
|
c5 = YELLOW
|
|
282
279
|
else:
|
|
283
280
|
c5 = GREEN
|
|
284
|
-
l4 = "%s5h:%s%s%s%%%s %s
|
|
285
|
-
DIM, RST, c5, r5, RST, DIM, fmt_rel_time(RATE_5H_RESETS),
|
|
281
|
+
l4 = "%s5h:%s%s%s%%%s %s⏱%s %s" % (
|
|
282
|
+
DIM, RST, c5, r5, RST, DIM, RST, fmt_rel_time(RATE_5H_RESETS),
|
|
286
283
|
)
|
|
287
284
|
if has_7d:
|
|
288
285
|
r7 = fmt_pct(RATE_7D_PCT)
|
|
@@ -292,8 +289,8 @@ def main():
|
|
|
292
289
|
c7 = YELLOW
|
|
293
290
|
else:
|
|
294
291
|
c7 = GREEN
|
|
295
|
-
seg7 = "%s7d:%s%s%s%%%s %s
|
|
296
|
-
DIM, RST, c7, r7, RST, DIM, fmt_rel_time(RATE_7D_RESETS),
|
|
292
|
+
seg7 = "%s7d:%s%s%s%%%s %s⏱%s %s" % (
|
|
293
|
+
DIM, RST, c7, r7, RST, DIM, RST, fmt_rel_time(RATE_7D_RESETS),
|
|
297
294
|
)
|
|
298
295
|
l4 = ("%s %s|%s %s" % (l4, DIM, RST, seg7)) if l4 else seg7
|
|
299
296
|
out.append(l4)
|
|
@@ -393,9 +390,9 @@ def main():
|
|
|
393
390
|
i_ver = i_ver if isinstance(i_ver, str) else ""
|
|
394
391
|
_installed = i_ver
|
|
395
392
|
if m_ver and i_ver and m_ver != i_ver:
|
|
396
|
-
# manifest != installed -> .claude is out of sync
|
|
397
|
-
# (
|
|
398
|
-
#
|
|
393
|
+
# manifest != installed -> .claude is out of sync. The nag was
|
|
394
|
+
# removed (CHK-195); only the bare version renders. _in_sync is
|
|
395
|
+
# retained for the guard shape but no longer drives any output.
|
|
399
396
|
_in_sync = False
|
|
400
397
|
except Exception:
|
|
401
398
|
# Can't read files → hide segment.
|
|
@@ -403,10 +400,6 @@ def main():
|
|
|
403
400
|
|
|
404
401
|
if not _guarded and _installed:
|
|
405
402
|
l8 = "%scbp%s %s" % (DIM, RST, _installed)
|
|
406
|
-
if _newer and _latest:
|
|
407
|
-
l8 += " %s↑%s%s" % (YELLOW, _latest, RST)
|
|
408
|
-
if not _in_sync:
|
|
409
|
-
l8 += " %s⟳ run claude update%s" % (YELLOW, RST)
|
|
410
403
|
out.append(l8)
|
|
411
404
|
|
|
412
405
|
sys.stdout.write(("\n".join(out) + "\n") if out else "")
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
+
# @scope: org-shared
|
|
2
3
|
# @hook: NOT-A-HOOK (statusLine renderer, invoked by settings.json statusLine.command)
|
|
3
4
|
# Claude Code Status Line — multi-runtime dispatcher + bash renderer
|
|
4
5
|
# Purpose: Renders up to 6 structured lines of Claude Code status from stdin JSON.
|
|
@@ -89,10 +90,6 @@ eval "$(echo "$INPUT" | jq -r '
|
|
|
89
90
|
@sh "LINES_DEL=\(.cost.total_lines_removed // 0)",
|
|
90
91
|
@sh "CTX_SIZE=\(.context_window.context_window_size // 200000)",
|
|
91
92
|
@sh "CTX_PCT=\(.context_window.used_percentage // 0)",
|
|
92
|
-
@sh "CUR_IN=\(.context_window.current_usage.input_tokens // 0)",
|
|
93
|
-
@sh "CUR_OUT=\(.context_window.current_usage.output_tokens // 0)",
|
|
94
|
-
@sh "CACHE_CREATE=\(.context_window.current_usage.cache_creation_input_tokens // 0)",
|
|
95
|
-
@sh "CACHE_READ=\(.context_window.current_usage.cache_read_input_tokens // 0)",
|
|
96
93
|
@sh "EXCEEDS_200K=\(.exceeds_200k_tokens // false)",
|
|
97
94
|
@sh "EFFORT=\(.effort.level // "")",
|
|
98
95
|
@sh "RATE_5H_PCT=\(.rate_limits.five_hour.used_percentage // "")",
|
|
@@ -114,18 +111,23 @@ eval "$(echo "$INPUT" | jq -r '
|
|
|
114
111
|
# Note: RATE_*_PCT use `// ""` (not `// 0`) so the absence gate below distinguishes
|
|
115
112
|
# "API said 0% used" from "rate_limits object absent". Do not change to `// 0`.
|
|
116
113
|
|
|
114
|
+
# Strip trailing ' (1M context)' suffix from model display name (whitespace-tolerant).
|
|
115
|
+
MODEL_NAME="$(printf '%s' "$MODEL_NAME" | sed -E 's/[[:space:]]*\(1M context\)[[:space:]]*$//')"
|
|
116
|
+
|
|
117
117
|
# ---- Config: line toggles + no_color from .codebyplan/statusline.json --------
|
|
118
|
-
CFG_IDENTITY=true; CFG_CONTEXT=true; CFG_COST=
|
|
118
|
+
CFG_IDENTITY=true; CFG_CONTEXT=true; CFG_COST=false
|
|
119
119
|
CFG_RATE_LIMITS=true; CFG_REPO_PR=true; CFG_WORKTREE=true; CFG_INFRA_DRIFT=true; CFG_PACKAGE_FRESHNESS=true; CFG_NO_COLOR=false
|
|
120
120
|
CBP_CFG="$CBP_ROOT/.codebyplan/statusline.json"
|
|
121
121
|
if [ -f "$CBP_CFG" ] && command -v jq >/dev/null 2>&1; then
|
|
122
122
|
# Use `!= false` / `== true` (NOT jq `//`): the `//` operator treats an explicit
|
|
123
123
|
# `false` as absent and would coerce a hidden line back to visible. `!= false`
|
|
124
|
-
# yields true for missing/true and false only for an explicit false
|
|
124
|
+
# yields true for missing/true and false only for an explicit false — correct for
|
|
125
|
+
# default-on lines. `cost` defaults OFF (CHK-195), so it uses `== true`: a missing
|
|
126
|
+
# key falls back to hidden, mirroring the node/python hardcoded `cost: false`.
|
|
125
127
|
eval "$(jq -r '
|
|
126
128
|
"CFG_IDENTITY=\(.lines.identity != false)",
|
|
127
129
|
"CFG_CONTEXT=\(.lines.context != false)",
|
|
128
|
-
"CFG_COST=\(.lines.cost
|
|
130
|
+
"CFG_COST=\(.lines.cost == true)",
|
|
129
131
|
"CFG_RATE_LIMITS=\(.lines.rate_limits != false)",
|
|
130
132
|
"CFG_REPO_PR=\(.lines.repo_pr != false)",
|
|
131
133
|
"CFG_WORKTREE=\(.lines.worktree != false)",
|
|
@@ -209,7 +211,7 @@ fmt_rel_time() {
|
|
|
209
211
|
local delta=$(( epoch - now ))
|
|
210
212
|
if [ "$delta" -le 0 ]; then printf "now"
|
|
211
213
|
elif [ "$delta" -ge 86400 ]; then printf "%dd" $(( delta / 86400 ))
|
|
212
|
-
elif [ "$delta" -ge 3600 ]; then printf "%dh" $(( delta / 3600 ))
|
|
214
|
+
elif [ "$delta" -ge 3600 ]; then printf "%dh%dm" $(( delta / 3600 )) $(( (delta % 3600) / 60 ))
|
|
213
215
|
else printf "%dm" $(( delta / 60 )); fi
|
|
214
216
|
}
|
|
215
217
|
|
|
@@ -229,12 +231,13 @@ fi
|
|
|
229
231
|
# ============================================================
|
|
230
232
|
if should_show IDENTITY "$CFG_IDENTITY"; then
|
|
231
233
|
L1=""
|
|
234
|
+
L1B=""
|
|
232
235
|
|
|
233
|
-
#
|
|
236
|
+
# Line A — location: folder + branch + wt/session/agent prefix
|
|
234
237
|
if [ -n "$FOLDER" ]; then
|
|
235
|
-
L1="${BOLD}${BLUE}${FOLDER}${RST}"
|
|
238
|
+
L1="📂 ${BOLD}${BLUE}${FOLDER}${RST}"
|
|
236
239
|
if [ -n "$BRANCH" ]; then
|
|
237
|
-
L1="${L1} ${DIM}
|
|
240
|
+
L1="${L1} ${DIM}🔀${RST} ${CYAN}${BRANCH}${RST}"
|
|
238
241
|
fi
|
|
239
242
|
L1="${L1} "
|
|
240
243
|
fi
|
|
@@ -248,31 +251,34 @@ if should_show IDENTITY "$CFG_IDENTITY"; then
|
|
|
248
251
|
L1="${L1}${DIM}agent:${RST}${MAGENTA}${AGENT_NAME}${RST} "
|
|
249
252
|
fi
|
|
250
253
|
|
|
251
|
-
#
|
|
254
|
+
# Line B — model: display name + effort + style + vim
|
|
252
255
|
if [ -n "$MODEL_NAME" ]; then
|
|
253
|
-
|
|
256
|
+
L1B="${L1B}${BOLD}${CYAN}${MODEL_NAME}${RST}"
|
|
254
257
|
elif [ -n "$MODEL_ID" ]; then
|
|
255
|
-
|
|
258
|
+
L1B="${L1B}${BOLD}${CYAN}${MODEL_ID}${RST}"
|
|
256
259
|
fi
|
|
257
260
|
|
|
258
261
|
# Effort level (when present)
|
|
259
262
|
if [ -n "$EFFORT" ]; then
|
|
260
|
-
|
|
263
|
+
L1B="${L1B} ${DIM}effort:${RST}${EFFORT}"
|
|
261
264
|
fi
|
|
262
265
|
|
|
263
266
|
# Output style (when present and not "default")
|
|
264
267
|
if [ -n "$OUTPUT_STYLE" ] && [ "$OUTPUT_STYLE" != "default" ]; then
|
|
265
|
-
|
|
268
|
+
L1B="${L1B} ${DIM}style:${RST}${OUTPUT_STYLE}"
|
|
266
269
|
fi
|
|
267
270
|
|
|
268
271
|
# Vim mode
|
|
269
272
|
if [ -n "$VIM_MODE" ]; then
|
|
270
|
-
|
|
273
|
+
L1B="${L1B} ${DIM}[${VIM_MODE}]${RST}"
|
|
271
274
|
fi
|
|
272
275
|
|
|
273
276
|
if [ -n "$L1" ]; then
|
|
274
277
|
printf "%b\n" "$L1"
|
|
275
278
|
fi
|
|
279
|
+
if [ -n "$L1B" ]; then
|
|
280
|
+
printf "%b\n" "$L1B"
|
|
281
|
+
fi
|
|
276
282
|
fi
|
|
277
283
|
|
|
278
284
|
# ============================================================
|
|
@@ -295,13 +301,8 @@ if should_show CONTEXT "$CFG_CONTEXT"; then
|
|
|
295
301
|
for ((i=0; i<EMPTY; i++)); do BAR+="░"; done
|
|
296
302
|
|
|
297
303
|
CTX_SIZE_F=$(fmt_k "$CTX_SIZE")
|
|
298
|
-
CUR_IN_F=$(fmt_k "$CUR_IN")
|
|
299
|
-
CUR_OUT_F=$(fmt_k "$CUR_OUT")
|
|
300
|
-
CACHE_CR_F=$(fmt_k "$CACHE_CREATE")
|
|
301
|
-
CACHE_RD_F=$(fmt_k "$CACHE_READ")
|
|
302
304
|
|
|
303
305
|
L2="${BAR_COLOR}${BAR}${RST} ${BAR_COLOR}${CTX_PCT}%${RST}${DIM}/${CTX_SIZE_F}${RST}"
|
|
304
|
-
L2="${L2} ${DIM}in:${RST}${BLUE}${CUR_IN_F}${RST} ${DIM}out:${RST}${MAGENTA}${CUR_OUT_F}${RST} ${DIM}cache_cr:${RST}${CACHE_CR_F} ${DIM}cache_rd:${RST}${CACHE_RD_F}"
|
|
305
306
|
|
|
306
307
|
if [ "$EXCEEDS_200K" = "true" ]; then
|
|
307
308
|
L2="${L2} ${YELLOW}⚠ 200k+${RST}"
|
|
@@ -343,7 +344,7 @@ if should_show RATE_LIMITS "$CFG_RATE_LIMITS"; then
|
|
|
343
344
|
C5="$GREEN"
|
|
344
345
|
fi
|
|
345
346
|
REL5=$(fmt_rel_time "$RATE_5H_RESETS")
|
|
346
|
-
L4="${DIM}5h:${RST}${C5}${R5}%${RST} ${DIM}
|
|
347
|
+
L4="${DIM}5h:${RST}${C5}${R5}%${RST} ${DIM}⏱${RST} ${REL5}"
|
|
347
348
|
fi
|
|
348
349
|
|
|
349
350
|
if [ -n "$RATE_7D_PCT" ] && [ "$RATE_7D_RESETS" != "0" ]; then
|
|
@@ -356,7 +357,7 @@ if should_show RATE_LIMITS "$CFG_RATE_LIMITS"; then
|
|
|
356
357
|
C7="$GREEN"
|
|
357
358
|
fi
|
|
358
359
|
REL7=$(fmt_rel_time "$RATE_7D_RESETS")
|
|
359
|
-
SEG7="${DIM}7d:${RST}${C7}${R7}%${RST} ${DIM}
|
|
360
|
+
SEG7="${DIM}7d:${RST}${C7}${R7}%${RST} ${DIM}⏱${RST} ${REL7}"
|
|
360
361
|
if [ -n "$L4" ]; then
|
|
361
362
|
L4="${L4} ${DIM}|${RST} ${SEG7}"
|
|
362
363
|
else
|
|
@@ -479,9 +480,9 @@ if should_show PACKAGE_FRESHNESS "$CFG_PACKAGE_FRESHNESS"; then
|
|
|
479
480
|
_cbp_iver="$(jq -r '.version // ""' "$_cbp_pkg" 2>/dev/null)"
|
|
480
481
|
_CBP_INSTALLED="$_cbp_iver"
|
|
481
482
|
if [ -n "$_cbp_mver" ] && [ -n "$_cbp_iver" ] && [ "$_cbp_mver" != "$_cbp_iver" ]; then
|
|
482
|
-
# manifest ≠ installed → .claude is out of sync
|
|
483
|
-
# (
|
|
484
|
-
#
|
|
483
|
+
# manifest ≠ installed → .claude is out of sync. The ⟳ nag was removed
|
|
484
|
+
# (CHK-195); only the bare version renders. _CBP_IN_SYNC is retained for
|
|
485
|
+
# the guard shape but no longer drives any output.
|
|
485
486
|
_CBP_IN_SYNC=false
|
|
486
487
|
fi
|
|
487
488
|
else
|
|
@@ -492,12 +493,6 @@ if should_show PACKAGE_FRESHNESS "$CFG_PACKAGE_FRESHNESS"; then
|
|
|
492
493
|
|
|
493
494
|
if [ "$_CBP_GUARDED" = "false" ] && [ -n "$_CBP_INSTALLED" ]; then
|
|
494
495
|
L8="${DIM}cbp${RST} ${_CBP_INSTALLED}"
|
|
495
|
-
if [ "$_CBP_NEWER" = "true" ] && [ -n "$_CBP_LATEST" ]; then
|
|
496
|
-
L8="${L8} ${YELLOW}↑${_CBP_LATEST}${RST}"
|
|
497
|
-
fi
|
|
498
|
-
if [ "$_CBP_IN_SYNC" = "false" ]; then
|
|
499
|
-
L8="${L8} ${YELLOW}⟳ run claude update${RST}"
|
|
500
|
-
fi
|
|
501
496
|
printf "%b\n" "$L8"
|
|
502
497
|
fi
|
|
503
498
|
fi
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
// @scope: org-shared
|
|
2
3
|
// @hook: NOT-A-HOOK (subagentStatusLine renderer, invoked via the cbp-subagent-statusline.sh dispatcher)
|
|
3
4
|
// Claude Code Subagent Status Line — node renderer (ESM; .mjs forces ESM regardless
|
|
4
5
|
// of the host repo's package.json "type"). Byte-identical output to the bash renderer
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
+
# @scope: org-shared
|
|
2
3
|
# @hook: NOT-A-HOOK (subagentStatusLine renderer, invoked via the cbp-subagent-statusline.sh dispatcher)
|
|
3
4
|
# Claude Code Subagent Status Line — python renderer. Byte-identical output to the
|
|
4
5
|
# bash renderer in cbp-subagent-statusline.sh and the node renderer in
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
+
# @scope: org-shared
|
|
2
3
|
# Portability: bash 3.2+ (macOS default /bin/bash). UTF-8 multibyte chars in
|
|
3
4
|
# user-controlled fields are byte-iterated under 3.2 (over-counts visible width
|
|
4
5
|
# for non-ASCII content); acceptable safe-direction approximation — and the node
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
scope: org-shared
|
|
3
3
|
name: cbp-build-cc-mode
|
|
4
|
-
description: Audit + apply the CHK-109 model/effort
|
|
4
|
+
description: Audit + apply the CHK-109 model/effort convention across every authoring skill and agent under `packages/codebyplan-package/templates/`. Skills set `effort:` only and inherit the session model; agents pin `model:` + `effort:`. Bare invocation audits and reports frontmatter gaps; with a path argument, edits the target file's frontmatter to the convention-decided values.
|
|
5
5
|
argument-hint: "[path-to-agent-or-skill]"
|
|
6
6
|
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
7
7
|
effort: xhigh
|
|
@@ -9,66 +9,47 @@ effort: xhigh
|
|
|
9
9
|
|
|
10
10
|
# Build CC Mode
|
|
11
11
|
|
|
12
|
-
Audit or apply the canonical
|
|
12
|
+
Audit or apply the canonical model/effort frontmatter convention across every authoring-source skill (`packages/codebyplan-package/templates/skills/*/SKILL.md`) and agent (`packages/codebyplan-package/templates/agents/*.md`). Bare invocation = audit; path argument = apply.
|
|
13
|
+
|
|
14
|
+
The convention splits by surface:
|
|
15
|
+
|
|
16
|
+
- **Skills do NOT pin `model:`.** A skill's inline turn runs inside the user's active session, so it must inherit the session model. Pinning a model (a) forces a model the user did not choose and (b) can carry the session's 1M `[1m]` context tier onto the skill, producing `API Error: Usage credits required for 1M context`. Skills set `effort:` only.
|
|
17
|
+
- **Agents pin `model:` explicitly.** A spawned/forked subagent should not silently inherit the parent's model or context tier — every agent states its model so each subagent's cost/quality is auditable. Agents set both `model:` and `effort:`.
|
|
13
18
|
|
|
14
19
|
## When to Use
|
|
15
20
|
|
|
16
|
-
- Authoring a new agent or skill — look up the
|
|
21
|
+
- Authoring a new agent or skill — look up the convention below before writing the frontmatter.
|
|
17
22
|
- Sweeping `packages/codebyplan-package/templates/` for conformance after a refactor or version bump.
|
|
18
|
-
- Onboarding a new exception
|
|
23
|
+
- Onboarding a new exception — record the rationale here first, then apply.
|
|
19
24
|
|
|
20
25
|
## Decision Matrix
|
|
21
26
|
|
|
22
|
-
###
|
|
23
|
-
|
|
24
|
-
`model: sonnet` + `effort: xhigh`
|
|
25
|
-
|
|
26
|
-
Fifteen of the 16 authoring agents take the default (`cbp-cc-executor`, `cbp-database-agent`, `cbp-improve-claude`, `cbp-improve-round`, `cbp-research`, `cbp-round-executor`, `cbp-security-agent`, `cbp-task-check`, `cbp-task-planner`, `cbp-testing-qa-agent`, `cbp-e2e-playwright`, `cbp-e2e-maestro`, `cbp-e2e-tauri`, `cbp-e2e-vscode`, `cbp-e2e-xcuitest`). The 16th — `cbp-mechanical-edits` — is an explicit haiku-low exception (see below). 26 skills take the default: cbp-round-start, cbp-round-input, cbp-round-execute, cbp-task-create, cbp-task-start, cbp-task-complete, cbp-task-testing, cbp-checkpoint-create, cbp-checkpoint-check, cbp-checkpoint-end, cbp-build-cc-mode, cbp-build-cc-agent, cbp-build-cc-skill, cbp-build-cc-rule, cbp-build-cc-claude-file, cbp-build-cc-settings, cbp-frontend-a11y, cbp-frontend-design, cbp-frontend-ui, cbp-frontend-ux, cbp-session-end, cbp-ship, cbp-ship-configure, cbp-supabase-setup, cbp-supabase-migrate, cbp-supabase-branch-check.
|
|
27
|
-
|
|
28
|
-
### Effort-lowered skills (5)
|
|
27
|
+
### Skills — `effort:` only, never `model:`
|
|
29
28
|
|
|
30
|
-
`model
|
|
29
|
+
Omit `model:` entirely (inherit the session model). Set `effort:` per the skill's nature. Default `effort: xhigh`; tiers:
|
|
31
30
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
| cbp-merge-main | sonnet | high | Long-lived-branch integration merge — surgical conflict resolution, no authoring |
|
|
31
|
+
| effort | use for | examples |
|
|
32
|
+
| -------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
33
|
+
| `xhigh` | deep authoring / planning / orchestration (most skills) | build-cc-*, checkpoint-check/end/plan, round-start/input/execute, task-create/start/complete/testing, standalone-task-*, frontend-*, ship, ship-configure, supabase-*, setup-e2e/eslint, session-end |
|
|
34
|
+
| `high` | summary / orchestration, lighter than xhigh | checkpoint-create, checkpoint-start, checkpoint-update, round-end, task-check, standalone-task-check, ship-main, merge-main |
|
|
35
|
+
| `medium` | moderate, scoped sync work | refresh-infra |
|
|
36
|
+
| `low` | pure mechanical / dispatch / templated work | checkpoint-complete, round-check, round-complete, round-update, todo, session-start, git-commit, git-branch-feat-create, git-worktree-create, git-worktree-remove |
|
|
39
37
|
|
|
40
|
-
|
|
38
|
+
A skill that carries a `model:` line is a **gap** — remove it unless a deliberate, documented exception is recorded here (currently none).
|
|
41
39
|
|
|
42
|
-
`model
|
|
40
|
+
### Agents — `model:` + `effort:`
|
|
43
41
|
|
|
44
|
-
|
|
45
|
-
| ---------------------- | ----- | ------ | ---------------------------------------------------------------------------------------- |
|
|
46
|
-
| cbp-round-update | haiku | low | Pure mechanical: triage round state (claude_approved/findings/hard_fail), route to round-complete or round-input |
|
|
47
|
-
| cbp-round-complete | haiku | low | Pure mechanical: sync-approvals git-add reconcile, complete round, route per unapproved count |
|
|
48
|
-
| cbp-round-check | haiku | low | Run build/lint/types commands, parse output, update QA |
|
|
49
|
-
| cbp-todo | haiku | low | Dispatch: single MCP call + route to next command |
|
|
50
|
-
| cbp-checkpoint-complete | haiku | low | Pure finalization — mark completed, write summary; judgment happened in checkpoint-check |
|
|
51
|
-
| cbp-git-commit | haiku | low | Conventional-commit message authoring is templated; never-git-add rule codified |
|
|
52
|
-
| cbp-git-branch-feat-create | haiku | low | Mechanical: read config, checkout production branch (main), create branch, push |
|
|
53
|
-
| cbp-git-worktree-create | haiku | low | Mechanical: git worktree add + .claude/ copy + MCP register |
|
|
54
|
-
| cbp-git-worktree-remove | haiku | low | Mechanical: git worktree remove + cleanup + MCP deregister |
|
|
55
|
-
| cbp-session-start | haiku | low | Dispatch: MCP health check, activate session, fetch logs, auto-trigger /cbp-todo |
|
|
56
|
-
|
|
57
|
-
### Haiku-low agents (1)
|
|
58
|
-
|
|
59
|
-
`model: haiku` + `effort: low`. The 16th authoring agent — pure I/O mechanical work, never authors logic.
|
|
42
|
+
Default `model: sonnet` + `effort: xhigh`. Fifteen of the 16 authoring agents take the default (`cbp-cc-executor`, `cbp-database-agent`, `cbp-improve-claude`, `cbp-improve-round`, `cbp-research`, `cbp-round-executor`, `cbp-security-agent`, `cbp-task-check`, `cbp-task-planner`, `cbp-testing-qa-agent`, `cbp-e2e-playwright`, `cbp-e2e-maestro`, `cbp-e2e-tauri`, `cbp-e2e-vscode`, `cbp-e2e-xcuitest`). The 16th is the one exception:
|
|
60
43
|
|
|
61
44
|
| agent | model | effort | reason |
|
|
62
45
|
| -------------------- | ----- | ------ | ----------------------------------------------------------------------------------- |
|
|
63
46
|
| cbp-mechanical-edits | haiku | low | Mechanical rename/substitution/frontmatter-edit subagent; no judgment, pure dispatch |
|
|
64
47
|
|
|
65
|
-
|
|
48
|
+
`model: inherit` is NOT permitted for agents — pin an explicit alias (`sonnet` / `haiku`) or a full ID.
|
|
66
49
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
## Model Alias vs Pinned
|
|
50
|
+
## Precedence Rule
|
|
70
51
|
|
|
71
|
-
|
|
52
|
+
A skill's `effort:` applies to the inline-running turn (the orchestrator turn that invokes the skill); the skill runs on that turn's inherited model. An agent's `model:` / `effort:` apply to the spawned/forked subagent context. For `context: fork` skills, the agent named in `agent:` governs the forked subagent (per the official Claude Code spec) — so a forked skill's model comes from that agent, not from the skill.
|
|
72
53
|
|
|
73
54
|
## Audit Mode
|
|
74
55
|
|
|
@@ -76,25 +57,28 @@ Invoked with no arguments. Procedure:
|
|
|
76
57
|
|
|
77
58
|
1. Glob `packages/codebyplan-package/templates/agents/*.md` and `packages/codebyplan-package/templates/skills/*/SKILL.md`.
|
|
78
59
|
2. For each file, read the frontmatter and parse `model:` + `effort:`.
|
|
79
|
-
3.
|
|
80
|
-
|
|
60
|
+
3. Apply the convention by surface:
|
|
61
|
+
- **Skill**: `model:` MUST be ABSENT; `effort:` MUST be present and one of `low`/`medium`/`high`/`xhigh`/`max` (default `xhigh`).
|
|
62
|
+
- **Agent**: `model:` MUST be present (per the agent table; default `sonnet`); `effort:` present (default `xhigh`).
|
|
63
|
+
4. Emit one pipe-delimited line per file: `path | current_model/current_effort | expected | status`.
|
|
81
64
|
5. Status values:
|
|
82
|
-
- `ok` —
|
|
83
|
-
- `gap` —
|
|
84
|
-
|
|
85
|
-
6. Print a summary line at the end: total files audited, count `ok`, count `gap`, count `deprecated`.
|
|
65
|
+
- `ok` — matches the convention.
|
|
66
|
+
- `gap` — a skill that carries a `model:` line, a skill missing `effort:`, an agent missing/incorrect `model:`, or any missing/invalid `effort:`.
|
|
67
|
+
6. Print a summary: total audited, count `ok`, count `gap`.
|
|
86
68
|
|
|
87
|
-
The audit is read-only
|
|
69
|
+
The audit is read-only.
|
|
88
70
|
|
|
89
71
|
## Apply Mode
|
|
90
72
|
|
|
91
73
|
Invoked with a path argument (the target `SKILL.md` or agent `.md`). Procedure:
|
|
92
74
|
|
|
93
|
-
1. Read the file. Identify the
|
|
94
|
-
2. Look up target
|
|
95
|
-
3. Use Edit to set the frontmatter
|
|
96
|
-
|
|
75
|
+
1. Read the file. Identify the name from the `name:` frontmatter (or the path basename).
|
|
76
|
+
2. Look up the target from the convention above.
|
|
77
|
+
3. Use Edit to set the frontmatter to the target, preserving every other field and the entire body:
|
|
78
|
+
- **Skill**: REMOVE any `model:` line; set/keep a valid `effort:` (default `xhigh`).
|
|
79
|
+
- **Agent**: set `model:` and `effort:` to the table values.
|
|
80
|
+
4. If the name is NOT covered, surface via AskUserQuestion: current state, propose the default (skill → no `model:` + `xhigh`; agent → `sonnet` + `xhigh`), and ask whether to (a) record an exception entry here first, or (b) apply the default.
|
|
97
81
|
|
|
98
82
|
## Self-Conformance
|
|
99
83
|
|
|
100
|
-
This skill
|
|
84
|
+
This skill is itself a skill: its frontmatter sets `effort: xhigh` and NO `model:`. The first audit run after editing this file MUST emit `ok` for `packages/codebyplan-package/templates/skills/cbp-build-cc-mode/SKILL.md` — if it doesn't, the convention is out of sync with reality and must be reconciled before any further apply.
|
|
@@ -90,7 +90,7 @@ Key fields by use case:
|
|
|
90
90
|
| Hide from `/` menu | `user-invocable: false` |
|
|
91
91
|
| Pre-approve tools | `allowed-tools: Bash(git add *) Bash(git commit *)` |
|
|
92
92
|
| Accept arguments | `argument-hint: [file] [mode]`, optionally `arguments: [file mode]` for named `$file`/`$mode` |
|
|
93
|
-
| Set
|
|
93
|
+
| Set effort (do NOT set model) | `effort: xhigh` — default for plugin skills; lower (`high`/`low`) per [/cbp-build-cc-mode](../build-cc-mode/SKILL.md). **Omit `model:`** so the skill inherits the active session model — pinning one forces a model the user didn't choose and can carry the session's 1M `[1m]` tier onto the skill (→ "usage credits required for 1M context"). Pin `model:` only as a deliberate, documented exception |
|
|
94
94
|
| Path-scoped auto-load | `paths: ["src/api/**/*.ts"]` |
|
|
95
95
|
| Fork to subagent | `context: fork`, `agent: Explore` |
|
|
96
96
|
|
|
@@ -12,7 +12,7 @@ Source: official Claude Code skills spec. All fields are optional; `description`
|
|
|
12
12
|
| `disable-model-invocation` | `true` → only user can invoke (via `/name`) |
|
|
13
13
|
| `user-invocable` | `false` → hidden from `/` menu, Claude-only |
|
|
14
14
|
| `allowed-tools` | Pre-approve tools while the skill is active |
|
|
15
|
-
| `model` | Override model for this skill's turn. **
|
|
15
|
+
| `model` | Override model for this skill's turn. **CBP skills normally OMIT this** so the skill inherits the active session model. Pinning a model (e.g. `sonnet`) forces that model and can carry the session's 1M `[1m]` context tier onto the skill, triggering "usage credits required for 1M context". Set it only as a deliberate, documented exception — see [/cbp-build-cc-mode](../../build-cc-mode/SKILL.md) |
|
|
16
16
|
| `effort` | Override effort level (`low`/`medium`/`high`/`xhigh`/`max`). **Plugin skills authored in CBP MUST set this explicitly** (no commented-out placeholder); defaults to `xhigh`. See [/cbp-build-cc-mode](../../build-cc-mode/SKILL.md) for the matrix |
|
|
17
17
|
| `context` | `fork` → run in a subagent |
|
|
18
18
|
| `agent` | Subagent type when `context: fork` — built-in or custom |
|
|
@@ -49,10 +49,14 @@ grep -qE '^description:\s*' <<< "$fm" || echo " WARN: no description — Claude
|
|
|
49
49
|
# CBP scope required
|
|
50
50
|
grep -qE '^scope:\s*' <<< "$fm" || err "missing CBP required field: scope (org-shared|project-shared|repo-only:<repo-name>)"
|
|
51
51
|
|
|
52
|
-
# Model
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
# Model — skills MUST NOT pin a model. A skill's inline turn runs in the user's
|
|
53
|
+
# active session, so it inherits the session model. Pinning one forces a model the
|
|
54
|
+
# user didn't choose and can carry the session's 1M [1m] context tier onto the skill
|
|
55
|
+
# ("API Error: Usage credits required for 1M context"). Agents pin model explicitly
|
|
56
|
+
# (validate-agent.sh) — skills never do.
|
|
57
|
+
if grep -qE '^model:' <<< "$fm"; then
|
|
58
|
+
model=$(grep -E '^model:' <<< "$fm" | head -1 | sed -E 's/^model:[[:space:]]*//; s/[[:space:]]*$//')
|
|
59
|
+
err "skills must NOT set 'model:' (found '$model') — skills inherit the session model; remove the line (see /cbp-build-cc-mode)"
|
|
56
60
|
fi
|
|
57
61
|
|
|
58
62
|
# Effort (if present)
|
|
@@ -8,8 +8,8 @@ description: What this skill does and when to use it. Front-load the key use cas
|
|
|
8
8
|
# disable-model-invocation: false # true = only user can invoke via /name
|
|
9
9
|
# user-invocable: true # false = only Claude can invoke (hidden from / menu)
|
|
10
10
|
# allowed-tools: Read, Grep, Glob, Bash(git status *)
|
|
11
|
-
#
|
|
12
|
-
|
|
11
|
+
# model: # OMIT to inherit the session model (recommended). A pinned model can carry the session's 1M [1m] tier and require usage credits — pin only as a documented exception (see /cbp-build-cc-mode)
|
|
12
|
+
# review effort with /cbp-build-cc-mode if the default doesn't fit this skill's purpose
|
|
13
13
|
effort: xhigh
|
|
14
14
|
# context: fork # runs in a forked subagent
|
|
15
15
|
# agent: Explore # subagent type: Explore | Plan | general-purpose | <custom>
|
|
@@ -3,7 +3,6 @@ scope: org-shared
|
|
|
3
3
|
name: cbp-setup-e2e
|
|
4
4
|
description: Detect installed E2E frameworks, ask which to enable, record credentials source (gitignored env-file path + var names only, never secrets), and write/refresh .codebyplan/e2e.json. Interactive, idempotent.
|
|
5
5
|
argument-hint: "[--force]"
|
|
6
|
-
model: sonnet
|
|
7
6
|
effort: xhigh
|
|
8
7
|
allowed-tools: Read, Write, Edit, Bash(cat *), Bash(jq *), Bash(which *), Bash(test *), Bash(mkdir *), Bash(cp *), Bash(echo *), Bash(date *), Bash(mv *), Bash(git check-ignore *), AskUserQuestion, mcp__codebyplan__get_repos
|
|
9
8
|
---
|
|
@@ -3,7 +3,6 @@ scope: org-shared
|
|
|
3
3
|
name: cbp-setup-eslint
|
|
4
4
|
description: Detect each app's tech stack, resolve matching DB ESLint presets, confirm which to enable per app, run `codebyplan eslint init` to generate eslint.config.mjs, and write/refresh .codebyplan/eslint.json. Interactive, idempotent.
|
|
5
5
|
argument-hint: "[--force]"
|
|
6
|
-
model: sonnet
|
|
7
6
|
effort: xhigh
|
|
8
7
|
allowed-tools: Read, Write, Edit, Bash(cat *), Bash(jq *), Bash(test *), Bash(ls *), Bash(mkdir *), Bash(cp *), Bash(echo *), Bash(mv *), Bash(npx codebyplan eslint *), AskUserQuestion, mcp__codebyplan__get_repos, mcp__codebyplan__get_eslint_presets
|
|
9
8
|
---
|
|
@@ -4,7 +4,6 @@ name: cbp-supabase-branch-check
|
|
|
4
4
|
description: Gate skill called by /cbp-ship-main (pre-merge) to verify the Supabase preview branch health check is green before allowing a PR to be merged; skips when no DB-path changes are detected.
|
|
5
5
|
argument-hint: "[--mode pre_pr_create|pre_merge] [--target integration|production]"
|
|
6
6
|
allowed-tools: Bash(git *), Bash(gh *), Bash(jq *), Bash(supabase *), Bash(sleep *), Bash(echo *), Read, mcp__supabase__list_branches, mcp__supabase__get_logs
|
|
7
|
-
model: sonnet
|
|
8
7
|
effort: xhigh
|
|
9
8
|
---
|
|
10
9
|
|
|
@@ -4,7 +4,6 @@ name: cbp-supabase-migrate
|
|
|
4
4
|
description: Scaffold or adopt a Supabase migration for the current PR branch, apply to the branch's preview DB, run advisor checks, regenerate TypeScript types. Includes a fresh-branch dry-run pre-flight that uses one persistent dry-run ephemeral branch per feature branch.
|
|
5
5
|
argument-hint: "[--new <name> | <path-to-sql>]"
|
|
6
6
|
allowed-tools: Read, Edit, Write, Bash(git *), Bash(supabase *), Bash(jq *), Bash(date *), Bash(which *), Bash(cp *), Bash(mv *), Bash(test *), Bash(ls *), mcp__supabase__apply_migration, mcp__supabase__list_migrations, mcp__supabase__get_advisors, mcp__supabase__generate_typescript_types, mcp__supabase__reset_branch, mcp__supabase__list_branches, mcp__supabase__create_branch, mcp__supabase__get_cost, mcp__supabase__confirm_cost, mcp__codebyplan__update_checkpoint, mcp__codebyplan__update_task
|
|
7
|
-
model: sonnet
|
|
8
7
|
effort: xhigh
|
|
9
8
|
---
|
|
10
9
|
|