← Back to library

Build a terminal command that edits your tech drafts

Connie Leung, a developer advocate, had Gemini CLI write her a custom review command, tightened its argument handling herself and stored it as a TOML file. It accepts a file path and returns editorial critique she can run from the terminal anytime.

  • OutcomeRun one command on any Markdown draft and get a structured edit covering typos, clarity, structure, code accuracy and publishing readiness.
  • SetupUnder an hour
  • LevelStarter
  • CreditConnie Leung
View original
Works with
GeminiClaude Code

Published Oct 23, 2026Updated Oct 23, 2026AI dry run on sample input: passed Oct 23, 2026Source verified Oct 24, 2026

When should you use it?

  • You publish technical tutorials
  • Drafts ship with small bugs in code samples
  • You work in the terminal anyway

Not for: Replacing a human editor for flagship pieces; Non-technical copy

What do you need, and what do you get?

You need

  • Markdown draft or pasted text
  • Your target platform's conventions

You get

  • Markdown critique: errors, clarity, structure, impact, readiness

How does it work, step by step?

  1. Have the CLI draft the commandDescribe what the command should check and how to treat file or text input.
  2. Refine by handFix argument handling until both input types work.
  3. Save itStore the command file where the CLI picks up custom commands.
  4. Run on each draftPass a file path before publishing.
  5. Act on code notes firstFix technical errors before polishing prose.

The prompt

The original prompt by Connie Leung, word for word, with a link to where it was published. Below it is our adapted version with fill-in blanks, if you want it. Works in Gemini and Claude Code. Values in lime are placeholders.

Original prompt by Connie Leung

Word for wordby Connie Leung
Please generate a Gemini CLI custom command (critique.toml) that does the following: Critique a draft blog post for clarity, structure, and impact. If it is a file path, load the blog post from the file and critique. If the input is a string, treat the input string itself as the blog post content and critique. Provide the critique in markdown format in the following sections: Look for typos and grammar errors. Clarity: Does the tutorial convey the ideas to the readers clearly? Structure: Does it have a good introduction, good conclusion and use the proper heading to separate sections? Impacts How to improve the draft so that it is ready to be published to dev.to blog site.

Exactly as published by Connie Leung in Automating DevRel: How I Use Gemini CLI and Gemini 3 to Catch Bugs in My Blog Posts.

Our adapted version (optional)

Adapted prompt0 variables
Review the blog draft at [path] as a senior developer-relations editor for a technical audience. Report in Markdown under these headings: errors (typos, grammar, broken code or commands), clarity, structure (intro, headings, conclusion), technical accuracy (anything likely wrong or outdated), and what to change before publishing on [platform]. Quote the line for each issue and suggest a fix. Leave the prose itself untouched; notes only.

What can go wrong?

  • Critique of code samples still needs you to run them.
  • Generic editor personas produce generic notes; name your audience.

Our take

Turning a good review prompt into a named command is the step most people skip, and it is what makes the habit stick. A named command removes the friction of finding and pasting the prompt, so you actually run it on every draft. Connie had the CLI write the first version and then fixed the argument handling herself, which is a sensible split: the model drafts, you make sure it accepts both a file path and pasted text. Act on the technical notes first, since a broken code sample costs readers more than a clumsy sentence, and run the samples yourself because the critique cannot. Tell the command who the audience is; a generic editor persona produces generic advice. Keep the command file in version control alongside your other tools so improvements are not lost. For flagship pieces a human editor still earns their place, but for routine tutorials this catches a lot before publishing.

Where the time goes back: A self-review pass that takes an hour becomes a one-line command before every publish.

FAQ

What input does it take?
A path to a .md or .txt file, or the post text itself.
Did it catch real bugs?
The author credits its feedback with helping resolve a blank-page error in her sample app.

Source and credit

The original prompt on this page is by Connie Leung, shown word for word with a link to where it was published. The summary, notes and adapted version are ours.

Original
Automating DevRel: How I Use Gemini CLI and Gemini 3 to Catch Bugs in My Blog Posts
Creator
Connie Leung
Published on
DEV Community
Original date
Dec 20, 2025
License
Not openly licensed; the original prompt is shown word for word with credit and a link to the original
Originally for
Gemini
AI dry run
Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails.
Verified
Oct 24, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.

Are you the creator? Claim or correct this page.

More in Marketing

All 97 Marketing playbooks →

Related playbooks

MarketingPrompt✓ AI dry run

Build a product messaging framework

Turn what you know about a product into three message pillars, each with the buyer outcome, its evidence and the feeling it should create.

Credit: OpenAI Academy

Minutes
MarketingRoutine✓ AI dry run

Nightly product loop for a side project, with a go gate

Let a coding agent run your small product's support, research and next version on a nightly schedule, filing a report and posting nothing public until you reply go.

Credit: u/intensityflow on r/ClaudeAI

An afternoon+
MarketingWorkflow✓ AI dry run

Run backlogged SEO fixes as reviewable pull requests

Stop letting SEO audits rot in a spreadsheet by having a coding agent execute the approved changes as pull requests your team reviews.

Credit: Lawrence Hitches

An afternoon+