Skip to content

code-yeongyu/oh-my-openagent / packages/shared-skills/skills/ultimate-browsing

ultimate-browsing

Flagged

Reaches web pages the user's browser cannot open: WAF-blocked and bot-scored hosts, platform-native readers (Chinese and social platforms), archive snapshots with provenance, and a browser you own for stealth or throwaway profiles. Not for plain search, an unblocked static fetch, or a page the user's browser can open.

FileKindSize
.gitignoreother29 B
ATTRIBUTION.mdmarkdown2.5 KB
SKILL.mdskill md11.9 KB
engine/AGENTS.mdmarkdown10.8 KB
engine/__init__.pyscript668 B
engine/__main__.pyscript5.0 KB
engine/bias_check.pyscript7.1 KB
engine/curl_probe.pyscript2.4 KB
engine/executor.pyscript8.0 KB
engine/fetch_chain.pyscript13.0 KB
engine/referers.pyscript327 B
engine/result_schema.pyscript1.5 KB
engine/summary.pyscript1.2 KB
engine/surrogate.pyscript7.9 KB
engine/surrogates.yamlconfig2.3 KB
engine/templates/knip.workspace.jsoncother1.5 KB
engine/templates/package.jsonmanifest349 B
engine/templates/playwright_mobile_chrome.jsscript3.6 KB
engine/templates/playwright_real_chrome.jsscript5.5 KB
engine/tests/fixtures/amp_redirect_stub.htmlother323 B
engine/tests/fixtures/search_interstitial.htmlother90.4 KB
engine/tests/fixtures/wayback_available.jsonconfig246 B
engine/tests/fixtures/wayback_snapshot.htmlother181.4 KB
engine/tests/test_executor_timeout.pyscript6.2 KB
engine/tests/test_fetch_chain.pyscript2.7 KB
engine/tests/test_playwright_stealth.pyscript3.9 KB
engine/tests/test_playwright_templates.pyscript10.7 KB
engine/tests/test_surrogate.pyscript11.3 KB
engine/tests/test_surrogate_validators.pyscript3.5 KB
engine/url_transforms.pyscript3.2 KB
engine/validators.pyscript9.1 KB
engine/waf_detector.pyscript6.9 KB
engine/waf_profiles.yamlconfig6.2 KB
references/agent-reach/README.mdmarkdown2.2 KB
references/agent-reach/career.mdmarkdown755 B
references/agent-reach/dev.mdmarkdown1.3 KB
references/agent-reach/search.mdmarkdown821 B
references/agent-reach/social.mdmarkdown5.6 KB
references/agent-reach/video.mdmarkdown2.7 KB
references/agent-reach/web.mdmarkdown2.1 KB
references/chrome-stealth.mdmarkdown2.4 KB
references/insane-search/README.mdmarkdown20.2 KB
references/insane-search/cache-archive.mdmarkdown4.1 KB
references/insane-search/fallback.mdmarkdown6.9 KB
references/insane-search/jina.mdmarkdown4.3 KB
references/insane-search/json-api.mdmarkdown3.5 KB
references/insane-search/media.mdmarkdown3.5 KB
references/insane-search/metadata.mdmarkdown2.9 KB
references/insane-search/naver.mdmarkdown3.4 KB
references/insane-search/playwright.mdmarkdown6.8 KB
references/insane-search/public-api.mdmarkdown3.4 KB
references/insane-search/rss.mdmarkdown3.0 KB
references/insane-search/tls-impersonate.mdmarkdown6.5 KB
references/insane-search/twitter.mdmarkdown3.5 KB
scripts/cookie_crypto.pyscript2.9 KB
scripts/cookie_domains.pyscript1.1 KB
scripts/cookie_paths.pyscript3.8 KB
scripts/extract_cookies.pyscript9.4 KB
scripts/tests/test_cookie_domain_filter.pyscript3.5 KB
scripts/tests/test_extract_cookies.pyscript9.4 KB

