Skip to content

Bhanunamikaze/Agentic-SEO-Skill

Deterministic LLM-first SEO audits for websites, blog posts, and GitHub repositories. Use this when the user asks to "perform SEO analysis", "run SEO audit", "analyze SEO", "check technical SEO", "review schema", "Core Web Vitals", "E-E-A-T", "hreflang", "GEO", "AEO", or GitHub repository SEO optimization. For full/page/repo audits, run bundled scripts for evidence and return prioritized, confidence-labeled fixes.

FileKindSize
SKILL.mdskill md19.4 KB
scripts/__init__.pyscript34 B
scripts/a11y_seo_checker.pyscript3.4 KB
scripts/ai_crawler_policy_matrix.pyscript2.2 KB
scripts/analyze_visual.pyexecutablescript6.5 KB
scripts/anchor_text_audit.pyscript7.7 KB
scripts/answer_block_scanner.pyscript3.9 KB
scripts/article_seo.pyscript27.1 KB
scripts/audit_runner.pyscript3.1 KB
scripts/broken_links.pyscript8.3 KB
scripts/cache_compression_checker.pyscript6.7 KB
scripts/canonical_checker.pyscript3.4 KB
scripts/capture_screenshot.pyexecutablescript4.4 KB
scripts/citation_readiness.pyscript5.1 KB
scripts/collection_page_checker.pyscript4.2 KB
scripts/competitor_gap.pyscript10.2 KB
scripts/content_decay_detector.pyscript6.2 KB
scripts/content_intent_matcher.pyscript5.4 KB
scripts/crawl_audit.pyscript7.2 KB
scripts/critical_request_chain.pyscript4.8 KB
scripts/duplicate_content.pyscript14.0 KB
scripts/eeat_signal_checker.pyscript5.5 KB
scripts/entity_checker.pyscript19.4 KB
scripts/env_loader.pyscript3.6 KB
scripts/external_link_quality.pyscript6.6 KB
scripts/faceted_nav_audit.pyscript3.3 KB
scripts/fetch_page.pyexecutablescript3.6 KB
scripts/finding_verifier.pyscript4.9 KB
scripts/font_audit.pyscript5.9 KB
scripts/freshness_checker.pyscript6.2 KB
scripts/generate_report.pyscript80.7 KB
scripts/github_api.pyscript12.8 KB
scripts/github_community_health.pyscript8.9 KB
scripts/github_competitor_research.pyscript17.2 KB
scripts/github_readme_lint.pyscript14.9 KB
scripts/github_repo_audit.pyscript21.0 KB
scripts/github_search_benchmark.pyscript7.7 KB
scripts/github_seo_report.pyscript32.0 KB
scripts/github_traffic_archiver.pyscript6.3 KB
scripts/github_weekly_scorecard.pyscript4.4 KB
scripts/gsc_checker.pyscript11.4 KB
scripts/hreflang_checker.pyscript24.2 KB
scripts/hreflang_sitemap_validator.pyscript6.4 KB
scripts/image_inventory.pyscript2.8 KB
scripts/image_weight_audit.pyscript4.8 KB
scripts/indexability_matrix.pyscript3.5 KB
scripts/indexnow_checker.pyscript9.4 KB
scripts/internal_links.pyscript10.5 KB
scripts/javascript_render_audit.pyscript2.9 KB
scripts/lcp_subparts.pyscript7.3 KB
scripts/lib/__init__.pyscript46 B
scripts/lib/safe_http.pyscript6.1 KB
scripts/lighthouse_runner.pyscript6.0 KB
scripts/link_profile.pyscript12.5 KB
scripts/llms_txt_checker.pyscript7.5 KB
scripts/llms_txt_generator.pyscript2.9 KB
scripts/local_seo_checker.pyscript3.7 KB
scripts/log_file_analyzer.pyscript6.0 KB
scripts/mobile_render_checker.pyscript6.9 KB
scripts/orphan_pages_from_sitemap.pyscript6.2 KB
scripts/pagespeed.pyscript12.9 KB
scripts/parse_html.pyexecutablescript12.2 KB
scripts/pre_commit_seo_check.shexecutablescript2.9 KB
scripts/product_schema_checker.pyscript4.9 KB
scripts/readability.pyscript14.5 KB
scripts/redirect_backlink_reclaim.pyscript5.7 KB
scripts/redirect_checker.pyscript6.2 KB
scripts/reference_freshness.pyexecutablescript2.9 KB
scripts/repo_docs_site_checker.pyscript5.7 KB
scripts/repo_file_inventory.pyscript3.6 KB
scripts/repo_release_seo.pyscript6.6 KB
scripts/repo_social_preview_checker.pyscript4.1 KB
scripts/repo_topic_suggester.pyscript6.3 KB
scripts/review_schema_checker.pyscript4.0 KB
scripts/rich_results_guard.pyscript3.4 KB
scripts/robots_checker.pyscript7.2 KB
scripts/robots_path_tester.pyscript1.8 KB
scripts/schema_diff.pyscript3.1 KB
scripts/schema_required_props.pyscript8.1 KB
scripts/schema_template_generator.pyscript5.4 KB
scripts/security_headers.pyscript6.8 KB
scripts/seo_common.pyscript14.1 KB
scripts/sitemap_checker.pyscript6.5 KB
scripts/sitemap_generator.pyscript3.4 KB
scripts/social_meta.pyscript8.7 KB
scripts/third_party_script_audit.pyscript4.7 KB
scripts/topical_cluster_mapper.pyscript6.4 KB
scripts/url_quality.pyscript2.5 KB
scripts/validate_schema.pyexecutablescript4.3 KB
scripts/validate_skill_inventory.pyexecutablescript4.8 KB
scripts/video_schema_checker.pyscript3.6 KB
scripts/visual_regression_snapshot.pyscript5.3 KB
scripts/x_robots_header_checker.pyscript2.0 KB

