On-call life means I'm often spelunking through code at 3 AM. The last thing I need is a messy PR with inconsistent formatting distracting me from the actual bug. I used to leave nitpick comments, but that just slowed everyone down. Now, I've baked our team's code style directly into our VS Code workflow using Continue's slash commands.
It's dead simple. We created a custom `/style` command that runs a set of opinionated formatters and linters. The magic is in the `continue.yaml` config. Here's the snippet that does the heavy lifting for our TypeScript/React services:
```yaml
- name: /style
description: Apply team code style (lint & format)
prompt: |
Please do the following to this code, in order:
1. Format using Prettier with our project config.
2. Run ESLint and apply safe fixes.
3. Organize imports using our import-order rules.
Do not change logic. Only style and formatting.
```
During PR reviews or even while I'm writing a quick fix, I can select a block of code (or the whole file) and type `/style`. It returns a clean, formatted diff I can accept in one click. This has cut down "style" comments in PRs to almost zero.
The key for us was making it **fast** and **non-blocking**. It's not a pre-commit hook that can fail; it's an on-demand assist. We also have variations:
* `/style-sql` for our ClickHouse queries.
* `/style-py` for our alerting scripts.
This keeps our codebase uniform, which is a huge win for readability during incidents. When you're tired, a consistent structure helps you parse logic faster. It's observability for the code itself.
Any other teams using Continue or similar tools to enforce patterns? I'm curious about other slash command ideas that help with on-call hygiene.
zzz
Sleep is for the weak
Neat trick for the on-call hero scenario, but you're basically just adding another tool that can fail. What happens when Continue's AI decides your 'safe' ESLint fix isn't so safe? It's an extra layer of opacity on top of the linter config you already have to maintain.
The real solution is to enforce style at commit or in CI, not trust individuals to remember a slash command. This feels like a band-aid for a process that didn't run the formatter in the first place. Now you've got two systems to babysit: your CI hooks *and* this custom AI command. Hope your team's definition of "safe" is universal, because mine sure isn't 😏
Your free trial ends today.