scripts/cookie_paths.py

View on GitHub
"""Pure profile-path resolution for cross-platform cookie extraction."""
from __future__ import annotations

import os
from pathlib import Path
from typing import Final, Literal, TypedDict, assert_never


class UnsupportedPlatform(ValueError):
    """Raised when a browser/platform combination is not supported."""


BrowserKind = Literal["chromium", "firefox"]


class BrowserDirs(TypedDict):
    darwin: str
    linux: str
    win32: str


class BrowserSpec(TypedDict):
    kind: BrowserKind
    safe_storage: str | None
    dirs: BrowserDirs


BROWSERS: Final[dict[str, BrowserSpec]] = {
    "chrome": {
        "kind": "chromium",
        "safe_storage": "Chrome Safe Storage",
        "dirs": {"darwin": "Google/Chrome", "linux": "google-chrome", "win32": "Google/Chrome/User Data"},
    },
    "brave": {
        "kind": "chromium",
        "safe_storage": "Brave Safe Storage",
        "dirs": {
            "darwin": "BraveSoftware/Brave-Browser",
            "linux": "BraveSoftware/Brave-Browser",
            "win32": "BraveSoftware/Brave-Browser/User Data",
        },
    },
    "chromium": {
        "kind": "chromium",
        "safe_storage": "Chromium Safe Storage",
        "dirs": {"darwin": "Chromium", "linux": "chromium", "win32": "Chromium/User Data"},
    },
    "firefox": {
        "kind": "firefox",
        "safe_storage": None,
        "dirs": {"darwin": "Firefox/Profiles", "linux": ".mozilla/firefox", "win32": "Mozilla/Firefox/Profiles"},
    },
}

CHROMIUM_PROFILE_DIRS: Final = ["Default", "Profile 1", "Profile 2"]


def platform_base(platform: str, kind: BrowserKind) -> Path:
    home = Path.home()
    match platform:
        case "darwin":
            return home / "Library" / "Application Support"
        case "linux":
            match kind:
                case "firefox":
                    return home
                case "chromium":
                    return Path(os.environ.get("XDG_CONFIG_HOME", str(home / ".config")))
                case unreachable:
                    assert_never(unreachable)
        case "win32":
            return Path(os.environ.get("LOCALAPPDATA", str(home / "AppData" / "Local")))
        case _:
            raise UnsupportedPlatform(f"unsupported platform: {platform!r}")


def browser_dir(spec: BrowserSpec, platform: str) -> str:
    match platform:
        case "darwin":
            return spec["dirs"]["darwin"]
        case "linux":
            return spec["dirs"]["linux"]
        case "win32":
            return spec["dirs"]["win32"]
        case _:
            raise UnsupportedPlatform(f"browser not mapped for platform {platform!r}")


def resolve_cookie_db(browser: str, platform: str, base_override: Path | None = None) -> Path:
    spec = BROWSERS.get(browser)
    if spec is None:
        raise UnsupportedPlatform(f"unsupported browser: {browser!r}")
    base = base_override if base_override is not None else platform_base(platform, spec["kind"])
    profile_root = base / browser_dir(spec, platform)

    match spec["kind"]:
        case "firefox":
            if not profile_root.exists():
                raise FileNotFoundError(f"no Firefox profile root at {profile_root}")
            for entry in sorted(profile_root.iterdir()):
                db = entry / "cookies.sqlite"
                if db.exists():
                    return db
            raise FileNotFoundError(f"no cookies.sqlite under {profile_root}")
        case "chromium":
            for profile in CHROMIUM_PROFILE_DIRS:
                for candidate in (profile_root / profile / "Cookies", profile_root / profile / "Network" / "Cookies"):
                    if candidate.exists():
                        return candidate
            raise FileNotFoundError(f"no Cookies DB under {profile_root}")
        case unreachable:
            assert_never(unreachable)
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 197kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall