| name | news-pdf-briefing |
| description | Use when generating a daily Chinese PDF briefing from current domestic and international news, including modular analysis of what happened, why it happened, how to interpret it, what to do next, source tracking, ReportLab rendering, and Codex cron automation for a dated PDF output. |
News PDF Briefing
Use this skill to create a dated Chinese PDF news briefing. The expected result is a concise but substantive PDF under output/pdf/<yyyy-mm-dd>.pdf, with domestic and international modules, source links, and practical interpretation.
Workflow
- Confirm the target date and output path. If no date is specified, use today's date in the user's local timezone.
- Search current authoritative news before writing. Prefer official agencies, primary institutional releases, and reputable wires. For unstable breaking events, compare at least two sources when possible.
- Choose a balanced set of modules. Typical modules include domestic policy, economy, technology, public safety, international affairs, energy, markets, climate, and public health.
- For each module, write in this structure:
发生了什么: the factual event.
为什么这样: incentives, background, constraints, or system causes.
怎么看待: interpretation, uncertainty, and likely impact.
之后如何做: practical action for readers, companies, researchers, or policymakers.
- Generate a Python ReportLab script when deterministic PDF rendering is needed. Reuse existing style patterns from
scripts/ when working inside this repository.
- Render the PDF to
output/pdf/<date>.pdf.
- Verify the PDF before delivery:
- Run the script and confirm the PDF exists.
- Use
pdftotext -layout or equivalent to check Chinese text extraction.
- Use
pdftoppm or another renderer to inspect the first pages when layout quality matters.
- Keep temporary build files under
tmp/ and do not treat them as source artifacts.
Content Rules
- Do not write rumor, gossip, market panic, disaster voyeurism, or nationalist outrage.
- Do not present unresolved breaking news as settled fact.
- Separate facts from interpretation.
- Keep source labels and URLs near the end of the PDF or in a dedicated source section.
- Use concrete action language. Avoid generic endings such as "持续关注".
- For market-related sections, state that the PDF is not investment advice.
- If live search fails, say so and either stop or clearly frame the output as a prior-snapshot example rather than current news.
Rendering Rules
- Use Chinese-capable fonts. On Windows, known working options include
C:\Windows\Fonts\Deng.ttf, Dengb.ttf, simhei.ttf, and ARIALUNI.ttf.
- Prefer A4 portrait layout with compact tables and readable line spacing.
- Keep the first page scannable: title, generation time, one paragraph of daily overview, and a module table.
- Avoid over-decorating. The briefing should read like an analyst note, not a poster.
- Include page numbers and a small footer with date/source context.
Automation Behavior
When running as a Codex cron automation:
- Use this skill explicitly.
- Search the current day's news.
- Produce one PDF named by date.
- Save any research notes or transient source snapshots only if the workspace already has a place for them.
- Report generated files and validation commands.
- If rendering fails because fonts or dependencies are missing, diagnose the missing dependency first and do not silently claim success.
Suggested Validation Commands
python scripts\generate_2026_05_18_news_pdf.py
pdftotext -layout output\pdf\2026-05-18.pdf -
pdftoppm -png -f 1 -l 1 -r 120 output\pdf\2026-05-18.pdf tmp\preview