prose-edit
/prose-edit
Use when the author asks to line-edit, tighten, cut or unpack a document (an RDR, reference doc, essay, CHANGELOG entry, web page, or text pasted in for a commit message), to list or remove a document's stored rejections, or to add an exemplar passage to a genre. Invoked as /prose-edit.
- Author
- hellblazer ↗
- Repository
- nexus ↗
- Licence
- AGPL-3.0
- Last repository change
- 26.10.2026
Assessment and security
- Files in this package
- 4
- Scripts
- 3
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.
AGPL-3.0, copyleft: przeróbki udostępniane innym muszą mieć tę samą licencję.
- 3 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/brief.py, scripts/memory.py, scripts/review.py
What it does and when to use it
Use when the author asks to line-edit, tighten, cut or unpack a document (an RDR, reference doc, essay, CHANGELOG entry, web page, or text pasted in for a commit message), to list or remove a document's stored rejections, or to add an exemplar passage to a genre. Invoked as /prose-edit.
Original author description
Use when the author asks to line-edit, tighten, cut or unpack a document (an RDR, reference doc, essay, CHANGELOG entry, web page, or text pasted in for a commit message), to list or remove a document's stored rejections, or to add an exemplar passage to a genre. Invoked as /prose-edit.
How it works
- Setup
- Invocation
- Steps
- Rules
SKILL.md preview
---
name: prose-edit
description: Use when the author asks to line-edit, tighten, cut or unpack a document (an RDR, reference doc, essay, CHANGELOG entry, web page, or text pasted in for a commit message), to list or remove a document's stored rejections, or to add an exemplar passage to a genre. Invoked as /prose-edit.
disable-model-invocation: true
---
# Prose edit
Arguments: $ARGUMENTS
Run every command from the repository root, the directory this session started in. Never run `cd`, and put nothing in front of a command. Write the command prefix of the table below exactly as it is shown: relative, unquoted, with no `./` and no `cd` before it. The permission rule that lets a command run matches that text, and a quoted or `./`-prefixed script path, or a `cd '<dir>' &&` in front, does not match it. Pass each argument as its own argv token. Never build a shell string from the arguments. Only the arguments after the prefix go in single quotes (a single quote inside one is written `'\''`): a path with a space or a `;` is author input, and so is every token. In a command below, the names of the first column (BRIEF, MEMORY, REVIEW) stand for the prefix text of their row, typed as it is shown, and a `<placeholder>` stands for one argument in single quotes.
| Name | Command prefix |
| --- | --- |
| BRIEF | `python3 .claude/skills/prose-edit/scripts/brief.py` |
| MEMORY | `python3 .claude/skills/prose-edit/scripts/memory.py` |
| REVIEW | `python3 .claude/skills/prose-edit/scripts/review.py` |
## Setup
The work directory is outside the repository, under the temp directory, so in default permission mode each Read and Write of it asks the author, and a headless run is refused at the first one. The author adds two allow rules to their user settings (`~/.claude/settings.json`), once per machine:
```json
"permissions": {"allow": ["Read(//<R>/prose-edit-*/**)", "Edit(//<R>/prose-edit-*/**)"]}
```
`<R>` is the output of `python3 -c 'import os,tempfile;print(os.path.realpath(tempfile.gettempdir()))'` without its leading slash. It must be the real path: `brief.py` resolves the temp directory, so on macOS the rule names `private/var/folders/...`, not the `$TMPDIR` spelling, and a rule on a symlinked path never matches. Both rules are needed. `Edit()` covers the Write tool and the line-editor's Read, but only `Read()` covers the `<` redirect of step 9. `additionalDirectories` is not a substitute: it allows reads of the whole temp directory and still asks for every Write (measured on Claude Code 2.1.302, T2 `nexus/prose-edit-allow-rule-measurement-2026-10-18`).
## Invocation
| Form | Meaning |
| --- | --- |
| `<path>[:<start>-<end>] [--genre G] [--budget N]` | Edit run. Budget defaults to 10. A range limits proposals to those lines. |
| `- --genre G [--budget N]` | Stdin run. The flags are the first line. The text is everything after the first newline. Nothing is applied. |
| `rejections <path> [--remove N]` | List a document's stored rejections, or remove number N. |
| `exemplar <genre> <path>:<start>-<end>` | Store that passage as an exemplar of the genre. |
| `-- <path>` or `./<path>` | A file named `rejections` or `exemplar`. |
## Steps
1. Run `BRIEF parse <token>...` with the arguments as tokens. For a stdin run pass only `-` and the flags to `parse`. Never pass the text. On exit 1, show stderr to the author and stop. A null `genre` in the output only means the flag was not given for a path run. Never ask the author for a genre because of it: a null `genre` after `parse` is not a reason to ask, at this step or at any step before step 4. Go on to step 2: step 4 finds the genre from the path and reports when none exists, and only that report (`build` exits 1 with `no genre` in stderr) is a reason to ask. On any failure, show stderr and stop.
2. Branch on `mode` in the JSON.
| mode | Do |
| --- | --- |
| `rejections` | Run `MEMORY <memory_argv...>`. Show the numbered rejections. Stop. |
| `exemplar` | Run `MEMORY <memory_argv...>`. Show the stored passage and `duplicate`. Stop. |
| `edit` | Continue. |
If a `MEMORY` command fails, show stderr and stop.
3. Fix the input.
| `stdin` | Do |
| --- | --- |
| false | Use `target` from step 1. |
| true | Take the text after the first newline of the message. If there is none, ask the author to paste it and end your turn: no WORK exists yet. Otherwise run `BRIEF tmpdir --ready`. It prints eight lines, `WORK=`, `INPUT=`, `REPLY=`, `FILTERED=`, `REASONS=`, `ANSWERS=`, `ENTRY=` and `CARD=`, each a full path. Write the text with the Write tool to the `INPUT=` path. Use `-` as the target and `--file '<input>'`. |
4. Build the brief. Both runs print a header, a blank line, and then the brief.
| `stdin` | Run |
| --- | --- |
| false | `BRIEF build <target> --budget <budget> [--genre <genre>] --work`. The header is six lines: `WORK=<dir>`, `DISPATCH=<prompt>`, `REPLY=<path>`, `FILTERED=<path>`, `REASONS=<path>` and `ANSWERS=<path>`. The brief is everything after the blank line. |
| true | `BRIEF build - --budget <budget> --genre <genre> --file '<input>'`. The header is one line, `DISPATCH=<prompt>`. The brief is everything after the blank line. |
Either way `build` has written the brief to `brief.md` in the work directory, which ends with the line `Brief id: <id>`. The line-editor reads that file and echoes the id. The id is in the file and nowhere else: never put one in the prompt. The `DISPATCH=` line is the whole prompt for step 7, with the full path of that file already in it. The brief printed here is for you to check step 6.
| Result | Do |
| --- | --- |
| exit 0 | Continue. |
| exit 1, stderr contains `no genre` | Never choose a genre yourself. Ask the author which genre applies: rdr, reference-doc, how-to, exploration-essay, changelog, commit-message. End your turn with that question and do nothing else. Start again at step 1 with `--genre` only after the author answers. |
| any other non-zero exit | On any failure, show stderr and stop. |
5. WORK is the directory on the `WORK=` line of step 3 or 4. It holds the marked-up copy and the saved proposal until step 12 deletes it. Every path in the steps below comes from a header line of step 3 or 4 and is used exactly as printed: `<work>` is the `WORK=` path, `<input>` the `INPUT=` path, `<reply>` the `REPLY=` path, `<filtered>` the `FILTERED=` path, `<reasons>` the `REASONS=` path, `<answers>` the `ANSWERS=` path (the `ENTRY=` and `CARD=` paths are for step 13). Never type the word WORK as a path and never build a path yourself. Never create a directory named WORK, in the repository or anywhere else: Write makes a missing directory without a word, and the stray one shows in the author's `git status`. A path that is not on a header line is not yours to invent: stop and tell the author. On every stop after WORK exists and before step 12, delete WORK first with `BRIEF rmtmp '<work>'`. Step 11, the answer route and a retry in step 12, and a retry of step 9 or step 10 after exit 3 are the exceptions: the turn ends there with WORK in place.
6. If the brief contains `No exemplars are stored`, tell the author the genre has no exemplars yet and the editor runs without them. If it contains `all come from this document`, tell the author the genre's only exemplars are from this document, so the editor runs without them.
7. Dispatch the `line-editor` agent with the Agent tool (`subagent_type` `line-editor`, `run_in_background` false). The prompt is the text after `DISPATCH=` on the header line of step 4, exactly as printed: copy it whole, change nothing, add nothing, and never type a path yourself. It already holds the full path of the brief and the instruction for the id; `<id>` stays as shown, because you do not know it. Do not paste the brief into the prompt. If the line-editor says it cannot read the brief, stop and show the author its error and the Setup section: do not create a directory or a link in the repository and do not list the work directory. Wait for its reply. The harness may run the agent in the background even so: then the tool result only says the agent started, and the reply comes later as a message from the agent (its report). Wait for that message and do nothing else meanwhile.
8. Write the agent's whole reply, once, with the Write tool to the `REPLY=` path: the tool result, or the report text of the agent's message. Keep its indentation and its ```json fence as they are: the filter reads both. Never copy the reply with Bash (a heredoc or `echo`): a quote or the delimiter inside the reply breaks the copy.
9. Run `BRIEF filter <target> --budget <budget> --save '<filtered>' [--file '<input>'] < '<reply>'` (`<filtered>` is the `FILTERED=` path, `<reply>` the `REPLY=` path). Its output is the filtered proposal and the saved file holds the same text. A `warnings` entry about `brief_sha` means the editor's reply does not carry the id on the last line of `brief.md` in the work directory, so it did not read the file to its end. A `warnings` entry about `voice_card` means the editor's card is not the author-approved card the brief gave it. Show each to the author with the others in step 10. On exit 3 (a T2 outage; the `REPLY=` file holds the editor's work): show stderr, keep WORK, tell the author, end your turn, and run this step again when the author says to retry. On any failure, show stderr and stop.
10. Run `REVIEW render <target> --work '<work>' [--file '<input>'] [--genre <genre>]`. A stdin run passes `--file '<input>'` and the genre it was given. A path run passes `--genre` only when the author gave one. If `REVIEW render` fails with exit 3 (T2 became unavailable after the editor ran), keep WORK: show stderr, tell the author, end your turn, and run the same command again when the author says to retry. Any other failure: show stderr and stop. Tell the author where the marked-up copy is (`copy`) and whether it opened in the viewer (`opened`; when false, `reason` says why and the path is how to read it). Show each filter `warnings` entry and each `unplaced` edit with its cause. If `opened` is false, also show the filtered proposal:
| Part | Show |
| --- | --- |
| `note` | The editor's note. |
| `voice_card` | The voice card. |
| `paragraphs` | Each as `[P<n>] <action>: <paragraphs>. <advice>`. |
| `edits` | Each as `<n>. <old> -> <new> (<reason>)`. |
| `queries` | Each as `[Q<n>] <anchor>: <text>`. |
| `dropped` | Each as `<n> <old> -> <new> (<cause>)`. The author cannot see these edits in the copy otherwise. |
| `dropped_queries`, `dropped_paragraphs` | Each as `<n> <anchor or paragraphs> (<cause>)`. |
11. If the filtered proposal has no `edits` (the editor proposed none, or the filter dropped every one), there is nothing to accept or reject: do not ask for numbers. Show the note, the paragraph proposals, the queries, each filter `warnings` entry and each `dropped` edit with its cause (so the author sees why no edit is left). If there is a query or a paragraph proposal, ask the author whether to answer any of them with a change and end your turn; a change goes through the answer route of step 12. With no query, no paragraph proposal, or an answer that asks for no change, go to step 12 with `--accept none` and no other spec. Run its dry run and then, without asking, the same command without `--dry-run`: it changes no file, logs the session and deletes WORK. Otherwise:
Ask the author which sentence edits to accept, which to reject (with a reason if the author wants to give one) and any corrections. Say what each answer does to the text: accept puts the edit's new text in the document. Reject keeps the document's text as it is and stores the edit, so the editor does not propose it again for this document. An edit the author does not name is left undecided: the text stays as it is and nothing is stored for it. Say that a rejection is stored for the document only when the author says `reject` with the numbers, or `reject the rest` (a stdin run stores none), and that `reject the rest` leaves alone an edit listed as one that cannot be placed. Say that the author may also answer a query or a paragraph proposal with a change: it becomes a new numbered edit to accept like the others. End your turn with that question and do nothing else. Never choose the numbers yourself.
12. When the author answers a query (`Q<n>`) or a paragraph proposal (`P<n>`) with a change, never edit the document yourself. Write each change as exact text: `old` copied word for word from the document, `new` the text the author asked for, `answers` the `Q<n>` or `P<n>` it answers. Write them all as one JSON list `[{"answers": "Q4", "old": "...", "new": "..."}]` with the Write tool to the `ANSWERS=` path and run `REVIEW answer --work '<work>' --from-file '<answers>'`. It prints the new edit numbers, or on exit 1 says which `old` it cannot place (not found, ambiguous, protected): fix that entry (quote more of the text) and run it again; nothing is added until every entry places. Then run step 10's `REVIEW render` again, show each added edit as `<n>. <old> -> <new> (answers Q<n>)`, and ask the author which of them to accept, with any edit not yet decided. End your turn. An added edit is the author's own: it can be accepted or held, never rejected, and nothing is stored for it.
When the author answers with numbers, turn the answer into an accept spec, a reject spec when the author rejects anything, and a hold spec when the author names edits to hold. A spec is explicit numbers and ranges (`1, 3-5`), `all` or `none`, in the author's own words. The reject spec may also be `rest`, only when the author says "reject the rest" or "reject everything else". Never reject an edit the author did not name: an edit the author leaves out is held, and so is every edit when the answer is "accept 1" or "none". For each reason the author gives, write all of them as one JSON object `{"<n>": "<the author's words>"}` (one key per rejected edit) with the Write tool to the `REASONS=` path, and pass `--reasons-file '<reasons>'`. Never put the author's words on the Bash line. If the answer names no explicit numbers (for example "all but 2", "the cuts", "looks good", "edit one", "no"), or `REVIEW` refuses it, ask the author again for explicit numbers and end your turn; never compute, infer or choose the set yourself.
Run `REVIEW apply --work '<work>' --accept <spec> [--reject <spec>] [--hold <spec>] [--reasons-file '<reasons>'] --dry-run`, each spec as one argv token. `--accept` may be left out when the author accepts nothing: it defaults to `none`. It prints the sets it understood and changes nothing. Show the author `accept` (the new text goes in), `hold` (undecided: the text stays, nothing stored) and `reject` (the text stays as it is, and the edit is stored), each as `<n>. <old> -> <new>`, with its `reason` when it has one, `unplaced` (the edits the copy could not show, which are left alone) and `would_skip` (each with its `cause`). Say that only the edits under `reject` are stored as rejections for the document (`stores_rejections`; a stdin run stores none). Ask the author to confirm and end your turn (in the no-edits close of step 11, do not ask: run it at once). When the author confirms, run the same command without `--dry-run`. When the author changes a number, run the dry run again. The script refuses a real apply that no matching dry run came before (the same answer, the file not saved since): exit 1 with `dry run` in stderr, nothing written, WORK still there. Run the dry run, show it, and ask the author to confirm; never skip it.
On exit 1 with `--accept`, `--hold`, `--reject`, `--reason` or `--reasons-file` in stderr (a number that is not an edit, an edit named twice, an answer that is not numbers, or a reasons file that is not valid), show stderr and ask again; WORK is still there. On exit 2 (a usage error: nothing ran), keep WORK, show stderr, fix the command and run it again. On exit 1 with `expired` in stderr, the work directory was swept after two hours idle and the review in it is gone: there is nothing to delete, so tell the author and start again at step 1. On exit 3, or exit 1 with `run apply again` in stderr (T2 unavailable or refusing, the file changed while the edits were applied, mixed line endings, a permission or disk problem), apply did not change the file (a change the author saved meanwhile is the author's own) and WORK is still there: keep WORK, show stderr, tell the author the cause, and ask the author to say when to retry; on retry run the dry run again, show it, and run the real apply after the author confirms. On any other failure, delete WORK, show stderr and stop. A successful apply has already deleted WORK (unless it reports `log_error`, below); do not delete it again. Show the author:
| Part | Show |
| --- | --- |
| `applied` | Each as `<n>. <old> -> <new>`. A stdin run applies nothing. |
| `skipped` | Each as `<n> skipped: <cause> (<detail>)`. The edit stays in the file as it was. |
| `rejected` | The numbers the author rejected. A path run stored them as rejections for the document, each with its reason when it had one. A stdin run stores none: say they were declined. |
| `held` | The numbers left undecided: not applied, nothing stored. |
| `unplaced` | The numbers the copy could not show. They were not stored. |
| `log_error` | When present: the file was written but the session log was not, and WORK is still there. Tell the author the edits are in the file and the session is not yet in the accept-rate record, then run `REVIEW log-retry --work '<work>'` (now, and again when the author says T2 is back). It prints `log` and deletes WORK. If it fails, show stderr, keep WORK and stop; a WORK idle for more than two hours may be swept when the next one is made. Never run apply again for it. |
| `staged_beside_document` | When present: the new text was staged beside the document, not in the git directory. Say so; nothing else to do. |
| `text` | A stdin run only: the text with the accepted edits applied, in a code block. |
13. Offer to keep what the author taught you. Do any of these only after the author has said yes and has read the text that will be stored.
- A correction in the answer or in conversation (for example "lead with the point here"): write it as a diagnostic that states its exception, ask which level it belongs to (user, repo or this document; a stdin run has no document level), show the text, and wait. Make a fresh work directory as step 3 does, with the command of its stdin row: it prints the `ENTRY=` path. Write `{"scalars": {}, "lists": {"diagnostics": ["<text>"]}}` with the Write tool to its `ENTRY=` path, run `MEMORY add-entry --level <level> [--path <path>] --from-stdin < '<entry>'`, then `BRIEF rmtmp '<work>'` for its `WORK=` path.
- A correction that targets a rule of the site-page style sheet, section 3 (for example "no motivate-a-new-thing rule on this essay"; the no-semicolons rule needs no entry, because the brief drops it for an exploration essay by genre): ask which treatment the author wants for it (ignore the rule, raise it as a query only, or mention it in the editor's note only) and which level it belongs to (repo or this document). Find the rule in the brief's section 3 and copy its first words. Show the entry and wait. Make a fresh work directory as step 3 does, with the command of its stdin row. Write `{"scalars": {}, "lists": {"<key>": ["\"<opening words>...\" (<why>)"]}}` with the Write tool to its `ENTRY=` path, where `<key>` is `site_page_section3_ignored`, `site_page_section3_query_only` or `site_page_section3_note_only`. The entry has the form `"<opening words>..." (<why>)`: the rule's opening words in double quotes, three dots inside the closing quote, then the reason in parentheses. Run `MEMORY add-entry --level <repo|doc> [--path <path>] --from-stdin < '<entry>'`, then `BRIEF rmtmp '<work>'`. A stdin run has no document level. The next build applies the narrower layer's treatment to that rule.
- The voice card the editor returned (`voice_card` in the filtered proposal, step 10). A path run only: a stdin run has no document, so it stores no card.
1. Run `MEMORY voice-card <path>`. When `voice_card` is not null, a card is already stored and this run's brief used it as the anchor: offer nothing, unless the author asks to replace it, and stop here. When it is null (none is stored), go on.
2. Offer to keep the card as this document's author-approved voice card: later runs start from it instead of rebuilding it from text the editor has already edited. Show the card text and wait. End your turn with that question.
3. When the author says yes, make a fresh work directory as step 3 does and write `{"voice_card": "<the card text>"}` with the Write tool to its `CARD=` path. Store the text as the author left it after any change.
4. Run `MEMORY voice-card <path> --from-stdin < '<card>'`, then `BRIEF rmtmp '<work>'`.
5. In your reply, show the stored card back verbatim: copy the `voice_card` text that the command of sub-step 4 printed, whole, into the reply. Do not summarize it, do not paraphrase it, and do not reply "Done" or "Stored" without the text: the author has not seen the card that is now stored until you show it.
- An edit the author says is never a defect:
1. Run `MEMORY promote <path> <n> --level <user|repo> --dry-run`, where `n` is the number in `MEMORY rejections <path>`.
2. Show the entry, quoted exactly as `<old> -> <new>`, taking `old` and `new` from the `entry` of the dry-run output, word for word. Do not paraphrase it, shorten it or describe it in your own words: the author confirms the text that will be stored, so the author must see that text. Then say what it does once stored: the editor is told never to propose that change, and the filter drops any edit that makes it, in every document at that level.
3. Ask the author to confirm and end your turn.
4. When the author confirms, run the same command without `--dry-run`. The script refuses a real promote that no matching dry run came before (the same rejection and level, within two hours): exit 1 with `dry run` in stderr, nothing stored. Run the dry run, show it, and ask again; never skip it.
## Rules
| Rule |
| --- |
| Never change the document except through `REVIEW apply`. |
| Never write to T2 except through MEMORY and REVIEW. |
| Never pass the author's text in a shell string. |
| On any failure, show stderr and stop. |
Files in this package (4)
- SKILL.md 22 KB
- scripts/brief.py 69 KB
- scripts/memory.py 69 KB
- scripts/review.py 67 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · hellblazer/nexus | 100 | AGPL-3.0 |
| hellblazer/nexus | 100 | AGPL-3.0 |
| Mikefluff/skills | 100 | MIT |
Database snapshot: 13.11.2026 · package version be1030b2d3ee (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100gtm-copyedit
Line edit of a draft the founder wrote, for /gtm copyedit <target> - an email, a post, a doc, or page copy. A checklist-driven edit pass - front-load the point, tighten sentences, swap jargon for plain English, cut filler, keep the writer's voice (via the project voice guide),… - 100rdr-research
Use when adding, tracking, or verifying structured research findings for an active RDR - 98rdr-close
Use when an RDR is done — close it with optional post-mortem, bead status gate, and T3 archival - 100human-prose
Edit or write text so it reads as written by a person, with the residue of machine generation removed. Use when the user asks to edit my draft, proofread, tighten this, make it sound natural, remove AI tells, AI slop, robotic tone or ChatGPT style, asks why their text sounds… - 100tighten-prose
This skill should be used when the user asks to "tighten this up", "tighten the prose", "clean up the writing", "check for AI tells", "make this sound more human", "de-slop this", "run a writing pass", or when completing a writing task that should not read like AI output. Scans… - 100tighten-prose
Cuts wordiness from a draft without losing meaning or voice, aiming at a stated cut (20 percent by default) and reporting what went. Use when someone says "tighten this", "make it shorter", "cut this down", "it's too wordy", or has a word limit to hit.