AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
Python ai-promptsai-skillblueskyclaudeclaude-codeclawhubdeep-researchhackernewsinstagramopenclawpolymarketrecencyredditresearchsocial-mediatiktoktrendstwitterweb-searchyoutube
fix(env): wire EXCLUDE_SOURCES through get_config + SKILL.md integration
Trevin Chow306d8c2d7333
diff --git a/skills/last30days/SKILL.md b/skills/last30days/SKILL.mdindex a7db05fc..2b47dc0d 100644--- a/skills/last30days/SKILL.md+++ b/skills/last30days/SKILL.md@@ -327,6 +327,7 @@ Common patterns:- If SCRAPECREATORS_API_KEY is set and INCLUDE_SOURCES contains pinterest: add Pinterest- If BSKY_HANDLE and BSKY_APP_PASSWORD are set: add Bluesky- If OPENROUTER_API_KEY is set: add Perplexity+- If EXCLUDE_SOURCES is set (comma-separated, case-insensitive): drop any matching source from the list above before displayingThen display (use "and more" if 5+ sources, otherwise list all with Oxford comma):diff --git a/skills/last30days/scripts/lib/env.py b/skills/last30days/scripts/lib/env.pyindex e78f0120..81f5641c 100644--- a/skills/last30days/scripts/lib/env.py+++ b/skills/last30days/scripts/lib/env.py@@ -265,6 +265,7 @@ def get_config() -> dict[str, Any]:('FROM_BROWSER', None),('SETUP_COMPLETE', None),('INCLUDE_SOURCES', ''),+ ('EXCLUDE_SOURCES', ''),]for key, default in keys:diff --git a/tests/test_pipeline_v3.py b/tests/test_pipeline_v3.pyindex 54dcc182..5ccddd16 100644--- a/tests/test_pipeline_v3.py+++ b/tests/test_pipeline_v3.py@@ -956,5 +956,29 @@ class TestExcludeSources(unittest.TestCase):self.assertIn("reddit", sources)+class TestExcludeSourcesEndToEnd(unittest.TestCase):+ """Wiring regression: EXCLUDE_SOURCES from the process environment must+ reach available_sources() via env.get_config(). The unit tests above+ construct config dicts directly; this one exercises the env-to-config+ path so a missing entry in env.py's keys list is caught immediately."""++ def test_exclude_sources_from_env_propagates_through_get_config(self):+ import os+ from unittest.mock import patch as _patch+ from lib import env as env_mod+ from importlib import reload+ with _patch.dict(os.environ, {+ "LAST30DAYS_CONFIG_DIR": "",+ "EXCLUDE_SOURCES": "tiktok,instagram",+ "SCRAPECREATORS_API_KEY": "fake",+ }, clear=False):+ reload(env_mod)+ cfg = env_mod.get_config()+ self.assertEqual(cfg.get("EXCLUDE_SOURCES"), "tiktok,instagram")+ sources = pipeline.available_sources(cfg)+ self.assertNotIn("tiktok", sources)+ self.assertNotIn("instagram", sources)++if __name__ == "__main__":unittest.main()