Draft a document from past examples

Point Claude Code at a folder of finished documents so it learns their structure and voice, then drafts a new one with gaps marked instead of invented.

Task: Draft a document from past examples · Other tasks

Fill in the details

A folder Claude Code can read. In Claude Code you can type @ to reference it.

Optional. Notes, requirements or pasted source text. Remove secrets and anything you may not share first. It goes first in the prompt, inside <facts> tags.

Optional. Leave empty and Claude will propose a file name next to the examples.

Copy your prompt

This site doesn't run Claude or show model output. Results depend on your input and the model you use.

3 required fields are empty.

What you type is kept in this tab's session storage so a reload doesn't lose it. Use "Clear this task" to remove it. Browsers can restore session data when they reopen tabs, so closing a tab isn't a guaranteed way to erase it.

When to use this template

  • Your team writes the same kind of document again and again, such as assessments, briefs, proposals or release announcements, and past versions sit in one folder.
  • You want the first draft to follow your existing format and tone without writing a style guide first, because the finished documents already show both.
  • The examples are in the repository or another folder Claude Code can open. If they live in a shared drive, connect it first, for example through an MCP server, or copy a few examples into a local folder.

When not to use it

  • The output needs final professional judgment, such as a legal opinion or a compliance sign-off. Use the draft as a first pass and route it to the person who approves it.
  • You have only one example, or the examples differ a lot from each other. Claude will copy the quirks of a single document; describe the structure you want instead.
  • The work happens in a plain chat without file access. Paste one or two examples and use the summarize or edit templates, because Claude cannot open the folder by name.

Why this structure

  • Pasted notes go first inside <facts> tags, and a rule says to treat them as source material. Notes can include text copied from elsewhere, so the tags keep it apart from your instructions.
  • Claude gives the summary first and waits for your reply before drafting, which makes its reading of the examples visible. You can correct the structure or tone in one line before a whole document is written in the wrong shape.
  • The rule to use only facts you gave or files in the project, together with marked placeholders, keeps gaps visible. An invented detail in a formal document is harder to spot than an empty slot.
  • Asking for new sentences, not carried-over details, targets a common problem with example-based drafts: a name or date from an earlier document slipping into the new one.
  • The save rule bounds the action. The draft lands in a new file, the examples stay untouched, and the draft does not leave the project.
  • The closing list of placeholders and unclear sections tells you exactly what to fill in or decide before the draft is ready for review.

Example input (fictional)

Kind of document
vendor risk reviews
Folder with past examples
legal/vendor-reviews/
The new one is for
the new web analytics vendor
Facts and material for the new draft
Vendor: a hosted web analytics service. Data collected: page views, referrer and device type, no account IDs. Retention: 13 months. Hosting region: EU.
Where to save the draft
legal/vendor-reviews/drafts/web-analytics-vendor.md

Follow-ups to send Claude

  • Write the structure and voice you summarized into a skill, so later drafts of this kind start from it.
  • Compare the draft with the most recent example section by section and list every place they differ in structure.
  • Fill the placeholders from the attached spec where it gives the answer, and list the ones that are still open.

Common mistakes

  • Pointing at a folder that mixes document types or old formats. Claude learns from everything it reads, so move outdated examples out or name the ones to follow.
  • Skipping the facts. Without them, Claude can match the shape of the documents but has to leave most of the content as placeholders.
  • Treating the draft as finished because it reads like the others. Check every fact and every placeholder before it goes to a reviewer.
  • Find and update copy across the codebase: Have Claude Code find a phrase and its near variants across the project, show each one in context, then change the wording while leaving tests alone.
  • Edit a draft for clarity: Make a draft clearer for a named reader while keeping your meaning and voice, with a short list of what changed and why.
  • Catch issues before a formal review: Before a draft goes to legal, compliance or an editor, have Claude Code check it for the concerns you name and list what to fix, each with a risk level.

See all templates

Sources