debug-voice
Skill này làm gì
Cho phép agent làm cho phiên giọng nói dễ xem lại về sau, rồi sửa các vấn đề dựa trên log. Dành cho lập trình viên có chế độ giọng nói gặp lỗi mà họ khó nhìn thấy.
Khi nào nên dùng
- ✓Khi phiên chế độ giọng nói gặp vấn đề và bạn cần xem điều gì đã xảy ra.
- ✓Khi tích hợp giọng nói chưa có log gỡ lỗi nào.
- ✓Khi bạn muốn các vấn đề giọng nói được sửa dựa trên bằng chứng thay vì phỏng đoán.
Liên kết skill
https://github.com/cursor/plugins/blob/main/grok-voice/skills/debug-voice/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Chế độ giọng nói bị giật lag. Hãy thêm log gỡ lỗi, rồi dùng log để tìm và sửa lỗi.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent lập bản đồ ứng dụng và đề xuất một kế hoạch ghi log, rồi chờ bạn phê duyệt. Sau đó nó thêm một log chỉ dành cho môi trường phát triển, kiểm tra kết quả và sửa từng vấn đề một, kiểm thử lại dựa trên log.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Debug Voice
Make a voice session readable after the fact, then fix from evidence. The agent cannot hear the app; the log is its ears, the user is its judge. No audio, no tokens, never in prod.
Works for any stack. The pipeline is a small contract (below); implement it in whatever the app already uses.
Workflow
- Map the app (read only).
- Plan: write the change list, show it, stop. Nothing is edited until the user aligns.
- Install the agreed pieces in the app's language, framework, and conventions.
- Verify the sink, hand the app to the user.
- Fix loop from the log.
1. Map
Find, and note the paths:
- Voice client: where realtime events are received and sent, mic capture, audio playback, token fetch.
- Server: framework, how routes are declared, where shared server code lives, how env is read, what "production" means here.
- Conventions: language(s), module system, formatter, where scripts or tasks live (
package.json,Makefile,pyproject,justfile),.gitignore. - Client kind: browser, mobile, desktop, CLI. A non-browser client still POSTs the same JSON; a single-process app can skip HTTP and append to the file directly.
- Where audio deltas are handled. They must be counted, never logged.
2. Plan, then stop
Fill this in with real paths and the app's language, post it, and wait for a yes or a trimmed list. Do not edit files before that.
## Debug voice: plan
Add
- <path>: client logger (batch, redact, flush) in <language>
- <path>: dev-only sink `POST /api/voice/log` → `.voice-logs/<sessionId>.ndjson`
- <path> (optional): summary command `<cmd>`; otherwise read the NDJSON with jq
Modify
- <voice client file>: hook points start, token, mic, env, ws.*, client/server events,
audio.in (2 s windows), audio.out.first, audio.out, play.stop, stop
- <token route>: append `server.token { ok, status, ms, upstream }` (never the token)
- <UI file>: session id in the voice status line and in voice error messages
- .gitignore: `/.voice-logs`
- <scripts file>: a `voice:logs` task (only if the summary command is wanted)
Logged: event names and non-audio fields, timings, byte counts, mic RMS.
Never: tokens, API keys, raw audio, strings over 400 chars.
Off in production unless `VOICE_LOG=1`.
Reply "go", or strike lines you do not want.
3. Install: the contract
Match the app. Same language as the surrounding code, same route style, same formatter. Write the pieces from the contract below; do not introduce a second language or toolchain for logging.
Session id: 8 lowercase hex chars from a UUID. The sink accepts ^[a-z0-9]{4,64}$; it becomes a file name.
Entry (one JSON object per line):
| Field | Client | Server |
|---|---|---|
t |
ms since the logger started | absent; the reader aligns by ts |
ts |
epoch ms | epoch ms |
kind |
start, server, client, error, audio.in, … |
server.token, … |
src |
absent | "server" |
| rest | the hook's fields, redacted | the hook's fields |
Redaction, applied client side before buffering: on audio event types (response.output_audio.delta, response.audio.delta, input_audio_buffer.append) replace delta / audio with bytes = decoded base64 length; strings over 400 chars cut to 400 + …[N chars]; objects deeper than 4 → "[depth]"; arrays over 50 items truncated.
Client logger: buffer entries; flush as POST <sink> {"sessionId","entries":[…]} every 1 s or at 200 entries; on stop flush with keepalive (or the platform's "survive navigation" equivalent); swallow every transport error, logging must never throw into the voice path. Also mirror entries to the console in dev.
Sink: POST /api/voice/log, JSON body. 404 unless dev or VOICE_LOG=1. 400 if sessionId fails the regex or entries is not an array. Append at most 500 entries per request, drop any line over 16,000 chars, to .voice-logs/<sessionId>.ndjson, creating the directory. Reply 204.
Pseudocode for any server:
handle POST /api/voice/log:
if production and VOICE_LOG != "1": return 404
body = parse json or return 400
if not regex(body.sessionId) or not list(body.entries): return 400
mkdir .voice-logs; append join(json(e) for e in body.entries[:500] if len < 16000) to .voice-logs/{sessionId}.ndjson
return 204
Pseudocode for the client logger:
logger(sessionId, sink):
buffer = []; started = now()
log(kind, data): buffer.push({ ...redact(data), t: now()
Câu hỏi thường gặp
Có ghi log âm thanh không?
Không. Dữ liệu âm thanh chỉ được đếm, không bao giờ được ghi vào log.
Nó có thay đổi code trước khi tôi phê duyệt không?
Không. Skill đưa ra kế hoạch và dừng lại cho đến khi bạn đồng ý với các thay đổi.
Log có dành cho môi trường production không?
Không. Skill nói rằng việc ghi log chỉ dành cho phát triển và không bao giờ được chạy trên production.
Chi tiết
Mô tả gốc của tác giả
Use when the user runs /debug-voice, says voice mode has flaws, asks to see or capture what happened in a Grok realtime voice session, or a voice integration has no debug logging yet. Proposes a plan, then installs a dev-only log pipeline (client logger → local NDJSON) in the app's own language and conventions, then runs the fix loop: match the user's report to log signatures, fix one thing, re-test.
repo: cursor/plugins
Độ phổ biến
- Sao GitHub
- 15k
- Vị trí xếp hạng
- #10953
- Giấy phép
- —
- Cập nhật
- 31/10/2026
Bình luận
- …
Thêm skill từ kho mã này
advisor
15kCho agent hỏi ý kiến một mô hình thứ hai mạnh hơn tại các điểm then chốt, như trước quyết định lớn hoặc khi bị kẹt ở lỗi, nếu bạn bật nó.
check-agent-compatibility
15kKiểm tra xem coding agent AI có khởi động, xác minh và ghi tài liệu được cho một repository không, rồi trả về một điểm tương thích và vấn đề chính.
cli-for-agents
15kDạy agent thiết kế hoặc rà soát công cụ dòng lệnh để các coding agent AI chạy được mà không cần lời nhắc, với trợ giúp rõ ràng và ví dụ.
continual-learning
15kGiữ các ghi chú AGENTS.md của bạn cập nhật bằng cách giao việc rà soát các cuộc trò chuyện trước cho một trình cập nhật bộ nhớ chuyên dụng.
Skill tương tự
test-driven-development
311kDạy agent của bạn viết kiểm thử thất bại trước, xem nó thất bại, rồi viết đoạn mã ngắn nhất để vượt qua trước khi làm bất kỳ tính năng hay bản sửa nào.
verification-before-completion
311kDạy agent của bạn chạy kiểm tra thực tế và đọc kết quả đầu ra trước khi khẳng định một việc, bản sửa hoặc bản build đã hoàn thành hay vượt qua.
migrate-to-shoehorn
310kThay các ép kiểu rủi ro trong tệp kiểm thử bằng thư viện shoehorn, để các bài kiểm thử dùng dữ liệu một phần vẫn qua được kiểm tra kiểu.