CampaignGenerator: Instructions file for Claude Code

CLAUDE.md

CampaignGenerator CLAUDE.md is an instructions file for Claude Code from kostadis/CampaignGenerator. It costs 8,042 tokens per session, scanned B, original, MIT.

A repository instruction file describing how a D&D session-preparation application is organised and how its coding agent should work. The application includes a Vue web interface, a FastAPI server, Python command-line tools, and TypeScript code.

In plain words
What is it for?
It is for guiding code search, memory lookup, and changes across the application's web interface, backend, and command-line tools.
Why use it?
It gives an agent project-specific guidance and a map of the codebase instead of leaving it to infer the structure each time.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is kostadis/CampaignGenerator's own configuration. It tells Claude Code how to work on CampaignGenerator 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 CampaignGenerator configures →

Reuse

Borrowing it

Nothing to install: this file belongs to kostadis/CampaignGenerator. 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/kostadis/CampaignGenerator/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/kostadis/CampaignGenerator

Made for: Claude Code.

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 CampaignGenerator CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/kostadis/campaigngenerator/claude-md/github.svg)](https://agentmods.dev/instructions/kostadis/campaigngenerator/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/kostadis/campaigngenerator/claude-md"><img src="https://agentmods.dev/badge/instructions/kostadis/campaigngenerator/claude-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 CampaignGenerator CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/kostadis/campaigngenerator/claude-md"><img src="https://agentmods.dev/badge/instructions/kostadis/campaigngenerator/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8,042 This file is loaded in full into every session.
When invoked 8,042 The same file — it is already loaded in full.
Security scan B 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.08042 $0.08042
Opus 5.5 $0.03217 $0.03217
Sonnet 5.5 $0.01608 $0.01608
Haiku 4.5 $0.00804 $0.00804

Measured yesterday against content hash 11de2b709e20, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

CampaignGenerator CLAUDE.md scanned grade B 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 yesterday.

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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

MemPalace memory-search policy (search-first for past work/decisions, mining freshness, grep fallback) lives in the same global `~/.claude/CLAUDE.md` under "MemPalace Memory Search" — no repo-specific override here.
CLAUDE.md · 406 lines

How it starts

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

CLAUDE.md

Guidance for Claude Code working in this repo.

Codebase search policy (structural queries, non-code fallback, stale-index handling) lives in the global ~/.claude/CLAUDE.md under "Codebase Semantic Search (codebase-memory-mcp)" — no repo-specific override here.

MemPalace memory-search policy (search-first for past work/decisions, mining freshness, grep fallback) lives in the same global ~/.claude/CLAUDE.md under "MemPalace Memory Search" — no repo-specific override here.

CampaignGenerator

A D&D session-prep CLI that assembles campaign documents and session beats, calls the Claude API to generate encounter/narration documents, and integrates with rpglib + MemPalace for verbatim retrieval from a local RPG library.

Project structure

# ── Web UI ──
startup                     # Launch script — builds frontend, starts FastAPI server
server/                     # FastAPI backend (routers, subprocess SSE streaming)
frontend/                   # Vue 3 + TypeScript + Pinia + Vue Router

# ── CLI tools ──
campaignlib.py              # Shared library — all scripts import from here
pipelines/session_prep/prep.py  # CLI: session beat / session arc prep
session_doc/sd_consistency.py  # CLI: Pass 1 — consistency check (sd_*.py replaced session_doc.py)
session_doc/sd_plan.py         # CLI: Pass 3 — narrative plan
session_doc/sd_narrate.py      # CLI: Pass 5 — per-scene narration
session_doc/sd_corrections.py  # CLI: generate *.transcript.cleaned.vtt from the raw
                             #   tape + transcript_corrections.yaml (#250 R4)
session_doc/                # Post-session pipeline CLIs (sd_*, assemble, scene_extract,
                             #   enhance_summary, …) + shared helpers (io, voice,
                             #   roster, examples, narrate)
server/migrate_session_doc.py # CLI: one-shot ui_state.yaml → session_doc.yaml — python -m server.migrate_session_doc --campaign-dir /path/to/campaign
server/migrate_ensemble_config.py # CLI: one-shot ui.ensemble → ensemble.yaml — python -m server.migrate_ensemble_config --campaign-dir /path/to/campaign
server/migrate_narrate_genre.py # CLI: one-shot narrate.genre (a paste) → paths.genre_file (a path) — python -m server.migrate_narrate_genre --campaign-dir /path/to/campaign
pipelines/grounding/npc_table.py        # CLI: generate NPC reference table
pipelines/grounding/distill.py          # CLI: convert summaries → world_state.md
pipelines/grounding/campaign_state.py   # CLI: generate completed-content grounding doc
pipelines/grounding/make_tracking.py    # CLI: extract trackable events from a module
pipelines/grounding/thread_registry.py  # CLI: narrative-thread canon — propose (harvest),
                            #   ratify (atomic accept), rule, add/log/set-status/alias,
                            #   list/proposals/check --json. Surfaced at /grounding/threads
pipelines/rlm/query.py      # CLI: search summaries
pipelines/grounding/planning.py         # CLI: NPC dossiers + arc scores → planning.md
pipelines/grounding/party.py            # CLI: character sheets + summaries → party.md
pipelines/summary_native/     # CLI: summary_native — validate | build | synth | compare; grounding-doc drafts straight from reviewed structured summaries
pipelines/content_ingest/dnd_sheet.py  # CLI: D&D Beyond PDF → markdown (vision API)
pipelines/workspace/new_workspace.py  # CLI: create a new campaign workspace
pipelines/session_prep/transform.py  # CLI: NotebookLLM dossiers → prep input

# ── RLM tools ──
pipelines/rlm/rpg_retriever.py    # Tiered retrieval (drawer / statblock / cost-tagged candidate)
pipelines/rlm/fivetools_catalog.py # Mtime-cached name index over canonical 5etools data
pipelines/rlm/dossier_proposer.py # Run retrieval → write docs/dossier_proposal.md
pipelines/rlm/proposal_loader.py  # Render pipelines consume approved proposals
pipelines/rlm/mempalace_client.py # Writes via MemPalace MCP
pipelines/rlm/mcp_server.py       # MCP tools: rpg_search, propose_dossier, suggest_conversion
pipelines/content_ingest/convert_book.py     # PDF → 5etools JSON (pdf-translators)
pipelines/content_ingest/fivetools_ingest.py # 5etools JSON → MemPalace drawers
pipelines/rlm/resolve_refs.py     # Resolve refs.yaml + refs.local.yaml → concrete JSON paths
pipelines/rlm/launch_5etools_mcp.py # Per-campaign 5etools MCP server launcher (reads refs.yaml)

# ── Config & docs ──
config/
  config.yaml               # Default paths to documents and agent prompts
  system_prompt.md          # Single-mode system prompt
  agents/                   # Pipeline-mode prompts (lore_oracle, encounter_architect, voice_keeper)
docs/                       # Default doc location (override via config)
  campaign_state.md, world_state.md, mechanics.md, planning.md, party.md
logs/                       # Auto-generated timestamped session logs
tests/test_prep.py          # Tests for campaignlib, prep, and session_doc logic

Read the full file on GitHub · 406 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. yesterday Changed · +2 lines · +122 tokens per session 11de2b709e20
  2. 5d ago First seen · 404 lines · 7,920 tokens per session scan B e44af79c6c61

Subscribe to this mod's changes

CampaignGenerator CLAUDE.md is an instructions file published in the GitHub repository kostadis/CampaignGenerator (5 stars, last pushed 2d ago), licensed MIT. It adds 8,042 tokens to every session, about $0.0322 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-02.

Related

Other instructions, from other repositories

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 · 9,649 tokens

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 · 6,805 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,680 tokens

generative-ai-for-beginners AGENTS.md

AGENTS.md instructions for microsoft/generative-ai-for-beginners, covering agents.md, project overview, setup commands, initial repository setup and clone the repository.

microsoft/generative-ai-for-beginners · 2,850 tokens