generate-story

generate-story is a command for Claude Code from MaxGhenis/openmessage. It costs 0 tokens per session (1,707 once invoked), scanned A, original, Unlicense.

A command that turns messaging history with a person into a fact-based relationship story and visualisation. It first examines message activity, then reads selected periods and uses photos to create an HTML presentation.

In plain words
What is it for?
Use it to identify busy or quiet periods, long gaps, changes in who sends more messages, the beginning of a relationship, and the most recent conversations, then turn those findings into a visual story.
Why use it?
It helps reveal meaningful changes in a conversation over time without relying only on memory or a simple message count.

Command for Claude Code

Part of the openmessage plugin — 2 commands shipped together

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 commands/maxghenis/openmessage/generate-story
Clone the repo
git clone --depth 1 https://github.com/MaxGhenis/openmessage

Made for: Claude Code.

Or install openmessage, the plugin that ships this one along with the rest of its 2 commands.

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 generate-story

README.md
[![agentmods](https://agentmods.dev/badge/commands/maxghenis/openmessage/generate-story.svg)](https://agentmods.dev/commands/maxghenis/openmessage/generate-story)
Your own site
<a href="https://agentmods.dev/commands/maxghenis/openmessage/generate-story"><img src="https://agentmods.dev/badge/commands/maxghenis/openmessage/generate-story.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,707 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.00000 $0.01707
Opus 5 $0.00000 $0.00853
Sonnet 5 $0.00000 $0.00341
Haiku 4.5 $0.00000 $0.00171

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

Security

Grade A, and why

generate-story 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 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.

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.

.claude/commands/generate-story.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.

Generate an agentic, fact-grounded relationship story visualization for "$ARGUMENTS".

You are a narrative writer with access to OpenMessage MCP tools. Your job is to explore the messaging history with this person, identify pivotal periods, read actual messages from those periods, and write a story grounded entirely in what you read. Then curate photos and render it as an HTML visualization.

Phase 1: overview + pivot identification

Call person_stats with the person's name. From the stats output, identify 4-8 pivotal periods:

  • Volume spikes: months with >2x the average monthly volume
  • Volume drops: especially after high-activity periods
  • Long gaps: periods of 14+ days with no messages
  • The beginning: the first 1-2 months of messaging
  • The present: the most recent 1-2 months
  • Sender ratio shifts: periods where the balance of who messages more changes noticeably

List your identified periods with date ranges and why each is interesting before proceeding.

Phase 2+3: deep-dive + write (interleaved)

For each pivotal period IN ORDER:

  1. Call get_person_messages_range with name, after, before dates, and limit of 300
  2. Read through the returned messages carefully. Note:
    • Key quotes (copy them VERBATIM with exact timestamps)
    • Topics discussed, events mentioned, emotional tone shifts
    • Inside jokes, recurring themes, nicknames
  3. Write the chapter for this period immediately while the messages are fresh
  4. Move to the next period

You may also call search_messages to search for specific topics across the full timeline if a theme from one period seems relevant to others.

Strict factual grounding rules

These rules are ABSOLUTE and cannot be violated:

  • Every fact must come from a message you actually read via get_person_messages_range or search_messages
  • Every quote must be verbatim — copied exactly from the tool output, with the exact timestamp shown
  • Never infer personality traits, pet details, hobbies, or facts that are not explicitly stated in messages you read
  • Never guess what happened between messages — if there's a gap, acknowledge it
  • If a period is sparse (few messages), say so honestly — don't invent activity to fill the gap
  • Never fabricate dialogue or combine parts of different messages into one quote
  • Attribute quotes correctly — check sender name carefully (watch for "me" vs the other person)

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. 5d ago First seen · 145 lines · 0 tokens per session scan A 11f4c619ff8d

Subscribe to this mod's changes

generate-story is a command published in the GitHub repository MaxGhenis/openmessage (52 stars, last pushed 10d ago), licensed Unlicense. It costs nothing until one of its globs matches a file; then it loads 1,707 tokens. 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.