/oracle:oraclefrom oracle
Use when the user asks the oracle for an answer — "ask the oracle", "give me a fortune", "answer of the day", a yes/no or "should I…" wish, or 求签 / 抽一签 / 答案机 / 今日答案 — or runs /oracle:oracle. Draws one random, playful, encouraging line from a pre-written bilingual pool (Chinese / English); the draw is random and independent of the question asked.
Ships in oracle. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Draw one random line as the user's "answer of the day." This is a fortune cookie: the answer is picked at random from a pre-written pool and is independent of whatever the user asked. The question (if any) is ritual only — never read it to craft the answer.
The user may invoke it bare (/oracle), with a forced language (/oracle zh,
/oracle en), or with a question (/oracle should I quit?, /oracle 我该辞职吗).
Walk this ladder, stop at the first match:
zh or en → use that bank (don't treat it as a question).zh; otherwise en./oracle → use the language this conversation has
been happening in.case "$LANG" in zh*) echo zh ;; *) echo en ;; esac.The language only chooses the bank. It never chooses the line.
Run exactly one shell command. Set LANG_CODE to zh or en from Step 1:
d="${CLAUDE_PLUGIN_ROOT}/skills/oracle" # installed as a plugin (normal case)
[ -f "$d/answers-en.txt" ] || d="$HOME/.claude/skills/oracle" # manual personal-skill copy
[ -f "$d/answers-en.txt" ] || d="$(pwd)/skills/oracle" # running from the repo
[ -f "$d/answers-en.txt" ] || d="$(pwd)"
shuf -n 1 "$d/answers-${LANG_CODE}.txt" 2>/dev/null \
|| awk -v seed="$RANDOM" 'BEGIN{srand(seed)} NF{a[++n]=$0} END{print a[int(rand()*n)+1]}' "$d/answers-${LANG_CODE}.txt"
The answer files ship beside this skill; ${CLAUDE_PLUGIN_ROOT} points at the installed
plugin root, and the fallbacks cover a manual copy or running from the repo. shuf is
preferred; the awk branch is the fallback when shuf is missing (common on macOS),
seeded with $RANDOM rather than the clock so draws in the same second don't repeat,
with the NF guard skipping blank lines. Use the command's output verbatim — never
substitute your own choice.
Open with the crystal ball, then the drawn line as a blockquote. If the user gave a question, echo it first for ritual (but the answer is unrelated to it).
English:
🔮 You give the crystal ball a shake…
> <the drawn line>
Chinese:
🔮 你摇了摇水晶球…
> <抽到的那句>
Keep it to the opener + the line. No explaining, no "this means…", no choosing a "better" line. The whole charm is that it's random.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub bytebase/oracle --plugin oracle