Skip to content

nexscope-ai/nexscope-ecommerce-skills / ecommerce-product-ai-visibility

ecommerce.product-ai-visibility

Verified

Product AI Visibility & Ranking — evaluate how AI search engines (ChatGPT, Claude, Gemini, DeepSeek) recommend your product when shoppers ask buying questions. Triggers: AI visibility, product AI ranking, AI recommend, AI search, does AI mention my product.

FileKindSize
.nexscope-manifest.jsonconfig230 B
SKILL.mdskill md14.3 KB
assets/config.jsonconfig388 B
assets/prompts/evaluator.mdmarkdown9.1 KB
config.jsonconfig392 B
profiles/_template/product.mdmarkdown878 B
profiles/_template/queries.csvother1.5 KB
profiles/_template/query_rules.mdmarkdown1.2 KB
profiles/airscape-planetary-design-kilo-coffee-st/product.mdmarkdown1.9 KB
profiles/airscape-planetary-design-kilo-coffee-st/queries.csvother3.2 KB
profiles/airscape-planetary-design-kilo-coffee-st/query_rules.mdmarkdown525 B
profiles/aisi-hair-ombre-blonde-wig-glueless-curl/product.mdmarkdown1.2 KB
profiles/aisi-hair-ombre-blonde-wig-glueless-curl/queries.csvother2.6 KB
profiles/aisi-hair-ombre-blonde-wig-glueless-curl/query_rules.mdmarkdown428 B
profiles/apple-airpods-pro-3/product.mdmarkdown1.1 KB
profiles/apple-airpods-pro-3/queries.csvother2.2 KB
profiles/apple-airpods-pro-3/query_rules.mdmarkdown737 B
profiles/coffee-canister/product.mdmarkdown1.4 KB
profiles/coffee-canister/queries.csvother1.3 KB
profiles/coffee-canister/query_rules.mdmarkdown356 B
profiles/define-jacket-nulu/product.mdmarkdown1.1 KB
profiles/define-jacket-nulu/queries.csvother2.2 KB
profiles/define-jacket-nulu/query_rules.mdmarkdown736 B
profiles/iphone-17-pro/product.mdmarkdown1.3 KB
profiles/iphone-17-pro/queries.csvother2.2 KB
profiles/iphone-17-pro/query_rules.mdmarkdown731 B
profiles/macbook-air-m5/product.mdmarkdown1.0 KB
profiles/macbook-air-m5/queries.csvother2.1 KB
profiles/macbook-air-m5/query_rules.mdmarkdown732 B
profiles/rare-beauty/product.mdmarkdown1.5 KB
profiles/rare-beauty/queries.csvother1.6 KB
profiles/rare-beauty/query_rules.mdmarkdown1.1 KB
profiles/stanley-quencher-h2-0-flowstate-tumbler-/product.mdmarkdown1.4 KB
profiles/stanley-quencher-h2-0-flowstate-tumbler-/queries.csvother2.5 KB
profiles/stanley-quencher-h2-0-flowstate-tumbler-/query_rules.mdmarkdown763 B
scripts/__init__.pyscript0 B
scripts/_next_steps.pyscript10.1 KB
scripts/api_capture_runner.pyscript9.0 KB
scripts/api_client_base.pyscript8.2 KB
scripts/cli.pyscript10.0 KB
scripts/evaluator.pyscript6.9 KB
scripts/html_report.pyscript43.9 KB
scripts/loader.pyscript4.4 KB
scripts/normalizer.pyscript3.0 KB
scripts/preaggregate.pyscript7.0 KB
scripts/profile_builder.pyscript9.5 KB
scripts/send_report_email.pyscript4.4 KB
scripts/task_builder.pyscript2.7 KB
scripts/test_raw_api.pyscript2.6 KB
tmp-tr_4cc43ce22aaa/product_info.jsonconfig2.0 KB
tmp-tr_be2fd13607b6/product_info.jsonconfig2.1 KB

scripts/normalizer.py

View on GitHub
"""Convert API capture results to normalized format."""

import json
from pathlib import Path


def normalize_api_capture(capture_path):
    """Convert a single API capture to normalized format."""
    capture = json.loads(Path(capture_path).read_text(encoding="utf-8"))

    if capture.get("status") == "failed":
        return None

    response_text = capture.get("response_text", "")
    if not response_text:
        return None

    citations = capture.get("citations", [])
    search_results = [
        {
            "title": c.get("title", ""),
            "url": c.get("url", ""),
            "snippet": c.get("snippet", ""),
            "source": "api_citation",
            "rank": c.get("position", i + 1),
            "domain": _extract_domain(c.get("url", "")),
        }
        for i, c in enumerate(citations)
    ]

    return {
        "schema_version": "normalized_response.v1",
        "query_id": capture["query_id"],
        "engine": capture["engine"],
        "timestamp": capture.get("timestamp", ""),
        "query_meta": {"category": capture.get("category", "")},
        "messages": [
            {"role": "user", "content": capture.get("query_text", "")},
            {"role": "assistant", "content": response_text},
        ],
        "response_content": response_text,
        "citations": citations,
        "search_queries": capture.get("search_queries", []),
        "search_results": search_results,
        "engine_metadata": {
            "model_label": capture.get("model", ""),
            "response_id": None,
            "conversation_id": None,
            "message_id": None,
            "raw_network_url": None,
        },
        "quality": {
            "structured_network_used": True,
            "dom_fallback_used": False,
            "partial": False,
            "missing_fields": [],
        },
        "latency_ms": capture.get("latency_ms", 0),
    }


def normalize_run(base_dir, run_dir, resume=False):
    """Normalize all capture files in a run directory."""
    capture_dir = run_dir / "captures"
    normalized_dir = run_dir / "normalized"
    normalized_dir.mkdir(parents=True, exist_ok=True)

    existing = set()
    if resume and normalized_dir.exists():
        existing = {p.stem for p in normalized_dir.glob("*.json")}

    written = []
    for capture_path in sorted(capture_dir.glob("*.json")):
        if capture_path.stem.endswith(".task"):
            continue
        if resume and capture_path.stem in existing:
            continue

        normalized = normalize_api_capture(capture_path)
        if normalized is None:
            continue

        output_path = normalized_dir / capture_path.name
        output_path.write_text(
            json.dumps(normalized, ensure_ascii=False, indent=2), encoding="utf-8"
        )
        written.append(output_path)

    return written


def _extract_domain(url):
    """Extract domain from URL."""
    if not url:
        return ""
    try:
        from urllib.parse import urlparse
        return urlparse(url).netloc
    except Exception:
        return ""
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: 198kUpdated 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