Writing Doctor
Writing Doctor helps make AI-assisted writing clearer, more natural, and less formulaic—without pretending to detect who wrote it. Give it a draft and it explains why the writing feels polished, uneven, mechanical, or sloppy, with evidence and practical editing priorities.
It works just as well on human-written drafts. Repeated openings, even sentence lengths, canned contrasts, and punchy fragments are writing patterns, not reliable proof of authorship.
The same skill works with Claude Code, Codex, OpenCode, Gemini CLI, and other Agent Skills-compatible harnesses.
What it achieves
- Shows exactly where a draft becomes repetitive, mechanical, choppy, vague, or underedited.
- Separates formulaic writing from genuinely sloppy writing.
- Identifies strengths worth preserving, not just faults.
- Prioritizes edits by reader impact instead of automatically rewriting the author's voice.
- Supports Markdown documents while excluding code, tables, lists, headings, and frontmatter from body-prose measurements.
What it examines
- repeated paragraph and sentence openings;
- repeated three- to six-word phrases across paragraphs;
- sentence-length range and variation;
- clusters of short standalone paragraphs;
- paragraph opening moves and dominant sentence shapes;
- rhetorical habits such as negative parallelism, self-posed Q&A, anaphora, tricolons, repeated metaphors, and dramatic reveals;
- clarity, coherence, rhythm, and reader effort.
Markdown frontmatter, headings, fenced code, tables, and list items are excluded from primary body-prose measurements and reported separately.
Requirements
The deterministic metrics command has no runtime dependencies.
Install
Claude Code
After this repository is published:
claude plugin marketplace add DheerG/writing-doctor
claude plugin install writing-doctor@writing-doctor --scope user
Restart Claude Code, then invoke:
/writing-doctor:diagnose-writing Why does docs/launch.md sound mechanical or sloppy?
For local development:
claude --plugin-dir ./plugins/writing-doctor
Codex
After this repository is published:
codex plugin marketplace add DheerG/writing-doctor
Install writing-doctor from that marketplace in the Codex plugin UI, then invoke:
$writing-doctor:diagnose-writing Diagnose why README.md feels repetitive.
For local development, add the absolute path to this repository as a local marketplace.
OpenCode, Gemini CLI, and Agent Skills harnesses
Clone the repository, then install the entry points you need:
node plugins/writing-doctor/scripts/install.mjs --harness opencode
node plugins/writing-doctor/scripts/install.mjs --harness gemini
node plugins/writing-doctor/scripts/install.mjs --harness agents
Use --harness all for all three. Existing targets are preserved unless --force is supplied.
Invoke /diagnose-writing <file or request> in OpenCode or Gemini CLI. Agent Skills-compatible harnesses can invoke diagnose-writing by name.
Direct metrics command
Link the command during development:
npm link
Analyze a file:
writing-doctor self-check
writing-doctor analyze draft.md
writing-doctor analyze draft.md --format json
Analyze standard input:
writing-doctor analyze - --format json
The command produces structural evidence, not an overall quality score. The skill reads the full artifact, adapts for genre and intent, cites representative examples, and chooses a verdict.
Verdicts
- Polished — controlled variation; no material issue.
- Mostly polished — a few local habits.
- Uneven — recurring issues affect some sections.
- Mechanical — repeated structures make the prose feel formulaic.
- Sloppy — clarity, coherence, grammar, or editing failures materially impede reading.
Mechanical and sloppy are deliberately separate. A clean draft can be mechanical; an entirely human draft can be sloppy.
Use in a plan
The diagnosis is read-only, so it can run during planning:
Use diagnose-writing on the current draft before proposing edits. Preserve
the intended voice and separate diagnosis from any rewrite.
Development
npm test
npm run validate
npm run version:check
Releases
Every merge to main receives a SemVer bump, an immutable v<version> tag, and a GitHub Release.
- Apply the
major label to a pull request for a major bump.
- Apply the
minor label for a minor bump.
- With neither label, the workflow applies a patch bump.
Repository setup:
- Create the
major and minor pull-request labels.
- Give GitHub Actions read/write repository permission.
- Permit
github-actions[bot] to push its version-only commit to main. If branch rules prevent that, add a write-capable DEPLOY_KEY repository secret.