scripts/github_search_benchmark.py

View on GitHub
#!/usr/bin/env python3
"""
GitHub Search Benchmark

Benchmarks repository visibility for a deterministic set of search queries.

Usage:
  python github_search_benchmark.py --repo owner/repo --query "seo skill" --json
  python github_search_benchmark.py --repo owner/repo --query-file queries.txt --max-pages 2
"""

import argparse
import json
import os
import sys
from datetime import datetime, timezone

from github_api import (
    GitHubAPIError,
    auth_context,
    fetch_json,
    get_token,
    resolve_repo,
)


def utc_now_iso() -> str:
    return datetime.now(timezone.utc).replace(microsecond=0).isoformat()


def _dedupe(values: list) -> list:
    out = []
    seen = set()
    for item in values:
        key = item.lower().strip()
        if key and key not in seen:
            out.append(item.strip())
            seen.add(key)
    return out


def load_queries(args) -> list:
    queries = []
    if args.query:
        queries.extend([q.strip() for q in args.query if q.strip()])
    if args.query_file:
        if not os.path.exists(args.query_file):
            raise GitHubAPIError(f"Query file not found: {args.query_file}")
        with open(args.query_file, "r", encoding="utf-8") as f:
            for line in f:
                text = line.strip()
                if text and not text.startswith("#"):
                    queries.append(text)
    return _dedupe(queries)


def run_query(repo: str, query: str, token: str, per_page: int, max_pages: int, provider: str) -> dict:
    target_rank = None
    competitors = []
    sampled = 0
    total_count = None
    errors = []

    for page in range(1, max_pages + 1):
        params = {"q": query, "per_page": per_page, "page": page}
        try:
            response = fetch_json(
                "/search/repositories",
                token=token,
                params=params,
                provider=provider,
                timeout=35,
            )
            data = response.get("data", {})
        except GitHubAPIError as exc:
            errors.append(f"Page {page}: {exc} (status: {exc.status or 'unknown'})")
            break

        if total_count is None:
            total_count = data.get("total_count", 0)

        items = data.get("items", [])
        if not items:
            break

        for item in items:
            sampled += 1
            full_name = (item.get("full_name") or "").lower()
            if target_rank is None and full_name == repo.lower():
                target_rank = sampled
            if len(competitors) < 10 and full_name != repo.lower():
                competitors.append(
                    {
                        "full_name": item.get("full_name"),
                        "stargazers_count": item.get("stargazers_count", 0),
                        "description": item.get("description") or "",
                        "topics": item.get("topics") or [],
                        "html_url": item.get("html_url"),
                    }
                )

        if target_rank is not None and len(competitors) >= 5:
            break

    return {
        "query": query,
        "total_count": total_count,
        "sampled_results": sampled,
        "target_rank": target_rank,
        "target_found": target_rank is not None,
        "top_competitors": competitors[:5],
        "errors": errors,
    }


def summarize(results: list) -> dict:
    found = [r for r in results if r.get("target_found")]
    not_found = [r["query"] for r in results if not r.get("target_found")]
    avg_rank = None
    if found:
        avg_rank = round(sum(r["target_rank"] for r in found) / len(found), 2)
    return {
        "queries_total": len(results),
        "queries_found": len(found),
        "queries_not_found": len(not_found),
        "not_found_queries": not_found,
        "average_rank_when_found": avg_rank,
    }


def print_text(report: dict):
    print(f"\nGitHub Search Benchmark: {report.get('repo')}")
    print("=" * 60)
    summary = report.get("summary", {})
    print(
        f"Found in {summary.get('queries_found', 0)}/{summary.get('queries_total', 0)} queries | "
        f"Average rank when found: {summary.get('average_rank_when_found', 'NA')}"
    )
    if report.get("limitations"):
        print("\nLimitations:")
        for item in report["limitations"]:
            print(f"- {item}")
    print("\nQueries:")
    for item in report.get("results", []):
        rank = item["target_rank"] if item["target_rank"] is not None else "Not found"
        print(f"- {item['query']}: rank={rank}, sampled={item['sampled_results']}, total={item['total_count']}")


def main():
    parser = argparse.ArgumentParser(description="Benchmark repository visibility across GitHub search queries.")
    parser.add_argument("--repo", help="Repository slug or URL (owner/repo). If omitted, infer from git origin.")
    parser.add_argument("--token", help="GitHub token override. Prefer env vars GITHUB_TOKEN or GH_TOKEN.")
    parser.add_argument("--query", action="append", help="Search query (repeatable).")
    parser.add_argument("--query-file", help="Path to newline-delimited query file.")
    parser.add_argument("--per-page", type=int, default=50, help="Results per page (default: 50, max: 100).")
    parser.add_argument("--max-pages", type=int, default=2, help="Max pages per query (default: 2).")
    parser.add_argument(
        "--provider",
        choices=["auto", "api", "gh"],
        default="auto",
        help="GitHub data provider mode (default: auto).",
    )
    parser.add_argument("--json", action="store_true", help="Output JSON.")
    parser.add_argument("--output", help="Write JSON report to file path.")
    args = parser.parse_args()

    try:
        repo = resolve_repo(args.repo)
        token = get_token(args.token)
        queries = load_queries(args)
    except GitHubAPIError as exc:
        print(f"Error: {exc}", file=sys.stderr)
        sys.exit(2)

    per_page = max(1, min(100, args.per_page))
    max_pages = max(1, args.max_pages)

    report = {
        "timestamp_utc": utc_now_iso(),
        "repo": repo,
        "auth_context": auth_context(token=token),
        "token_present": bool(token),
        "queries": queries,
        "results": [],
        "limitations": [],
    }

    if not token:
        ctx = report["auth_context"]
        if ctx.get("gh_authenticated"):
            report["limitations"].append(
                "No GitHub token found. Using authenticated gh CLI fallback for search."
            )
        elif ctx.get("gh_available"):
            report["limitations"].append(
                "No GitHub token found and gh CLI is not authenticated. Run `gh auth login -h github.com` or set GITHUB_TOKEN/GH_TOKEN."
            )
        else:
            report["limitations"].append(
                "No GitHub token found and gh CLI is unavailable. Search may be rate-limited; set GITHUB_TOKEN/GH_TOKEN."
            )

    if not queries:
        report["limitations"].append(
            "No queries provided. Supply `--query` or `--query-file` using LLM/web-search-derived intent keywords."
        )
    else:
        for query in queries:
            result = run_query(
                repo=repo,
                query=query,
                token=token,
                per_page=per_page,
                max_pages=max_pages,
                provider=args.provider,
            )
            if result.get("errors"):
                report["limitations"].extend([f"{query}: {err}" for err in result["errors"]])
            report["results"].append(result)

    report["summary"] = summarize(report["results"])

    if args.output:
        with open(args.output, "w", encoding="utf-8") as f:
            json.dump(report, f, indent=2)

    if args.json:
        print(json.dumps(report, indent=2))
    else:
        print_text(report)


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: 471kUpdated 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: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated 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