
News Summary
Turn fetched news arrays into timestamped HTML summaries with saved data.json for newsletters or research digests.
Overview
news-summary is an agent skill most often used in Grow (also Idea research) that generates timestamped HTML news summaries with saved JSON data.
Install
npx skills add https://github.com/zjfls/zhoujie-claude-skills --skill news-summaryWhat is this skill?
- Creates per-query timestamped directories under output/ with summary.html and data.json
- Supports categorized HTML when news items include category fields
- Writes raw news JSON alongside rendered summary for reuse or diffing
- Node fs/path workflow suitable for agent-generated reporting scripts
- Per query outputs two core files: summary.html and data.json
Adoption & trust: 524 installs on skills.sh; 2 GitHub stars; 1/3 security scanners passed (skills.sh audits).
What problem does it solve?
You collected news items for a topic but lack a consistent folder layout and HTML summary you can open or share quickly.
Who is it for?
Solo builders automating niche news roundups, watchlists, or internal briefings from agent-fetched JSON.
Skip if: Full SEO content strategy, paywalled publisher CMS workflows, or real-time alerting without a prior news fetch step.
When should I use this skill?
Agent has structured news data and needs a timestamped HTML summary directory under output/.
What do I get? / Deliverables
Each query yields output/<timestamp>_<topic>/ with data.json and summary.html, optionally with category navigation baked in.
- output/<timestamp>_<topic>/summary.html
- output/<timestamp>_<topic>/data.json
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Grow/content is the canonical shelf because the primary artifact is a shareable summary.html for ongoing audience or stakeholder updates. content fits HTML digest generation, optional category navigation, and persisted query folders under output/.
Where it fits
Compile weekly AI tooling headlines into summary.html for a Substack or blog prep folder.
Archive competitor launch articles with categories before committing to a product direction.
Refresh a saved data.json digest when rerunning the same topic for email subscribers.
How it compares
Local HTML report generator, not a hosted news API or growth analytics platform.
Common Questions / FAQ
Who is news-summary for?
Indie operators and developers who want agent-driven news digests as static HTML plus JSON in predictable directories.
When should I use news-summary?
In Grow when publishing content roundups, in Idea during research when archiving competitor or domain news, or whenever you already have a news array to render.
Is news-summary safe to install?
Review the Security Audits panel on this Prism page; the skill writes to disk and may invoke child processes in extended setups.
SKILL.md
READMESKILL.md - News Summary
const fs = require('fs'); const path = require('path'); const { exec } = require('child_process'); /** * 生成新闻摘要HTML,每次查询创建独立的时间戳目录 * @param {string} topicName - 查询主题名称(如:'AI技术新闻'、'物理引擎技术') * @param {Array} newsData - 新闻数据数组 * @param {boolean} withCategories - 是否包含分类导航 */ function generateNewsHtml(topicName, newsData, withCategories = false) { // 生成时间戳目录名 const timestamp = new Date().toISOString().replace(/[:.]/g, '-').substring(0, 19).replace('T', '_'); const dirName = `${timestamp}_${topicName}`; // 创建目录结构 const baseDir = path.join(__dirname, 'output'); const queryDir = path.join(baseDir, dirName); const analysisDir = path.join(queryDir, 'analysis'); // 确保目录存在 [baseDir, queryDir, analysisDir].forEach(dir => { if (!fs.existsSync(dir)) { fs.mkdirSync(dir, { recursive: true }); } }); // 保存原始数据 const dataPath = path.join(queryDir, 'data.json'); fs.writeFileSync(dataPath, JSON.stringify(newsData, null, 2), 'utf8'); // 生成HTML文件 const htmlPath = path.join(queryDir, 'summary.html'); let html; if (withCategories && newsData.some(item => item.category)) { html = generateCategorizedHtml(newsData, topicName, dirName); } else { html = generateSimpleHtml(newsData, topicName, dirName); } fs.writeFileSync(htmlPath, html, 'utf8'); console.log(`✓ 新闻摘要已生成`); console.log(` 目录: output/${dirName}/`); console.log(` 文件: summary.html, data.json`); return { htmlPath, queryDir, dirName }; } function generateCategorizedHtml(newsData, topicName, dirName) { // 按分类组织新闻 const categories = {}; newsData.forEach(item => { const cat = item.category || '未分类'; if (!categories[cat]) { categories[cat] = []; } categories[cat].push(item); }); return `<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>${topicName} - 新闻摘要</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; padding: 20px; } .header { max-width: 1400px; margin: 0 auto 30px; text-align: center; color: white; } .header h1 { font-size: 36px; margin-bottom: 10px; text-shadow: 0 2px 4px rgba(0,0,0,0.2); } .header p { font-size: 16px; opacity: 0.9; } .stats { display: flex; justify-content: center; gap: 20px; margin-top: 20px; font-size: 14px; flex-wrap: wrap; } .badge { display: inline-block; background: rgba(255,255,255,0.2); padding: 6px 12px; border-radius: 20px; font-size: 12px; } .main-container { max-width: 1400px; margin: 0 auto; display: flex; gap: 20px; } .sidebar { width: 250px; background: white; border-radius: 12px; padding: 20px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); position: sticky; top: 20px; height: fit-content; } .sidebar h2 { font-size: 18px; margin-bottom: 15px; color: #1a202c; } .category-nav { list-style: none; } .category-item { margin-bottom: 8px; } .category-link { display: block; padding: 8px 12px; color: #4a556