news-llama: Instructions file for Claude Code

CLAUDE.md

news-llama CLAUDE.md is an instructions file for Claude Code from slb350/news-llama. It costs 5,306 tokens per session, scanned A, original, MIT.

Repository-specific instructions for News Llama, an application that collects articles from RSS feeds, Reddit, and web search, then summarizes them with a locally run language model. It can run as a command-line program or as a web application with multiple users and scheduled newsletters.

In plain words
What is it for?
Use them when developing or maintaining news collection, article extraction, local summarization, the command-line workflow, the web app, database migrations, or newsletter generation.
Why use it?
They explain the project layout, technology choices, and known limitations so coding agents can change the right parts without assuming unsupported data sources work.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is slb350/news-llama's own configuration. It tells Claude Code how to work on news-llama itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything news-llama configures →

Reuse

Borrowing it

Nothing to install: this file belongs to slb350/news-llama. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/slb350/news-llama/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/slb350/news-llama

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for news-llama CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/slb350/news-llama/claude-md/github.svg)](https://agentmods.dev/instructions/slb350/news-llama/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/slb350/news-llama/claude-md"><img src="https://agentmods.dev/badge/instructions/slb350/news-llama/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for news-llama CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/slb350/news-llama/claude-md"><img src="https://agentmods.dev/badge/instructions/slb350/news-llama/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,306 This file is loaded in full into every session.
When invoked 5,306 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.05306 $0.05306
Opus 5.5 $0.02122 $0.02122
Sonnet 5.5 $0.01061 $0.01061
Haiku 4.5 $0.00531 $0.00531

Measured 25d ago against content hash 953857a3dd46, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

news-llama CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 25d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 388 lines

How it starts

The opening of the file, as written. The whole thing — 388 lines — stays where its author put it; the contents beside it link to each section on GitHub.

News Llama

Project Description

An AI-powered news curation engine that aggregates content from RSS, Reddit, and web search (DuckDuckGo), then summarizes the most relevant articles using a local LLM via open-agent-sdk. Runs in CLI batch mode or as a persistent web application with multi-user support and automatic daily newsletter generation. (Hacker News aggregator exists but is disabled due to empty content extraction. Twitter/X aggregator exists but is a placeholder — _collect_from_user() returns hardcoded fake tweets; tweepy is not called.)

Repository Structure

news-llama/
├── main.py                    # CLI entry point (NewsLlama class, async orchestration)
├── setup.py                   # Automated setup script
├── take_screenshots.py        # Screenshot helper for macOS app
├── requirements.txt           # 34 Python dependencies
├── alembic.ini                # Database migration configuration
├── pytest.ini                 # Test configuration (80%+ coverage target)
├── CONTRIBUTING.md            # Contribution guidelines
├── CHANGELOG.md               # Project changelog
├── LICENSE
├── src/
│   ├── aggregators/           # Source-specific aggregators
│   │   ├── base.py            # BaseAggregator abstract class
│   │   ├── rss_aggregator.py
│   │   ├── twitter_aggregator.py    # Unimplemented placeholder: returns hardcoded fake tweets, tweepy not called
│   │   ├── reddit_aggregator.py # asyncpraw with 24h smart time filtering
│   │   ├── hackernews_aggregator.py  # Disabled: empty content
│   │   └── dynamic_aggregator.py    # AI-discovered sources (Twitter delegate also disabled: delegates to placeholder)
│   ├── processors/            # Content processing
│   │   ├── content_processor.py    # Cleaning, filtering, categorization, scoring
│   │   ├── duplicate_detector.py   # Cosine similarity dedup (threshold 0.8)
│   │   └── source_discovery.py     # LLM-powered five-tier source discovery
│   ├── summarizers/           # LLM summarization via open-agent-sdk
│   │   └── llm_summarizer.py       # Batch summarization, streaming JSON-first
│   ├── generators/            # Output generation
│   │   ├── html_generator.py  # Responsive HTML with Jinja2 templates
│   │   ├── json_generator.py
│   │   └── rss_generator.py
│   ├── utils/                 # Configuration, models, utilities
│   │   ├── config.py          # Pydantic-based configuration (LLM, social, processing)
│   │   ├── models.py          # Article, SummarizedArticle dataclasses
│   │   ├── logger.py          # Logging setup (loguru)
│   │   ├── scheduler.py       # CLI mode scheduler
│   │   ├── constants.py       # Predefined interests and source patterns
│   │   ├── llm_prompts.py     # LLMPrompts class: cache-optimized prompt factory separating static system prompts from dynamic user prompts; token estimate constants (ARTICLE_SUMMARY_SYSTEM_TOKENS=250, etc.); static methods for article summary, subreddit discovery, and multi-source discovery prompts. Note: CLI-mode summarizer and source discovery reverted to inline prompts due to ROCm/AMD GPU memory issues; only web layer's direct_search_service uses this class currently
│   │   ├── image_cache.py     # Image caching
│   │   └── security.py        # Security utilities
│   └── web/                   # FastAPI web application
│       ├── app.py             # FastAPI app, route registration, lifespan management
│       ├── models.py          # SQLAlchemy ORM (8 tables: users, newsletters,
│       │                      #   user_interests, tier1_sources, source_blacklist,
│       │                      #   discovered_sources, source_health, source_contributions)
│       ├── schemas.py         # Pydantic request/response schemas
│       ├── database.py        # SQLite WAL mode + connection pooling + Alembic
│       ├── config.py          # Web app configuration
│       ├── dependencies.py    # FastAPI dependency injection (get_db, get_current_user)
│       ├── error_handlers.py  # Global error handling (no stack traces exposed)
│       ├── rate_limiter.py    # Sliding window rate limiter (10 req/min default)
│       ├── file_cache.py      # LRU cache for newsletter HTML (100 files, ~10MB cap)
│       ├── static/            # Static assets (CSS, JS, favicon, logo)
│       │   ├── styles.css
│       │   ├── avatar-manager.js
│       │   ├── interest-manager.js
│       │   ├── form-accessibility.js
│       │   ├── favicon.ico
│       │   └── logo.png
│       ├── templates/         # Jinja2 HTML templates
│       │   ├── base.html
│       │   ├── profile_select.html
│       │   ├── profile_create.html
│       │   ├── profile_settings.html
│       │   ├── calendar.html
│       │   └── metrics.html
│       ├── api/               # RESTful JSON API (v1)
│       │   ├── schemas.py     # Pydantic schemas for API v1 responses
│       │   └── v1/            # v1 routes: users.py, interests.py, newsletters.py
│       └── services/          # 15 service modules: core (user, interest, newsletter,
│                              #   generation, scheduler) + discovery (autonomous_discovery,
│                              #   direct_search, list_mining, discovery_metrics) +
│                              #   AI (tier1, llama_wrapper, llama_wrapper_tier1) +
│                              #   support (blacklist, health_check, quality_scoring)
├── NewsLlama/                 # Native macOS SwiftUI app (XcodeGen project)
├── tests/
│   ├── test_*.py              # Root-level CLI tests (5 files: models, content_processor,
│   │                          #   duplicate_detector, security, integration)
│   ├── unit/                  # Additional CLI/batch mode tests (4 files: llm_prompts,
│   │                          #   llm_summarizer_caching, main_tier1_integration, models)
│   ├── web/
│       ├── __init__.py
│   ├── web/unit/              # Web application tests (26 files + api/ subdir, 416 test functions; 528 total across all test directories)
│       ├── __init__.py
│       ├── conftest.py        # Shared fixtures (in-memory SQLite for isolation)
│       ├── api/               # API v1 endpoint tests (4 files)
│       │   ├── __init__.py
│       │   ├── test_api_users.py
│       │   ├── test_api_interests.py
│       │   └── test_api_newsletters.py
│       ├── test_user_service.py
│       ├── test_interest_service.py
│       ├── test_newsletter_service.py
│       ├── test_generation_service.py  # Newsletter generation orchestration
│       ├── test_scheduler_service.py
│       ├── test_llama_wrapper.py
│       ├── test_llama_wrapper_tier1.py
│       ├── test_autonomous_discovery_service.py
│       ├── test_direct_search_service.py
│       ├── test_list_mining_service.py
│       ├── test_discovery_metrics.py
│       ├── test_tier1_service.py
│       ├── test_blacklist_service.py
│       ├── test_quality_scoring.py
│       ├── test_health_check_service.py
│       ├── test_routes_profile.py      # Profile creation/selection/deletion routes
│       ├── test_routes_calendar.py     # Calendar view routes
│       ├── test_routes_settings.py     # Profile settings routes
│       ├── test_routes_newsletter.py   # Newsletter view/generate/retry routes
│       ├── test_routes_health.py       # Health check routes
│       ├── test_error_handlers.py      # Error handling (user-friendly messages)
│       ├── test_performance.py         # Indexes, rate limiting, LRU caching
│       ├── test_ui_states.py           # Empty/loading/error UI states
│       └── test_source_discovery_models.py
│   └── web/integration/       # Integration tests placeholder (contains only __init__.py; future use)
├── docs/                      # Architecture, deployment, user guide
├── config/                    # Configuration templates (config.example.yaml)
├── assets/                    # Static assets (logo.png)
├── screenshots/               # Demo screenshots and GIFs
├── db/                        # Alembic migration files
└── .env.example               # Environment variables template

Read the full file on GitHub · 388 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 25d ago Changed 953857a3dd46
  2. 26d ago Changed · +4 lines · +46 tokens per session 15c8d523e775
  3. 1mo ago Changed 7331abb1561d
  4. 1mo ago Changed · +57 tokens per session 76f111f48836
  5. 1mo ago Changed 75a82d56ec04
  6. 1mo ago Changed · +1 lines · +123 tokens per session 21f5a08a887b
  7. 2mo ago First seen · 383 lines · 5,080 tokens per session scan A 84d1d8aa7e98

Subscribe to this mod's changes

news-llama CLAUDE.md is an instructions file published in the GitHub repository slb350/news-llama (12 stars, last pushed 25d ago), licensed MIT. It adds 5,306 tokens to every session, about $0.0212 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

news-llama CLAUDE.md compared with instructions from other repositories

news-llama CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
news-llama CLAUDE.mdslb350/news-llamaInstructions file1225d agoMITA5,306Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode