CampaignGenerator: Instructions file for Claude Code

CLAUDE.md

CampaignGenerator CLAUDE.md is an instructions file for Claude Code from kostadis/CampaignGenerator. It costs 10,530 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 10,530 This file is loaded in full into every session.
When invoked 10,530 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.10530 $0.10530
Opus 5.5 $0.04212 $0.04212
Sonnet 5.5 $0.02106 $0.02106
Haiku 4.5 $0.01053 $0.01053

Measured 5d ago against content hash a7b231465046, 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 5d 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.

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 · 509 lines

How it starts

The opening of the file, as written. The whole thing — 509 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/npc_agent/          # CLI: npc_agent — prototype: NPC presence candidates + knowledge horizon,
                            #   knowledge notes (who does not know what) and leak cases (no LLM);
                            #   see docs/design/NpcAgentPrototypes_proposal.md
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 · 509 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. 5d ago Changed · +6 lines · +200 tokens per session a7b231465046
  2. 14d ago Changed · +1 lines · +130 tokens per session 51a9bc978743
  3. 25d ago Changed · +1 lines · +109 tokens per session 783c7278f369
  4. 27d ago Changed · +2 tokens per session 16fd3545ec48
  5. 1mo ago Changed · +3 lines · +57 tokens per session 959866416204
  6. 1mo ago Changed · +13 lines · +160 tokens per session 8ca01b03ac40
  7. 1mo ago Changed · +22 lines · +527 tokens per session 55f4da599d56
  8. 1mo ago Changed · +57 lines · +1,303 tokens per session 55e5fdf5c60f
  9. 2mo ago Changed · +2 lines · +122 tokens per session 11de2b709e20
  10. 2mo 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 (6 stars, last pushed today), licensed MIT. It adds 10,530 tokens to every session, about $0.0421 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

CampaignGenerator CLAUDE.md compared with instructions from other repositories

CampaignGenerator CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
CampaignGenerator CLAUDE.mdkostadis/CampaignGeneratorInstructions file6todayMITB10,530Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,887GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA7,230Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file150ktodayMITA4,951Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,685GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,303GitHub Copilot
deno copilot-instructions.mddenoland/denoInstructions file109kyesterdayMITA3,077GitHub Copilot