# Write

> Turn a brief and its source material into one truthful first draft in the target language, and stop there. Start it on your own only when the literal token `/write` appears in the request or in an instruction the request points at — inside a longer message, a document, or a checklist that says to run it. Not for a bare request to write, draft, compose, summarise, rewrite, edit, or review something — without `/write` in it, such a request is answered as it otherwise would be. A user may also invoke it by name at any time.

- Skill: `kntnt/write` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add kntnt/write`
- Raw SKILL.md: https://api.skillmd.com/api/skills/kntnt/write/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Research & Search
- Author: kntnt (https://skillmd.com/u/kntnt)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/kntnt/write

---


# write

Turn a brief and whatever material it points at into one first draft, and stop. No review pass, no proofreading pass, no peer Skill: running an editorial pipeline is a separate choice the user makes afterwards.

`$HERE` is the directory that contains this SKILL.md, and `$MANAGER` is the Manager directory: `$HERE/../kntnt/` if it exists, else `kntnt/` under a Global harness skills directory (`~/.claude/skills`, `~/.config/opencode/skills`, or wherever another Harness keeps them). Neither found: tell the user to install the Manager (`npx skills add Kntnt/skills`) and stop. `$LIBRARY` is `$MANAGER/library/` — absent, tell the user to run `/kntnt update`, then stop.

Run `uv run --no-cache --no-project "$MANAGER/scripts/kntnt.py" invoke --here="$HERE"` with the invocation payload — everything the user typed after `/write`, verbatim, however many lines — on stdin. On exit 0, answer the `capabilities` in its `dependencies` first: for each one, say whether its `confirm` sentence is true of you, and where it is not, give its `how`, change nothing, and stop. Then continue from the JSON. On any other exit print its stdout verbatim and stop: it has already printed what the user is to see, and none of that text is yours to write.

In the JSON, `path` is the command path as a list, `flags` holds each flag the user wrote — `true` where it stood bare, its value where it carried one, a list of values where it was repeated — `operands` is what followed the flags, in order, and `instruction` is the Contextual Instruction, or `null`, applied as `$LIBRARY/references/invocation-envelope.md` says.

Run every UV command in this Skill with a fresh private directory as `TMPDIR`, and remove that directory after the command, including when it fails. The private directory belongs to that one command and no other run, so cleanup removes only files this run created.

## Arguments

- `<brief>` is free text in any language, and `operands` holds it where one was written. It may state what to write and it may point at material — a local path, a URL, a passage pasted in whole.
- `--genre=<genre>` names a resource under `$LIBRARY/references/editorial/genres/`, by its filename without the extension.
- `--technique=<technique>` names a resource under `$LIBRARY/references/editorial/techniques/`, the same way.
- `--language=<language>` is any selector `$LIBRARY/scripts/languages.py` accepts: a canonical code, a curated alias, or a description of a language in words.
- `--frontmatter=<yes|no>` accepts `yes`, `on`, or `true` and `no`, `off`, or `false`.
- `--output=<response|path>` accepts the keyword `response` or one filesystem path, whose parent directory exists and which is no local file that supplied material for this run.

## Resolution

Genre, technique, language, and the two output options are each resolved on their own, in this order of precedence:

1. The Formal Invocation.
2. A recognized Kntnt map in the leading YAML frontmatter of supplied material — the reserved `kntnt` key and its `genre`, `technique`, and `language` values, and nothing else. Frontmatter carrying no such map carries no configuration, whatever its other keys are called. The map never carries the output options, so this step is empty for them.
3. The current Contextual Instruction.
4. Applicable Conversation Context.
5. Inference from what was requested and what the material is.
6. For the technique alone: the technique the resolved genre names as the one it is ordinarily written with, where that genre names one.
7. The parameter's default: `general` for genre, no technique, the language of the request and the supplied material, the response for the Output Target, and on for the Kntnt map.

A value found at one level suppresses the levels below it for that parameter alone. An explicit genre and a language taken from context are an ordinary invocation, not a conflict. Suppression is that precedence working rather than an error: a Contextual Instruction every higher level has already settled leaves nothing for it to settle, and the run continues rather than refusing it as unaddressable guidance. Where saying so is useful, the delivery names the suppressed instruction beside the resolved configuration.

Two things are never inferred. A technique applies because it was selected — by the invocation, the map, an instruction that names one, or the genre that was resolved — and never because the material or the draft happens to fall into its shape. A language is settled rather than guessed: where the request and the material are materially ambiguous or mixed, say what the candidates are and ask, before anything is written.

A genre inferred rather than named is inferred against what is installed. The genre directory is the list of installed values, and a run inferring one may read a single thing besides that listing: the opening of each installed genre resource — its `# <Name>` heading and the paragraph under it, which every resource carries so that a reader choosing between them has something to read without loading the rest. Read that far and no further. What a genre asks for is not evidence about whether that genre applies, so a resource read past its opening has been loaded rather than considered — and the loading step below is unchanged by any of this: it loads the genre inference settled on, and no other. Where no installed genre fits what is in front of you better than the default does, the default at the foot of the precedence stands.

