Why use snippets in the era of AI agents?

AI can generate code faster than ever. A single prompt can produce entire classes, build files or test suites in minutes, so it’s fair to ask: why would any engineer still care about VS Code snippets? Because generating code is not the same thing as maintaining flow.

Assuming that you're not a vibe coder, you know that many repetitive engineering tasks are not difficult enough to justify opening an AI chat, writing a prompt, waiting for output, reviewing the result and adjusting it to match your project conventions. Ironically, for small but frequent tasks, AI often introduces the exact thing engineers try to avoid most: context switching.

And context switching is expensive.

Every time you stop coding to ask an AI assistant how to write a constructor, scaffold a test, remember a target_link_libraries signature or recreate a logging macro, you temporarily break concentration. Individually, these interruptions feel insignificant, but across an entire day, they quietly fragment momentum and slow down deep technical work.