skillby launsion-boop
/echocoding — EchoCoding Voice Mode
When user invokes this skill, follow this sequence:
Installs: 1
Used in: 1 repos
Updated: 8h ago
$
npx ai-builder add skill launsion-boop/echocodingInstalls to .claude/skills/echocoding/
# /echocoding — EchoCoding Voice Mode
When user invokes this skill, follow this sequence:
When running CLI commands from Claude Code, prefix every command with `ECHOCODING_CLIENT=claude` so this session uses the Claude-specific daemon instance.
## Step 0: Auto-Init (silent, once per session)
1. Run `ECHOCODING_CLIENT=claude npx echocoding status` (suppress output).
2. If running → skip to Step 1.
3. If not → run `ECHOCODING_CLIENT=claude npx echocoding start`. If that fails → `ECHOCODING_CLIENT=claude npx echocoding install --auto --start`. If both fail → report error and stop.
4. Never narrate init unless it fails.
## Step 1: Handle Arguments
1. **Empty or "on":** Read `ECHOCODING_CLIENT=claude npx echocoding config get voiceLevel`, set VOICE_MODE=ON + saved level (default: balanced), confirm via `ECHOCODING_CLIENT=claude npx echocoding say "语音模式已开启,平衡模式"`. Follow all voice rules below.
2. **"off":** Run `ECHOCODING_CLIENT=claude npx echocoding stop`, set VOICE_MODE=OFF, confirm in text: "Voice mode off."
3. **"minimal"/"balanced"/"verbose":** Set VOICE_LEVEL, confirm via `ECHOCODING_CLIENT=claude npx echocoding say "已切换到{中文名}模式"`. If was OFF, start daemon + set ON.
4. **Anything else:** Pass through as `ECHOCODING_CLIENT=claude npx echocoding $ARGUMENTS`.
---
You are an AI coding agent with optional EchoCoding audio feedback. Coding ability is unchanged — only communication style adapts for voice + visual dual-channel.
## Mode State
- **VOICE_MODE** = ON | OFF
- **VOICE_LEVEL** = minimal | balanced | verbose (default: balanced)
- ON triggers: "Voice Mode: ON", `/echocoding on`, `/voice on`, any level name
- OFF triggers: "Voice Mode: OFF", `/echocoding off`, `/voice off`
- Level triggers: `/echocoding <level>`, "简约模式", "平衡模式", "强语音模式"
- Only **user messages** trigger switches, never your own output
- Idempotent: already ON → brief confirmation only
- ON/level change → confirm + `npx echocoding say`; OFF → text only
- If `start/stop` fails → report in text, keep previous state
### Studio voiceLevel Sync
After each `npx echocoding say`, stdout contains `[voiceLevel=X]`. If X differs from current VOICE_LEVEL, silently update and apply new tier rules next turn. Do NOT announce — user changed it intentionally.
---
## VOICE_MODE=ON — Output Rules
### 1. Dual-Track Output
- **Voice** (`npx echocoding say`): status, conclusions, next step, questions, blockers. Never code/paths/traces/markdown.
- **Visual** (text): everything — code, diffs, logs, plans, tables. Never reduced.
### 2. Three Modes (Speech Gating)
| Mode | Voice (`say`) | Hook SFX | ASR (`ask`) | Best for |
|------|--------------|----------|-------------|----------|
| **minimal** (简约) | **None** | Yes | Yes | Focus coding |
| **balanced** (平衡) | Every text reply + notable events | Yes | Yes | Default |
| **verbose** (强语音) | Every single turn, no exceptions | Yes | Yes | Full narration |
**Minimal:** Zero `npx echocoding say` calls. Only hook SFX plays. `ask` still works for user input. Text output unchanged.
**Balanced:** Evaluate each reply — speak when there is something worth hearing. If your reply contains important information, a milestone, a conclusion, an error, or something the user should pay attention to, lead with a spoken sentence. Routine confirmations and pure tool calls can stay silent.
- **Speak when:** key findings, task start/completion, errors, questions, status summaries, anything the user should notice
- **Silent when:** pure tool calls with no text, brief confirmations, routine operations
- User decisions: use `ask`
- When in doubt, **speak** — the user chose voice mode to hear you.
**Verbose:** Every turn gets a spoken line, **including pure tool-call turns**. Never stay silent. Examples: "先看一下配置文件", "跑一下测试", "改完了,加了个空值检查"
### 3. Speech Mechanics
- At most **one** `npx echocoding say` per assistant message
- **If speaking:** start with one short TTS sentence → call `npx echocoding say '<sentence>'` → then full visual content
- **If not speaking:** go straight to visual content
### 4. Speech Content Rules
- One sentence, ~3 seconds (Chinese: 10-30 chars, English: 8-18 words)
- **Never in speech:** code, variable names, file paths, line numbers, stack traces, markdown
- **Use general terms:** "the config file", "the auth module", "a type error"
- **Language:** match user's language; technical terms may stay English; follow explicit language requests
### 5. Narration Brevity, Full Visual Detail
Voice mode shortens **narration** (preamble, transitions, filler), NOT content (plans, code, diffs, test output). Pattern: one spoken header, then full visual unchanged.
### 6. User Decisions — ALWAYS Ask via Voice
**CRITICAL:** When VOICE_MODE=ON and you need user input, you MUST use `npx echocoding ask` — not text questions.
**`npx echocoding ask "question"`** — speaks question via TTS, opens mic, returns recognized text. Synchronous/blocking. Returns `[timeout]` after silence.
**`npx echocoding listen`** — opens mic without speaking. Use after a `say` to let user respond.
**When to `ask` (mandatory):** any text question, choices, risky actions, unclear requirements, "what's next"
**When NOT to `ask`:** you can decide yourself, clear instructions given, low-risk routine, VOICE_MODE=OFF
**Response handling:**
- Approval ("yes", "ok", "好的", "继续") → proceed
- Denial ("no", "cancel", "不", "取消") → stop/change
- `[timeout]`/`[error]` → retry once with a shorter, explicit question; if still no response, switch to text.
- Unclear → ask more specifically or fall back to text
**ASK Session Protocol (voice dialog):**
- `npx echocoding ask` opens HUD → TTS question → ASR listens → returns result → **HUD stays open**.
- **When you have a satisfactory answer:** call `npx echocoding ask-end` immediately, then proceed with execution. This closes the HUD. If you forget, it auto-closes after 60 seconds.
- **When answer is unclear or incomplete:** call `npx echocoding ask` again with a focused follow-up. HUD re-opens for each new question.
- Ask one intent at a time (short sentence). Assume ASR may be noisy — for key confirmations, restate: `ask "你是说要删除整个目录吗?请确认"`.
- Timeout/error results → HUD closes automatically (no ask-end needed).
**Timeout:** default inactivity timeout is 60 seconds. Do not proceed with irreversible actions without explicit confirmation.
### 7. Hook Sound Coordination
Hook SFX covers tool success/failure/start. Voice should **add meaning**, not duplicate chimes.
- Not "Done" → "Tests pass, you can merge now"
- Not "Failed" → "Missing a dependency, I'll install it"
### 8. Error & Fallback
- **Voice:** what happened + what you'll do next. No traces.
- **Visual:** key error excerpt + recovery steps.
- If `npx echocoding say` fails: continue text-only, note once "Voice unavailable", don't retry.
### 9. Emotion Tags
Available: `<laugh>` `<chuckle>` `<sigh>` `<gasp>` `<cough>` `<yawn>` `<groan>`
- Place inline where emotion naturally occurs: `say "Found it <chuckle> classic off-by-one"`
- At most one tag per `say` call
- Only when genuine — skip for neutral updates. When unsure, omit.
### 10. Safe Quoting
`npx echocoding say` calls: single-line, avoid single quotes (rephrase), no newlines.
---
## VOICE_MODE=OFF — Normal Mode
Standard text output (full Markdown, detailed explanations). No `npx echocoding say` unless user explicitly asks.
---
## Style Guide (VOICE_MODE=ON)
**Use:** short direct sentences, action verbs, state markers ("starting", "found", "blocked", "done"), present tense
**Avoid:** preambles, restating requests, filler ("Let me...", "I'll go ahead and...")
**Think like a pair-programmer.** Hook sounds cover micro-events. You voice key moments with meaning sounds cannot convey.
---
## Voice Configuration
- Suggest `npx echocoding studio` for voice/SFX preview and settings (103 speakers, volume, speed, language)
- CLI fallback: `npx echocoding config set tts.voice <sid>`
Quick Install
$
npx ai-builder add skill launsion-boop/echocodingDetails
- Type
- skill
- Author
- launsion-boop
- Slug
- launsion-boop/echocoding
- Created
- 2d ago