Skip to content

flurdy/agent-skills / skills/pr-status

pr-status

Verified

Show enriched status of your open PRs — CI checks, approvals, unresolved review threads, and linked Jira discussion, with transition-driven suggested next actions.

scripts/github_remote.py

View on GitHub
"""GitHub remote identity parsing shared by checkout discovery and review snapshots."""

from __future__ import annotations

import re
from urllib.parse import urlparse

REPOSITORY_PATTERN = re.compile(r"^[^/\s]+/[^/\s]+$")
SSH_GITHUB_HOST_PATTERN = re.compile(
    r"^(?:[A-Za-z0-9-]+\.)?github\.com$",
    flags=re.IGNORECASE,
)


def github_repository(remote_url: str) -> str | None:
    value = remote_url.strip()
    scp = re.fullmatch(
        r"(?:[^@/:]+@)?([^/:]+):([^/\s]+)/([^/\s]+?)(?:\.git)?/?",
        value,
        flags=re.IGNORECASE,
    )
    if scp and SSH_GITHUB_HOST_PATTERN.fullmatch(scp.group(1)):
        repository = f"{scp.group(2)}/{scp.group(3)}"
        return repository if REPOSITORY_PATTERN.fullmatch(repository) else None

    try:
        parsed = urlparse(value if "://" in value else f"https://{value}")
        hostname = parsed.hostname or ""
    except ValueError:
        return None
    if parsed.scheme.casefold() not in {"http", "https", "ssh"}:
        return None
    exact_github = hostname.casefold() == "github.com"
    ssh_alias = parsed.scheme.casefold() == "ssh" and SSH_GITHUB_HOST_PATTERN.fullmatch(
        hostname
    )
    if not exact_github and not ssh_alias:
        return None
    if parsed.query or parsed.fragment or parsed.params:
        return None
    parts = parsed.path.strip("/").split("/")
    if len(parts) != 2:
        return None
    owner, repository = parts
    if repository.endswith(".git"):
        repository = repository[:-4]
    result = f"{owner}/{repository}"
    return result if REPOSITORY_PATTERN.fullmatch(result) else None
planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies.Stars: 108kUpdated Claude CodeCodexVerifiedInstall
meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "会议纪要".Stars: 108kUpdated Claude CodeCodexVerifiedInstall