news-summary
Original:🇨🇳 Chinese
Translated
4 scripts
News search, news summarization, news aggregation, hot news, latest news, news organization, news collection. Helps you search for relevant news from the past few days (12-25 articles), generate a beautiful HTML summary page, each news article has a summary and AI in-depth interpretation function, and automatically opens the browser to display it
7installs
Added on
NPX Install
npx skill4agent add zjfls/zhoujie-claude-skills news-summaryTags
Translated version includes tags in frontmatterSKILL.md Content (Chinese)
View Translation Comparison →News Search Summary Skill
An intelligent news search and summarization tool that helps you quickly obtain and analyze the latest news.
Core Features
1. News Search
- Ask the user for a search topic
- Search for 12-25 relevant news articles from the past 3-5 days
- Search Tools: Prioritize using WebSearch, use Brave Search MCP when unavailable
- Brave Search Restrictions: Must second after each call to prevent rate limiting
sleep 1 - Search Optimization:
- Use multiple keyword combinations for search
- Search in batches to ensure sufficient results
- Automatic deduplication (title/URL)
- If fewer than 12 results are obtained, expand the time range or keywords
2. News Analysis
Extract the following information for each news article:
- Title
- Source website
- Publication time
- Authority assessment (High/Medium/Low)
- Summary (100-200 words)
- Original link
3. Generate HTML Page
- Output Directory:
<current working directory>/news-summary/<timestamp>_<topic>/- Get the absolute path of the current working directory via
pwd - format:
<timestamp>(e.g.:YYYYMMDD_HHMM), ensuring a unique directory for each search20260111_1145 - extracts keywords from the user's query (e.g.:
<topic>,AI), usedeepseekif extraction failsnews - Example:
/path/to/work/news-summary/20260111_1145_AI/
- Get the absolute path of the current working directory via
- File Name:
news_summary_<topic>.html - AI Interpretation Directory:
<current working directory>/news-summary/<timestamp>_<topic>/analysis/ - Interpretation File Name:
news_analysis_<newsId>.md - Page Features:
- Beautiful responsive design
- Card-style news display
- Each news article includes: title, source, time, authority label, summary
- Two buttons: "View Original" and "AI Interpretation"
- Must include before </body>:
<script src="/news-ai.js"></script>
4. AI Interpretation Function
- Server: Node.js HTTP server (lib/server.js, port 3456)
- Real AI Analysis: Generate in-depth interpretations via Claude Code CLI
- Output Format: Complete HTML page
- Storage location:
<working directory>/news-summary/<timestamp_topic>/analysis/news_analysis_<id>.html - Contains complete HTML structure (<!DOCTYPE html>, <html>, <head>, <body>, etc.)
- Uses modern CSS styles and responsive design
- Color theme uses gradient of #667eea and #764ba2
- Contains complete structure including news information, analysis content, bottom copyright, etc.
- Storage location:
- Custom Prompt: Enter a custom analysis angle after clicking the "AI Interpretation" button
- Blocking and Timeout:
- Display loading modal during generation
- Automatically abort after 120 seconds timeout
- File Management:
- Generated: Display "View AI Interpretation" and "Delete Interpretation" buttons
- Not generated: Display "AI Interpretation" button
- Support deletion and regeneration
- Service Endpoints:
- - Check if the interpretation file exists
GET /check-analysis?newsId=<id>×tamp=<timestamp_topic> - - Generate AI interpretation (supports customPrompt, outputs complete HTML)
POST /analyze - - Delete interpretation
DELETE /delete-analysis?newsId=<id>×tamp=<timestamp_topic> - - View interpretation (directly returns HTML)
GET /view-analysis?newsId=<id>×tamp=<timestamp_topic> - - Static file service
GET /news-summary/<timestamp_topic>/<filename> - - Frontend script
GET /news-ai.js
5. Restart Server and Open Browser
- Server Restart Steps (must be executed after each generation):
- Check if port 3456 is occupied:
- Windows:
netstat -ano | findstr 3456 - macOS/Linux: or
lsof -ti:3456netstat -ano | grep 3456
- Windows:
- If the port is occupied, stop the old server:
- Windows:
taskkill /F /PID <process ID> - macOS/Linux:
kill -9 <process ID>
- Windows:
- Restart the server:
- Windows:
start /B node <skill directory>/lib/server.js - macOS/Linux:
node <skill directory>/lib/server.js &
- Windows:
- Wait 2 seconds to ensure the server starts
- Verify startup: Access should return JavaScript code
http://localhost:3456/news-ai.js
- Check if port 3456 is occupied:
- After generating HTML, open the browser via HTTP
- Browser Commands:
- Windows:
Start-Process "http://localhost:3456/news-summary/<timestamp_topic>/news_summary_<topic>.html" - macOS:
open "http://localhost:3456/news-summary/<timestamp_topic>/news_summary_<topic>.html" - Linux:
xdg-open "http://localhost:3456/news-summary/<timestamp_topic>/news_summary_<topic>.html"
- Windows:
- Important: Must access via HTTP, do not use file:// protocol
Workflow
- Ask the user for a search topic
- Generate Unique Identifier:
- Extract keywords from the query as (use
<topic>if extraction fails)news - Generate timestamp: =
<timestamp>formatYYYYMMDD_HHMM - Combine as: (e.g.:
<timestamp>_<topic>)20260111_1145_AI
- Extract keywords from the query as
- Search for news (prioritize WebSearch; Brave Search requires 1-second interval)
- Analyze and organize news information
- Get Current Working Directory: Use Bash command to get the absolute path
pwd - Create Directory:
<current working directory>/news-summary/<timestamp>_<topic>/ - Generate HTML:
- File path:
<current working directory>/news-summary/<timestamp>_<topic>/news_summary_<topic>.html - Must add before </body>:
<script src="/news-ai.js"></script> - Each news card must include data attributes (data-news-id, data-news-url, data-news-source, data-news-time)
- File path:
- Restart Server:
- Check if port 3456 is occupied
- If occupied, stop the old server
- Start new server:
node <skill directory>/lib/server.js & - Wait 2 seconds and verify
- Open browser:
http://localhost:3456/news-summary/<timestamp_topic>/news_summary_<topic>.html
HTML Template Requirements
- Modern and concise design, responsive layout
- Card-style news display
- Each news card must include data attributes:
- : News ID (0, 1, 2...)
data-news-id - : Original link
data-news-url - : Source
data-news-source - : Publication time
data-news-time - : News title
data-news-title - : News summary
data-news-summary
- Authority labels: High (green), Medium (yellow), Low (gray)
- Relative time display (e.g.: 2 days ago)
- Must introduce before </body>: (use absolute path)
<script src="/news-ai.js"></script> - Initially only include "View Original" button, AI interpretation button is dynamically added by news-ai.js after page loads
Notes
- Use absolute paths (get current working directory via )
pwd - Create necessary directory structures
- Handle network request failures
- Verify news source reliability
- Must include in HTML, otherwise AI interpretation function will not be available
<script src="/news-ai.js"></script> - Timestamp Format: Must use format to ensure a unique directory for each search
YYYYMMDD_HHMM - Server Must Be Restarted: Must restart the server after each news generation to ensure WORK_DIR points to the current working directory