Writer's Loop

May 3, 2026 · View on GitHub

English | 简体中文 | 日本語 | Español

AI writing that learns from your style, approvals, and edits. 让 AI 写作根据你的风格、认可与修改持续改进。

Validate License: MIT No npm install Memory

Writer's Loop overview

Writer's Loop is a portable writing skill for AI agents. It turns writing into a reviewable loop — frame, plan, draft, critique, revise — and learns only from style samples you provide or approve and decisions you actually review.

Use it when one-shot prompting is too fuzzy: coding plans, reports, proposals, product specs, documentation, essays, speeches, fiction, style distillation, and translation.


One-Line Agent Setup

If you use Claude Code, Codex, Cursor, Gemini CLI, OpenCode, or another local agent, give it this setup prompt:

Help me install Writer's Loop from https://github.com/xxsang/writers-loop, then use $writers-loop for my writing task without saving preferences unless I explicitly opt in.

For manual installation, see docs/installation.md. If your agent supports repository plugins, start with the public GitHub URL: https://github.com/xxsang/writers-loop.


The Problem With One-Shot AI Writing

Most writing prompts collapse planning, drafting, editing, and preference learning into one pass. The agent guesses what you want, rewrites without asking, and forgets your decisions the moment the conversation ends.

ProblemWriter's Loop response
One-shot drafts guess too muchFrame the task and plan before drafting
Rewrites can erase intentPropose changes before revising
AI memory can become unreliableLearn only from reviewed decisions
Style copying can leak private factsSeparate style traits from source content

Writer's Loop keeps the stages separate:

StageWhat happens
FrameUnderstand the artifact, audience, goal, and constraints
AskAsk only questions that would materially change the result
PlanPropose a structured plan and wait for approval
DraftWrite once the plan is locked
CritiqueEvaluate the draft before touching it
ProposeName targeted changes with reason, scope, and risk
DecideYou accept, reject, or adjust — the agent does not guess
ReviseRewrite only what was approved
LearnRecord only reviewed decisions as reusable preferences

Core rule:

Learn from user decisions, not from raw AI drafts.
flowchart LR
  A["Style samples you provide or approve"] --> D["Reviewed signals"]
  B["Approved plans"] --> D
  C["Accepted edits"] --> D
  X["Raw AI drafts"] -. "not learned from" .-> Z["Discarded"]
  D --> E["Reusable preferences"]
  E --> F["Better future drafts"]

Try It In 30 Seconds

Use $writers-loop for this:
[describe the writing task]

Audience: [who will read it]
Goal: [what it should achieve]

Ask only if blocked. Otherwise make a short plan, draft, and brief critique.
Do not save preferences unless I ask.

For more ready-to-copy prompts, see docs/prompt-templates.md.


What You Get

A structured loop that keeps planning, drafting, and editing separate — so the output is steerable and reviewed preferences can persist across sessions after explicit opt-in. Includes artifact-specific guidance for technical plans, reports, proposals, docs, essays, speeches, and fiction; style distillation from your own samples; translation that preserves voice and exact technical tokens; and optional project-local memory that writes only where you approve it.


Install And Agent Support

Writer's Loop is GitHub-only and public. If your agent supports repository plugins, install from:

https://github.com/xxsang/writers-loop

For local skill-folder installs, clone the repository, then install with the path or plugin flow that matches your agent.

git clone https://github.com/xxsang/writers-loop.git
AgentFast path
Claude CodeCopy skills/writers-loop into ~/.claude/skills/, or use .claude-plugin/plugin.json
OpenAI Codex CLIUse the plugin flow with the GitHub URL if available, or copy skills/writers-loop into ~/.codex/skills/
OpenAI Codex AppUse the plugin flow with the GitHub URL if available, or copy skills/writers-loop into ~/.codex/skills/ and refresh skill discovery
CursorUse .cursor-plugin/plugin.json, or copy the skill folder
Gemini CLIRun gemini extensions install https://github.com/xxsang/writers-loop
GitHub Copilot CLIPoint Copilot-enabled workflows at AGENTS.md
OpenCodeFollow .opencode/INSTALL.md
ChatGPT / hosted agentsPaste or attach skills/writers-loop/SKILL.md into project instructions

For full per-agent steps, see docs/installation.md.

No npm install required for normal use. package.json is private: true; Node scripts are for validation, evals, and optional local storage tooling only.


Writing Tool Templates

Writer's Loop also ships templates for writing surfaces that do not run skills natively. These are linked from the full writing tool integration guide.

ToolEasy path
ObsidianCopy integrations/obsidian/templates/ into your vault's template folder
LogseqCopy integrations/logseq/templates/writers-loop.md into a template page
NotionPaste integrations/notion/writers-loop-page-template.md into a page
Feishu / Lark DocsPaste or create integrations/feishu/writers-loop-doc-template.md
ChatGPT / Claude ProjectsPaste the project instructions and attach the listed Writer's Loop references

Obsidian quick setup:

VAULT="$HOME/Documents/Obsidian/MyVault"
mkdir -p "$VAULT/Templates/Writers Loop"
cp integrations/obsidian/templates/*.md "$VAULT/Templates/Writers Loop/"

Then enable Obsidian's Templates core plugin and set the template folder to Templates/Writers Loop.


Local Memory Is Opt-In

Writer's Loop works without memory. Preference learning is session-only by default.

If you opt in, tools write only inside the selected project:

.writers-loop/
├── journal.jsonl
├── prefs.md
└── styles/
    └── my-style.md
  • .writers-loop/ is never created unless you ask.
  • Never commit it to public repositories.
  • Only reviewed style packs are saved in .writers-loop/styles/ — not raw source samples.

See docs/local-preference-storage.md for style:save and other commands, and PRIVACY.md for the full policy.


When Not To Use It

For tiny one-off copy edits, a simple prompt is usually enough. Writer's Loop is for writing that benefits from structure, review, or reusable decisions.

Using an LLM for writing may also reduce the pleasure of writing — it can compress the uncertainty, wandering, discovery, and ownership that make writing satisfying. Use Writer's Loop as a scaffold, sparring partner, editor, or translator. Keep the parts of writing you value doing yourself.


Docs

NeedRead
Quick exampledocs/demo-transcript.md
Full methoddocs/writers-loop-complete-guide.md
Copyable promptsdocs/prompt-templates.md
Writing tool integrationsdocs/writing-tools.md
Using A Learned Styledocs/prompt-templates.md#using-a-learned-style
Installationdocs/installation.md
Local preference storagedocs/local-preference-storage.md
Privacy policyPRIVACY.md
Release checklistRELEASE.md

Repository Layout

Show file tree
skills/writers-loop/SKILL.md               Core skill instructions
skills/writers-loop/references/            Progressive-disclosure references
skills/writers-loop/scripts/journal.mjs    Optional local preference journal
skills/writers-loop/scripts/style-pack.mjs Optional local style-pack storage
docs/                                      User-facing guides and prompt templates
.codex-plugin/plugin.json                  Codex plugin metadata
.claude-plugin/plugin.json                 Claude plugin metadata
.cursor-plugin/plugin.json                 Cursor plugin metadata
gemini-extension.json                      Gemini extension metadata
.opencode/                                 OpenCode install metadata
tools/                                     Maintainer validation and eval scripts

Validate

npm test

No install step required. Uses only Node.js built-in modules.


Contributing

See CONTRIBUTING.md. Keep the skill portable, concise, and useful across agents.

License

MIT License. See LICENSE.

Copyright (c) 2026 Writer's Loop contributors.