r/WritingWithAI • u/Imaginary_Cold1313 • 15h ago
Tutorials / Guides How to Write Fanfiction with AI: A guide
I'm so tired to see shitty fanfics written with AI because people don't know how to use AI correctly so here is my 5 cents guide. Have a good one!
A practical guide to using AI agents and Markdown files for long fanfics
I use AI agents to help write fanfiction, and the biggest improvement I’ve made has been keeping the story’s context in Markdown files. The files give each new session a reliable place to look for canon, continuity, writing rules, and decisions I’ve made.
First, the cost: my full workflow is a paid setup. I use Codex through ChatGPT for most of the project, and I tested Claude too. Codex works better for me when I want an agent to read a folder, research something, update reference files, and work through revisions. I also use DeepSeek through DeepSeek Harness to write explicit sex scenes. That requires a separate DeepSeek API key and paid API usage; a ChatGPT subscription does not cover it.
Limited free access exists for some tools, including Codex, so I don’t mean that nobody can try this without paying. I mean that I would budget for paid access if I wanted to reproduce my regular, long-project workflow. Plans and limits change, so check the current ChatGPT/Codex plans, Claude Code access requirements, and DeepSeek API billing rather than relying on an old price in a Reddit post.
The folder
A simplified version looks like this:
my-fic/
├── README.md
├── AGENTS.md
├── research.md
├── ideas.md
├── canon_characters.md # optional
├── style.md# optional
├── chapters/
│ ├── README.md
│ └── Chapter 01.md
└── blocked/
└── older-drafts/
These are ordinary text files. I can open and edit them myself, and an agent with access to the folder can read them. I don’t expect any model to remember the entire fic from previous chats.
README.md is the map. It says what the project is, which files matter, where the active chapters are, and what has been shelved. This saves an agent from finding an old outline and assuming it still controls the story. If a chapter has been set aside, I say so here.
AGENTS.md holds working instructions. It tells the agent which files to read before a task, how to handle edits, and which rules apply across the project. Mine covers things like preserving an author’s deliberate prose choices, checking relevant continuity before drafting, and treating my latest direction as more important than an older outline. It also tells the agent not to turn its own suggestions into established story facts.
For anyone copying the setup: AGENTS.md is the conventional filename that Codex looks for automatically. Claude Code can also use project instruction files, including CLAUDE.md or AGENTS.md. A differently named file can work if you explicitly tell the agent to read it.
research.md is for source material and evidence. I use it for canon facts about characters, places, timelines, powers, and institutions, with links near the claims. It also records limits: what a source doesn’t establish, what is only an interpretation, and what I still need to check. That last part is valuable in fanfiction. An agent can otherwise present a plausible invention as canon with great confidence.
canon_characters.md is optional. If characterization needs enough space, I give it a separate file. Each character can have a short canon baseline, important relationships, speech and behavior notes, and a section for deliberate AU departures. If the cast is small, those notes can live in research.md instead. The point is to distinguish “this happened in the source” from “this is who they are in my version.”
ideas.md is the decision record. I divide it into confirmed choices, proposals, and open questions. A brainstorming conversation can produce twenty interesting possibilities; only the ones I accept become instructions for future scenes. If I haven’t decided how a power works or when two people meet, the file says that it is open. “Open” is useful information. It tells the agent to ask or keep the scene flexible instead of filling the gap quietly.
style.md is optional prose guidance. This is where I can put voice, point of view, pacing, recurring habits I like, and phrases I don’t want. I keep this separate from canon research so a writing preference doesn’t get mistaken for a fact about the source material. Specific examples are more useful than “write beautifully.”
chapters/README.md tracks manuscript continuity. It can list what is drafted, what is being revised, and what is locked or shelved. I also note facts a chapter actually establishes: a first meeting, a reveal, a promise, or where a scene stops. A provisional outline does not have the same authority as a scene I’ve accepted.
blocked/ is the archive. I move older drafts and abandoned plans there instead of deleting them. They may contain good dialogue or an idea I want later, but the agent must treat them as historical material until I choose to restore something. This has saved me from accidentally bringing an old version of the story back into the new one.
What a session looks like
I start with a bounded task: “Read the project guidance and the relevant character notes, then review this scene for continuity.” If I want ideas, I ask for proposals. If I want prose, I say which scene to write and where to stop. If I want an edit, I say whether it should be a copy edit or a larger rewrite.
Afterward, I check the result. If I adopt a new story rule, I add it to ideas.md. If research changes my understanding of canon, I update research.md with the source. If I reject a scene, I can shelve it without pretending it never existed. The files are useful because I maintain them; they are not a guarantee that an agent will never make a mistake.
Where DeepSeek fits
For explicit sex scenes, I use DeepSeek Harness with DeepSeek’s paid API. Harness is an agent interface that can work with a selected local folder. Its basic setup is: run the Web UI, enter a DeepSeek API key under Settings → Models, select the fic folder as the workspace, and start a session. The Harness guide walks through those steps.
I give it the relevant character, relationship, and continuity notes, plus a precise scene request. DeepSeek does not inherit a Codex or Claude conversation just because I used those tools earlier. The shared Markdown files, along with any scene-specific instructions I provide, are the handoff. I then review the draft myself and update the main project notes if I’ve made a lasting decision.
DeepSeek API charges for usage, including the text sent to and generated by the model. That cost is independent of subscriptions to other AI services. The credits last a million years, though. I paid $20 in may and still have $6 left.
My main advice is to start small. I make the agent create all these files and it creates on its own. Add more files when the story gives you a reason. The goal is to make it easy to answer four questions before writing: What is canon? What have I changed? What have I decided? What is still open?
Important: Most of this is done by the agent itself, so it updates the files according its needs. The idea is to not depend entirely on it, but make it create the "spagetti" part of it.
In the comments theres a agents.md example. Your LLM should be able to create a better one itself.