






















@@ -1,5 +1,6 @@
11import type { SkillStatusEntry, SkillStatusReport } from "../agents/skills-status.js";
22import { sanitizeForLog, stripAnsi } from "../terminal/ansi.js";
3+import { decorativeEmoji, decorativePrefix } from "../terminal/decorative-emoji.js";
34import { getTerminalTableWidth, renderTable } from "../terminal/table.js";
45import { theme } from "../terminal/theme.js";
56import { shortenHomePath } from "../utils.js";
@@ -29,13 +30,13 @@ function appendClawHubHint(output: string, json?: boolean): string {
29303031function formatSkillStatus(skill: SkillStatusEntry): string {
3132if (skill.disabled) {
32-return theme.warn("⏸ disabled");
33+return theme.warn(decorativePrefix("⏸", "disabled"));
3334}
3435if (skill.blockedByAllowlist) {
35-return theme.warn("🚫 blocked");
36+return theme.warn(decorativePrefix("🚫", "blocked"));
3637}
3738if (skill.blockedByAgentFilter) {
38-return theme.warn("🚫 excluded");
39+return theme.warn(decorativePrefix("🚫", "excluded"));
3940}
4041if (skill.eligible) {
4142return theme.success("✓ ready");
@@ -44,7 +45,10 @@ function formatSkillStatus(skill: SkillStatusEntry): string {
4445}
45464647function normalizeSkillEmoji(emoji?: string): string {
47-return (emoji ?? "📦").replaceAll("\uFE0E", "\uFE0F");
48+if (emoji) {
49+return emoji.replaceAll("\uFE0E", "\uFE0F");
50+}
51+return decorativeEmoji("📦");
4852}
49535054const REMAINING_ESC_SEQUENCE_REGEX = new RegExp(
@@ -75,7 +79,8 @@ function sanitizeJsonValue(value: unknown): unknown {
7579}
7680function formatSkillName(skill: SkillStatusEntry): string {
7781const emoji = normalizeSkillEmoji(skill.emoji);
78-return `${emoji} ${theme.command(sanitizeForLog(skill.name))}`;
82+const name = theme.command(sanitizeForLog(skill.name));
83+return emoji ? `${emoji} ${name}` : name;
7984}
80858186function formatSkillMissingSummary(skill: SkillStatusEntry): string {
@@ -197,11 +202,11 @@ export function formatSkillInfo(
197202const lines: string[] = [];
198203const emoji = normalizeSkillEmoji(skill.emoji);
199204const status = skill.disabled
200- ? theme.warn("⏸ Disabled")
205+ ? theme.warn(decorativePrefix("⏸", "Disabled"))
201206 : skill.blockedByAllowlist
202- ? theme.warn("🚫 Blocked by allowlist")
207+ ? theme.warn(decorativePrefix("🚫", "Blocked by allowlist"))
203208 : skill.blockedByAgentFilter
204- ? theme.warn("🚫 Excluded by agent allowlist")
209+ ? theme.warn(decorativePrefix("🚫", "Excluded by agent allowlist"))
205210 : skill.eligible
206211 ? theme.success("✓ Ready")
207212 : theme.warn("△ Needs setup");
@@ -210,7 +215,7 @@ export function formatSkillInfo(
210215const safeHomepage = skill.homepage ? sanitizeForLog(skill.homepage) : undefined;
211216const safeSkillKey = sanitizeForLog(skill.skillKey);
212217213-lines.push(`${emoji} ${theme.heading(safeName)} ${status}`);
218+lines.push(`${emoji ? `${emoji} ` : ""}${theme.heading(safeName)} ${status}`);
214219lines.push("");
215220lines.push(sanitizeForLog(skill.description));
216221lines.push("");
@@ -376,11 +381,15 @@ export function formatSkillsCheck(report: SkillStatusReport, opts: SkillsCheckOp
376381lines.push(
377382`${theme.success("✓")} ${theme.muted("Available as command:")} ${commandVisible.length}`,
378383);
379-lines.push(`${theme.warn("⏸")} ${theme.muted("Disabled:")} ${disabled.length}`);
380-lines.push(`${theme.warn("🚫")} ${theme.muted("Blocked by allowlist:")} ${blocked.length}`);
384+lines.push(
385+`${theme.warn(decorativePrefix("⏸", "Disabled:"))} ${theme.muted(String(disabled.length))}`,
386+);
387+lines.push(
388+`${theme.warn(decorativePrefix("🚫", "Blocked by allowlist:"))} ${theme.muted(String(blocked.length))}`,
389+);
381390if (agentId || agentFiltered.length > 0) {
382391lines.push(
383-`${theme.warn("🚫")} ${theme.muted("Excluded by agent allowlist:")} ${agentFiltered.length}`,
392+`${theme.warn(decorativePrefix("🚫", "Excluded by agent allowlist:"))} ${theme.muted(String(agentFiltered.length))}`,
384393);
385394}
386395if (promptHidden.length > 0) {
@@ -418,7 +427,7 @@ export function formatSkillsCheck(report: SkillStatusReport, opts: SkillsCheckOp
418427lines.push(theme.heading("Ready and visible to model:"));
419428for (const skill of modelVisible) {
420429const emoji = normalizeSkillEmoji(skill.emoji);
421-lines.push(` ${emoji} ${sanitizeForLog(skill.name)}`);
430+lines.push(` ${emoji ? `${emoji} ` : ""}${sanitizeForLog(skill.name)}`);
422431}
423432}
424433@@ -430,7 +439,9 @@ export function formatSkillsCheck(report: SkillStatusReport, opts: SkillsCheckOp
430439const reason = skill.commandVisible
431440 ? "skill hides its instructions from the model; commands/cron may still use it"
432441 : "skill hides its instructions from the model and is not exposed as a command";
433-lines.push(` ${emoji} ${sanitizeForLog(skill.name)} ${theme.muted(`(${reason})`)}`);
442+lines.push(
443+` ${emoji ? `${emoji} ` : ""}${sanitizeForLog(skill.name)} ${theme.muted(`(${reason})`)}`,
444+);
434445}
435446}
436447@@ -440,7 +451,7 @@ export function formatSkillsCheck(report: SkillStatusReport, opts: SkillsCheckOp
440451for (const skill of agentFiltered) {
441452const emoji = normalizeSkillEmoji(skill.emoji);
442453lines.push(
443-` ${emoji} ${sanitizeForLog(skill.name)} ${theme.muted("(loaded, but this agent is not allowed to see/use it)")}`,
454+` ${emoji ? `${emoji} ` : ""}${sanitizeForLog(skill.name)} ${theme.muted("(loaded, but this agent is not allowed to see/use it)")}`,
444455);
445456}
446457}
@@ -451,7 +462,9 @@ export function formatSkillsCheck(report: SkillStatusReport, opts: SkillsCheckOp
451462for (const skill of missingReqs) {
452463const emoji = normalizeSkillEmoji(skill.emoji);
453464const missing = formatSkillMissingSummary(skill);
454-lines.push(` ${emoji} ${sanitizeForLog(skill.name)} ${theme.muted(`(${missing})`)}`);
465+lines.push(
466+` ${emoji ? `${emoji} ` : ""}${sanitizeForLog(skill.name)} ${theme.muted(`(${missing})`)}`,
467+);
455468}
456469}
457470此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。