Overview
Set up a Claude Code subagent for fiction drafting that reads your outline and the chapters already written, then drafts the next chapter into its own file, one chapter at a time, for you to revise.
Problem or Objective
- Which agents research and draft articles, newsletters or posts for a person to edit?
- How do teams design the context, tools and memory of their own AI agents?
More in Content and Media
AI Agents and Models
Tools and Integrations
- Tools
- Claude Code
- Prerequisites
- Claude Code with a paid Claude plan or an API key.
How It Works
Make a folder for the book with an outline file (premise, characters, setting and a paragraph per chapter), a style note and an empty chapters folder. In Claude Code, ask it to create a project subagent for chapter drafting: its system prompt tells it to read the outline, the style note and every earlier chapter before writing, to keep names and timeline consistent, and to write only the requested chapter file. Give it file reading and writing tools only. Then have the main session ask the subagent to draft chapter one, read the result, adjust the outline or style note, and carry on chapter by chapter up to ten. Keep a running list of established facts in the outline so later chapters stay consistent.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Claude Code.
- Connect the toolsConnect the tools this workflow relies on: Claude Code.
- Check the prerequisitesClaude Code with a paid Claude plan or an API key.
- Gather your detailsCollect what the prompt asks for: Name of the drafting subagent, Chapter to draft, Outline file, Target length in words.
- Run the starter promptPaste the starter prompt below into Claude Code and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at code.claude.com before you rely on it.
Practical Starter Prompt: Draft the next chapter with the writer subagent
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
Use the [Name of the drafting subagent] subagent to draft chapter [Chapter to draft] of the novel in this folder. It should first read [Outline file], the style note and every earlier chapter in the chapters folder, keep names, timeline and tone consistent, and write only chapters/chapter-[Chapter to draft].md at about [Target length in words] words. Do not edit the outline or earlier chapters. When it finishes, list any new facts it introduced so I can review them and update the outline.Review each chapter and update the outline before asking for the next one.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. Anthropic's documentation says a subagent runs in its own context with a custom system prompt and its own tool access, and that Claude Code reads and edits files in a project. It says nothing about the quality of fiction, so the draft needs your own revision.
Limitations and Considerations
Treat the draft as a starting point: expect repetition, drifting details and flat passages, and plan to rewrite. Subagent requests count toward the same usage limits as your main conversation, and long earlier chapters use a lot of context, so a short chapter summary file can help. Check that the text does not echo existing works too closely, and read any publisher or platform rules on AI-assisted writing before you submit or sell it. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
AI Agent Repository
Source code of the agent that does the work.
Official Website
The official site of the main tool or project in this use case.
Visit Website (opens in a new tab)code.claude.com
Related Videos
About anthropics/claude-code
The SECRET Claude Code Upgrade That Has Everyone Going Nuts (Full Guide) (opens in a new tab)
The title names the project, the description links the project website.
Watch on YouTube (opens in a new tab)About anthropics/claude-code
The only Claude Code guide you'll ever need (Opus 4.5) (opens in a new tab)
The title names the project, the description links the project website.
Watch on YouTube (opens in a new tab)Independent creators. Listing a video implies no endorsement, sponsorship or partnership.
Sources
- Create custom subagents - Claude Code Docs (opens in a new tab)
Project documentation · code.claude.com · Undated · Source checked 26 Nov 2026, 23:47 UTC
What this source supports
- Each subagent runs in its own context window with a custom system prompt, specific tool access and independent permissions, and its requests count toward the same usage limits as the main conversation.
- Subagents are Markdown files with YAML frontmatter; Claude can write one with a name, a description, a tools list, a model and a system prompt.
- Overview - Claude Code Docs (opens in a new tab)
Project documentation · code.claude.com · Undated · Source checked 25 Nov 2026, 11:57 UTC
What this source supports
- Claude Code is an agentic coding tool that reads your codebase, edits files, runs commands and integrates with your development tools.

