INNER CODE UNIT · Python
_normalize_github_url
ghost-in-the-droid/android-agent · gitd/cli.py:66
def _normalize_github_url(url: str) -> str:
"""Ensure GitHub URL has https:// prefix."""
if not url.startswith("http"):
url = "https://" + url
# Strip trailing slashes and .git suffix for consistency
url = url.rstrip("/")
if url.endswith(".git"):
url = url[:-4]
return url
def _download_skill_from_registry(name: str) -> Path | None:
"""Download a skill from the official registry by name.
Downloads individual files from the registry raw GitHub URL.
Returns the temp directory path on success, None on failure.
"""
# Fetch the registry to find the skill metadata