---
name: news-front-page
description: Generate a Gradient News & Observer newspaper front page for a time window. Pulls game events into a structured digest, writes ten illustrated story ledes (7 straight news + 2 gossip + 1 market box) into a markdown file, then renders a 2160x3840 newspaper front-page PNG. Usage `/news-front-page [duration]` (default `24h`; e.g. `1h`, `6h`, `7d`).
---

# Generate Newspaper Front Page

Produce a complete edition of *The Gradient News & Observer* for a requested time window: digest → markdown stories → image.

## Parameters

`/news-front-page [duration]`

- **duration** (optional, default `24h`): time window. Accepts `90m`, `1h`, `6h`, `24h`, `7d` — anything `news-digest --duration` understands.
- **env** (optional, default `cloud`): `cloud` → `.env.cloud`, `local` → `.env.supabase`. Production data lives in cloud; local is mostly empty unless the user is testing.
- **skip-image** (optional flag): only run steps 1–3, skip image rendering. Useful for iterating on copy.

If duration is missing, default to `24h` and proceed — do not ask.

## Output files

All under `artifacts/`. Use the digest's `end` timestamp formatted as `YYYYMMDD-HHMMSSZ` UTC for the stem, and `past-<duration>` as the suffix:

- Digest JSON: `artifacts/news-digest-<stem>-past-<duration>.json`
- Front-page Markdown: `artifacts/gradient-news-observer-front-page-<stem>-past-<duration>.md`
- Image PNG: the image script computes the path from the Markdown filename. The default renderer writes a regional composite under `artifacts/gradient-news-observer-regions/`.

## Steps

### 1. Generate the digest JSON

Run `news-digest` to pull events for the requested window into a structured JSON file. Use the entry-point script (registered in `pyproject.toml`):

```bash
uv run news-digest \
  --env-file .env.cloud \
  --duration <duration> \
  --format json \
  --output artifacts/news-digest-<stem>-past-<duration>.json
```

- The script connects read-only to Postgres, pulls all events in the window, dedupes recipient fan-out, and writes a JSON object with `global_stats`, `players`, `leaderboard_ranks`, `period_ranks`, and `warnings`.
- For a 24-hour window the JSON is large (multi-MB). Don't `cat` it. Use `python3 -c` or targeted `Read` calls.

### 2. Mine the digest for storylines

Read the JSON with small Python scripts (via `Bash`) to surface the angles. Useful queries:

- **Top by activity / wealth / trade volume / sectors visited / combat wins / messages / sessions.** Print rank tables with name + key counters for the top 15–25.
- **Notable garrison events.** For each player with `garrison_events`, show the lines containing `placed`, `collected`, `mode_changed`, or `disbanded` (these are the real deployments — the rest are passers-through).
- **Combat events.** For each player with `combat_wins > 0` or `destroyed_ships > 0`, dump the combat log; look for back-to-back attacks on garrisons, defeated targets, multi-round skirmishes, and named opponents.
- **All public chat.** Dedupe broadcasts and direct messages by sender+text and sort by timestamp. Broadcasts are the strongest signal for story angles — pilots announcing intent (toll lanes, recruitment, accusations, public notices of kills).
- **Ship purchases / sales / trade-ins.** Five-or-fewer transactions per day, easy to enumerate.
- **Corporation events.** `corporation.created` and `corporation.disbanded` counts; cross-reference with chat broadcasts that mention a corp name.
- **Leaderboard top 10** for wealth, trading, territory, exploration. Sort by `rank` ascending; show name + score.

You don't need TaskCreate for the mining — it's all read-only Python. Spawn a single `Explore` agent only if the JSON exceeds ~10MB and you want a focused report.

Pick **9 storylines** from what you find. Mix should match the structure below: 7 grounded news beats + 2 dishy gossip angles. Lean toward conflict, status changes, public statements, and surprising aggregates.

### 3. Write the front-page Markdown

Write to `artifacts/gradient-news-observer-front-page-<stem>-past-<duration>.md` using the structure below verbatim. The image generator's prompt template assumes this exact section count and ordering.

#### Structure (10 sections, in order)

| # | Type | Length | Section tag |
|---|---|---|---|
| 1 | Straight news (lead) | Two paragraphs | Story-specific newspaper section — see tagging guide below |
| 2 | Straight news | Two paragraphs | Story-specific newspaper section |
| 3 | Straight news | One short paragraph | Story-specific newspaper section |
| 4 | Straight news | One short paragraph | Story-specific newspaper section |
| 5 | Straight news | One short paragraph | Story-specific newspaper section |
| 6 | Straight news | One short paragraph | Story-specific newspaper section |
| 7 | Straight news | One short paragraph | Story-specific newspaper section |
| 8 | Gossip | 2–3 punchy sentences | Oblique, catty, insider-y tag |
| 9 | Gossip | 2–3 punchy sentences | Oblique, catty, insider-y tag |
| 10 | Market Update | Two markdown tables + footnote | Literally `*Market Update*` |

#### File template

```markdown
# THE GRADIENT NEWS & OBSERVER

**Front-Page Edition — <window length> ending <YYYY-MM-DD HH:MM> UTC**

*"All the news the void allows."*

---

## 1. <Headline>

*<Story-specific section tag — e.g. Combat Wire, Trade & Lanes, Open Channel>*

<Lede paragraph — the strongest single fact or scene.>

<Second paragraph — context, quoted broadcasts, supporting numbers.>

---

## 2. <Headline>

*<Story-specific section tag>*

<Two paragraphs, same shape as story 1.>

---

## 3–7. <Headlines>

*<Story-specific section tag — different per story>*

<One short paragraph each — three to five sentences.>

---

## 8. <Headline>

*<Oblique, catty, insider-y tag — e.g. Salvage Talk>*

<Two or three short, punchy sentences. Vary the opening — see persona guide.>

---

## 9. <Headline>

*<Different oblique, catty, insider-y tag — e.g. The Mega-Port Set>*

<Two or three short, punchy sentences. Different opening from story 8.>

---

## 10. Market Update — <Window> Galactic Index

*Market Update*

| Measure | Value |
| --- | ---: |
| Gross trade volume | $... |
| ... |

| Top of the Boards | Pilot | Score |
| --- | --- | ---: |
| Wealth (lifetime) | ... | ... |
| ... |

---

*All sector numbers used appear in the period's open broadcasts; private direct messages and non-public sector references have been withheld.*
```

The closing italic footnote is required — the image template renders it as a footnote.

### 4. Render the front-page image

Unless `skip-image` was passed, run:

```bash
uv run news-front-page-image \
  --front-page-md artifacts/gradient-news-observer-front-page-<stem>-past-<duration>.md
```

- Defaults to the `composited-regions` renderer, which generates each story region separately and composites them — better text fidelity than the older `one-shot` renderer.
- Defaults to linotype light mode (black ink on white paper, character/ship names bolded). To render the original dark mode (cyan and chartreuse on dark paper, names highlighted in cyan), append `--dark-mode`. Dark mode writes its output dir and composite filename with a `-dark` suffix to keep light and dark renders side by side.
- For comparison or quick iteration, append `--renderer one-shot` to render the whole page in a single image-edit call.
- The script writes the final PNG, per-region prompt text, region PNGs, and metadata JSON. Composited-regions output lives under `artifacts/gradient-news-observer-regions/<stem>/`; one-shot output lives under `artifacts/gradient-news-observer-images/`.
- Composited-regions takes several minutes (one image-edit call per region, run in sequence). One-shot finishes in 30–90 seconds. Stream stdout — both print final paths on success.
- If `OPENAI_API_KEY` isn't in the environment, the script reads it from `.env`.

### 5. Report

Print the three artifact paths (digest JSON, front-page Markdown, image PNG) and the headline of story 1 so the user can open the right files.

## Personas — write in these voices

### Straight news — *New York Times* house style

- Lede paragraph carries the strongest factual beat. Date, place, actor, action.
- Past tense. Third person. Active voice.
- Quote public broadcasts with attribution: *"…", the pilot declared on the open channel.*
- Numbers spelled out under ten in body prose, numerals for stats and credits ($12,533,985).
- No hype, no exclamation points, no scare quotes. The tone is measured even when the facts are dramatic.
- One non-headline-grabbing fact per story is welcome — context that situates the day.

### Gossip — dishy, varied openings

- 2–3 short, punchy sentences. No paragraphs.
- **Vary the opening every time.** "A little kestrel told this columnist…" is one option. Others:
  - "Word from the trading docks…"
  - "Overheard on the open channel at HH:MM UTC…"
  - "Whispers in the wardroom suggest…"
  - "One of your columnist's more reliable informants…"
  - "Spotted at a mega-port this cycle…"
  - "The rumor on the long-range channels…"
- First-person columnist voice ("your columnist," "this column") is fine and characterful.
- Wry, observational, never mean. Tease, don't accuse.

## Section tags

Each story carries a single italic line directly under its headline that names the newspaper section it belongs to. These tags are part of the look — they make the page feel like an actual newspaper instead of a numbered list of stories. Write a fresh tag for every story; never re-use one.

### Tags for straight news (stories 1–7)

Pick a section name that fits the story. Real-newspaper analogues are great when they're the obvious fit (Markets, Corporate Affairs, Cartography). Lean into the retro-space-game theme when there's room to be a little playful (Combat Wire, Trade & Lanes, Open Channel, Shipyard). Keep them short — two or three words, title-cased, no punctuation. A few worked examples for reference:

