INNER CODE UNIT · Python

_is_local_path

ghost-in-the-droid/android-agent · gitd/cli.py:61

def _is_local_path(target: str) -> bool:
    """Check if target is a local path."""
    return target.startswith("./") or target.startswith("/") or target.startswith("../") or os.path.isdir(target)


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.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…