跳到正文
DEV Community· Fawwaaz Sheik·· 2 小時前AI 評分53

Cursor 和 Claude Code 的語音提示詞:如何向 AI 編碼 Agent 説明需求,以及打字提示詞為何容易遺失上下文

Voice prompting for Cursor and Claude Code: how to talk to your AI coding agent (and why typed prompts lose context)

AI 導讀

Fawwaaz Sheik 分享向 Cursor、Claude Code 等 AI 編碼 Agent 口述需求的方法,指出口述較容易保留背景、限制及邊界情況。他建議用能清除填充語、保留約束的聽寫工具整理內容,並按 Goal → Where → Rules → Done 交代目標、修改位置、規則及完成條件。

正文

TL;DR: Speaking your prompts to an AI coding agent is faster than typing them, and you naturally include more context: what you tried, what must not change, edge cases. The catch is that raw speech is messy. The fix is a dictation tool that removes the filler but keeps the constraints, plus a simple structure for what you say. This post covers the workflow, the structure, and which Mac tools do it.


Why are typed prompts often worse than spoken ones?

Typed prompts are short because typing is slow. When you type to Cursor or Claude Code, you skip details: "add search to dashboard". The agent then guesses the rest, and you spend the next three turns correcting it.

When you explain the same change out loud, you say what you'd say to a colleague:

  • where the feature goes
  • what it should search
  • what it must not break
  • what happens when nothing matches
  • "and please don't add a new library for this"

That extra context is exactly what makes an agent's first attempt land. Most people speak around 130–150 words per minute and type around 40, so speaking a five-sentence brief takes seconds instead of a minute or two.

What's wrong with plain dictation for prompts?

Plain speech-to-text writes down everything you say. Here's a real example of thinking out loud about a feature:

"Okay, so, um, I've been looking at the dashboard and thinking about this a bit. Basically, what I mean is, when someone starts typing, the results should narrow down as they go. Maybe that's probably the best place for it, I think, if that makes sense. Oh, and, yeah, one more thing before I forget."

Pasted into an agent, that's noisy. The hedging ("maybe", "I think", "probably") can even make the model less decisive. What you actually want the agent to receive is this:

Add dashboard search with live filtering. Search across names and descriptions. Keep the search field above the table. Preserve the current layout and reuse existing components. Show an empty state when nothing matches. No new dependencies.

Same intent, a third of the words, and every constraint survived. That transformation (filler out, requirements in) is the whole game.

A spoken prompt structure that works

You don't need to script yourself, but having a loose order in your head helps. I use Goal → Where → Rules → Done when:

Part What you say Example
Goal The change in one sentence "Add live search to the dashboard table."
Where Files, components, routes "It's in app/dashboard/page.tsx, reuse the Input component."
Rules What must not change, libraries to avoid "Don't touch the layout. No new dependencies."
Done when How you'll judge it "Empty state when nothing matches, tests still pass."

Speak it in any order you like. A good cleanup step will put it into a clean brief either way.

Tips for speaking technical terms

  • Say file paths naturally: "app slash dashboard slash page dot tsx" works with most modern models, but it's often easier to say "the dashboard page" and let the agent find it.
  • Spell rare identifiers once: if a function is called normalizeSKU, say it plainly; good tools learn your vocabulary over time.
  • Say constraints as constraints: "must", "don't", "only" survive cleanup much better than "it'd be nice if maybe".
  • Keep one task per prompt. Speaking makes it tempting to dump five ideas at once. Agents still do best with one clear change.

The workflow: hold, speak, release

The flow that keeps you in the editor:

  1. Put your cursor in the agent's input (Cursor chat/agent panel, Claude Code in the terminal, Codex, ChatGPT, whatever).
  2. Hold a keyboard shortcut.
  3. Explain the change out loud like you would to a teammate.
  4. Release. The cleaned-up prompt appears in the field.
  5. Skim it, hit Enter.

No copy-paste, no switching windows. The skim in step 5 matters: you're still the reviewer of what goes to the agent.

Which Mac tools can do voice prompting?

Tool Cleanup / rewriting Where speech is processed Notes
Apple Dictation Minimal On-device (mostly) Free and built in; writes verbatim, filler included
Wispr Flow Yes Cloud Cross-platform, team features
Superwhisper Yes, via custom modes you configure Local or cloud Very configurable, good for tinkerers
Superquill Yes, focused on shorter, clearer prompts On-device transcription; only text goes to the cloud (or nothing in Private mode) Mac, private beta; free during beta

Disclosure: I build Superquill. I built it because I kept running into the problem above: dictation tools wrote down my rambling word for word, and I wanted something that turned a spoken thought into a tight prompt while keeping the file names and "no new dependencies" bits. It also learns the names, projects and phrasing you use, so your teammates' names and your internal jargon come out right.

If you want a broader, more neutral breakdown of the options, I wrote a comparison of AI dictation apps for Mac covering pricing, privacy and platforms.

Curious where your voice data actually goes? I wrote a privacy checklist for AI dictation apps.

Is voice prompting worth it for developers?

Yes, if you use AI agents for more than one-line edits. The time saved typing is nice, but the real win is better first attempts, because spoken prompts carry the context you'd never bother to type. It also helps if you have RSI or just want to give your hands a break between long sessions.

It's less useful for writing actual code character by character. Use your keyboard for code; use your voice for describing code.

FAQ

Can I use voice dictation for coding prompts?

Yes. Any dictation tool that types into the focused text field works with Cursor, Claude Code, Codex and ChatGPT. Tools with an AI cleanup step work best, because they remove filler and turn speech into a structured prompt.

Does voice dictation work in Cursor and Claude Code?

Yes. System-wide dictation on macOS writes into whatever input has focus, including Cursor's chat and agent panels and terminal apps running Claude Code.

Is speaking faster than typing prompts?

For most people, yes. Average speaking speed is roughly 130–150 words per minute versus about 40 for typing, and it's easier to include rich context out loud.

Is voice dictation private?

It depends on the tool. Some process audio in the cloud; others, like Apple Dictation, Superwhisper's local models and Superquill, transcribe on your Mac so audio never leaves it. Check whether text is sent to a cloud model for cleanup too, and whether there's an offline mode.

What's the best way to structure a spoken prompt?

Say the goal, where the change goes, the rules it must follow, and how you'll know it's done. One task per prompt.


How are you prompting your agents today: typing, voice, or something else? I'd love to hear what's worked in the comments. 👇

來源:DEV Community · dev.to