diff --git a/skills/last30days/SKILL.md b/skills/last30days/SKILL.md index d171313..06a63ca 100644 --- a/skills/last30days/SKILL.md +++ b/skills/last30days/SKILL.md @@ -13,9 +13,9 @@ metadata: openclaw: emoji: "📰" requires: - env: - - SCRAPECREATORS_API_KEY + env: [] optionalEnv: + - SCRAPECREATORS_API_KEY - OPENAI_API_KEY - XAI_API_KEY - OPENROUTER_API_KEY diff --git a/tests/test_setup_openclaw.py b/tests/test_setup_openclaw.py index 250cc1d..20be83d 100644 --- a/tests/test_setup_openclaw.py +++ b/tests/test_setup_openclaw.py @@ -64,6 +64,19 @@ class TestRunOpenclawSetup: assert result["keys"]["brave"] is True assert result["keys"]["scrapecreators"] is False + def test_openclaw_metadata_keeps_scrapecreators_optional(self): + """OpenClaw metadata should not hard-require the ScrapeCreators key.""" + skill_md = Path(__file__).parent.parent / "skills" / "last30days" / "SKILL.md" + text = skill_md.read_text() + assert "SCRAPECREATORS_API_KEY" in text + expected = ( + "requires:\n" + " env: []\n" + " optionalEnv:\n" + " - SCRAPECREATORS_API_KEY" + ) + assert expected in text + @patch("shutil.which") def test_x_method_xai(self, mock_which): """x_method is 'xai' when XAI_API_KEY is set."""