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.
소스 정보
- 저장소
- bytebase/oracle
- 최근 소스 활동
- 2026년 6월 2일 06:17
- 감지된 SKILL.md 언어
- 영어
- 스타
- 3
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
파일 탐색기
3 개 파일SKILL.md 표시 중
SKILL.md
소스 지침 · 읽기 전용 미리보기- name
- oracle
- description
- 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.
# oracle 🔮 — Answer Oracle
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.
## Inputs
The user may invoke it bare (`/oracle`), with a forced language (`/oracle zh`,
`/oracle en`), or with a question (`/oracle should I quit?`, `/oracle 我该辞职吗`).
## Step 1 — Pick the bank (language)
Walk this ladder, **stop at the first match**:
1. **Forced:** the argument is exactly `zh` or `en` → use that bank (don't treat it as a question).
2. **Question language:** there is a question argument → if it contains any Chinese
(CJK) character, use `zh`; otherwise `en`.
3. **Conversation language:** bare `/oracle` → use the language this conversation has
been happening in.
4. **System fallback:** still unsure (brand-new conversation, first thing typed) → run
`case "$LANG" in zh*) echo zh ;; *) echo en ;; esac`.
The language only chooses the **bank**. It never chooses the line.
## Step 2 — Draw one line (truly random — do NOT pick yourself)
Run exactly one shell command. Set `LANG_CODE` to `zh` or `en` from Step 1:
```bash
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.
## Step 3 — Present it
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.
GitHub에서 보기