- A combat-heavy day with named pilots → **Combat Wire** (or **Hostilities**, **Casualty Desk**)
- A toll lane / mega-port / trade-route story → **Trade & Lanes** (or **Public Affairs** if it leans policy)
- An exchange of public broadcasts → **Open Channel** (or **Frontier Justice** if it's spicy)
- A new corporation, recruiting drive, member moves → **Corporate Affairs**
- An exploration / survey / probe record → **Cartography** (or **The Survey Desk**)
- Ship purchases, sales, trade-ins → **Shipyard** (or **Off the Lot**)
- Trade volume, port flow, leaderboard movement → **Markets** (or **The Ledger**)
- Chat broadcasts that read more like commentary than news → **Frontier Justice** (reserve **Open Channel** for the strongest broadcast-driven beat on the page)

If two stories would land on the same tag — adjacent or not — change one. Each tag must be unique on the page; visual rhythm and section variety depend on it. If a straight-news story and a gossip beat both spring from open-channel chatter, give the gossip the **Open-Channel Confidential** variant and keep the news as **Open Channel**.

### Tags for gossip (stories 8–9)

Oblique. Catty. Insider-y. The reader should feel they've stumbled into the back room of a yacht club. Two or three words, title-cased; "The X Set" / "On the X Beat" / "X Talk" patterns work. Worked examples:

- Wreckage / destroyed ships / escape pods → **Salvage Talk**, **From the Insurance Wing**, **Recovery Notes**
- Mega-port socialites, traders, anyone seen at the dock → **The Mega-Port Set**, **Concourse Whispers**, **Heard on the Promenade**
- Corp politics, recruitment, defections → **The Member Lounge**, **From the Boardroom Door**
- A pilot's unguarded chatter on the open channel → **Open-Channel Confidential**

The tag should hint at the gist of the gossip without naming it outright. If your tag basically restates the headline, it's too literal — make it more sideways.

### Tag for the market box (story 10)

Always literally `*Market Update*`. No variants. The image template expects this string.

## Privacy and content rules — non-negotiable

These constraints flow into the image prompt verbatim. Violating them in the markdown means a wrong front page.

- **Direct messages are private.** Never quote, paraphrase, or imply contents of any DM. Players cannot see other players' DMs in-game; the newspaper can't either. *Broadcasts are public — quote them freely.*
- **Sector numbers are restricted.** Use a sector number only if (a) it appears in a public broadcast inside the window, OR (b) it is a Federation Space sector (the meta-defined fedspace list, 200 sectors by default). When in doubt, omit the number and use a generic phrase like "the borderlands beyond Federation Space" or "a contested sector outside Fed."
- **No invented facts.** Headlines, ledes, quotes, percentages, ship classes, credit amounts, sector numbers — every readable claim must be grounded in the digest. If a stat is interesting but unverifiable, leave it out.
- **No fabricated player names.** Only use names that appear in `players[].name` or in the leaderboard ranks of the digest.
- **No invite codes** unless they were broadcast publicly.
- **Aggregate counts are always public.** Total sectors visited, total trade volume, ships destroyed, corporations created — all fair game for ledes and the market box.

## Story-mining heuristics

Strong story signals, in roughly decreasing order of front-page value:

1. **A public broadcast that announces intent** — toll lanes, recruitment, accusations, "public notice" kill claims, declarations of war. These almost always lead the page.
2. **An exchange of broadcasts between two pilots** — accusation + denial, ultimatum + response. Story 2 territory.
3. **A new corporation with a public manifesto** broadcast in the window.
4. **A combat day above baseline** — count `ship.destroyed` and `combat.ended`. Fourteen ship destructions is a lot; one is a footnote.
5. **A leaderboard sweep** — same name in #1 across multiple boards, or three sister ships in the top three of one board.
6. **A run of ship purchases** with a clear narrative (e.g., a pilot who lost a hull and re-bought).
7. **An autonomous-fleet survey record** — "468 sectors in 24 hours" is a clean explorer beat.
8. **Garrison drama in or near Fed Space.** Garrisons placed close to fedspace, especially if destroyed within hours, are reliable conflict copy.

Weak signals — generally skip:

- Quiet trading sessions with no anchoring narrative.
- Movement totals without a name attached.
- Errors, session counts, or other infra signals.

## Things this skill does NOT do

- **Does not edit code, deploy, or run migrations.** Read-only digest + write artifacts under `artifacts/`.
- **Does not commit anything.** The user reviews the markdown and image first.
- **Does not push the image anywhere.** It writes to disk; sharing is the user's call.
- **Does not invent storylines to pad to 9.** If the window is genuinely quiet (e.g., an off-hour 1h slice), say so plainly in the lede and reduce gossip items to one. Better a thin honest page than a fabricated one.


---
Source attribution: pipecat-ai
Original project: https://github.com/pipecat-ai/gradient-bang/blob/5735d794ea69527526761cb305b91b8244ce4c58/.claude/skills/news-front-page/SKILL.md
License: Apache-2.0
License information: https://www.apache.org/licenses/LICENSE-2.0
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice


                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.


# Mega AI Hub resource metadata

Creator / publisher: pipecat-ai
Original project: https://github.com/pipecat-ai/gradient-bang/blob/5735d794ea69527526761cb305b91b8244ce4c58/.claude/skills/news-front-page/SKILL.md
Attribution basis: Source repository record

Fields of work: Content & Media, Marketing
Roles: Content Marketer, Copywriter, Journalist / Editor
Specialties: Specialty not specified
Tools: Python, PostgreSQL
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: ab6865814611235d1c9c624b0f8150a1c4a33f02ffc7e6d5ad108510310c3ba4
