用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/majiayu000/claude-skill-registry --skill bun-shell-commands命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
LLM token logprobs and calibration. Per-decision confidence, ECE, Brier, reliability diagrams, low-confidence triage.
Analyze LLM token logprobs and calibration. Use for per-decision confidence, ECE, Brier scores, reliability diagrams, and low-confidence triage.
回顾最近 N 天的 Claude Code 使用记录——扫描原始会话数据,按主题分组汇总"我都做了什么",并从个人操作系统视角输出模式、风险与增删建议。当用户说 /recap、"看看我这几天做了什么"、"回顾一下我最近的会话"、"这两天我用 claude 干了啥"、"活动回顾" 时使用。
基于 SOC 职业分类
正在显示 SKILL.md
| name | bun-shell-commands |
| description | Writing shell commands for OpenCode custom commands using Bun Shell |
This skill covers how to write effective shell commands in OpenCode custom commands using Bun Shell (Bun's bash-like shell implementation).
OpenCode uses Bun Shell for executing shell commands in custom commands via the !command syntax. Bun Shell is a bash-like shell written in Zig that provides cross-platform shell scripting, but it has some differences from traditional bash.
Positional arguments work correctly:
!`echo "Arg1: $1" && echo "Arg2: $2" && echo "Arg3: $3"`
Usage: /mycommand 5 "hello world" "a,b,c"
Use $(command) for command substitution:
!`echo "Sum: $(seq $1 | awk '{s+=$1} END {print s}')"`
Pipe commands using |:
!`echo "$2" | tr '[:lower:]' '[:upper:]' | rev`
Set environment variables and use them:
!`TEST_VAR="$1" && echo "TEST_VAR=$TEST_VAR"`
Store command substitution results in variables:
!`REV=$(echo "$2" | rev) && echo "Reversed: $REV"`
Use && to chain commands (instead of newlines or ;):
!`echo "First" && echo "Second" && echo "Third"`
Bun Shell includes these built-in commands:
cd, ls, rm, echo, pwd, cat, touch, mkdir, which, mvseq, dirname, basename, true, false, yesCommon external commands also work:
awk, sed, tr, wc, grep, head, tailfind, xargs, sort, uniqDo NOT use for, while, do, done:
# ❌ DOESN'T WORK
!`for i in $(seq 1 $1); do echo $i; done`
Do NOT use $(( )) directly in the template:
# ❌ DOESN'T WORK
!`echo "Squared: $(($1 * $1))"`
Use $(awk '{...}') instead:
# ✅ WORKS
!`echo "$1" | awk '{print $1 * $1}'`
Native brace expansion is not supported:
# ❌ DOESN'T WORK
!`echo {1,2,3}`
Use pipes to simulate expansion:
# ✅ WORKS
!`echo "$3" | tr ',' '\n' | awk '{print "Expanded:", $1}'`
Instead of for loops, use seq with awk:
# Generate numbers 1 to N with squares
!`seq $1 | awk '{print $1, "-> squared:", $1*$1}'`
Use environment variables to store intermediate results:
# Reverse text, count chars, and show both
!`REV=$(echo "$2" | rev) && COUNT=$(echo "$2" | wc -c) && echo "Reversed: $REV (${COUNT} chars)"`
Use awk for conditionals:
# Classify numbers as even/odd
!`seq $1 | awk '{if ($1 % 2 == 0) print $1 ": even"; else print $1 ": odd"}'`
Combine tr, sed, awk for text manipulation:
# Uppercase, reverse, and format
!`echo "$2" | tr '[:lower:]' '[:upper:]' | rev | sed 's/^/> /'`
Use separate shell blocks for independent tests:
## Test 1: Arithmetic with $1
!`seq $1 | awk '{s+=$1} END {print "Sum:", s}'`
## Test 2: Text processing with $2
!`echo "$2" | tr '[:lower:]' '[:upper:]' | rev`
## Test 3: Pattern with $3
!`echo "$3" | tr ',' '\n' | wc -l`
---
description: Test Bun Shell capabilities
---
Test Bun Shell with multiple features:
## Argument passing
!`echo "Arg1: [$1]" && echo "Arg2: [$2]" && echo "Arg3: [$3]"`
## Command substitution
!`echo "Sum of 1 to $1: $(seq $1 | awk '{s+=$1} END {print s}')"`
## Text processing
!`echo "$2" | tr '[:lower:]' '[:upper:]' | rev | wc -c`
## Environment variables
!`REV=$(echo "$2" | rev) && echo "Reversed via var: $REV"`
Usage: /mycommand 5 "hello world" "a,b,c"
If a shell command fails silently:
echo "$1" to verify argument passingawk with simpler tr or sedecho at each step to verify intermediate values