Level 6 belongs to the technique alone, and it is read after the genre is settled and out of the genre that was settled: that resource's base half names the technique this kind of text is ordinarily written with, or states that it has none, and nothing else is opened for it. What the genre carries there is a selection rather than evidence — an installed genre names its ordinary arc whatever text is in front of you — so a technique reached this way is settled exactly as an instruction naming one settles it, and a genre naming none leaves the level below it standing.

`none` for the technique is a value rather than a gap, and it is how the genre's arc is refused. Written in a recognized map it says that the run which wrote the map resolved no technique; said in an instruction or in Conversation Context it says the same thing at that level. Either settles the parameter where it sits, above the genre's level, so the genre supplies nothing and the draft has no arc. It names no resource, so it is not the uninstalled value the refusal below reaches. `--technique` takes an installed name and has no spelling for this, which is why the levels below the invocation are where it is said.

A recognized Kntnt map whose value cannot be used — a language nothing installs, a genre or technique that is not there — is reported as unusable artifact metadata and stops the run, unless the Formal Invocation already settled that parameter. It is never quietly read as the nearest usable value.

## Steps

1. Take the brief and the options from the JSON. A value outside what `## Arguments` admits — `--frontmatter` outside its two vocabularies — is refused as `$LIBRARY/references/invocation-envelope.md` says: write nothing, deliver nothing, and stop. Done when the values are settled, or you have stopped.
2. Gather the material: text inline in the brief, local files and URLs it points at, applicable Contextual Instruction, and applicable Conversation Context. Several sources feed one draft, and reading a file selects no destination. Done when everything the draft is answerable to is in hand, or you have refused for want of anything to write.
3. Resolve genre, technique, language, and the output options by `## Resolution`. A genre or technique is verified against the resources actually installed in the two directories named above; one that is not there is refused as `$LIBRARY/references/invocation-envelope.md` says, and the run writes nothing, delivers nothing, and stops. Where the genre has to be inferred rather than verified, `## Resolution` says what may be read to infer it. Settle the genre before the technique, since the technique's last level reads what the settled genre names. A language selector is verified by `uv run --no-cache --no-project "$LIBRARY/scripts/languages.py" resolve --scope=composition "<selector>"`, whose non-zero exit says which of the ways it failed — no installed Language Resource reached, or more than one — and takes that same refusal; an unlisted description of a language is interpreted first, then proposed as one installed candidate and verified through that same command. Where the language of the request and the material is materially ambiguous or mixed, name the candidates and ask before anything is written. Done when all five are settled, or you have asked or refused.
4. Settle the Output Target against `$LIBRARY/references/delivery.md`, and refuse a contradictory or unwritable destination before anything is written. In-place Editing is not offered here: this Skill creates a text and never replaces the material its brief came from, so an output path equal to a supplied file is refused rather than honoured. Done when the destination is known, or you have refused.
5. Load the contract, and nothing besides it: `$LIBRARY/references/editorial/base.md`, the selected genre from `$LIBRARY/references/editorial/genres/`, the resolved technique from `$LIBRARY/references/editorial/techniques/` where one was selected, and the composition scope the resolver already returned in step 3. A resource's review half — the file named for it with `.review.md` — belongs to the Skills that review, and so do the language's other scopes; none of them is loaded here. Done when those four are loaded and nothing else has been.
6. Write one draft that satisfies that contract. Source Fidelity is the invariant over all of it: invent no fact, and preserve attribution, uncertainty, scope, chronology, and causality exactly as the material has them. Where the material is speech to be quoted, read [`quotations.md`](references/quotations.md) first. Done when the draft is complete.
7. Unless the frontmatter option is off, attach the Handoff Metadata: a `kntnt` map in leading YAML frontmatter carrying the normalized `genre`, `technique`, and `language` and nothing else, with `none` where no technique was resolved. Merge it into the frontmatter the requested artifact already needs rather than writing a second block. Never embed the argument, the material, or the options this run was given. Turning it off removes that map alone and never the frontmatter the artifact itself requires. Done when the artifact carries what it should and nothing more.
8. Deliver by `$LIBRARY/references/delivery.md`, then stop. On a response target, remove every artifact or scratch file this run created and base the delivery account on the filesystem state that remains after cleanup. Say what was resolved, where the draft went, and where the material stopped: what the brief asked for that the material did not carry, and, where the draft is short of a stated length, what further material would close the gap. Where a technique was resolved, say where it came from, naming the genre where the genre supplied it, so that somebody who asked for none can see why the draft has an arc. The account is answerable to the same contract as the draft, so it asserts no fidelity it has not established: a run reporting its own draft as faithful has made a claim about the draft like any other. Reviewing the draft and proofreading it are separate invocations the user makes afterwards; perform neither, and offer neither as a next step of this run. Done when the draft has been delivered.

