# write

Checks, tightens or rewrites English prose using a deterministic instrument that measures readability, formula patterns, plain language and consistency, and proves an edit kept every fact with before-and-after numbers.

Jobs are check, tighten, plain, voice, words and agent-docs; a bare /write shows the menu.

**When an agent uses it:** Use only when the user explicitly invokes /write or $write. Ordinary writing or editing requests must not activate it.

Group: [Writing](https://www.atlasscope.dev/skills#writing). Part of the agent-kit plugin, written for Agent Kit. License: MIT, © AtlasScope.

## Install

It comes with the plugin: https://www.atlasscope.dev/install. This skill by itself, for any agent that reads skill folders:

```sh
npx skills add AtlasScope/agent-kit --skill write
```

## SKILL.md

# Write

The person has a piece of writing and wants it clearer. They get one of two things. A check tells them what a
reader would trip over, with line numbers and the three fixes worth making first. An edit gives them the rewritten
text, a table of numbers before and after, and a line saying whether every fact survived.

`<skill>` is the folder this file is in. `scripts/prose.mjs` and `scripts/compare.mjs` need only Node 18 or later
and work offline. They read Markdown, MDX and plain text. They are for English; say so if the text is in another
language and edit by hand without the numbers.

## Jobs

| Job | What it does |
| --- | --- |
| `check` | Reports only. Runs the instrument and leads with what a reader would trip over, three fixes first. Never rewrites. |
| `tighten` | Edits for clarity and length. Keeps every fact and the writer's voice. Shows the numbers and any lost facts. |
| `plain` | Rewrites for a reader outside the field: terms defined, what happened and what it means first, detail underneath. |
| `voice` | Learns the writer's voice from their samples into a short style note they approve, then applies it. |
| `words` | Interface wording is not this skill's job. Hand it to `/keen words` in one line. |
| `agent-docs` | Checks or rewrites instructions an AI agent will read: a skill file, AGENTS.md, a prompt. |

A bare `/write` shows this menu in a few lines and suggests one job from what was pasted: a draft with no request
gets `check`; "too long" or "make this better" gets `tighten`; a named non-expert reader gets `plain`; samples
plus "sound like me" gets `voice`; a SKILL.md, AGENTS.md or prompt gets `agent-docs`; a button label or error
message gets the hand-off. Ask which to run. When the job is named, run it without asking.

Read `references/editing.md` before `tighten`, `references/plain-language.md` before `plain`,
`references/voice.md` before `voice`, and `references/agent-docs.md` before `agent-docs`. Read
`references/rules.md` when a finding needs explaining or a rule looks wrong for the text.

## Gates

- Never invent a fact, a number, a quotation or a source. A claim with no source is reported, not given one. Take
  out the empty credit ("experts agree", "studies show") and keep what was claimed as a plain statement.
- Every claim, reason, rule and doubt in the original is in the edit at the same strength. Only a unit that says
  nothing is cut: delete it and the reader knows exactly as much.
- `check` never rewrites. Suggest the fix in words; change nothing.
- An edit is not finished until `compare` has run and the reply says what it found. Lost or altered facts must be
  none. If one was cut on purpose, name it and say why. If the after has a new fact, remove it or ask.
- The score measures formula and density. It does not measure truth, the quality of the ideas, or who or what
  wrote the text. Never use it, or any finding, to say a text was or was not written by a person.
- Do not promise that text will pass a detector, and do not help pass off machine-written text as a person's own
  where disclosure is required. Decline that framing in one line and offer to make the writing clearer.
- Do not "humanise" by adding errors, slang, filler or invented personal detail.
- Never imitate a named living author's distinctive voice for publication as theirs.
- No review pass by another model unless the person asks.

## How to edit

The instrument checks facts and shape; it cannot hear a sentence. So an edit runs in three passes: the rewrite
is free to sound like a person and the check is strict about what was said. Method: `references/editing.md`.

1. Ledger. Read for the point; if you cannot state it in one sentence, say so (for `check` that is the first
   finding; for an edit, ask). Then take each sentence, list item and heading in turn, note what it asserts and
   why, and mark it: says something, says it again, or says nothing. The ledger is private. Nothing from it
   appears in the rewrite or the reply.
2. Rewrite. Work a paragraph or a list at a time, from what the block means, and write it as a careful
   colleague would say it: subject first, the whole before its parts, one idea to a sentence, notes said as
   sentences, plain words. Do not walk the original changing words. No "However" or "Therefore" at a join, no
   inversions, no person the writer did not use. Keep headings, lists, code, links and bold labels; a bold
   label before a dash fragment can become the subject of a real sentence.
3. Check. Walk the ledger against the rewrite: every unit that said something is still there with the same
   scope, strength, time, actor, mood and reason, and nothing was added. Repair a slip by restoring the exact
   word, not the whole sentence. Read it as if aloud and rebuild what you stumble on. Then run `compare`.

`compare --tighten` has two checks an edit must clear: every fact kept, and the same headings, lists and bold
labels. The rest it lists to look at: length, long sentences, notes left in prose, added linking phrases. Read
each and fix what a reader would trip on; never bend a clear sentence to quiet one. Three runs at most, and
the reply names what still fails. An edit that leaves awkward text much as it was has failed regardless.

## Run it

```bash
node <skill>/scripts/prose.mjs <file | folder | glob>        # or pipe text in
node <skill>/scripts/prose.mjs draft.md --json > before.json
node <skill>/scripts/prose.mjs draft.md --baseline before.json
node <skill>/scripts/compare.mjs before.md after.md --tighten   # leave out --tighten for plain and voice
```

`--only` and `--skip` take rule ids; `--max 0` lists every finding; `--terms <file>` holds the writer's own
`allow: term` and `flag: term -> plain word` lines; `--list-rules` explains every rule. Exit code 0 means nothing
to fix, 1 findings, 2 a usage error.

For an edit: keep an untouched copy of the original first, in the primary checkout's ignored `.artifacts/write/`
or a temporary folder. Edit, then run `compare` on the pair. If it reports a lost or altered fact, a new finding
or a failed check, fix the edit and run it again. Each sentence it lists as not carried over either said nothing
or goes back. If scripts cannot be run, count the words, walk the checks by hand and say the numbers are missing.
Edit files in place only when the person named a file; for pasted text, the reply ends with the whole rewrite.

## What the person gets back

Plain English first, proof they can see, and one approval at most.

- `check`: one sentence on what the piece says and whether it gets there. Then the three fixes, each with a line
  number and the offending words. Then the numbers in one line: words, grade, share of long sentences, score.
  Offer `tighten` or `plain` as the next step. Details (every finding by rule) go underneath.
- `tighten`, `plain`, `voice`: what changed in two or three sentences. Then the table from `compare`: words,
  grade, longest sentence, score, before and after. Then "Facts: all N kept" or the list of what was lost, and
  for `tighten` the checks: clear, or what still fails, and anything listed to look at that you left, with why. Then anything the person must decide, batched.
  The rewritten text or the file path comes last, with nothing after it.

Naming the job is the approval. Ask a question first only when the answer changes the edit: who the reader is for
`plain`, and approval of the style note for `voice`.

## Traps

- Do not write to the score. A text can score 100 and say nothing. Under about 150 words, leave it out.
- Quotations and code are kept word for word. A blockquote used as the writer's own note is prose: edit it.
- Passive voice, undefined initialisms and the consistency rules are questions. Raise them; do not auto-fix them.

Sources (Orwell, Strunk and White, Williams and Bizup, plain-language guidance and others) are cited by rule in `references/rules.md`.

Other files in the skill folder: agents, references, scripts, tests. Browse them at https://github.com/AtlasScope/agent-kit/tree/main/plugin/skills/write

Source: https://www.atlasscope.dev/skills/write
