lightnovel-immersive-reader: Instructions file for Codex

AGENTS.md

lightnovel-immersive-reader AGENTS.md is an instructions file for Codex, OpenCode from Catkamakura/lightnovel-immersive-reader. It costs 3,376 tokens per session, scanned A, original, MIT.

Repository instructions for an AI coding agent working on a reading tool for LightNovel.fun. The project includes a browser userscript that adds an immersive reader and an optional service that sends exported books to Calibre.

In plain words
What is it for?
Navigating the project, working on the userscript or Calibre bridge, understanding the site integration, and following the project's development and testing procedures.
Why use it?
They explain how the two project parts fit together and how to build, run, and test them. This helps an agent change the reader without overlooking the browser or book-library side.

Instructions file for CodexOpenCode

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

This is Catkamakura/lightnovel-immersive-reader's own configuration. It tells Codex and OpenCode how to work on lightnovel-immersive-reader 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 lightnovel-immersive-reader configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Catkamakura/lightnovel-immersive-reader. 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/Catkamakura/lightnovel-immersive-reader/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/Catkamakura/lightnovel-immersive-reader

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 lightnovel-immersive-reader AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/catkamakura/lightnovel-immersive-reader/agents-md/github.svg)](https://agentmods.dev/instructions/catkamakura/lightnovel-immersive-reader/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/catkamakura/lightnovel-immersive-reader/agents-md"><img src="https://agentmods.dev/badge/instructions/catkamakura/lightnovel-immersive-reader/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for lightnovel-immersive-reader AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/catkamakura/lightnovel-immersive-reader/agents-md"><img src="https://agentmods.dev/badge/instructions/catkamakura/lightnovel-immersive-reader/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,376 This file is loaded in full into every session.
When invoked 3,376 The same file — it is already loaded in full.
Security scan A 1 finding. 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.03376 $0.03376
Opus 5.5 $0.01350 $0.01350
Sonnet 5.5 $0.00675 $0.00675
Haiku 4.5 $0.00338 $0.00338

Measured 2mo ago against content hash ac90ceb8fc69, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

lightnovel-immersive-reader AGENTS.md scanned grade A with 1 finding 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 2mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl http://127.0.0.1:8788/api/health
AGENTS.md · 101 lines

How it starts

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

AGENTS.md

Orientation for an AI coding agent (and for Claude Code / Cursor). Start here.

lightnovel-immersive-reader is a two-part personal-reading tool for www.lightnovel.fun. Part 1 is a single-file Tampermonkey userscript (lightnovel-immersive-reader.user.js, ~1900 lines of vanilla JS in one IIFE) that injects a clean, Google-Docs-style immersive reader into the live site without replacing it — it renders into a Shadow-DOM overlay under host lkir-host and reads the site's own JSON web API same-origin (POST /proxy/api/...). It supports continuous-scroll single articles and seamless continuous-scroll web novels (a windowed chapter flow with background prefetch and lazy content-visibility chunk rendering; a settings toggle falls back to the paged one-chapter-per-page reader), auto/manual chapterization, per-chapter bookmarks, a minimap, themes, account-scoped resume, and one-click EPUB/TXT export or send-to-Calibre. Part 2 is calibre-bridge/, an optional FastAPI companion the reader POSTs an EPUB to; it enriches the EPUB's OPF metadata and drops the file into a Calibre-Web-Automated (CWA) ingest folder (import-only — no progress/bookmark sync, no kosync).

Project map

Path What it is
lightnovel-immersive-reader.user.js The whole reader. One IIFE: config/themes → API envelope → helpers (stripTags/esc/norm) → chapterize/buildEpub → render (stream / paged series / seamless flow renderFlow, outline, minimap) → metadata (extractCredits/extractMetaLLM/buildLibMeta) → resume/progress → boot (lkir-host shadow root, SPA route watcher).
package.json npm metadata + verify* scripts. The userscript header @version (currently 2.0.0) is the source of truth for the reader's version.
verify/verify-userscript.mjs Playwright smoke test: injects the script (with a GM_xmlhttpRequest shim) into the live site, opens the reader, asserts UI.
verify/verify-webnovel.mjs Playwright checks for the web-novel (series) mode: seamless flow (append/prepend/leap/bookmarks/minimap) + the paged fallback toggle.
verify/verify-lib.mjs Playwright checks for the send-to-library flow.
calibre-bridge/ Optional FastAPI companion (uv + Docker).
calibre-bridge/bridge/main.py FastAPI app + endpoints (/api/health, /api/import, /api/lookup, /api/books), custom CORS/PNA middleware, bearer-token auth.
calibre-bridge/bridge/epub_meta.py enrich_epub / enrich_opf_bytes: rewrites the EPUB's OPF (Dublin-Core + Calibre fields, MARC relator roles).
calibre-bridge/bridge/calibre.py import_epub: drop into CWA ingest folder (default) or add via calibredb CLI.
calibre-bridge/bridge/store.py SQLite book registry (upsert_book/list_book/get_book) for /api/lookup.
calibre-bridge/bridge/config.py Env-driven Config (BRIDGE_MODE, INGEST_DIR, STATE_DB, CORS_ORIGINS, BRIDGE_TOKEN).
calibre-bridge/tests/ pytest suite (OPF enrichment, store, API import/auth).
calibre-bridge/{Dockerfile,docker-compose.yml,.env.example} Container scaffold that stands up CWA and the bridge together.
calibre-bridge/README.md The bridge's user/operator doc (architecture, deploy modes, caveats).
docs/ The English wiki: architecture, userscript reference, metadata, lk-web-api, calibre-bridge, development.

Read the full file on GitHub · 101 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. 2mo ago First seen · 101 lines · 3,376 tokens per session scan A ac90ceb8fc69

Subscribe to this mod's changes

lightnovel-immersive-reader AGENTS.md is an instructions file published in the GitHub repository Catkamakura/lightnovel-immersive-reader (5 stars, last pushed 5mo ago), licensed MIT. It adds 3,376 tokens to every session, about $0.0135 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

lightnovel-immersive-reader AGENTS.md compared with instructions from other repositories

lightnovel-immersive-reader AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
lightnovel-immersive-reader AGENTS.mdCatkamakura/lightnovel-immersive-readerInstructions file55mo agoMITA3,376Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,649GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot