preview

preview is a command for Claude Code from xiaolai/claude-english-buddy-for-claude. It costs 165 tokens per session (688 once invoked), scanned A, original, ISC.

A dry-run review command for text. It shows proposed corrections without submitting the text, logging it in correction history, or triggering automatic correction.

In plain words
What is it for?
Use it with inline text or a file to review prompts, commit messages, pull request descriptions, and other writing before submission.
Why use it?
It lets you inspect changes before sending an important prompt or message. This is useful when you want feedback without changing stored history or the submitted text.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; names the AskUserQuestion tool.

Part of the claude-english-buddy plugin — 6 skills, 7 commands, 4 agents, 2 hooks shipped together

Good fit Use it with inline text or a file to review prompts, commit messages, pull request descriptions, and other writing before submission.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/xiaolai/claude-english-buddy-for-claude/preview
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/xiaolai/claude-english-buddy-for-claude

Made for: Claude Code.

Or install claude-english-buddy, the plugin that ships this one along with the rest of its 6 skills, 7 commands, 4 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for preview

README.md
[![agentmods](https://agentmods.dev/badge/commands/xiaolai/claude-english-buddy-for-claude/preview/github.svg)](https://agentmods.dev/commands/xiaolai/claude-english-buddy-for-claude/preview)
Your own site
<a href="https://agentmods.dev/commands/xiaolai/claude-english-buddy-for-claude/preview"><img src="https://agentmods.dev/badge/commands/xiaolai/claude-english-buddy-for-claude/preview/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for preview

Your own site · 80×15
<a href="https://agentmods.dev/commands/xiaolai/claude-english-buddy-for-claude/preview"><img src="https://agentmods.dev/badge/commands/xiaolai/claude-english-buddy-for-claude/preview.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 165 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 688 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00165 $0.00688
Opus 5 $0.00082 $0.00344
Sonnet 5 $0.00033 $0.00138
Haiku 4.5 $0.00016 $0.00069

Measured 3d ago against content hash d88979d4f136, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

preview scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/preview.md · 86 lines

What it actually says

User Input

$ARGUMENTS

Workflow

Step 1: Resolve input

Input Action
Inline text Use directly
(empty) Ask for text via AskUserQuestion
File path Read the file

Step 2: Load resolved config

Load the resolved config per commands/shared/config-loader.md. If auto_correct is false, note this in the report — preview still runs regardless.

Step 3: Dry-run review

This is a dry run. Do NOT:

  • Log anything to the JSONL history.
  • Submit the corrected text anywhere.
  • Trigger the UserPromptSubmit hook.

Dispatch the writing-reviewer agent via the Task tool with the input text. The orchestrator will fan out to grammar-checker, tone-calibrator, and clarity-enhancer as usual.

Step 4: Report

Use the writing-reviewer's output verbatim, but prepend a preview banner and append a "what would change" diff.

# Preview — Dry Run

**Auto-correct is currently**: {enabled / disabled}
**This preview does NOT log, submit, or modify any history.**

---

{writing-reviewer output verbatim}

---

## What Would Change If You Submitted

| Aspect | Before | After |
|--------|--------|-------|
| Prompt length | {n chars} | {n chars} |
| Error count | {n} | 0 |
| Tone score | {1–5} | {1–5} |

## Recommendation

{If Errors found == 0 AND Tone score >= 4: "Ready to submit — no changes needed."}
{If Errors found > 0 OR Tone score <= 3: "Consider applying the corrections above before submitting."}
{If the text is a commit message (single short imperative line): add a commit-specific note with the ≤72 char check.}

Notes

  • This command is purely informational; it never mutates state.
  • If the input is shorter than 10 characters, skip the review and respond: "Input too short to preview."
  • If the input starts with a slash command, skip and respond: "Preview does not apply to slash commands."
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 86 lines · 165 tokens per session scan A d88979d4f136

Subscribe to this mod's changes

preview is a command published in the GitHub repository xiaolai/claude-english-buddy-for-claude (29 stars, last pushed 18d ago), licensed ISC. It adds 165 tokens to every session and 688 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-08.