ai-novel-lab: Instructions file for Codex

AGENTS.md

ai-novel-lab AGENTS.md is an instructions file for Codex, OpenCode from xindoo/ai-novel-lab. It costs 2,326 tokens per session, scanned A, original, MIT.

A set of instructions for an AI assistant that writes chapters of a Chinese science-fiction novel. It explains the story files, writing process, chapter format, and progress tracking.

In plain words
What is it for?
Use it to retrieve story context, write a chapter, save it in the right folder, update summaries and progress, and follow the required style and length.
Why use it?
It keeps new chapters consistent with the outline, previous events, characters, and recorded progress instead of treating each chapter as a separate task.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is xindoo/ai-novel-lab's own configuration. It tells Codex and OpenCode how to work on ai-novel-lab itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ai-novel-lab configures →

Reuse

Borrowing it

Nothing to install: this file belongs to xindoo/ai-novel-lab. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/xindoo/ai-novel-lab/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/xindoo/ai-novel-lab

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ai-novel-lab AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/xindoo/ai-novel-lab/agents-md.svg)](https://agentmods.dev/instructions/xindoo/ai-novel-lab/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/xindoo/ai-novel-lab/agents-md"><img src="https://agentmods.dev/badge/instructions/xindoo/ai-novel-lab/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,326 This file is loaded in full into every session.
When invoked 2,326 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02326 $0.02326
Opus 5 $0.01163 $0.01163
Sonnet 5 $0.00465 $0.00465
Haiku 4.5 $0.00233 $0.00233

Measured 7d ago against content hash 754cdd71ed81, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

ai-novel-lab AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 155 lines

How it starts

The opening of the file, as written. The whole thing — 155 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AI Agent Guide: 小说自动化写作指南

本文件旨在指导 AI Agent 依据《大厂重生:我用代码征服世界》的大纲设定,自动完成小说章节的撰写、文件归档及进度追踪。


1. 角色与核心目标 (Role & Objective)

  • 角色: 爽文小说写作专家 (Cool Novel Specialist) & 剧情架构师。
  • 核心目标: 创作高爽点、快节奏、逻辑自洽的都市重生科技爽文。
  • 当前任务: 根据 章节大纲.md 的设定,逐章撰写正文,并维护 progress.md 的进度状态。

2. 项目结构 (Project Structure)

  • 章节大纲.md: 全书的核心设定、人物小传、等级体系及分章细纲。(绝对真理,必须严格遵守)
  • workspace/summary.md: 全书已完成章节的剧情总结,用于上下文参考和一致性检查。如果新写完一章节,总结后写入此文件。
  • progress.md: 写作进度追踪表,记录每章状态、字数、完成日期及一致性检查。
  • chapters/: 正文存储目录。
  • AGENTS.md: 本操作指南。

3. 标准作业程序 (Standard Operating Procedure)

在接到"写下一章"或"写第X章"的指令时,请严格执行以下步骤:

Phase 1: 上下文检索 (Context Retrieval)

  1. 读取大纲: 读取 章节大纲.md,锁定目标章节的细纲、登场人物及爽点安排。
  2. 检查进度: 读取 progress.md,确认目标章节是否为"待写"状态,并回顾上一章的结尾以确保剧情衔接。
  3. 记忆回溯: 如果不是第一章,需检索前文(特别是最近3章)的关键剧情、伏笔和人物状态,防止吃书。
  4. 参考总结: 阅读 workspace/summary.md 中对应章节的总结,确保与已写内容的连贯性。

Phase 2: 正文撰写 (Writing)

  1. 构思: 基于细纲,设计本章的"情绪流"(压抑 -> 爆发 -> 收获)。
  2. 撰写:
    • 篇幅: 每章约 5000 字左右,不得少于 4000 字。
    • 风格: 用词犀利,节奏紧凑。多用短句。
    • 技术流: 在装逼打脸时,适当插入"不明觉厉"的技术名词(如:零日漏洞、量子纠缠、汇编注入),增加专业感。
  3. 格式: 使用 Markdown 格式。标题格式为 ## 第X章 章节名
  4. 如果你要生成一些临时文件(比如处理脚本),可以放到workspace目录下,不要放在根目录下。

Phase 3: 文件归档 (Archiving)

  1. 生成文件: 将正文写入 chapters/ 目录。
    • 命名规范: chapters/XXX_章节名.md (例如: chapters/001_死亡回档.md, chapters/002_面试.md)。注意:保持三位数字编号以便排序。

Phase 4: 进度更新 (Progress Update)

  1. 更新 progress.md:
    • 将目标章节的 状态 从 "待写" 改为 "已完成"。
    • 填入 字数 (预估值或精确值)。
    • 填入 完成日期 (使用当前日期)。
    • 一致性检查 列确认无误后打钩或备注。
    • 写作日志 区域添加一条新的提交记录。

4. 写作规范 (Writing Rules)

4.1 爽文三定律

  1. 主角绝对中心: 所有剧情围绕主角装逼/获利展开。配角存在的意义是震惊、被打脸或提供辅助。
  2. 有仇不过夜: 冲突发生后,主角必须在 1-3 章内完成反击。
  3. 金手指一致性: 严格遵守"超脑黑客"的设定(绝对理智、代码视觉、虚空编译),不可随意削弱。

4.2 人物塑造要点

  • 林峰: 重生者,外表冷酷但内心保留人性。拒绝成神,选择成人。技术上无敌,但情感上需要苏晓晓作为锚点。
  • 苏晓晓: 治愈系,林峰的女友,唯一能让林峰退出超频模式的人。代表人性、温柔、产品哲学。
  • 李薇: 野心勃勃的运营女王,林峰的商业利刃。代表力量、野心、执行力。
  • 赵晴: 冰山美人,首席法务,道德指南针。代表正义、理性、法律。
  • 反派: 智商在线但运气极差,死得有节奏感。

Read the full file on GitHub · 155 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 155 lines · 2,326 tokens per session scan A 754cdd71ed81

Subscribe to this mod's changes

ai-novel-lab AGENTS.md is an instructions file published in the GitHub repository xindoo/ai-novel-lab (56 stars, last pushed 5mo ago), licensed MIT. It adds 2,326 tokens to every session, about $0.0116 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens