Skip to content

balsm-health/website / .claude/skills/seo

Comprehensive SEO analysis for any website or business type. Full site audits, single-page analysis, technical SEO (crawlability, indexability, Core Web Vitals with INP), schema markup, content quality (E-E-A-T), image optimization, sitemap analysis, and GEO for AI Overviews/ChatGPT/Perplexity. Industry detection for SaaS, e-commerce, local, publishers, agencies. Triggers on: SEO, audit, schema, Core Web Vitals, sitemap, E-E-A-T, AI Overviews, GEO, technical SEO, content quality, page speed.

FileKindSize
LICENSE.txtmarkdown143 B
SKILL.mdskill md16.9 KB
bin/claude-seoexecutablescript1.5 KB
extensions/banana/references/cost-tracking.mdmarkdown1.2 KB
extensions/banana/references/gemini-models.mdmarkdown5.8 KB
extensions/banana/references/mcp-tools.mdmarkdown3.7 KB
extensions/banana/references/post-processing.mdmarkdown5.1 KB
extensions/banana/references/presets.mdmarkdown2.2 KB
extensions/banana/references/prompt-engineering.mdmarkdown20.9 KB
extensions/banana/references/seo-image-presets.mdmarkdown4.0 KB
extensions/banana/scripts/batch.pyexecutablescript3.3 KB
extensions/banana/scripts/cost_tracker.pyexecutablescript7.2 KB
extensions/banana/scripts/edit.pyexecutablescript5.6 KB
extensions/banana/scripts/generate.pyexecutablescript6.4 KB
extensions/banana/scripts/presets.pyexecutablescript4.9 KB
extensions/banana/scripts/setup_mcp.pyexecutablescript4.5 KB
extensions/banana/scripts/validate_setup.pyexecutablescript3.8 KB
hooks/hooks.jsonconfig416 B
hooks/run-python-hook.jsscript1.7 KB
hooks/validate-schema.pyexecutablescript5.9 KB
pdf/google-seo-reference.mdmarkdown8.0 KB
references/backlink-quality.mdmarkdown3.4 KB
references/cwv-thresholds.mdmarkdown6.9 KB
references/eeat-framework.mdmarkdown8.1 KB
references/free-backlink-sources.mdmarkdown5.6 KB
references/local-schema-types.mdmarkdown9.2 KB
references/local-seo-signals.mdmarkdown9.6 KB
references/maps-api-endpoints.mdmarkdown5.9 KB
references/maps-free-apis.mdmarkdown6.0 KB
references/maps-gbp-checklist.mdmarkdown5.9 KB
references/maps-geo-grid.mdmarkdown4.3 KB
references/quality-gates.mdmarkdown5.1 KB
references/schema-types.mdmarkdown7.8 KB
references/thinking-framework.mdmarkdown9.3 KB
requirements.txtmanifest1.5 KB
runtime-plugin.jsonconfig1.5 KB
schema/templates.jsonconfig9.4 KB
scripts/agent_ux_check.pyscript8.2 KB
scripts/analyze_visual.pyexecutablescript7.2 KB
scripts/backlinks_auth.pyscript16.1 KB
scripts/bing_webmaster.pyscript21.8 KB
scripts/capture_screenshot.pyexecutablescript6.4 KB
scripts/commoncrawl_graph.pyscript15.6 KB
scripts/consistency_check.pyscript12.5 KB
scripts/content_humanize.pyscript7.2 KB
scripts/content_quality.pyscript9.7 KB
scripts/content_verify.pyscript7.1 KB
scripts/crux_history.pyscript10.7 KB
scripts/dataforseo_costs.pyscript15.8 KB
scripts/dataforseo_merchant.pyexecutablescript16.7 KB
scripts/dataforseo_normalize.pyexecutablescript14.7 KB
scripts/domain_history.pyscript9.6 KB
scripts/drift_baseline.pyscript13.5 KB
scripts/drift_compare.pyscript22.3 KB
scripts/drift_history.pyscript3.4 KB
scripts/drift_report.pyscript11.0 KB
scripts/fetch_page.pyexecutablescript9.4 KB
scripts/ga4_report.pyscript16.8 KB
scripts/gbp_deprecation_lint.pyexecutablescript4.7 KB
scripts/google_auth.pyscript31.0 KB
scripts/google_report.pyscript97.6 KB
scripts/gsc_inspect.pyscript11.0 KB
scripts/gsc_query.pyscript18.6 KB
scripts/indexing_notify.pyscript10.3 KB
scripts/indexnow_submit.pyscript8.8 KB
scripts/iptc_ai_label.pyscript7.6 KB
scripts/keyword_planner.pyscript10.8 KB
scripts/lcp_subparts.pyscript7.2 KB
scripts/moz_api.pyscript14.7 KB
scripts/nlp_analyze.pyscript12.1 KB
scripts/pagespeed_check.pyscript22.9 KB
scripts/parasite_risk.pyexecutablescript8.6 KB
scripts/parse_html.pyexecutablescript8.8 KB
scripts/portability_check.pyscript7.8 KB
scripts/preload_check.pyscript8.1 KB
scripts/release_sign.pyscript5.6 KB
scripts/render_page.pyscript20.9 KB
scripts/runtime.pyexecutablescript15.1 KB
scripts/schema_ecommerce_validate.pyscript11.8 KB
scripts/schema_generate.pyscript12.0 KB
scripts/seo_updates.pyscript4.8 KB
scripts/sitemap_discovery.pyscript10.0 KB
scripts/sync_flow.pyscript11.9 KB
scripts/ucp_check.pyscript8.4 KB
scripts/unlighthouse_run.pyscript5.6 KB
scripts/url_safety.pyscript22.0 KB
scripts/validate_backlink_report.pyscript11.7 KB
scripts/verify_backlinks.pyscript12.9 KB
scripts/verify_release.pyscript4.8 KB
scripts/youtube_search.pyscript12.3 KB

scripts/indexing_notify.py

View on GitHub
#!/usr/bin/env python3
"""
Google Indexing API v3 - notify Google of URL updates and removals.

Publishes URL_UPDATED or URL_DELETED notifications. Supports single URL
and batch mode (up to 200 URLs/day). Includes quota tracking.

IMPORTANT: The Indexing API is restricted to pages with JobPosting or
BroadcastEvent embedded in a VideoObject. Do not submit ordinary URLs.
URL_UPDATED is not an indexing guarantee; abuse can revoke access. Use
URL Inspection or sitemaps for ordinary URLs.

Usage:
    python indexing_notify.py https://example.com/jobs/123
    python indexing_notify.py https://example.com/jobs/123 --action URL_DELETED
    python indexing_notify.py --batch urls.txt
    python indexing_notify.py --status https://example.com/jobs/123
"""

import argparse
import json
import sys
import time
from typing import Optional

try:
    from googleapiclient.discovery import build
    from googleapiclient.http import BatchHttpRequest
except ImportError:
    print(
        "Error: google-api-python-client required. "
        "Install with: pip install google-api-python-client",
        file=sys.stderr,
    )
    sys.exit(1)

try:
    from google_auth import get_oauth_credentials, validate_url
except ImportError:
    import os
    sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
    from google_auth import get_oauth_credentials, validate_url

INDEXING_SCOPES = ["https://www.googleapis.com/auth/indexing"]
DAILY_QUOTA = 200

SCOPE_WARNING = (
    "NOTE: The Indexing API is for JobPosting and BroadcastEvent embedded "
    "in a VideoObject only. Do not submit ordinary URLs. URL_UPDATED is not "
    "an indexing guarantee; abuse can revoke access. Use URL Inspection or "
    "sitemaps for ordinary URLs."
)


def _build_indexing_service():
    """Build the Indexing API v3 service."""
    credentials = get_oauth_credentials(INDEXING_SCOPES)
    if not credentials:
        return None
    try:
        return build("indexing", "v3", credentials=credentials)
    except Exception as e:
        print(f"Error building Indexing service: {e}", file=sys.stderr)
        return None


def notify_url(
    url: str,
    action: str = "URL_UPDATED",
) -> dict:
    """
    Publish a single URL notification to the Indexing API.

    Args:
        url: The URL to notify about.
        action: 'URL_UPDATED' or 'URL_DELETED'.

    Returns:
        Dictionary with notification result.
    """
    result = {
        "url": url,
        "action": action,
        "notify_time": None,
        "error": None,
    }

    if not validate_url(url):
        result["error"] = "URL rejected: only public http/https URLs are accepted (SSRF protection)"
        return result

    service = _build_indexing_service()
    if not service:
        result["error"] = (
            "Could not build Indexing service. Ensure the service account has "
            "'https://www.googleapis.com/auth/indexing' scope and is added as "
            "Owner in Google Search Console for the target domain."
        )
        return result

    body = {
        "url": url,
        "type": action,
    }

    try:
        response = service.urlNotifications().publish(body=body).execute()
        metadata = response.get("urlNotificationMetadata", {})
        latest = metadata.get("latestUpdate", {}) or metadata.get("latestRemove", {})
        result["notify_time"] = latest.get("notifyTime")
    except Exception as e:
        error_str = str(e)
        if "403" in error_str:
            result["error"] = (
                "Permission denied. The service account must be added as an "
                "Owner in Google Search Console for this domain. "
                "Also ensure the Indexing API is enabled in your GCP project."
            )
        elif "429" in error_str:
            result["error"] = (
                f"Quota exceeded. Daily limit: {DAILY_QUOTA} publish requests. "
                "Apply for a quota increase at https://developers.google.com/search/apis/indexing-api/v3/quota-increase"
            )
        elif "400" in error_str:
            result["error"] = f"Invalid URL or request: {e}"
        else:
            result["error"] = f"Indexing API error: {e}"

    return result


def get_notification_metadata(url: str) -> dict:
    """
    Get the latest notification metadata for a URL.

    Args:
        url: The URL to check.

    Returns:
        Dictionary with latest update and remove timestamps.
    """
    result = {
        "url": url,
        "latest_update": None,
        "latest_remove": None,
        "error": None,
    }

    if not validate_url(url):
        result["error"] = "URL rejected: only public http/https URLs are accepted (SSRF protection)"
        return result

    service = _build_indexing_service()
    if not service:
        result["error"] = "Could not build Indexing service."
        return result

    try:
        response = service.urlNotifications().getMetadata(url=url).execute()
        update = response.get("latestUpdate", {})
        remove = response.get("latestRemove", {})

        if update:
            result["latest_update"] = {
                "url": update.get("url"),
                "type": update.get("type"),
                "notify_time": update.get("notifyTime"),
            }
        if remove:
            result["latest_remove"] = {
                "url": remove.get("url"),
                "type": remove.get("type"),
                "notify_time": remove.get("notifyTime"),
            }
    except Exception as e:
        if "404" in str(e):
            result["error"] = "No notification metadata found for this URL."
        else:
            result["error"] = f"Error fetching metadata: {e}"

    return result


def batch_notify(
    urls: list,
    action: str = "URL_UPDATED",
    delay: float = 0.5,
) -> dict:
    """
    Batch notify multiple URLs with quota awareness.

    Args:
        urls: List of URLs.
        action: 'URL_UPDATED' or 'URL_DELETED'.
        delay: Seconds between requests.

    Returns:
        Dictionary with results and quota usage.
    """
    result = {
        "action": action,
        "total": len(urls),
        "results": [],
        "summary": {"success": 0, "error": 0},
        "quota_warning": None,
        "error": None,
    }

    if len(urls) > DAILY_QUOTA:
        result["quota_warning"] = (
            f"Batch size ({len(urls)}) exceeds daily quota ({DAILY_QUOTA}). "
            f"Only the first {DAILY_QUOTA} URLs will be submitted."
        )
        urls = urls[:DAILY_QUOTA]

    if len(urls) > 50:
        result["quota_warning"] = (
            f"Submitting {len(urls)} URLs will use {len(urls)}/{DAILY_QUOTA} "
            f"of your daily quota."
        )

    for i, url in enumerate(urls):
        url = url.strip()
        if not url:
            continue

        print(f"Notifying [{i + 1}/{len(urls)}]: {url}", file=sys.stderr)

        notification = notify_url(url, action)
        result["results"].append(notification)

        if notification.get("error"):
            result["summary"]["error"] += 1
            # Stop on quota errors
            if "429" in str(notification.get("error", "")):
                result["error"] = "Stopped: daily quota exceeded."
                break
        else:
            result["summary"]["success"] += 1

        if i < len(urls) - 1:
            time.sleep(delay)

    remaining = DAILY_QUOTA - result["summary"]["success"]
    result["estimated_remaining_quota"] = max(0, remaining)

    return result


def main():
    parser = argparse.ArgumentParser(
        description="Google Indexing API v3 - URL notification helper"
    )
    parser.add_argument("url", nargs="?", help="URL to notify")
    parser.add_argument(
        "--action", "-a",
        choices=["URL_UPDATED", "URL_DELETED"],
        default="URL_UPDATED",
        help="Notification type (default: URL_UPDATED)",
    )
    parser.add_argument("--batch", "-b", help="File with URLs (one per line)")
    parser.add_argument("--status", help="Check notification status for a URL")
    parser.add_argument(
        "--delay",
        type=float,
        default=0.5,
        help="Delay between batch requests in seconds (default: 0.5)",
    )
    parser.add_argument("--json", "-j", action="store_true", help="Output as JSON")

    args = parser.parse_args()

    if args.status:
        result = get_notification_metadata(args.status)
    elif args.batch:
        print(SCOPE_WARNING, file=sys.stderr)
        try:
            with open(args.batch, "r") as f:
                urls = [line.strip() for line in f if line.strip()]
        except IOError as e:
            print(f"Error reading batch file: {e}", file=sys.stderr)
            sys.exit(1)
        result = batch_notify(urls, args.action, delay=args.delay)
    elif args.url:
        print(SCOPE_WARNING, file=sys.stderr)
        result = notify_url(args.url, args.action)
    else:
        parser.print_help()
        sys.exit(1)

    if args.json:
        print(json.dumps(result, indent=2))
    else:
        if result.get("error"):
            print(f"Error: {result['error']}", file=sys.stderr)

        if args.status:
            print(f"=== Notification Status: {args.status} ===")
            update = result.get("latest_update")
            remove = result.get("latest_remove")
            if update:
                print(f"  Latest Update: {update.get('notify_time')} ({update.get('type')})")
            if remove:
                print(f"  Latest Remove: {remove.get('notify_time')} ({remove.get('type')})")
            if not update and not remove and not result.get("error"):
                print("  No notifications found.")
        elif args.batch:
            summary = result.get("summary", {})
            print(f"=== Batch Indexing Notification ===")
            print(f"Action: {args.action}")
            print(f"Total: {result.get('total', 0)} | Success: {summary.get('success', 0)} | Errors: {summary.get('error', 0)}")
            print(f"Estimated remaining daily quota: {result.get('estimated_remaining_quota', '?')}")
            if result.get("quota_warning"):
                print(f"Warning: {result['quota_warning']}")
        else:
            if result.get("notify_time"):
                print(f"Notified: {result['url']} ({result['action']}) at {result['notify_time']}")
            elif not result.get("error"):
                print(f"Notification sent for: {result['url']} ({result['action']})")


if __name__ == "__main__":
    main()
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall