Skip to content

The agent that grows with you

fix(skills): hoist the hub import out of the index retry loop

kshitijk4poor485e05d11834
diff --git a/tools/skills_hub_search.py b/tools/skills_hub_search.py
index 0c43bb8f436..b284f2a4e74 100644
--- a/tools/skills_hub_search.py
+++ b/tools/skills_hub_search.py
@@ -16,7 +16,7 @@ from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple
from tools.skills_hub_clawhub import ClawHubSource
from tools.skills_hub_github import GitHubAuth, GitHubSource, _filter_results_by_provider, _provider_filter_of
-from tools.skills_hub_models import SkillMeta, SkillSource, TRUST_RANK, _dedupe_by_trust
+from tools.skills_hub_models import SkillMeta, SkillSource, TRUST_RANK, _dedupe_by_trust, hub
from tools.skills_hub_official import HermesIndexSource, OptionalSkillSource
from tools.skills_hub_skillssh import SkillsShSource
from tools.skills_hub_sources import BrowseShSource, LobeHubSource, UrlSource, WellKnownSkillSource
@@ -51,7 +51,6 @@ def _load_hermes_index() -> Optional[dict]:
data = None
for accept_encoding in ("gzip, deflate", "identity"):
try:
- from tools.skills_hub_models import hub
resp = hub()._skills_hub_http_get(
HERMES_INDEX_URL, timeout=15, follow_redirects=True,
headers={"Accept-Encoding": accept_encoding},