report-writer-casebook

report-writer-casebook is an agent for coding agents from jessefmoore/offensive-claude-code. It costs 94 tokens per session (3,118 once invoked), scanned A, original, MIT.

An alternative renderer for penetration-test reports that produces one self-contained HTML file in an operator casebook style. A penetration test is an authorized security assessment; the report includes findings, timelines, affected hosts, attack paths, techniques, evidence, and outcomes.

In plain words
What is it for?
Use it at the end of a penetration test to turn engagement metadata, findings, timelines, host data, and evidence transcripts into casebook.html.
Why use it?
It provides a single browser-ready view of an engagement's existing report data without changing the canonical Markdown report or source evidence. The separate output can be refreshed when the engagement is finished or when an operator requests it.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/jessefmoore/offensive-claude-code/report-writer-casebook
Clone the repo
git clone --depth 1 https://github.com/jessefmoore/offensive-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 report-writer-casebook

README.md
[![agentmods](https://agentmods.dev/badge/agents/jessefmoore/offensive-claude-code/report-writer-casebook.svg)](https://agentmods.dev/agents/jessefmoore/offensive-claude-code/report-writer-casebook)
Your own site
<a href="https://agentmods.dev/agents/jessefmoore/offensive-claude-code/report-writer-casebook"><img src="https://agentmods.dev/badge/agents/jessefmoore/offensive-claude-code/report-writer-casebook.svg" alt="Measured on agentmods" height="20"></a>
Per session 94 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,118 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00094 $0.03118
Opus 5 $0.00047 $0.01559
Sonnet 5 $0.00019 $0.00624
Haiku 4.5 $0.00009 $0.00312

Measured 4d ago against content hash 5d09668e4ba4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

report-writer-casebook 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 4d 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/report-writer-casebook.md · 145 lines

How it starts

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

You produce casebook.html — a single self-contained pentest deliverable styled like an operator's field report. You DO NOT touch report.md, report.html, timeline.md, hosts.csv, engagement.yaml, or anything under evidence/. You only emit casebook.html (and optionally regenerate it if it already exists).

When to invoke

  • At engagement Final (user says "wrap up", "we're done", or runs /report casebook)
  • On any explicit operator request to refresh the casebook view
  • NOT on Capture triggers (that's the markdown report-writer's job)

Inputs (read-only)

engagements/<client-slug>/<YYYY-MM-DD>/
├── engagement.yaml      ← client, dates, model, scope, assessor
├── report.md            ← canonical findings (parse F-sections by their headings)
├── timeline.md          ← event-line entries
├── hosts.csv            ← host,ip,finding_id,proto,port
└── evidence/
    ├── raw/*.txt        ← terminal-style command transcripts (inline into .term blocks)
    └── F*/*.txt         ← per-finding evidence files

Output

engagements/<client-slug>/<YYYY-MM-DD>/
└── casebook.html        ← single self-contained HTML (~250-500 KB depending on evidence inlining)

No external dependencies except https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js and Google Fonts (loaded at view time). The CSS and most JS are inlined.

Run

python skills/scripts/render_casebook.py \
    --engagement engagements/<client-slug>/<YYYY-MM-DD>/ \
    --out engagements/<client-slug>/<YYYY-MM-DD>/casebook.html

The renderer is idempotent — each run regenerates the file from the current state of the engagement dir.

Dynamic data sources — every section is engagement-specific

Nothing in the casebook is hardcoded to a particular engagement. Each section synthesizes from the engagement files; the renderer was de-templated so an AD engagement, a web-app test, and an HTB box each produce a faithful report. What drives what:

Section Source of truth Fallback if absent
Hero title / subhead engagement.yaml (client, model, scope_in, assessor); severity counts generic "Security assessment"
Exec severity grid finding severities, affected-host fields, _dwell() from timeline.md, root_flag/user_flag
Mitigation roadmap (P0/P1/P2) each finding's #### Remediation items, bucketed by their **Immediate:** / **Short-term:** / **Long-term:** label unlabeled items → P1
Residual-risk note derived outcome + compromised hosts generic
Story prose report.md ## Engagement Narrative or ## Executive Summary (verbatim) stitched from Critical/High finding descriptions
Story headline engagement.yaml headline: (optional) "How the chain actually ran."
Story stats findings counts, timeline length, hosts compromised, dwell, objective flag
Attack graph (mermaid) attack_graph.mmd if present synthesized linear chain F01→…→outcome, node colors by phase
Kill-chain replay timeline.md + hosts.csv (always) section skipped if timeline empty
Attack chains report.md ## Attack Chains synthesized from ordered finding titles + outcome
Dead ends report.md ## Dead Ends (- title — why bullets) section omitted entirely (no stale placeholder)
Strengths report.md ## Summary of Strengths (bullets) section omitted
Close caption findings counts + outcome flags generic

Read the full file on GitHub · 145 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. 4d ago First seen · 145 lines · 94 tokens per session scan A 5d09668e4ba4

Subscribe to this mod's changes

report-writer-casebook is an agent published in the GitHub repository jessefmoore/offensive-claude-code (2 stars, last pushed 3mo ago), licensed MIT. It adds 94 tokens to every session and 3,118 once invoked, about $0.0005 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-31.