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/loader.py

View on GitHub
"""Load configuration and queries."""

import csv
import json
from datetime import date
from pathlib import Path


CURRENT_YEAR = str(date.today().year)


class AppConfig:
    """App runtime configuration."""
    def __init__(self, profile, engines, engine_configs=None, runs_dir="data/runs",
                 api_parallel=4, eval_parallel=4, eval_batch_size=3, subagent_parallelism=2,
                 capture_timeout_ms=60000, eval_timeout_s=120, eval_max_retries=2,
                 engine_concurrency=None, base_dir=None):
        self.profile = profile
        self.engines = engines
        self.engine_configs = engine_configs or {}
        self.runs_dir = Path(runs_dir)
        self.api_parallel = api_parallel
        self.eval_parallel = eval_parallel
        self.eval_batch_size = eval_batch_size
        self.subagent_parallelism = subagent_parallelism
        self.capture_timeout_ms = capture_timeout_ms
        self.eval_timeout_s = eval_timeout_s
        self.eval_max_retries = eval_max_retries
        self.engine_concurrency = engine_concurrency or {}
        self.base_dir = base_dir or Path(".")


class Query:
    """Single evaluation query."""
    def __init__(self, id, query, category="", user_persona="", notes=""):
        self.id = id
        self.query = query
        self.category = category
        self.user_persona = user_persona
        self.notes = notes


def load_config(base_dir=None):
    """Load config.json and return AppConfig."""
    base_dir = Path(base_dir) if base_dir else Path(".")
    config_path = base_dir / "config.json"
    if not config_path.exists():
        raise FileNotFoundError(f"Config not found: {config_path}")

    raw = json.loads(config_path.read_text(encoding="utf-8"))

    engines = raw.get("engines", [])
    if isinstance(engines, list) and engines and isinstance(engines[0], dict):
        engine_names = [e["name"] for e in engines]
        engine_configs = {e["name"]: e for e in engines}
    elif isinstance(engines, list):
        engine_names = engines
        engine_configs = {}
    else:
        engine_names = []
        engine_configs = {}

    return AppConfig(
        profile=raw.get("profile", ""),
        engines=engine_names,
        engine_configs=engine_configs,
        runs_dir=raw.get("runs_dir", "data/runs"),
        api_parallel=int(raw.get("api_parallel", 4)),
        eval_parallel=int(raw.get("eval_parallel", 4)),
        eval_batch_size=int(raw.get("eval_batch_size", 3)),
        subagent_parallelism=int(raw.get("subagent_parallelism", 2)),
        capture_timeout_ms=int(raw.get("capture_timeout_ms", 60000)),
        eval_timeout_s=int(raw.get("eval_timeout_s", 120)),
        eval_max_retries=int(raw.get("eval_max_retries", 2)),
        engine_concurrency=raw.get("engine_concurrency", {}),
        base_dir=base_dir,
    )


def load_queries(config, profile=None):
    """Load queries from profiles/{profile}/queries.csv with {{year}} injection."""
    profile_name = profile or config.profile
    csv_path = config.base_dir / "profiles" / profile_name / "queries.csv"
    if not csv_path.exists():
        raise FileNotFoundError(f"queries.csv not found: {csv_path}")

    queries = []
    with csv_path.open("r", encoding="utf-8", newline="") as f:
        for row in csv.DictReader(f):
            query_id = (row.get("id") or "").strip()
            query_text = (row.get("query") or "").strip()
            if not query_id or not query_text:
                continue
            # Inject current year
            query_text = query_text.replace("{{year}}", CURRENT_YEAR)
            queries.append(Query(
                id=query_id,
                query=query_text,
                category=(row.get("category") or "").strip(),
                user_persona=(row.get("user_persona") or "").strip(),
                notes=(row.get("notes") or "").strip(),
            ))
    return queries


def load_product_info(config, profile=None):
    """Load product.md for the given profile."""
    profile_name = profile or config.profile
    path = config.base_dir / "profiles" / profile_name / "product.md"
    if path.exists():
        return path.read_text(encoding="utf-8")
    return ""


def filter_queries(queries, ids=None, category=None):
    """Filter queries by ID list or category."""
    if ids:
        id_set = set(ids)
        return [q for q in queries if q.id in id_set]
    if category:
        return [q for q in queries if q.category == category]
    return queries
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