| name | pulsefeed-digest |
| description | Generate an information digest from Hacker News, GitHub Trends, and Product Hunt.
Use this skill when the user wants to collect and summarize tech news, trending repos,
or new products. Supports scheduled collection (e.g., every 2 hours) and handles
cache staleness automatically.
|
PulseFeed Information Digest
This skill runs the PulseFeed information aggregation tool to collect and summarize content from multiple sources with LLM-powered deep analysis.
Prerequisites
- PulseFeed installed in
~/workspace/pulsefeed
- Config file at
~/.pulsefeed/config.yaml with LLM settings:
llm:
provider: minimax
api_type: anthropic
model: MiniMax-M2.1
api_key: your-api-key
api_base: https://api.minimax.io/anthropic
max_tokens: 4096
cache:
ttl_hours: 24
db_path: ~/.pulsefeed/cache.db
Instructions
Step 1: Acquire Lock (Prevent Multiple Instances)
Before running, check and acquire a lock to prevent multiple instances:
LOCKFILE=~/.pulsefeed/pulsefeed.lock
if [ -f "$LOCKFILE" ]; then
PID=$(cat "$LOCKFILE")
if ps -p "$PID" > /dev/null 2>&1; then
echo "Another instance is running (PID: $PID). Killing it..."
kill "$PID" 2>/dev/null
sleep 2
kill -9 "$PID" 2>/dev/null || true
fi
rm -f "$LOCKFILE"
fi
echo $$ > "$LOCKFILE"
Step 2: Run Collection
cd ~/workspace/pulsefeed && \
python3 -m pulsefeed collect \
--sources hackernews,github,producthunt \
--max-items 10 \
--format detailed \
-o ~/.pulsefeed/output/digest_$(date +%Y%m%d_%H%M).md
Options:
--sources: Comma-separated list (hackernews, github, producthunt, rss, twitter)
--max-items: Total items to process (default: 50)
--demo: Quick test mode (1 item per source)
--format: Output format (markdown, html, json, detailed)
-o: Output file path
Step 3: Release Lock and Verify
rm -f "$LOCKFILE"
ls -la ~/.pulsefeed/output/digest_*.md | tail -1
Scheduled Collection (Every 2 Hours)
For automated collection, use this complete workflow:
#!/bin/bash
set -e
PULSEFEED_DIR=~/workspace/pulsefeed
OUTPUT_DIR=~/.pulsefeed/output
LOCKFILE=~/.pulsefeed/pulsefeed.lock
TIMESTAMP=$(date +%Y%m%d_%H%M)
mkdir -p "$OUTPUT_DIR"
mkdir -p "$(dirname $LOCKFILE)"
acquire_lock() {
if [ -f "$LOCKFILE" ]; then
PID=$(cat "$LOCKFILE")
if ps -p "$PID" > /dev/null 2>&1; then
echo "⚠️ Previous instance still running (PID: $PID). Terminating..."
kill "$PID" 2>/dev/null || true
sleep 3
kill -9 "$PID" 2>/dev/null || true
fi
rm -f "$LOCKFILE"
fi
echo $$ > "$LOCKFILE"
echo "🔒 Lock acquired (PID: $$)"
}
release_lock() {
rm -f "$LOCKFILE"
echo "🔓 Lock released"
}
trap release_lock EXIT
acquire_lock
cd "$PULSEFEED_DIR"
python3 -m pulsefeed collect \
--sources hackernews,github,producthunt \
--max-items 10 \
--format detailed \
-o "$OUTPUT_DIR/digest_$TIMESTAMP.md"
OUTPUT_FILE="$OUTPUT_DIR/digest_$TIMESTAMP.md"
if [ -f "$OUTPUT_FILE" ]; then
LINES=$(wc -l < "$OUTPUT_FILE")
echo "✅ Digest generated: $OUTPUT_FILE ($LINES lines)"
else
echo "❌ Collection failed"
exit 1
fi
Cache Behavior
The cache is used to save LLM costs by not re-processing the same URLs:
- Location:
~/.pulsefeed/cache.db
- TTL: 24 hours (configurable in config.yaml)
- Behavior: URLs processed within TTL are skipped, saving LLM API calls
- Do NOT clear cache for scheduled runs - this is by design
If you see fewer items than expected, it means those URLs were already processed recently. The cache ensures you don't pay for duplicate LLM processing.
Output Format
The detailed format includes:
Hacker News
- Article Summary: Core views, key information, technical details, why it matters
- Comment Analysis: Selected quotes from valuable discussions + overall summary
GitHub Trends
- README Summary: One-line description, core features, technical highlights, use cases, quick start
Product Hunt
- Product Analysis: Positioning, problem solved, core features, target users, unique value
Troubleshooting
"No items collected" or very few items
- This is normal if cache has recent entries
- Check cache TTL in config.yaml
- Wait for TTL to expire, or manually clear cache if needed:
rm -f ~/.pulsefeed/cache.db
LLM processing fails
- Verify config.yaml has correct LLM settings
- Check
api_type matches your provider (openai vs anthropic format)
- Ensure
api_base is set for third-party providers
Lock file stale
- If process crashed, manually remove:
rm -f ~/.pulsefeed/pulsefeed.lock
Slow processing
- Reduce
--max-items for faster runs
- Use
--demo mode for quick tests
Success Criteria