⏳ This skill is pending AI review.
Scores will appear once the review pipeline completes.
seo-scan
>-
Choose how to use this skill
You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.
1. Native installer
This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.
Do not guess an installer command or replace an existing version without reviewing the diff.
2. Complete package recommended
Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.
No complete ProSkills package is published for this listing yet.3. Prompt-only
Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.
Need only the instruction file?
Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.
No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.
// RATINGS
Not yet listed on ClawHub or SkillsMP
// README
Narwhal scans a web page or whole site for SEO and GEO/LLMO (visibility in
AI answer engines) and hands back a prioritized, fix-first report. It ships as
an agent skill: use it from Claude Code via
SKILL.md, or from any agent that reads
AGENTS.md — Codex, Cursor, OpenCode, and friends.
Default scans need no accounts or API keys and send no telemetry. They fetch the requested site and related audit resources; external data integrations are opt-in. Narwhal runs on a bare Python install, with additional extraction and rendering paths available through optional libraries.
Use Narwhal as an audit assistant, not a final SEO verdict. Check findings against their evidence and your site's intent before changing anything. Its score summarizes reported findings, not page quality or measured ranking/AI citation performance. Passing tests do not establish real-world accuracy; see how to interpret scores and verification.
Why "Narwhal"?
The narwhal is the perfect mascot for a search-and-AI-visibility tool:
- The tusk is a sensor, not a weapon. A narwhal's tusk is packed with millions of nerve endings that read tiny changes in the water around it. Narwhal the tool does the same for a page — it senses the subtle, easy-to-miss signals (meta, canonical, schema, crawler directives and editorial text cues) that help you investigate a page's presentation and accessibility—not predict visibility.
- It navigates dark, opaque water. Narwhals thrive in deep, ice-covered Arctic seas using sound, surfacing where nothing else can. Modern search and AI answer engines are exactly that kind of murky water — Narwhal helps you navigate it.
- The "unicorn of the sea." Rare and unmistakable. That's the whole goal of SEO and GEO: to be the distinctive result that ranks and gets cited by AI, not one of the anonymous many.
- It dives deep. Deep audits, not surface-level checks.
And yes, it works as a backronym too: Navigate AI Rankings, Web Health And LLM-visibility.
What it checks
| Area | Highlights |
|---|---|
| Technical SEO | title/meta, headings, canonical, robots directives, viewport/mobile, hreflang, images, links, HTTP hygiene, robots.txt, sitemap |
| Content & E-E-A-T | scoped text-length/readability cues, author/date candidates, Open Graph / Twitter cards |
| Structured data | JSON-LD + Microdata + bounded schema.org RDFa detection, required/recommended property validation, merchant checks, source-backed Google feature-retirement notes, JSON-LD generation |
| E-commerce | evidence-gated Product detection; Product/Offer/AggregateOffer completeness; variants; expired prices; visible-vs-schema price, currency, availability, SKU, and brand consistency |
| GEO / LLMO | contextual review of question-heading, sentence-group, statistic/citation and intro cues—not measured citability—plus llms.txt and role-aware search/retrieval robots policies, with separate non-scoring training/data-use notes |
| Search performance (opt-in) | real Google Search Console query data: striking-distance queries, CTR laggards, decaying pages, keyword cannibalization |
| Site structure | sampled click depth and start coverage, orphan-page candidates (sitemap vs crawl), inbound-link counts (not measured link equity) — observations stay visible even with zero inter-page edges |
| Competitor gaps | narwhal compare <you> <rival…>: same auditors on every page, then a gap analysis — schema types, meta strategy, structure, social packaging, with separate neutral length and statistic/citation-pattern observations (local-first; on-page facts only). Your first URL must load as HTML; failed competitors can be skipped, but never become "You". |
| Content briefs | narwhal brief <you> <rival…>: a page-grounded writing plan — competitor gaps, heading-review candidates, questions, schema and structure candidates. Add --gsc for own-page queries, or --topic "…" --gsc-site <your-site> for adjacent topic queries (Python/MCP: gsc_site). Matching question queries feed the writing plan; default briefs do not query account services |
GEO text-cue checks expose literal counts and limits in meta.geo_text_cues.
English-oriented patterns do not measure answer accuracy, actual paragraphs,
source validity or citation likelihood. Their low-priority advice keeps edits
conditional; configured ranges and matches are not engine requirements. Legacy
rule IDs remain, but displayed titles change. Priority corrections can raise a
score without changing a page. See the check boundaries.
Attribution checks capture bounded metadata, author-link and short leading byline-like candidates, not verified writers or expertise. Ordinary prose words and blank author metadata do not pass. Missing article cues prompt low contextual review, not an anonymity verdict; never invent people or credentials to close a finding. Scans and comparisons use the same observer, with JSON receipts and literal page-report witnesses. See scope and limitations.
Date checks likewise record bounded metadata/selected-text candidates, not verified publication/update dates or freshness. Scans, comparisons and briefs use the same observer: modified-only metadata counts, blank metadata and a copyright year alone do not. A missing article cue invites conditional review, not invented dates or cosmetic refreshes; compared pages do not set a date quota. See date-cue scope and compatibility.
Common-phrase checks are editorial review prompts, not AI-authorship detectors. Quoted examples may be appropriate for the audience; neither matches nor their absence establish originality, helpfulness or ranking impact. The four-distinct-phrase advisory is now low priority (previously medium), so that score correction is not a page improvement. Stable rule IDs remain; update title-based ignore filters for the revised labels and interpretation.
Configured filler-list matches and vocabulary ratios are also low contextual reviews, with exact ASCII-pattern counts and extraction basis—not padding or thin/spun-content diagnoses. Keep useful quot
// HOW IT'S BUILT
// FILES
339 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.
skills/seo-scan/SKILL.md31 KB007182ce26d3upstream ↗
--- name: seo-scan description: >- Audit a web page or site for SEO and GEO/LLMO (AI-search) readiness. Use when the user wants to scan, audit, or improve a URL's search visibility — technical SEO, on-page content and E-E-A-T, schema.org/JSON-LD structured data, or how well a page can be cited by AI answer engines (ChatGPT, Claude, Perplexity, Google AI Overviews). Also use to generate valid JSON-LD or check AI-crawler access. Triggers: "SEO audit", "check my meta tags", "why isn't this ranking", "make this page AI-search friendly", "GEO", "LLMO", "structured data", "llms.txt". license: MIT --- # SEO & GEO/LLMO Scan A local-first toolkit that audits a page or site for classic SEO **and** GEO/LLMO (Generative Engine Optimization — being cited by AI answer engines). It fetches the real page, runs four auditors, and returns a prioritized, fix-first report. No accounts or API keys are required. ## When to use this skill - Auditing a page or whole site for search visibility. - Diagnosing why a page underperforms (thin content, missing meta, no schema). - Preparing content to be **cited by AI answers**, not just to rank in blue links. - Generating correct schema.org JSON-LD. - Checking whether AI crawlers (GPTBot, ClaudeBot, PerplexityBot…) can access a site. ## Setup Scripts run on a bare Python 3.8+ install. For higher-fidelity parsing and JS rendering, optionally install the extras (the tools auto-detect them): ``` pip install -r skills/seo-scan/requirements.txt python -m playwright install chromium # only needed for --render ``` ## How to run All scripts live in `scripts/`. Run them and read the report back to the user in your own words — lead with the highest-severity fixes. **Comprehensive site audit** (the flagship `audit` action — combines a homepage audit + site crawl + sitemap validation into one report): ``` python scripts/audit.py https://example.com ``` **Audit one page** (Markdown report to stdout): ``` python scripts/scan.py https://example.com/page ``` Useful flags: - `--render` — render JavaScript with Playwright and compare paired served/ rendered snapshots: selected-text equality, whitespace-token deltas, headings and metadata presence/block counts. `js_dependence.text_comparison` records scope; legacy `js_only_pct` is a positive net count delta, not JS-only content. Equal counts can hide replacement text. Review differences manually before SSR/metadata edits; do not infer JS causation, crawler access or citation impact. Missing legacy receipts do not certify content parity or server rendering. - `--format json|html|pdf` — machine-readable JSON, a self-contained styled HTML report, or PDF (needs WeasyPrint; falls back to HTML). Use `-o <file>` to save. `html`/`pdf` also work on `audit.py` for a shareable, stakeholder-ready report. - `--only technical,geo` — run a subset: `technical`, `content`, `schema`, `geo`. Unknown names and empty comma-separated entries fail before fetching (CLI exit 2); MCP follows the same rule. Omitted/empty selection runs all four. - Image checks run by default on single-page scans (a few HEADs + one ~64 KB ranged GET): heavy images (>200 KB), legacy formats worth AVIF/WebP, missing width/height (CLS), and og:image validation (reachable? real dimensions?). Skip with `--no-image-checks`; crawls skip them automatically. - The schema auditor conditionally applies a merchant bar to evidenced product pages: Product/Offer completeness, ProductGroup variants, expired prices, and explicit visible-vs-schema price/currency/availability/SKU/brand consistency. Ordinary pages and editorial Product reviews are not treated as stores. - `--fail-under N` — exit non-zero if the score is below `N` (CI quality gate; `crawl_site.py` gates on the average score). **Compare against competitors** (local-first — your page first, then 1-3 competitor pages; same auditors run on each, then a gap analysis): ``` python scripts/compare.py https://you.com/page https://rival.com/page ``` Reports a scoreboard, a side-by-side fact table, **"Gaps to close"** (what they have that you don't: schema types, meta strategy, question headings, social packaging) and **"Where you lead"**. Honesty rule: it compares the recorded HTML snapshots (served or rendered, as labelled) — never claim a gap explains rankings. Text length is a neutral whitespace-token observation, not a depth gap/lead or writing target. Legacy `words` values without a recorded basis stay unverified. No rank/keyword data is used or implied. Statistic/citation-pattern counts are likewise observations, not verified sources or evidence-density gaps. `evidence_cues` explains the basis and unchecked source validity; legacy `stats_cites` alone does not supply a measurement basis. Question-heading differences are optional contextual reviews using exact `question_cues` counts, not the preserved rounded `question_ratio`. The one-in-five heuristic does not establish real queries or engine matching; keep useful descriptive headings and use questions only when helpful. Missing counts/basis and no eligible headings are not interpreted as a measured low fraction. `schema_search_features` carries a dated Google retirement snapshot; it is not schema.org validation or live eligibility. Retired Google appearances do not require deleting accurate semantic markup. Unlisted types are not certified eligible, and missing legacy snapshot provenance stays unverified. `schema_extraction` records supported-extractor errors/warning-detail counts. Known problems or missing receipts cannot certify schema absence. Keep observed types visible, inspect existing markup before adding/duplicating a candidate, and do not claim schema/overall score gains from unverified extraction. A `no_known_problem` receipt is not full conformance/eligibility or exhaustive coverage. `date_cues` records bounded metadata/selected-text candidates, not validated publication/update dates or freshness. Modified-only metadata counts; blank values and bare years alone do not. Review real page purpose and known dates when useful; never invent dates, relabel event dates or cosmetically refresh them to clear a finding. Compared candidates do not impose a date quota. See the [date-cue boundaries](references/content-eeat.md#date-cues-not-freshness-verification). **Build a data-driven content brief** (what to *write*, grounded in real data — no keyword APIs, no invented volumes): ``` python scripts/brief.py https://you.com/page https://rival.com/page python scripts/brief.py https://you.com/page https://rival.com/page --gsc # explicit Search Console opt-in python scripts/brief.py --topic "widget calibration" https://rival.com/guide python scripts/brief.py --topic "widget calibration" https://rival.com/guide --gsc-site https://you.com # explicit topic-query opt-in ``` By default, uses supplied pages without querying account services. Topic `--gsc-site` (Python/MCP `gsc_site`) explicitly opts into your site's recorded queries before deriving question and schema-review candidates; review relevance and visible content before implementing suggestions. Brief `gsc.capped` preserves the collector's row-limit flag (null if unknown). A cap in either query window can limit observations; no matching retrieved queries does not prove absent demand. An uncapped response is not proof of exhaustive Search Console coverage. Topic `gsc.topic_query_selection` records input/matching/retained/omitted row counts for the first-15 lexical filter; rows are not unique-query counts. Input rows are analyzed striking-distance rows, not all raw API rows. This selection limit is separate from `gsc.capped`. Missing, malformed or contradictory receipts do not establish that no matching rows were omitted. Internal count consistency does not verify upstream query completeness. Explicit `--gsc` (Python/MCP `use_gsc=True`) adds the page's own **striking-distance GSC queries** (positions 8–20 — demand it nearly satisfies; needs GSC credentials, same setup as `gsc.py`), the **competitor gap analysis**, **compared-heading review candidates** (a lexical H2/H3 term filter, not verified missing semantic coverage), **question-shaped candidates** (compared headings + your recorded question-shaped queries, distinguished by `source_kind`; legacy missing kinds stay unverified), schema suggestions, and a question-heading structure heuristic on non-hubs. Review candidates for actual relevance and coverage; neither compared headings nor a structure flag require rewriting headings or forcing a first-sentence answer. Keep deliberate user/editorial format choices separate from measured cues. The legacy `missing_subtopics` field keeps review candidates, not absence verdicts. `subtopic_review` and per-candidate `term_match` record the ASCII/English prefix-term basis and exact counts/cutoff. Synonyms can be missed and unrelated words can match; compared headings do not prove section content. Topic mode has no own-page matches. Missing/malformed legacy receipts stay unrecorded; inspect relevance and existing coverage before recommending sections, without overriding explicit editorial choices. `text_length` contains neutral length observations, including hubs; do not infer a word target or missing coverage from length alone. Keep explicit user/editorial length constraints separate from measured observations. Citation/statistic cues do not establish factual support or a source quota; review real claims and sources without inventing numbers/citations to satisfy counts. `target_words`/`your_words` and `evidence_target`/`your_evidence` are no longer generated. `--topic` mode plans a page that doesn't exist yet from competitor pages only (add `--gsc-site <your-site>` to fold in real adjacent queries). Without GSC credentials it produces a clearly labeled **structure-only** brief — target queries are omitted, never invented. Schema candidates carry `google_search_appearance` notes from that same dated snapshot. Keep semantic generators available, but add only actual visible content for the intended consumer; a competitor's type or a question candidate does not establish validity, eligibility or ranking/citation gains. `/narwhal brief` layers an editorial synthesis (outline, metadata drafts) on top of this data. **Audit a whole site** (discovers URLs via sitemap or internal links, rolls up the issues that recur most — the highest-leverage fixes): ``` python scripts/crawl_site.py https://example.com --max-pages 25 ``` The crawler is polite by default: it **honors robots.txt** (skips disallowed URLs; reported in the summary), fetches site-level signals once, and scans pages in parallel. Tune with `--concurrency N` (default 4), `--delay SECONDS` (minimum spacing of parallel page-scan starts; sequential post-scan pause), and `--ignore-robots` to override. Delay must be finite and nonnegative; it does not pace discovery, site resources or optional probes. Crawl/audit page and worker limits must be positive integers (including config defaults); invalid limits fail before fetching with CLI exit 2. Link and sitemap file/sample caps require nonnegative integers; zero retains scoped optional-check skips, not an all-network off switch. Consumed config defaults follow the same preflight. MCP retains its page/worker clamps. Sitemap probes sample distinct exact URL strings at evenly spaced positions in parsed-file order (endpoints when selecting at least two; one selects the first). JSON/Markdown record the policy. This bounded sample is not random or representative; changed selection is not evidence of a site change. `--fail-under N` gates on the average score. Add `--check-links` to check outbound links (internal + external) for 4xx/5xx/dead — reported grouped by source page (`--max-links N` caps how many; rate-limited/bot-blocked codes like 429/403 are treated as gated, not broken). **Hreflang reciprocity** is validated automatically when the site uses hreflang: missing return tags reported as exact A → B pairs, missing self-references, invalid codes, x-default presence; up to 5 same-host alternates are probed so return tags are verifiable, and anything outside the sample is labeled unverified — never broken. **Site-structure analysis** is always included: click depth from the start URL, pages unreachable within the sample, zero-inbound pages (weak link equity), most-linked pages, and sitemap **orphan candidates** — all sample-aware (the report states the crawl size next to every claim). **Near-duplicate content detection** runs by default (SimHash fingerprints; clusters pages ≥`--dup-threshold` % similar and flags clusters lacking a consistent canonical; disable with `--no-dupes`). **Generate schema.org JSON-LD:** ``` python scripts/generate_schema.py Article --field headline="…" --field author="…" python scripts/generate_schema.py --list # supported types ``` **Validate a site's XML sitemap(s)** (discovers from robots.txt/common paths or takes a sitemap URL; recurses indexes, validates `loc`/`lastmod`, samples URLs for 404s, handles gzip): ``` python scripts/validate_sitemap.py https://example.com --sample 20 ``` **Generate a starter `llms.txt`** (seeds from the homepage + discovered pages, grouped into sections; a curation starting point, not a finished file): ``` python scripts/generate_llms.py https://example.com -o llms.txt ``` **Track health over time / catch regressions** (no database — diff two saved JSON reports). Save a scan as JSON now, re-scan later, and compare: ``` python scripts/scan.py https://example.com --format json -o before.json # ...later... python scripts/scan.py https://example.com --format json -o after.json python scripts/diff_scan.py before.json after.json ``` The diff reports the score delta and which findings are **new**, **resolved**, **worsened**, or **improved** (dynamic titles like "Thin content (210 words)" are matched across runs). Add `--fail-on-regression` for a CI gate: it exits non-zero if the score dropped, a new critical/high finding appeared, or an existing finding escalated to critical/high (even with an offsetting score improvement). Known incomparable coverage also fails the gate. Add `--require-comparable` to reject unknown legacy coverage with exit 2; planner commands use both flags. An explicitly invalid root-page `scan_scope` is incomparable, with no score/fix claims and regression-gate exit 2. Absent legacy scope keeps its unknown status. Comparability covers recorded checks only, not unrecorded settings or a whole site. Different complete recorded audit crawl URL samples (including multiplicities) withhold verdicts and exit 2; order does not matter. An explicitly malformed crawl page list also withholds score deltas and fix claims. Absent legacy lists remain unverified. Works on `audit` JSON too (overall score + homepage findings). Separate `crawl_rule_changes` compares native recurring rules only with matching recorded coverage and nonempty exact crawl samples. New critical/high rules and severity escalations trigger the regression gate even without a score drop. Removed rules mean no longer observed in that sample, not per-page fixes or complete site coverage. Missing, legacy or unsupported rollups remain explicitly unverified. For audits, `--require-comparable` also requires a verified crawl-rule comparison; missing/unsupported rollups or absent/empty crawl samples exit 2. Ordinary viewing and the non-strict regression flag retain legacy behavior with a warning. An explicit `pages_scanned` must be an integer matching the recorded page list. Malformed counts, count/list contradictions, or a count without a page list withhold overall score/fix claims as well as crawl-rule claims; regression gates exit 2. Missing counts are not filled in or treated as independent evidence of sample completeness. Inspect the reasons and re-scan with matching settings; do not edit saved JSON to manufacture a passing comparison. Fresh crawl/audit page rows retain recorded `scan_scope`. Incomplete/invalid scopes, contradictory duplicate-page settings, changed scopes or scope recorded on only one side make audit diffs incomparable. When both reports lack legacy page scopes, that coverage remains unverified rather than inferred. Capture a fresh matching baseline before edits when crossing this recording change; do not backfill old JSON to manufacture comparability. **Map findings to source before editing** (read-only, no changes applied): ``` python scripts/plan.py before.json --repo . python scripts/plan.py before.json --repo . --format json -o plan.json ``` The versioned plan detects plain HTML, Next.js, Astro, Nuxt, Hugo, or Jekyll; links stable finding IDs to likely owning files; groups shared-template fixes; and separates safe candidates, review-required work, external/manual work, and changes that require post-deploy verification. Treat file matches as evidence- backed candidates, not permission to edit blindly; inspect warnings and conflicts. Fresh crawl/audit JSON includes up to five sorted, distinct URL-label witnesses per recurring rule observation, with truncation/omission receipts. They use the recorded final URL when present and otherwise the requested label, not proof of response destinations, successful access or the full affected-page set. Counts and scores are unchanged. Labels over 4,096 characters and shared credential-like markers are omitted from these samples, not truncated into new URLs. For recurring page-local actions, plans use supported same-origin witnesses to locate inventoried route sources instead of a healthy homepage fallback. Unsupported/legacy unlocated rollups require manual source confirmation or a fresh audit; shared-framework head candidates remain heuristic. Viewport automation eligibility is blocked by `unlocated_page_witness` when any recorded page label has no inventoried source candidate, even if others do. An explicitly malformed `scan_scope` blocks automation with `known_incomplete_source_evidence`; it is not treated as absent legacy metadata. Missing legacy scope still does not certify ownership, completeness or permission to edit. Known source candidates remain available for review. Next.js page candidates include observed default-extension sources and Pages Router directory indexes under `app/`, `pages/`, or `src/`. Dynamic routes, rewrites and custom page extensions still need manual ownership confirmation. Next.js robots/sitemap candidates include observed JavaScript and static app metadata files alongside TypeScript/public owners. Inspect the actual source before edits and verify the generated resource after deploy. Astro candidates include observed `.astro`, `.md`, `.mdx` and `.html` root, direct and directory-index pages in `src/pages/`. Confirm MDX integration, dynamic routes and content-collection ownership manually before editing. Nuxt candidates include observed `app/pages/` routes alongside legacy `pages/`, including root and directory-index Vue files. Confirm custom source directories, layers, route overrides and actual page ownership manually. Hugo candidates include observed home/section `_index.md` branch bundles under `content/`. Confirm custom content roots, multilingual layouts, URL overrides and permalinks before choosing an owner. Owner previews label inventory status and disclose candidates beyond the first three; the complete list remains in plan JSON. Uninventoried paths are not proven missing, and inventoried files are not proven active source owners. Owner and related-action path previews use literal code spans, including names with backticks or Markdown punctuation; original path strings remain in JSON. Markdown evidence previews are literal, capped at 600 characters and not reverified; full action evidence remains in JSON. Synthesized sitemap failure actions retain the first five reported status/URL witnesses and their total. Consult the original report for remaining witnesses and verify before editing. Sitemap sample reporting/planning uses the shared crawl HTTP classification; unsupported statuses or malformed/error fields remain unverified even when raw compatibility problem rows retain them. JSON includes selected-target response counts beside the raw observations. Audit crawl link failures and uncertain/capped/unknown coverage produce separate manual actions with bounded target/source witnesses. They assign no source owner or automatic link edit; verify HEAD/GET behavior and anchor intent first. New `crawl.links.unverified` records preserve checked uncertain targets and referrers for that follow-up. Crawl Markdown shows up to 20 rows with bounded URL previews; JSON retains all checked records. Legacy missing identities are not inferred. **Real Core Web Vitals** (opt-in external service, like Search Console). Ordinary audits do not enable these services merely because credentials exist. PageSpeed lab calls are external even without a key. Never fabricate field metrics — for the *real* LCP/INP/CLS (what Chrome users experience), query the CrUX API: ``` python scripts/crux.py https://example.com/page # needs a CrUX API key python scripts/crux.py https://example.com --origin --form-factor phone ``` The key is resolved from `--crux-key`, the `CRUX_API_KEY` env var, or a `.env` file (auto-loaded) — so once the user has set it, just run the script. If it reports the key is missing, relay the three ways to provide one and the free-key link (`https://developer.chrome.com/docs/crux/api`); **do not** invent numbers. Low-traffic URLs return "no data" — suggest `--origin`. Get a key: enable the *Chrome UX Report API* in Google Cloud Console and create an API key (free, 150 queries/min). When CrUX has **no data** (most pages are below its traffic floor), use lab data — a PageSpeed Insights (Lighthouse) synthetic test that works for any URL: ``` python scripts/crux.py https://example.com/page --lab # mobile python scripts/crux.py https://example.com/page --lab --strategy desktop ``` It returns a performance score + LCP, TBT (lab proxy for INP), CLS, FCP, SI, TTI. **Always label lab data as synthetic/estimate, not real-user field data.** The PSI key is optional (keyless quota is shared/often exhausted); set `PAGESPEED_API_KEY` or reuse the CrUX key with the PageSpeed Insights API also enabled. **Real Search Console query data** (opt-in; OAuth — GSC has no API-key path). Turns "what's broken" into "what to fix *first*" using the user's own queries: ``` python scripts/gsc.py https://example.com # needs GSC credentials python scripts/gsc.py https://example.com --days 28 --format json ``` Reports striking-distance queries (positions 8–20 with impressions), CTR laggards (top-10 rankings whose CTR is far below the expected-for-position curve — title/meta rewrite candidates; the curve is a labeled heuristic used only for ranking), decaying pages (clicks down ≥25% vs the prior window), and keyword cannibalization (several pages splitting one query — cross-check the crawler's near-duplicate clusters). Credentials resolve from env/`.env`: `GSC_ACCESS_TOKEN` (e.g. `gcloud auth print-access-token`, expires ~1h) or the durable `GSC_CLIENT_ID`/`GSC_CLIENT_SECRET`/`GSC_REFRESH_TOKEN` trio. If missing, relay the one-time setup: create a **Desktop** OAuth client (enable the Search Console API), put the ID/secret in `.env`, run `python scripts/gsc.py --auth --write-env`. Add `--gsc` to `audit.py` to fold the same data into the audit report/JSON (degrades to a note without credentials). These are real numbers for the user's verified property — never fabricate or extrapolate them. **Turn a Markdown report into a branded HTML/PDF** (e.g. after synthesizing an audit — write it to a `.md`, then render): ``` python scripts/render_report.py report.md -o report.html # branded HTML python scripts/render_report.py report.md --format pdf -o report.pdf # needs WeasyPrint ``` The output is self-contained (inline CSS + logo), with the Narwhal header/footer — same look as the scan/audit reports. Scan/audit/render require regular output files and return exit 2 for expected delivery failures. Other CLI text artifact saves use the same regular-file/UTF-8 checks and preserve analysis gate codes; PDF engine bytes are staged first. Final writes remain non-atomic. Choose an output file distinct from the source; direct/link aliases are rejected for HTML, PDF and actual fallback HTML writes. PDF bytes are staged first; separate final writes remain non-atomic. Avoid redirecting stdout over the input (the shell truncates before Narwhal runs). ## What each auditor covers | Auditor | Focus | |---|---| | `technical` | title/meta, headings, canonical, robots directives, viewport, hreflang, images, links, HTTP hygiene, robots.txt, sitemap | | `content` | scoped text-length/readability cues, attribution/date candidates, Open Graph/Twitter cards | | `schema` | JSON-LD detection, required/recommended property validation, deprecated rich-result types | | `geo` | contextual question-heading, synthetic sentence-group, statistic/citation and intro cues; `llms.txt`, role-aware **AI-crawler policies** | Deep-dive guidance (heuristics, thresholds, and the *why* behind each check) lives in `references/` — read the relevant file when the user asks for detail or wants to go beyond the automated checks: - `references/technical-seo.md` - `references/content-eeat.md` - `references/schema.md` - `references/geo-llmo.md` ## Interpreting output Each report has a **0–100 health score** and findings bucketed by severity (`critical → high → medium → low`, plus passing checks). Scores are directional, not absolute — always explain the *specific* fixes, not just the number. When a finding is a heuristic (readability, citability, entity clarity), say so; these flag pages worth a human look rather than issuing verdicts. Known structured-data extraction uncertainty also prevents page/audit diff improvement/resolution verdicts; the CI gate exits 2, including uncertain crawl contributions. Fix/verify extraction before treating missing findings as fixes. Page scans with known extraction gaps withhold generic/Article/site-entity/Product absence advice while retaining checks on observed nodes. Plans make extraction verification manual-only, not markup-generation work; actual syntax/property repairs remain reviewable. Even without known errors, non-observation is only a conditional review: preserve valid formats/entities and do not promise eligibility. JSON decoder syntax errors remain repair candidates. JSON-LD decoder limits, numeric/Unicode handling or node-processing failures are verification-only, not proof of invalid source or engine rejection. `jsonld_error_stages` records actual runtime counts; missing legacy stages stay unclassified. Verify before rewriting data, and do not increase global parser/body limits just to clear a note. `meta.readability` exposes historical ASCII-token, punctuation-fragment and vowel-group inputs with English-oriented Flesch/FK formula estimates, not actual comprehension, school grade or engine citability. Non-English declarations, non-ASCII letters/marks, hub hints and unusable inputs leave interpretation unassessed. Keep useful concise/specialist text and necessary precision; simplify only where useful for the actual audience, not to meet a universal score/word quota. Current/legacy plans use the same conditional review. Known changes in recorded `readability_reviewed` scope make page/audit/crawl diffs incomparable, not fixes; missing legacy scope stays unknown. See `references/content-eeat.md#readability`. `meta.lexical_focus` records top-eight ASCII-term frequency and exact title/first-H1 overlap, not dominant topics or semantic coverage. Cutoffs/ties, synonyms, inflections and extraction can hide matches; incidental overlap is not relevance. Review actual page purpose/wording and edit only confirmed misleading labels or missing useful content, without keyword stuffing or forced overlap. Legacy IDs remain; missing receipts do not supply measured scope. See `references/content-eeat.md#topical-focus` for witnesses, limits and compatibility. ## Deep audit (multi-agent) For a comprehensive audit, `/narwhal audit <site>` runs the deterministic `audit.py` baseline and then fans out ~10 specialist subagents in parallel (in the plugin's `agents/` dir) — technical, content, schema, geo, performance, links, duplication, sitemap, sxo, local, and conditional e-commerce — each using these scripts as tools and adding reasoning + exact fixes, synthesized into one prioritized report. The individual scripts above remain the fast, deterministic path. ## Fix loop (audit → edit → prove it) When the site's **source code is in the current workspace**, don't stop at the report — close the loop (`/narwhal fix <url>` in Claude Code): 1. Save a baseline: `python scripts/scan.py <url> --format json -o before.json` (or reuse a fresh audit JSON). 2. Run `python scripts/plan.py before.json --repo . --format json -o plan.json`. Review its likely owners, safety classes, conflicts, and coverage. Capture a page scan of each affected local preview route as `page-before.json` when available; use distinct snapshot names for multiple pages. Then apply minimal, framework-idiomatic edits. Use `generate_schema.py` for JSON-LD and `generate_llms.py` for llms.txt rather than hand-writing them. 3. Re-scan the same local route (`--allow-private` for localhost) with matching options as `page-after.json`, then run `python scripts/diff_scan.py page-before.json page-after.json --require-comparable --fail-on-regression`. Keep this page comparison separate from an audit baseline. Follow the plan's original-baseline verification commands after deployment: scan → scan or audit → audit, restoring the original invocation settings and limits. Honesty rules: a localhost re-scan only verifies **page-level** fixes — label site-level signals (robots.txt, sitemap, HTTPS, canonical host, llms.txt) as *verify after deploy*; if there's no local preview, report "applied, pending deploy" with the re-scan commands. Without a pre-edit page baseline, a later preview is a current-state check, not measured improvement. Do not discount a regression or override a withheld/incomparable verdict to claim successful verification. Report scoped finding changes alongside failed or unverified overall checks. Audit homepage findings and crawl-rule aggregate changes have separate scopes; a disappeared sampled rule does not prove each page was repaired. If the source is **not** in the workspace, make no edits — give a per-finding fix plan instead. Findings unreachable from the repo (CDN/redirect config, real CWV) go in a "needs manual action" list. ## Configuration An optional `narwhal.toml` at the project root (auto-discovered) tunes scoring weights, check thresholds, CLI defaults, and ignore rules. Precedence is **CLI flag > narwhal.toml > default**. Use `--config PATH` or `--no-config` to override. If the user has one, respect it; to suppress a finding they consider acceptable, add it to `[ignore]` rather than hard-coding around it. Full docs: `docs/CONFIG.md`. ## Guardrails - **SSRF-safe:** hosts resolving to private/loopback IPs are blocked. Only pass `--allow-private` when the user is intentionally scanning a local/staging site. - **Local-only by default:** no external services are called. API integrations (PageSpeed, CrUX, SERP data) are intentionally out of the default path. - Don't fabricate metrics the tools don't measure (e.g. exact Core Web Vitals field data needs a real device/CrUX; the scan only flags likely LCP hygiene issues). Report what was measured and what would need an external source.skills/seo-scan/scripts/__init__.py285 Bb8ef30f74735upstream ↗
"""Narwhal SEO & GEO/LLMO scanner. When installed as a package (via uvx/pip) these modules are importable as ``narwhal.*``; when run from a cloned repo or the Claude Code plugin, each script also runs standalone (e.g. ``python scan.py <url>``). """ from ._version import __version__skills/seo-scan/scripts/__main__.py146 Ba72422b871e5upstream ↗
"""Enable ``python -m narwhal …`` for the installed package.""" from .cli import main if __name__ == "__main__": raise SystemExit(main())skills/seo-scan/scripts/_version.py108 B5a4c2598cbcaupstream ↗
"""Canonical release version for packaging, CLI, reports, and plugin manifests.""" __version__ = "1.30.19"skills/seo-scan/scripts/audit.py17 KB0667dc39a1a6upstream ↗
#!/usr/bin/env python3 """Comprehensive site audit — one report combining: 1. A full single-page audit of the entry URL (all four auditors) 2. A site-wide crawl (weakest pages, recurring issues, broken links, duplicates) 3. XML sitemap validation This is the flagship ``narwhal audit <site>`` deliverable: a stakeholder-ready overview that a single-page scan can't give on its own. Usage: python audit.py https://example.com python audit.py https://example.com --max-pages 30 --format json -o audit.json """ from __future__ import annotations import argparse import os import sys sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) from lib import config as configlib # noqa: E402 from lib.cli_errors import url_errors # noqa: E402 from lib.budgets import nonnegative_integer # noqa: E402 from lib import report as report_lib # noqa: E402 from lib import canonical, links, hreflang # noqa: E402 from lib.report import below_threshold, deliver # noqa: E402 import scan as scanner # noqa: E402 import crawl_site # noqa: E402 import validate_sitemap # noqa: E402 def _demote(md: str) -> str: """Drop a sub-report's top H1 and push every other heading down one level.""" out, seen_h1 = [], False for line in md.splitlines(): if line.startswith("# ") and not seen_h1: seen_h1 = True continue out.append("#" + line if line.startswith("#") else line) return "\n".join(out).strip() def run(site: str, *, max_pages=15, concurrency=4, timeout=20, allow_private=False, obey_robots=True, render=False, max_links=100, max_sitemaps=12, config=None, vitals=False, strategy="mobile", gsc=False) -> dict: """Run the three sub-audits. The link and sitemap caps default lower than the standalone tools' — an audit is an overview, so it favors speed over an exhaustive link/sitemap sweep (the dedicated commands go deeper).""" crawl_site.validate_budgets(max_pages=max_pages, concurrency=concurrency) nonnegative_integer(max_links, 'max_links') nonnegative_integer(max_sitemaps, 'max_sitemaps') config = config or configlib.Config() sample = config.default("sample") nonnegative_integer(sample, 'sample') config, _ = configlib.snapshot_rules(config) page = scanner.scan(site, timeout=timeout, allow_private=allow_private, render=render, config=config) site_result = crawl_site.crawl( site, max_pages=max_pages, concurrency=concurrency, timeout=timeout, allow_private=allow_private, obey_robots=obey_robots, render=render, check_links=True, max_links=max_links, detect_dupes=True, config=config) sitemap = validate_sitemap.analyze( site, allow_private=allow_private, timeout=timeout, sample=sample, max_sitemaps=max_sitemaps) data = {"site": site, "page": page, "site_result": site_result, "sitemap": sitemap} if vitals: data["vitals"] = gather_vitals(site, timeout=timeout, strategy=strategy) if gsc: import gsc as gsc_mod # noqa: PLC0415 data["gsc"] = gsc_mod.gather(site, timeout=timeout) return data def gather_vitals(site: str, *, timeout=20, strategy="mobile") -> dict: """Core Web Vitals for the audit: real CrUX **field** data first (origin-level), then PageSpeed Insights **lab** data as a fallback when CrUX has none (most sites). Opt-in — only runs with ``--vitals`` because it makes external API calls. Honest about which is which; never fabricates numbers.""" import crux # noqa: PLC0415 import psi # noqa: PLC0415 from lib import env as envlib # noqa: PLC0415 crux_key = envlib.resolve("CRUX_API_KEY") field = crux.analyze(site, crux_key, origin=True, timeout=timeout) if crux_key else None lab = None if not (field and field.get("found")): psi_key = envlib.resolve("PAGESPEED_API_KEY") or crux_key lab = psi.analyze(site, psi_key, strategy=strategy, timeout=max(timeout, 60)) return {"field": field, "lab": lab} def _vitals_markdown(v: dict) -> str: """The Core Web Vitals section body (Markdown), demoted to slot under an H2.""" import crux # noqa: PLC0415 import psi # noqa: PLC0415 field, lab = v.get("field"), v.get("lab") if field and field.get("found"): return _demote(crux.render_markdown(field)) if lab is not None: note = ("_CrUX has no real-user field data for this site (below its traffic " "floor), so this is PageSpeed Insights **lab** data instead._\n\n" if field is not None else "") return note + _demote(psi.render_markdown(lab)) if field is not None: # CrUX tried, no data, no lab return _demote(crux.render_markdown(field)) return ("_No Core Web Vitals collected. Set `CRUX_API_KEY` for real-user field " "data, or `PAGESPEED_API_KEY` for lab data, then re-run with `--vitals`._") def _vitals_headline(v: dict) -> str: """A short one-liner for the header/metrics strip, or '' if nothing usable.""" field, lab = v.get("field"), v.get("lab") if field and field.get("found"): verdict = {True: "pass", False: "fail"}.get(field.get("cwv_pass"), "partial") return f"CWV (field): {verdict}" if lab and lab.get("found") and lab.get("perf_score") is not None: return f"Perf (lab): {lab['perf_score']}/100" return "" def _gsc_markdown(g: dict, site: str) -> str: """The Search-performance section body (Markdown), demoted under an H2.""" import gsc as gsc_mod # noqa: PLC0415 if not g.get("found"): return (f"_No Search Console data: {g.get('error', 'unavailable')}_" if g.get("error") else "_No Search Console data collected._") return _demote(gsc_mod.render_markdown(g, site)) def _gsc_headline(g: dict) -> str: """Short header-strip metric, or '' when there's no data.""" if not g.get("found"): return "" s = g["summary"] delta = "" if s.get("clicks_prev"): d = round(100 * (s["clicks"] - s["clicks_prev"]) / s["clicks_prev"]) delta = f" ({'+' if d >= 0 else ''}{d}%)" return f"GSC clicks ({g.get('days', 28)}d): {s['clicks']}{delta}" def _extra_sections(data: dict) -> list: """The conditional report sections after the three fixed ones, numbered in order of presence: (number, title, markdown-body).""" out, n = [], 4 cwv = data.get("vitals") if cwv: out.append((n, "Core Web Vitals", _vitals_markdown(cwv))) n += 1 g = data.get("gsc") if g: out.append((n, "Search performance (GSC)", _gsc_markdown(g, data["site"]))) n += 1 return out def overall_score(data: dict) -> float: """The audit's headline score: the lower of homepage and site-average.""" return min(data["page"].score(), data["site_result"]["avg_score"]) def _schema_score_note(data: dict) -> str: schema = (crawl_site.schema_extraction_note(data['site_result']) or report_lib.recorded_schema_extraction_problem(data['page'].meta, for_score=True) or '') canonical_note = (crawl_site.canonical_comparison_note(data['site_result']) or (canonical.ERROR if canonical.unverified(data['page'].meta) else '')) base_note = (crawl_site.anchor_base_note(data['site_result']) or (links.BASE_ERROR if links.unassessed_base(data['page'].meta) else '')) hreflang_note = (crawl_site.hreflang_source_note(data['site_result']) or (hreflang.ERROR if hreflang.unverified(data['page'].meta, for_score=True) else '')) partial_note = (crawl_site.partial_response_note(data['site_result']) or (report_lib.PARTIAL_HTML_ERROR if report_lib.recorded_response_partial(data['page'].meta) else '')) image_note = report_lib.recorded_image_weight_problem(data['page'].meta, for_score=True) merchant_note = (crawl_site.merchant_comparison_note(data['site_result']) or report_lib.recorded_merchant_comparison_problem(data['page'].meta, for_score=True)) return ' '.join(note for note in (schema, canonical_note, base_note, hreflang_note, partial_note, image_note, merchant_note) if note) def render_markdown(data: dict) -> str: page = data["page"] site_res = data["site_result"] sm = data["sitemap"] broken = crawl_site.link_summary(site_res.get('links')) dupes = crawl_site.duplicate_summary(site_res) cwv = data.get("vitals") headlines = [h for h in ((_vitals_headline(cwv) if cwv else ""), (_gsc_headline(data["gsc"]) if data.get("gsc") else "")) if h] headline = " · ".join(f"**{h}**" for h in headlines) header = [ f"# Narwhal Site Audit — {data['site']}", "", f"**Homepage:** {page.score()}/100 · " f"**Site average:** {site_res['avg_score']}/100 · " f"**Pages scanned:** {site_res['pages_scanned']} ", f"**Broken links:** {broken} · **Near-duplicate clusters:** {dupes} · " f"**Sitemap URLs:** {sm.get('total_urls', 0)}" + (f" · {headline}" if headline else ""), "", "---", "", "## 1. Homepage audit", "", _demote(page.to_markdown()), "", "## 2. Site-wide", "", _demote(crawl_site.render_markdown(site_res)), "", "## 3. Sitemap", "", _demote(validate_sitemap.render_markdown(sm)), ] for n, title, body in _extra_sections(data): header += ["", f"## {n}. {title}", "", body] schema_note = _schema_score_note(data) if schema_note: header[5:5] = ['> ' + schema_note, ''] return "\n".join(header).rstrip() + "\n" def render_html(data: dict) -> str: """A self-contained, styled HTML audit: overall score gauge, a metrics strip, the homepage findings (rich cards), then the site-wide and sitemap sections. Reuses the shared HTML helpers and the sub-reports' Markdown so no presentation logic is duplicated.""" page = data["page"] site_res = data["site_result"] sm = data["sitemap"] broken = crawl_site.link_summary(site_res.get('links')) dupes = crawl_site.duplicate_summary(site_res) overall = int(round(overall_score(data))) cwv = data.get("vitals") metrics = [ ("Homepage", f"{page.score()}/100"), ("Site average", f"{site_res['avg_score']}/100"), ("Pages scanned", site_res["pages_scanned"]), ("Broken links", broken), ("Near-dupe clusters", dupes), ("Sitemap URLs", sm.get("total_urls", 0)), ] for headline in ((_vitals_headline(cwv) if cwv else ""), (_gsc_headline(data["gsc"]) if data.get("gsc") else "")): if headline: label, _, val = headline.partition(": ") metrics.append((label, val)) cells = "".join( f'<div class="metric"><span class="m-num">{report_lib._esc(v)}</span>' f'<span class="m-lab">{report_lib._esc(k)}</span></div>' for k, v in metrics) hero = ( '<header class="hero">' f'{report_lib.score_gauge(overall)}' '<div class="hero-txt"><div class="grade" ' f'style="color:{report_lib._grade_color(overall)}">Overall</div>' f'<div class="metrics">{cells}</div></div></header>') homepage = ('<h2 class="section">1. Homepage audit</h2>' + "".join(page._html_sections())) sitewide = ('<h2 class="section">2. Site-wide</h2><section class="card">' + report_lib.md_to_html(_demote(crawl_site.render_markdown(site_res))) + "</section>") sitemap = ('<h2 class="section">3. Sitemap</h2><section class="card">' + report_lib.md_to_html(_demote(validate_sitemap.render_markdown(sm))) + "</section>") extra_html = "".join( f'<h2 class="section">{n}. {title}</h2><section class="card">' + report_lib.md_to_html(body) + "</section>" for n, title, body in _extra_sections(data)) schema_note = _schema_score_note(data) coverage = ('<section class="card"><p>' + report_lib._esc(schema_note) + '</p></section>') if schema_note else '' body = hero + coverage + homepage + sitewide + sitemap + extra_html return report_lib.html_document("Narwhal Site Audit", data["site"], body) def render_json(data: dict) -> str: import json payload = { "schema_version": report_lib.REPORT_SCHEMA_VERSION, "tool_version": report_lib.TOOL_VERSION, "site": data["site"], "overall_score": overall_score(data), "homepage": json.loads(data["page"].to_json()), "crawl": json.loads(crawl_site.render_json(data["site_result"])), "sitemap": json.loads(validate_sitemap.render_json(data["sitemap"])), } if "vitals" in data: payload["vitals"] = data["vitals"] # {field: crux result, lab: psi result} if "gsc" in data: payload["gsc"] = data["gsc"] # gsc.gather() result return json.dumps(payload, indent=2, ensure_ascii=False) @url_errors def main(argv=None) -> int: cfg = configlib.load_from_args(argv) d = cfg.defaults ap = argparse.ArgumentParser(description="Comprehensive site audit (page + crawl + sitemap)", parents=[configlib.config_arg_parser()]) ap.add_argument("url", help="site URL") ap.add_argument("--max-pages", type=int, default=d["max_pages"], help="positive maximum pages for the crawl portion") ap.add_argument("--concurrency", type=int, default=d["concurrency"], help="positive number of concurrent crawl page scans") ap.add_argument("--max-links", type=int, default=100, help="nonnegative outbound-link cap (default 100; 0 skips link requests)") ap.add_argument("--max-sitemaps", type=int, default=12, help="nonnegative sitemap validation file-attempt cap (default 12; 0 skips validation fetches)") ap.add_argument("--timeout", type=int, default=d["timeout"]) ap.add_argument("--render", action="store_true") ap.add_argument("--ignore-robots", action="store_true") ap.add_argument("--allow-private", action="store_true") ap.add_argument("--vitals", action="store_true", help="include real Core Web Vitals in the report — CrUX field " "data (needs CRUX_API_KEY), falling back to PageSpeed " "Insights lab data. Makes external API calls.") ap.add_argument("--strategy", choices=("mobile", "desktop"), default="mobile", help="device for the lab (PSI) fallback (default: mobile)") ap.add_argument("--gsc", action="store_true", help="include real Google Search Console query data " "(striking distance, CTR laggards, decaying pages, " "cannibalization). Needs GSC OAuth credentials — see " "`narwhal gsc --auth`. Makes external API calls.") ap.add_argument("--format", choices=("markdown", "json", "html", "pdf"), default="markdown", help="output format; pdf needs WeasyPrint (falls back to html)") ap.add_argument("-o", "--output") ap.add_argument("--fail-under", type=int, metavar="N", default=d.get("fail_under"), help="exit non-zero if the overall score (min of homepage & " "site-average) is below N") args = ap.parse_args(argv) try: sys.stdout.reconfigure(encoding="utf-8", errors="replace") except (AttributeError, ValueError): pass try: crawl_site.validate_budgets(max_pages=args.max_pages, concurrency=args.concurrency) nonnegative_integer(args.max_links, 'max_links') nonnegative_integer(args.max_sitemaps, 'max_sitemaps') nonnegative_integer(cfg.default('sample'), 'sample') except ValueError as exc: print(f"Error: {exc}", file=sys.stderr) return 2 data = run(args.url, max_pages=args.max_pages, concurrency=args.concurrency, timeout=args.timeout, allow_private=args.allow_private, obey_robots=not args.ignore_robots, render=args.render, max_links=args.max_links, max_sitemaps=args.max_sitemaps, config=cfg, vitals=args.vitals, strategy=args.strategy, gsc=args.gsc) renderers = { "json": render_json, "markdown": render_markdown, "html": render_html, "pdf": render_html, # PDF is produced by converting the HTML } content = renderers[args.format](data) rc = deliver(args.format, args.output, content, label="audit", score=int(round(overall_score(data)))) if rc: return rc if below_threshold(overall_score(data), args.fail_under): print(f"FAIL: overall score {overall_score(data)}/100 is below the " f"--fail-under threshold of {args.fail_under}.", file=sys.stderr) return 1 return 0 if __name__ == "__main__": raise SystemExit(main())skills/seo-scan/scripts/audit_content.py14 KBcdda5ed72417upstream ↗
"""Content quality & E-E-A-T auditor. Observes extracted-text counts, English-oriented readability/style patterns, attribution/date candidates and social metadata. These are scoped heuristics, not measurements of content depth, expertise, quality or search outcomes. """ from __future__ import annotations try: from lib import text as textlib from lib import content_quality from lib import htmlx from lib import authorship from lib import content_length from lib import date_cues from lib import readability_observation from lib import lexical_focus except ImportError: # when imported as a package from .lib import text as textlib # type: ignore from .lib import content_quality # type: ignore from .lib import htmlx # type: ignore from .lib import authorship # type: ignore from .lib import content_length # type: ignore from .lib import date_cues # type: ignore from .lib import readability_observation # type: ignore from .lib import lexical_focus # type: ignore CAT = "content" _WORD = content_length.WORD_PATTERN # historical private matcher alias def audit(doc, resp, report, ctx=None) -> None: text = doc.body_text or "" # Page-type awareness: prose checks misfire on link-hub pages (index, # category, front pages), and byline checks misfire on non-articles. hub = htmlx.is_hub_page(doc) article = htmlx.looks_article(doc) # Flesch and the filler/common-phrase lists are English-calibrated. Running # them on a declared non-English page measures nothing real — skip them # (and claim nothing) rather than mislabel French prose "hard to read". english = not doc.lang or doc.lang.strip().lower().startswith("en") th = (ctx or {}).get("thresholds", {}) receipt = content_length.observe(text, language=doc.lang, basis=doc.extraction, thresholds=th) report.meta['content_length'] = receipt _word_count(receipt, report, hub=hub) _readability(text, report, hub=hub, article=article, language=doc.lang, basis=doc.extraction) if english: _quality(text, report, basis=doc.extraction) _keywords(doc, text, report) _authorship(doc, text, report, article=article) _freshness(doc, text, report) _og_social(doc, report) def _word_count(receipt, report, hub=False): """Keep length cues contextual; a count cannot certify thinness or depth.""" status = receipt['threshold_status'] if status == 'uninterpreted': return # no false zero-word defect or passing depth claim observed = (f"{receipt['ascii_pattern_matches']} matches of the configured ASCII-only pattern " f"in selected extracted text ({receipt['source_basis']}). ") advice = ('Review whether the captured text serves the reader and page intent. Keep useful ' 'concise text; edit only confirmed coverage gaps. Do not pad content to reach ' 'a configured count. Ranking and citation impact are not measured.') if status == 'below_lower': detail = observed + 'Below the configured lower bound. ' + content_length.LIMITS if hub: report.add(CAT, 'low', 'Review limited ASCII-token count on a hub', detail, advice, rule_id='content.link.hub.page.with.little.prose') else: report.add(CAT, 'low', 'Review limited ASCII-token count', detail, advice, rule_id='content.thin.content') elif status == 'below_upper': report.add(CAT, 'low', 'Review ASCII-token count in the configured middle range', observed + content_length.LIMITS, advice, rule_id='content.content.is.on.the.short.side') else: report.add(CAT, 'good', 'No below-range ASCII-token flag', observed + content_length.LIMITS, rule_id='content.sufficient.content.depth') def _readability(text, report, hub=False, article=False, *, language='', basis='visible text'): receipt = readability_observation.observe(text, language=language, basis=basis, hub=hub) report.meta['readability'] = receipt if receipt['formula_status'] != 'computed': return fre, grade = receipt['flesch_reading_ease'], receipt['flesch_kincaid_grade'] detail = (f'Flesch reading ease estimate {fre}; FK grade formula estimate {grade}. ' + readability_observation.LIMITS) advice = ('Review actual audience, language and the captured prose in context. Simplify only where useful; ' 'preserve necessary technical terms, factual precision and useful concise text. Do not pad or ' 'rewrite solely to reach a formula target. Reader comprehension and engine outcomes are unmeasured.') if fre < 30: report.add(CAT, 'low', 'Review below-30 readability formula estimate', detail, advice, rule_id='content.content.is.very.hard.to.read') elif fre < 50: report.add(CAT, 'low', 'Review below-50 readability formula estimate', detail, advice, rule_id='content.content.is.fairly.hard.to.read') else: report.add(CAT, 'good', 'No below-range readability formula flag', detail, rule_id='content.readable.prose') def _keywords(doc, text, report): receipt = lexical_focus.observe(doc, text) report.meta['lexical_focus'] = receipt keywords = receipt['body_terms'] if not keywords: return display = lambda item: item['term'] + (' [clipped]' if item['clipped'] else '') + f" ({item['count']})" summary = ', '.join(display(item) for item in keywords[:6]) bigrams = receipt['phrases'] if bigrams: summary += ' · phrases: ' + ', '.join(item['term'] + (' [clipped]' if item['clipped'] else '') for item in bigrams) report.add(CAT, 'good', 'Frequent extracted-text terms observed', summary + '. ' + lexical_focus.LIMITS, rule_id='content.dominant.topics.detected') if receipt['status'] == 'zero_overlap': report.add(CAT, 'low', 'Review literal title/H1 term overlap', f"0 exact shared title/first-H1 terms among {len(keywords)} retained frequent body terms. " + lexical_focus.LIMITS, 'Review actual page purpose and wording in context, including synonyms and extraction. ' 'Edit only confirmed misleading labels or missing useful content; keep accurate wording. ' 'Do not repeat keywords or rewrite solely to force overlap with the top-8 list. ' 'Ranking and AI-citation effects are unmeasured.', evidence=lexical_focus.witnesses(receipt), rule_id='content.body.may.not.reinforce.the.title.topic') def _quality(text, report, *, basis='selected extracted text'): """Surface phrase matches for editorial review, not authorship detection.""" q = content_quality.analyze(text) if q["word_count"] < 100: return # preserve the historical review minimum, not calibrated reliability source = ' '.join(str(basis or 'selected extracted text').split())[:160] counts = (f"{q['word_count']} matches of [A-Za-z][A-Za-z'-]+; " f"{q['unique_word_count']} distinct lowercased matches in {source}. ") limits = ('English-oriented patterns and a type/token ratio, not padding, thin/spun content, ' 'authorship, helpfulness or ranking/AI-citation measurements. Counts depend on ' 'selected text and this ASCII-only matcher; necessary repetition can be useful.') style_advice = ('Review actual wording, quoted examples and audience needs in context. Keep useful ' 'phrasing and consistent technical terms; edit only confirmed unnecessary repetition ' 'or vague wording. Do not add filler or substitute synonyms solely to change a count ' 'or ratio. Search and AI-citation effects are unmeasured.') if q["filler_per_100w"] >= 1.0: report.add(CAT, 'low', 'Review configured phrase-match rate', f"{q['filler_count']} configured phrase matches; rounded rate " f"{q['filler_per_100w']} per 100 ASCII-pattern matches (review cutoff >=1.0). " + counts + limits, style_advice, evidence='; '.join(q['filler_examples']), rule_id='content.filler.padding.language') elif q["filler_count"] >= 2: report.add(CAT, 'low', 'Review configured phrase matches', f"{q['filler_count']} configured phrase matches (review cutoff >=2 below the rate cutoff). " + counts + limits, style_advice, evidence='; '.join(q['filler_examples']), rule_id='content.some.filler.phrasing') # Keep examples/limits in advice too: legacy/third-party compact renderers # may omit the reported detail and evidence previews. phrase_advice = (f"Example matches: {'; '.join(q['ai_examples'])}. Review in context. " "Edit only if wording is vague or unnecessary for the intended " "audience; keep useful wording. Matches do not determine " "authorship, originality, helpfulness or ranking impact.") if q["ai_distinct"] >= 4: report.add(CAT, "low", "Common phrases worth reviewing", f"{q['ai_distinct']} distinct configured phrase matches " f"({q['ai_pattern_count']} total). Phrase matches do not determine " "authorship, originality, helpfulness or ranking impact.", phrase_advice, evidence="; ".join(q["ai_examples"]), rule_id="content.reads.as.ai.generated.generic") elif q["ai_distinct"] >= 2: report.add(CAT, "low", "Some common phrases worth reviewing", f"{q['ai_distinct']} distinct configured phrase matches " f"({q['ai_pattern_count']} total). Phrase matches do not determine " "authorship, originality, helpfulness or ranking impact.", phrase_advice, evidence="; ".join(q["ai_examples"]), rule_id="content.some.generic.ai.sounding.phrasing") if q["word_count"] >= 400 and q["lexical_diversity"] < 0.35: report.add(CAT, 'low', 'Review lower type/token ratio', f"Rounded distinct/total ASCII-pattern ratio {q['lexical_diversity']} " '(review cutoff <0.35 with >=400 matches). ' + counts + limits, style_advice, rule_id='content.repetitive.vocabulary') if (q["filler_per_100w"] < 1.0 and q["ai_distinct"] < 2 and q["lexical_diversity"] >= 0.35): report.add(CAT, "good", "Few configured style-pattern matches", f"{q['filler_count']} configured phrase matches; {q['ai_distinct']} distinct " f"common-phrase matches; rounded type/token ratio {q['lexical_diversity']}. " + counts + limits + ' This does not establish originality or content quality.', rule_id="content.clean.specific.writing") def _authorship(doc, text, report, article=False): receipt = authorship.observe(doc, text) receipt['article_hint'] = bool(article) report.meta['authorship_cues'] = receipt if receipt['candidates']: report.add(CAT, 'good', 'Attribution cue candidate observed', f"{len(receipt['candidates'])} captured metadata/link/byline candidate(s). " + authorship.LIMITS_NOTE, rule_id='content.authorship.signal.present') elif article: report.add(CAT, 'low', 'Review article attribution cues', 'No attribution candidate was observed in the bounded metadata, author-link ' 'and leading source-block checks. This does not prove anonymity.', 'Review the real byline, profile links and editorial ownership in context. ' 'Identify actual creators/reviewers where appropriate; do not invent people ' 'or credentials. Missing cues do not establish anonymity or poor quality.', rule_id='content.no.visible.author.byline') # Homepages, hubs, and product pages don't carry bylines — flagging them # there was noise, so non-article pages are simply not judged on this. def _freshness(doc, text, report): receipt = date_cues.observe(doc, text) report.meta['date_cues'] = receipt if receipt['candidates']: report.add(CAT, 'good', 'Date-related candidate observed', f"{receipt['candidate_count']} captured metadata/text candidate(s). " + date_cues.LIMITS, rule_id='content.date.freshness.signal.present') elif htmlx.looks_article(doc): report.add(CAT, 'low', 'Review article date cues', 'No candidate observed in the checked metadata and selected-text prefix. ' + date_cues.LIMITS, 'Review actual page purpose and original date evidence. Add accurate publication/update ' 'information only when useful and known; do not invent dates, relabel events as publication ' 'or refresh a date without substantive change. Ranking/citation effects are not measured.', rule_id='content.no.visible.date.signal') def _og_social(doc, report): missing = [ p for p in ("og:title", "og:description", "og:image") if not doc.meta_by_property(p) ] if missing: report.add(CAT, "low", "Incomplete Open Graph tags", f"Missing: {', '.join(missing)}.", "Add og:title, og:description and og:image for rich social and " "chat-app link previews.") else: report.ok(CAT, "Open Graph preview tags complete") if not doc.meta_by_name("twitter:card"): report.add(CAT, "low", "No Twitter/X card type", "Missing <meta name=\"twitter:card\">.", "Add twitter:card (e.g. summary_large_image) for X previews.")skills/seo-scan/scripts/audit_geo.py16 KB6bfbe592d7f3upstream ↗
"""GEO / LLMO auditor — visibility in AI answers (ChatGPT, Claude, Perplexity, Google AI Overviews). Content heuristics and documented search/retrieval robots directives inform this audit. Training/data-use choices are separate policy observations, not proof of search visibility or live crawler access. """ from __future__ import annotations import re import math from decimal import Decimal from fractions import Fraction try: from lib.robots import RobotsTxt from lib import htmlx from lib import jsdiff from lib import llms_resource except ImportError: # when imported as a package from .lib.robots import RobotsTxt # type: ignore from .lib import htmlx # type: ignore from .lib import jsdiff # type: ignore from .lib import llms_resource # type: ignore CAT = "geo" _WORD = re.compile(r"[A-Za-z][A-Za-z'-]+") _QUESTION_WORDS = ("how", "what", "why", "when", "where", "who", "which", "can", "does", "is", "are", "should", "do") _STAT = re.compile(r"\b\d+([.,]\d+)?\s?(%|percent|million|billion|k\b|x\b)", re.I) _CITE_HINT = re.compile(r"\b(according to|source:|study|research|report|data from|" r"survey|cited|\[\d+\])\b", re.I) # Static, primary-source role guidance, checked 2026-10-15. No runtime policy I/O. _OPENAI_BOTS = "https://developers.openai.com/api/docs/bots" _CLAUDE_BOTS = ("https://support.claude.com/en/articles/8896518-" "does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler") _PERPLEXITY_BOTS = "https://docs.perplexity.ai/docs/resources/perplexity-crawlers" _GOOGLE_BOTS = "https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers#google-extended" _GOOGLE_SEARCH = "https://developers.google.com/search/docs/appearance/ai-features#controlling-your-content-in-ai-features-in-search" # agent, role, purpose, source, interpretation for non-scored restrictions. _CRAWLER_POLICIES = ( ("OAI-SearchBot", "search_retrieval", "ChatGPT Search", _OPENAI_BOTS, ""), ("Claude-SearchBot", "search_retrieval", "Claude search", _CLAUDE_BOTS, ""), ("Claude-User", "search_retrieval", "Claude user-directed retrieval", _CLAUDE_BOTS, ""), ("PerplexityBot", "search_retrieval", "Perplexity search", _PERPLEXITY_BOTS, ""), ("Googlebot", "search_retrieval", "Google Search, including AI features", _GOOGLE_SEARCH, ""), ("GPTBot", "training", "OpenAI training collection", _OPENAI_BOTS, "Training collection opt-out; independent of ChatGPT Search access."), ("ClaudeBot", "training", "Anthropic training collection", _CLAUDE_BOTS, "Training collection opt-out; distinct from Claude search and user-directed retrieval."), ("Google-Extended", "data_use", "Gemini training and grounding", _GOOGLE_BOTS, "Controls training and specified Gemini/Vertex grounding uses, not Google Search or AI Overviews access."), ("CCBot", "data_collection", "Common Crawl dataset", "https://commoncrawl.org/ccbot", "Dataset collection restriction; this alone does not establish a direct search-access failure."), ("ChatGPT-User", "user_triggered", "ChatGPT user-triggered fetches", _OPENAI_BOTS, "A user-triggered directive does not prove a fetch is blocked; robots.txt may not apply. Not a Search opt-out control."), ("Perplexity-User", "user_triggered", "Perplexity user-triggered fetches", _PERPLEXITY_BOTS, "A user-triggered directive does not prove a fetch is blocked; this fetcher generally ignores robots.txt."), ("Claude-Web", "unverified", "Legacy or unverified token", None, "Current role is unverified; a matching directive does not establish a search impact."), ("Bytespider", "unverified", "Unverified role", None, "Current role is unverified; a matching directive does not establish a search impact."), ) AI_BOTS = {agent: purpose for agent, role, purpose, source, note in _CRAWLER_POLICIES} def audit(doc, resp, report, ctx=None) -> None: ctx = ctx or {} # Editorial pattern counts are not engine/citation measurements. Keep them # low priority, including on articles; article classification stays available # to callers of the individual helpers for compatibility. article = htmlx.looks_article(doc) _question_headings(doc, report, article=article) _passage_citability(doc, report, ctx.get("thresholds", {})) _evidence_density(doc, report, article=article) _direct_answer(doc, report) _llms_txt(ctx, report) _ai_crawler_access(ctx, report) _entity_clarity(doc, report) if ctx.get("jsdep"): # only present when a --render scan measured it jsdiff.geo_finding(ctx["jsdep"], report) def _record_text_cue(report, name, counts): """Expose bounded literal observations, not a semantic or engine verdict.""" receipt = report.meta.setdefault('geo_text_cues', { 'version': 1, 'basis': 'configured_english_oriented_patterns', 'interpretation': 'editorial_review_only', 'limits': 'Not language understanding, paragraph segmentation, source validation, ' 'answer assessment or measured engine/ranking/citation behavior.', 'checks': {}, }) receipt['checks'][name] = counts def _bound_receipt(value): """Serialize bounds without rounding or changing their comparison behavior.""" if type(value) is int: return value if type(value) is float: return value if math.isfinite(value) else {'kind': 'nonfinite_float', 'value': str(value)} if type(value) is Decimal: return {'kind': 'decimal', 'value': str(value)} if type(value) is Fraction: return {'kind': 'fraction', 'value': str(value)} # Other programmatic numeric types may support comparisons. Keep that # behavior, but do not serialize the object, call its conversion hooks or # imply an exact numeric snapshot that we cannot represent. return {'kind': 'unrecorded_numeric_type'} def _question_headings(doc, report, article=False): subs = [t for lvl, t in doc.headings if lvl >= 2 and t] q = [t for t in subs if t.lower().split()[:1] and t.lower().split()[0] in _QUESTION_WORDS or t.rstrip().endswith("?")] _record_text_cue(report, 'question_headings', { 'matched': len(q), 'examined': len(subs), 'advisory_below_fraction': 0.2, 'match_rule': 'english_first_token_or_terminal_ascii_question_mark', }) if not subs: return observed = (f"{len(q)}/{len(subs)} subheadings match configured English starters " "or a terminal ASCII question mark.") ratio = len(q) / len(subs) if ratio < 0.2: report.add(CAT, "low", "Few configured question-heading cues", observed + " Question relevance and engine matching are not measured.", observed + " Use descriptive headings suited to the audience; questions " "are optional when useful. Do not rewrite solely to satisfy these " "English-oriented cues; citation impact is not measured.", rule_id="geo.few.question.based.headings") else: report.add(CAT, "good", "Configured question-heading cues present", observed + " Question relevance and engine matching are not measured.", rule_id="geo.question.based.headings.present") def _passage_citability(doc, report, th=None): """Count synthetic sentence groups in a configured ASCII-word size range. This does not segment real paragraphs or measure self-containment/citability. The default 40–120 range is a heuristic, not an engine requirement. """ th = th or {} lo, hi = th.get("passage_min", 40), th.get("passage_max", 120) text = doc.body_text or "" chunks = re.split(r"(?<=[.!?])\s+(?=[A-Z])", text) # Historical grouping algorithm, not actual paragraph segmentation. passages, buf, count = [], [], 0 for s in chunks: w = len(_WORD.findall(s)) buf.append(s) count += w if count >= lo: passages.append(count) buf, count = [], 0 if buf and count: passages.append(count) citable = [p for p in passages if lo <= p <= hi] _record_text_cue(report, 'sentence_groups', { 'in_range': len(citable), 'examined': len(passages), 'word_min': _bound_receipt(lo), 'word_max': _bound_receipt(hi), 'advisory_below_fraction': 0.3, 'match_rule': 'ascii_word_counts_in_accumulated_sentence_fragments', }) if not passages: return observed = (f"{len(citable)}/{len(passages)} synthetic sentence groups contain " f"{lo}–{hi} counted ASCII-word matches.") ratio = len(citable) / len(passages) if ratio < 0.3: report.add(CAT, "low", "Few sentence groups in the configured word range", observed + " Actual paragraphs, self-containment and engine citability are not measured.", observed + " Review readability and completeness in context. This configured " "range is not an engine requirement; do not pad or split useful text " "just to match it. Citation impact is not measured.", rule_id="geo.few.self.contained.citable.passages") else: report.add(CAT, "good", "Sentence groups in the configured word range", observed + " Actual paragraphs, self-containment and engine citability are not measured.", rule_id="geo.citable.passage.structure") def _evidence_density(doc, report, article=False): text = doc.body_text or "" stats = len(_STAT.findall(text)) cites = len(_CITE_HINT.findall(text)) _record_text_cue(report, 'evidence_cues', { 'statistic_matches': stats, 'citation_cue_matches': cites, 'source_validity_checked': False, }) observed = f"{stats} configured statistic-pattern matches; {cites} citation-cue matches." if stats + cites == 0: report.add(CAT, "low", "No configured statistics/citation cues", observed + " Other numbers, links or references may exist; source validity is not checked.", observed + " Review factual claims and relevant primary sources in context. " "Do not invent statistics or citations to satisfy this check. Cue absence " "does not prove missing evidence; citation impact is not measured.", rule_id="geo.no.statistics.or.citations") else: report.add(CAT, "good", "Configured statistics/citation cues present", observed + " Lexical cues only; factual support and source validity are not checked.", rule_id="geo.evidence.signals.present") def _direct_answer(doc, report): """Observe English lexical cues in the first 80 whitespace-separated tokens.""" text = doc.body_text or "" tokens = text.split()[:80] intro = " ".join(tokens) matched = bool(re.search(r"\b(is|are|means|refers to|allows|helps|provides)\b", intro, re.I)) _record_text_cue(report, 'intro_cues', { 'inspected_tokens': len(tokens), 'token_limit': 80, 'matched': matched, 'match_rule': 'configured_english_answer_terms', }) if not intro: return if not matched: report.add(CAT, "low", "No configured introductory answer cues", "No configured English answer term matched in the first 80 whitespace-separated tokens. " "This does not establish whether the opening answers a question.", "Review whether the opening serves the reader's intent and language. " "Add a concise answer only when useful; English cue absence does not " "prove a missing answer. Answer accuracy and citation impact are not measured.", rule_id="geo.no.direct.answer.up.top") else: report.add(CAT, "good", "Configured introductory answer cue present", "A configured English term matched in the first 80 whitespace-separated tokens. " "Answer directness, accuracy and citation impact are not measured.", rule_id="geo.direct.answer.near.the.top") def _llms_txt(ctx, report): supplied = ctx.get('llms_txt_receipt') receipt = llms_resource.recorded(supplied) if receipt is None: receipt = {'version': 1, 'checked_path': '/llms.txt', 'state': 'unverified', 'basis': 'legacy_context' if type(ctx.get('llms_txt')) is bool and supplied is None else 'not_recorded'} if receipt['basis'] == 'legacy_context': receipt['reported_present'] = ctx['llms_txt'] report.meta['llms_txt'] = dict(receipt) legacy = receipt['basis'] == 'legacy_context' if receipt['state'] == 'observed' or (legacy and receipt['reported_present']): report.add(CAT, 'good', 'Root llms.txt text candidate observed' if not legacy else 'llms.txt presence reported (legacy context)', llms_resource.note(report.meta), rule_id='geo.llms.txt.published', scope='site') elif receipt['state'] == 'absent' or (legacy and not receipt['reported_present']): report.add(CAT, 'low', 'No root llms.txt observed' if not legacy else 'No root llms.txt recorded (legacy context)', llms_resource.note(report.meta), 'Optionally publish a curated llms.txt if useful; this is not a required ranking or access control.', rule_id='geo.no.llms.txt', scope='site') def _ai_crawler_access(ctx, report): """Classify root directives by documented purpose, not live bot reachability.""" robots = ctx.get("robots_txt") if robots is None: return rt = RobotsTxt.parse(robots) agents, notes = [], [] for agent, role, purpose, source, note in _CRAWLER_POLICIES: disallowed = rt.disallowed("/", agent) agents.append({"agent": agent, "role": role, "purpose": purpose, "source": source, "disallowed": disallowed}) if disallowed and role != "search_retrieval": notes.append({"agent": agent, "text": note, "source": source}) report.meta["ai_crawler_access"] = { "version": 1, "policy_checked": "2026-10-15", "checked_path": "/", "basis": "robots_txt_only", "agents": agents, "notes": notes, } blocked = [row["agent"] for row in agents if row["role"] == "search_retrieval" and row["disallowed"]] if blocked: names = ", ".join(f"{b} ({AI_BOTS[b]})" for b in blocked) report.add(CAT, "high", "AI crawlers are blocked in robots.txt", f"robots.txt disallows / for these search/retrieval agents: {names}. " "Only the site root was checked; live access, other paths, indexing and citations are not verified.", "If these search or user-retrieval channels match your goals, review their / directives " "and infrastructure access. Keep deliberate restrictions; do not enable training bots " "as a search fix.", evidence=names, scope="site") else: report.add(CAT, "good", "Search/retrieval agents are not disallowed at site root", "robots.txt only; live access, other paths, indexing and citations are not verified.", scope="site") def _entity_clarity(doc, report): """A clear subject entity helps AI ground the page. Approximate by checking the H1/title share a consistent noun phrase and the page names an org.""" title = (doc.title or "").lower() h1s = [t.lower() for lvl, t in doc.headings if lvl == 1] if title and h1s: t_words = set(_WORD.findall(title)) h_words = set(_WORD.findall(h1s[0])) if t_words and not (t_words & h_words): report.add(CAT, "low", "Title and H1 don't share terms", "The <title> and <h1> have no words in common.", "Align them on the core entity so engines get one clear " "topic signal.")skills/seo-scan/scripts/audit_schema.py16 KB52701f9b10cfupstream ↗
"""Supported JSON-LD, Microdata and bounded schema.org RDFa observations. Distinguish decoder syntax errors from tool processing gaps, inspect observed node fields and dated appearance policies, and condition type-nonobservation advice on extraction scope rather than certifying absence or eligibility. """ from __future__ import annotations try: from lib import ecommerce, htmlx, microdata, structured_data, schema_appearance, schema_coverage from lib.report import recorded_schema_extraction_problem except ImportError: # when imported as a package from .lib import ecommerce, htmlx, microdata, structured_data, schema_appearance, schema_coverage # type: ignore from .lib.report import recorded_schema_extraction_problem CAT = "schema" # Preserve existing module names while sharing one dated, offline snapshot. FEATURE_STATUS_CHECKED = schema_appearance.FEATURE_STATUS_CHECKED DEPRECATED = schema_appearance.DEPRECATED DEPRECATED_SOURCES = schema_appearance.DEPRECATED_SOURCES DEPRECATED_ADDITIONAL_SOURCES = schema_appearance.DEPRECATED_ADDITIONAL_SOURCES # Minimal required-property expectations per common type. REQUIRED = { "Organization": ["name"], "LocalBusiness": ["name", "address"], "Recipe": ["name", "image"], "Event": ["name", "startDate", "location"], "JobPosting": ["title", "hiringOrganization", "datePosted"], "BreadcrumbList": ["itemListElement"], "VideoObject": ["name", "thumbnailUrl", "uploadDate"], "Review": ["reviewRating", "author"], "Course": ["name", "provider"], } ARTICLE_TYPES = {"Article", "NewsArticle", "BlogPosting"} ARTICLE_SOURCE = "https://developers.google.com/search/docs/appearance/structured-data/article" ARTICLE_STATUS_CHECKED = "2026-10-12" ARTICLE_FIELDS = ["headline", "author", "datePublished", "image"] RECIPE_SOURCE = "https://developers.google.com/search/docs/appearance/structured-data/recipe" RECIPE_STATUS_CHECKED = "2026-10-12" RECIPE_FIELDS = ["recipeIngredient", "recipeInstructions", "author", "aggregateRating"] RECOMMENDED = { **{typ: list(ARTICLE_FIELDS) for typ in sorted(ARTICLE_TYPES)}, "Organization": ["url", "logo"], "LocalBusiness": ["telephone", "openingHours", "geo"], "Recipe": list(RECIPE_FIELDS), "Event": ["endDate", "offers"], "VideoObject": ["description", "duration"], } def _field_value_present(value, depth=0): """Absence/blank evidence only, not datatype or reference validation.""" if depth >= 16: return True # unknown deeply nested shape, not proven absent if value is None: return False if isinstance(value, str): return bool(value.strip()) if isinstance(value, list): return any(_field_value_present(child, depth + 1) for child in value) if isinstance(value, dict): if not value: return False if "@value" in value and set(value) <= {"@value", "@language", "@type", "@direction", "@index"}: return _field_value_present(value["@value"], depth + 1) return True # preserve non-empty references/unknown shapes, not validity def _article_policy(typ, report): policy = report.meta.setdefault("structured_data", {}).setdefault("article_field_policy", { "scope": "Google Article-family field recommendations, not full eligibility or schema.org validity", "required_properties": [], "checked_recommendations": list(ARTICLE_FIELDS), "checked_on": ARTICLE_STATUS_CHECKED, "source": ARTICLE_SOURCE, "observed_types": [], }) if typ not in policy["observed_types"]: policy["observed_types"].append(typ) policy["observed_types"].sort() def _recipe_policy(report): """Record offline base-field expectations without claiming full eligibility.""" report.meta.setdefault("structured_data", {}).setdefault("recipe_field_policy", { "scope": "Google Recipe base-field presence, not full eligibility or schema.org validity", "required_properties": list(REQUIRED["Recipe"]), "checked_recommendations": list(RECIPE_FIELDS), "checked_on": RECIPE_STATUS_CHECKED, "source": RECIPE_SOURCE, "not_checked": ["conditional nutrition/yield and time relationships", "nested steps/sections", "image crawlability and dish/content suitability", "datatype/language/reference validation"], }) def audit(doc, resp, report, ctx=None) -> None: blobs = doc.scripts_ld diagnostics = [] records, errors = structured_data.collect(doc, diagnostics=diagnostics) report.meta["structured_data"] = structured_data.provenance(doc, records) report.meta['structured_data']['extraction_coverage'] = schema_coverage.observe(doc, errors) report.meta['structured_data']['jsonld_error_stages'] = { 'version': 1, 'basis': 'decoder_and_node_processing_exceptions', 'syntax_errors': sum(d['kind'] == 'syntax' for d in diagnostics), 'decoder_processing_errors': sum(d['kind'] == 'processing' and d['stage'] == 'decode' for d in diagnostics), 'node_processing_errors': sum(d['kind'] == 'processing' and d['stage'] == 'nodes' for d in diagnostics), 'unclassified_errors': max(0, len(errors) - len(diagnostics)), 'limits': 'Exception-stage observations only, not full JSON/JSON-LD conformance, schema validity, ' 'exhaustive extraction or engine behavior. Missing legacy classification is not inferred.', } if doc.microdata_warnings: warning = "\n".join(doc.microdata_warnings) report.add(CAT, "low", "Microdata extraction needs verification", warning, ("Check item scopes, URLs and itemref targets; validate the rendered markup with the schema.org validator. " + microdata.warning_summary(doc.microdata_warnings)).strip(), evidence=warning, rule_id="schema.microdata.extraction") if doc.rdfa_warnings: warning = "\n".join(doc.rdfa_warnings) report.add(CAT, "low", "RDFa extraction needs verification", warning, ("Check RDFa subjects, vocabulary and coverage limits; validate the rendered markup with the schema.org validator. " + microdata.warning_summary(doc.rdfa_warnings)).strip(), evidence=warning, rule_id="schema.rdfa.extraction") if not blobs and not any(structured_data.types(r["node"]) for r in records): # Hub/index pages have no single entity to mark up — absence there is a # note, not a real gap (articles/products/homepages keep medium). if (schema_coverage.state(schema_coverage.meta_receipt(report.meta)) == 'no_known_problem' and not recorded_schema_extraction_problem(report.meta)): hub = htmlx.is_hub_page(doc) report.add(CAT, "low" if hub else "medium", "No structured data", "No JSON-LD, typed Microdata or supported schema.org RDFa was observed in the supported subset; " "this does not certify exhaustive extraction or a markup requirement.", "Review existing markup and the page's real entity before adding applicable semantic markup. " "Preserve valid JSON-LD, Microdata or RDFa; do not invent content or duplicate existing entities. " "Rich-result eligibility, ranking and AI citation benefits are not established." + (" (Least critical on listing/index pages.)" if hub else ""), rule_id="schema.no.structured.data") report.meta["ecommerce"] = ecommerce.audit(doc, report) return found_types = [] error_kinds = {d['block']: d['kind'] for d in diagnostics} for block, error in errors: if error_kinds.get(block) == 'syntax': report.add(CAT, "high", "Invalid JSON-LD", f"Block #{block} triggered a JSON decoder syntax error; this is not full JSON-LD/schema validation.", "Inspect the original block and repair verified JSON syntax errors. Preserve valid semantic data; " "engine behavior and rich-result eligibility are not measured.", evidence=error) else: report.add(CAT, 'low', 'JSON-LD processing needs verification', f'Block #{block} could not be fully decoded or processed by this tool; ' 'a limit/unsupported processing path is not proof of source syntax invalidity.', 'Inspect the original block, error evidence and supported tool/parser scope. ' 'Do not rewrite valid markup or increase recursion/numeric/body limits automatically to clear this note. ' 'Verify any actual source defect before editing; validity and engine behavior remain unverified.', evidence=error, rule_id='schema.jsonld.processing.unverified') # Validate shared unique objects, including nested Microdata/RDFa entities. # Distinct defective variants remain evidence, but score a given rule once. start = len(report.findings) for record in records: _validate_node(record["node"], found_types, report) kept, seen = report.findings[:start], {} for finding in report.findings[start:]: if finding.rule_id not in seen: kept.append(finding) seen[finding.rule_id] = finding elif finding.detail not in seen[finding.rule_id].detail: seen[finding.rule_id].detail += " Additional node: " + finding.detail report.findings = kept if found_types: report.ok(CAT, "Structured data present", ", ".join(sorted(set(found_types)))) _cross_checks(doc, found_types, report) report.meta["ecommerce"] = ecommerce.audit(doc, report) def _types_of(node) -> list: t = node.get("@type") if isinstance(t, list): return [str(x) for x in t] return [str(t)] if t else [] def _feature_notice(typ, report): source = DEPRECATED_SOURCES[typ] additional = DEPRECATED_ADDITIONAL_SOURCES.get(typ, []) notices = report.meta.setdefault("structured_data", {}).setdefault("google_rich_result_notices", []) if not any(notice["type"] == typ for notice in notices): notices.append(schema_appearance.notice(typ)) # Config ignores use title substrings, not rule IDs. Honor the old title # as well as the new presentation; factual provenance remains available. if report.ignore and report.ignore(CAT, f"Deprecated rich-result type: {typ}"): return sources = "; ".join([source] + additional) other_use = "ClaimReview remains supported by Fact Check Explorer. " if typ == "ClaimReview" else "" report.add(CAT, "low", f"Retired Google rich-result feature: {typ}", DEPRECATED[typ], "Retain accurate markup if useful for semantic meaning or other consumers; do not expect this Google Search rich-result feature. " "Retirement alone does not invalidate schema.org markup or establish a ranking penalty. " + other_use + f"Google sources (checked {FEATURE_STATUS_CHECKED}): {sources}", # Keep the historical identity despite clearer wording. rule_id=f"schema.deprecated.rich.result.type.{typ.lower()}") def _validate_node(node, found_types, report): for typ in _types_of(node): found_types.append(typ) if typ in DEPRECATED: _feature_notice(typ, report) if typ in ARTICLE_TYPES: _article_policy(typ, report) if typ == "Recipe": _recipe_policy(report) for req in REQUIRED.get(typ, []): absent = not _field_value_present(node.get(req)) if typ == "Recipe" else req not in node if absent: recipe = typ == "Recipe" report.add(CAT, "high", f"{typ} missing required '{req}'", f"Recipe '{req}' is absent or blank; Google requires it for Recipe rich results." if recipe else f"Schema {typ} lacks the required '{req}' property.", (f"Add an accurate {'completed-dish image' if req == 'image' else 'dish name'} matching the page. " f"This is a base-field check, not full eligibility or schema.org validity; verify conditional, nested and image requirements separately. Source: {RECIPE_SOURCE}") if recipe else f"Add '{req}' — without it the rich result is invalid.") if typ in ARTICLE_TYPES or typ == "Recipe": missing_rec = [p for p in RECOMMENDED[typ] if not _field_value_present(node.get(p))] else: missing_rec = [p for p in RECOMMENDED.get(typ, []) if p not in node] if typ in ARTICLE_TYPES and "headline" in missing_rec and report.ignore and report.ignore(CAT, f"{typ} missing required 'headline'"): missing_rec.remove("headline") # preserve the old headline-only opt-out if typ == "Recipe" and report.ignore: missing_rec = [p for p in missing_rec if p not in ("recipeIngredient", "recipeInstructions") or not report.ignore(CAT, f"Recipe missing required '{p}'")] if missing_rec: article = typ in ARTICLE_TYPES recipe = typ == "Recipe" if article: recommendation = (f"Consider applicable, known {', '.join(missing_rec)} values; do not invent authors or dates. " f"Google Article markup has no required properties, and this is not an invalidity or eligibility verdict. Source: {ARTICLE_SOURCE}") elif recipe: recommendation = (f"Add applicable, real {', '.join(missing_rec)} values matching the recipe; do not invent authors or ratings. " f"Google requires Recipe name and image; ingredients and instructions are recommended. " f"This is not full eligibility or schema.org validity; verify conditional, nested and image requirements separately. Source: {RECIPE_SOURCE}") else: recommendation = f"Add {', '.join(missing_rec)} to strengthen the {typ} entity." report.add(CAT, "low", f"{typ} missing recommended properties", f"Recommended fields absent{' or blank' if article or recipe else ''}: {', '.join(missing_rec)}.", recommendation) def _cross_checks(doc, found_types, report): # An unobserved type may be in the portion the extractor could not inspect. # Node-level validation above remains active for positively observed objects. if (schema_coverage.state(schema_coverage.meta_receipt(report.meta)) != 'no_known_problem' or recorded_schema_extraction_problem(report.meta)): return has_article = any(t in found_types for t in ("Article", "NewsArticle", "BlogPosting")) # Shared page-type heuristic (og:type / published_time / single <article>) — # raw text length alone misread text-heavy homepages as articles. if htmlx.looks_article(doc) and not has_article: report.add(CAT, "low", "Article-like page without Article schema", "The page-type heuristic suggests an article, but no Article/BlogPosting/NewsArticle " "type was observed in the supported subset; this is not proof of absence or suitability.", "Review the actual page purpose and existing markup before adding an applicable Article type. " "Use only real visible content and known authors/dates; preserve valid supported formats. " "No rich-result eligibility, ranking or AI attribution benefit is verified.") if not any(t in found_types for t in ("Organization", "LocalBusiness", "WebSite")): report.add(CAT, "low", "No Organization/WebSite entity", "No Organization, LocalBusiness or WebSite type was observed in this page's supported subset; " "this is not a whole-site identity or exhaustive-extraction check.", "Review existing publisher/site markup and intended consumer before adding applicable entity data. " "Do not duplicate entities, invent publisher facts or add both types automatically. " "Preserve valid JSON-LD, Microdata or RDFa; eligibility and ranking benefits are not established.")skills/seo-scan/scripts/audit_technical.py21 KB1baf31f9da2eupstream ↗
"""Technical SEO auditor. Checks the crawlability and indexability signals that determine whether a page can rank at all: title/meta, headings, canonical, robots directives, viewport, hreflang, images, links, and a few HTTP-header hygiene checks. """ from __future__ import annotations import json from urllib.parse import urljoin, urlparse try: from lib import htmlx from lib import jsdiff from lib import links from lib import sitemap as sm from lib import indexing from lib import canonical from lib import hreflang except ImportError: # when imported as a package from .lib import htmlx # type: ignore from .lib import jsdiff # type: ignore from .lib import links # type: ignore from .lib import sitemap as sm # type: ignore from .lib import indexing # type: ignore from .lib import canonical # type: ignore from .lib import hreflang # type: ignore CAT = "technical" ANCHOR_WITNESSES = 5 def audit(doc, resp, report, ctx=None) -> None: ctx = ctx or {} th = ctx.get("thresholds", {}) _title(doc, report, th) _description(doc, report, th) _headings(doc, report) _canonical(doc, resp, report) _robots_directives(doc, report) _http_robots(resp, report) _viewport_lang(doc, report) _hreflang(doc, report) _images(doc, report) _links(doc, resp, report) _http_hygiene(resp, report) _robots_txt(ctx, report) _sitemap(ctx, report) _noscript_only(doc, report) if ctx.get("jsdep"): # only present when a --render scan measured it jsdiff.technical_findings(ctx["jsdep"], report) def _noscript_only(doc, report): """JS-shell pages that serve their real content only inside <noscript>. Non-rendering crawlers (and most AI fetchers) do read the fallback, so it's not invisible — but it's a second-class, historically spam-adjacent signal, and rendering crawlers see a *different* document than non-rendering ones.""" visible = len((doc.text or "").split()) fallback = len((doc.noscript_text or "").split()) if visible < 20 and fallback >= 50: report.add(CAT, "medium", "Content served only as a <noscript> fallback", f"{visible} words of regular body text vs {fallback} words " "inside <noscript>.", "Server-render (SSR/SSG) the main content so JS and non-JS " "crawlers see the same document; verify the rendered page " "with --render matches the fallback.") def _title(doc, report, th=None): th = th or {} lo, hi = th.get("title_min", 15), th.get("title_max", 65) t = doc.title if not t: report.add(CAT, "critical", "Missing <title>", "The page has no title element.", "Add a unique, descriptive <title> of ~50–60 characters.") return n = len(t) if n < lo: # A homepage title that is just the brand name is normal practice, not a # ranking emergency — flagging it "high" was noise on most real sites. if htmlx.is_homepage(doc): report.add(CAT, "low", "Homepage title is just the brand", f"Title is {n} characters.", "Fine for a known brand; consider \"Brand — what you do\" " "(~50–60 chars) to also rank for the value proposition.", evidence=t) else: report.add(CAT, "high", "Title is very short", f"Title is {n} characters.", "Expand to ~50–60 characters with the primary query and brand.", evidence=t) elif n > hi: report.add(CAT, "medium", "Title may be truncated in SERPs", f"Title is {n} characters (>{hi} often truncates).", "Trim to ~50–60 characters, front-loading the key phrase.", evidence=t) else: report.ok(CAT, "Title length is in range", f"{n} characters") def _description(doc, report, th=None): th = th or {} lo, hi = th.get("meta_desc_min", 70), th.get("meta_desc_max", 165) d = doc.meta_by_name("description") if not d: report.add(CAT, "high", "Missing meta description", "No <meta name=\"description\"> found.", "Add a compelling 140–160 character summary with the target query.") return n = len(d) if n < lo: report.add(CAT, "low", "Meta description is short", f"Description is {n} characters.", "Aim for 140–160 characters to use the full SERP snippet.", evidence=d) elif n > hi: report.add(CAT, "low", "Meta description may be truncated", f"Description is {n} characters.", "Trim to ~155 characters.", evidence=d) else: report.ok(CAT, "Meta description length is in range", f"{n} characters") def _headings(doc, report): h1s = [t for lvl, t in doc.headings if lvl == 1] if not h1s: report.add(CAT, "high", "No H1 heading", "The page has no <h1>.", "Add a single H1 that states the page's main topic.") elif len(h1s) > 1: report.add(CAT, "medium", "Multiple H1 headings", f"Found {len(h1s)} H1 elements.", "Use one H1; demote the rest to H2/H3.", evidence=" | ".join(h1s[:3])) else: report.ok(CAT, "Exactly one H1", h1s[0]) # heading level jumps (e.g. H2 -> H4) hurt outline clarity levels = [lvl for lvl, _ in doc.headings] for a, b in zip(levels, levels[1:]): if b - a > 1: report.add(CAT, "low", "Heading levels skip a level", f"An H{a} is followed by an H{b}.", "Keep heading nesting sequential (no H2→H4 jumps).") break def _canonical(doc, resp, report): final = resp.final_url or resp.url receipt = canonical.observe(doc, final) report.meta['canonical_comparison'] = receipt can = doc.canonical() if receipt['status'] == 'missing': report.add(CAT, "medium", "No canonical URL", "No <link rel=\"canonical\"> present.", "Add a self-referencing canonical to consolidate signals.") return if receipt['status'] == 'unverified': report.add(CAT, 'low', 'Review unverified canonical comparison', 'A first HTML canonical declaration was observed, but a candidate/comparison URL ' 'was empty, malformed or outside supported HTTP comparison. ' + canonical.LIMITS, 'Inspect the original declaration, HTML base and fetched URL before editing. ' 'Repair only confirmed source defects; do not add a duplicate canonical or assume ' 'the target is missing, reachable or selected by a search engine.', evidence=can or '', rule_id='technical.canonical.comparison.unverified') elif receipt['status'] == 'differs': report.add(CAT, "low", "Canonical points elsewhere", f"Canonical is {can} but fetched URL is {final}. Differing components: " + ', '.join(receipt['differences']) + '. ' + canonical.LIMITS, 'Confirm this is intentional (cross-domain/variant canonical). Preserve valid ' 'consolidation; edit only a verified wrong target. Search-engine selection is unmeasured.', evidence=can) else: report.ok(CAT, 'Self-referencing canonical', str(can) + '. ' + canonical.LIMITS) def _generic_meta_robots(doc): """Collect exact restriction names across active generic robots meta tags. Parameter names/values are not standalone rules (e.g. image-preview:none), but standalone names before a parameter remain observable. Keep one bounded positional witness per recognized name, scanning every tag. """ observed = {} for position, meta in enumerate(doc.meta, 1): if (meta.get('name') or '').lower() != 'robots': continue for token in indexing.restriction_names(meta.get('content') or ''): observed.setdefault(token, position) rules = indexing.expand(observed) evidence = '; '.join(f'meta robots #{position}: {token}' for token, position in sorted(observed.items())) return rules, evidence def _robots_directives(doc, report): named = indexing.crawler_meta(doc.meta) if named: report.meta['crawler_meta_robots'] = named robots, evidence = _generic_meta_robots(doc) if 'noindex' in robots: report.add(CAT, "critical", "Page is set to noindex", "Generic meta robots declares 'noindex' or its 'none' alias.", "Remove the restricting directive only if this page should appear in search results.", evidence=evidence) if 'nofollow' in robots: report.add(CAT, "medium", "Page-level nofollow", "Generic meta robots declares 'nofollow' or its 'none' alias.", "Review this directive if crawlers should follow page links; this check does not measure crawler behavior.", evidence=evidence) if 'noindex' not in robots: report.add(CAT, 'good', 'No generic meta noindex detected', 'Generic meta robots observation only; it excludes HTTP headers and crawler-specific meta. ' 'Absence is not proof of indexability.', rule_id='technical.page.is.indexable') def _http_robots(resp, report): """Score only observed unprefixed restrictions; named scopes are policy notes.""" fields = getattr(resp, 'robots_header_fields', None) basis = getattr(resp, 'robots_header_basis', 'merged_or_unknown') if fields is None: value = next((value for key, value in resp.headers.items() if key.lower() == 'x-robots-tag'), '') fields = [value] if value else [] basis = 'merged_or_unknown' if not fields: return receipt, witnesses = indexing.http_robots(fields, basis) report.meta['http_robots'] = receipt recommendation = ('Review the hosting/CDN/middleware response-header owner; remove the restriction only if unintended. ' 'Changing HTML meta tags alone does not remove this header.') if 'noindex' in receipt['generic']: report.add(CAT, 'critical', 'HTTP X-Robots-Tag declares noindex', 'An unprefixed response-header rule declares noindex (including the none alias). ' 'This observes a declaration, not live search inclusion.', recommendation, evidence=witnesses['noindex'], rule_id='technical.http.robots.noindex') if 'nofollow' in receipt['generic']: report.add(CAT, 'medium', 'HTTP X-Robots-Tag declares nofollow', 'An unprefixed response-header rule declares nofollow (including the none alias). ' 'This observes a declaration, not actual crawler behavior.', recommendation, evidence=witnesses['nofollow'], rule_id='technical.http.robots.nofollow') def _viewport_lang(doc, report): if not doc.meta_by_name("viewport"): report.add(CAT, "high", "No responsive viewport tag", "Missing <meta name=\"viewport\">.", "Add <meta name=\"viewport\" content=\"width=device-width, " "initial-scale=1\"> for mobile-first indexing.") else: report.ok(CAT, "Responsive viewport declared") if not doc.lang: report.add(CAT, "low", "No lang attribute on <html>", "The <html> element has no lang.", "Set <html lang=\"…\"> to aid rendering and localization.") def _hreflang(doc, report): alts = doc.links_by_rel("alternate") hreflangs = [l for l in alts if l.get("hreflang") is not None] receipt = {} hreflang.extract(doc, report.final_url or report.url, diagnostics=receipt) report.meta['hreflang_policy_basis'] = hreflang.EXTRACTION_BASIS report.meta['hreflang_extraction'] = receipt if not hreflangs: return seen = {} for l in hreflangs: code = l.get("hreflang").strip().lower() seen[code] = seen.get(code, 0) + 1 dupes = [c for c, n in seen.items() if n > 1] if dupes: report.add(CAT, "medium", "Duplicate hreflang entries", f"Repeated hreflang codes: {', '.join(dupes)}.", "Each hreflang value should map to exactly one URL.") if "x-default" not in seen: report.add(CAT, "low", "No x-default hreflang", 'No x-default declaration observed; an unmatched-locale fallback is optional, not a universal requirement.', 'Review whether an existing intended fallback should be declared as x-default. ' 'Do not invent a page or add a fallback solely to clear this contextual review.') if hreflang.unverified(report.meta): report.add(CAT, 'low', 'HTML hreflang URL declarations need review', hreflang.note(report.meta), 'If these are intended language alternatives, confirm their fully-qualified HTTP(S) page URLs ' 'and correct only the relevant declarations. Do not invent language pages or treat source ' 'omissions as HTTP failures; re-scan before relationship or score claims.', rule_id='technical.hreflang.urls.review') if not dupes and not hreflang.unverified(report.meta): report.add(CAT, 'good', 'hreflang declarations observed', f"{len(hreflangs)} declarations with supported source URLs; not search acceptance or language equivalence.", rule_id='technical.hreflang.cluster.present') def _images(doc, report): total = len(doc.images) if not total: return missing = [i for i in doc.images if not (i.get("alt") is not None)] if missing: report.add(CAT, "medium", "Images missing alt text", f"{len(missing)} of {total} <img> tags have no alt attribute.", "Add descriptive alt text (empty alt=\"\" only for decorative images).") else: report.ok(CAT, "All images have alt attributes", f"{total} images") if not any(i.get("loading") == "lazy" for i in doc.images) and total > 5: report.add(CAT, "low", "No lazy-loaded images", f"{total} images and none use loading=\"lazy\".", "Add loading=\"lazy\" to below-the-fold images to improve LCP.") def _anchor_evidence(count, witnesses): """Omit credential-like hrefs; keep other witnesses as reversible literal JSON.""" safe_witnesses = [] for witness in witnesses: item = dict(witness) if links.has_credential_like_marker(item['href']): item['href'] = None item['href_omitted'] = 'credential_like_marker' safe_witnesses.append(item) return json.dumps({'scope': 'Source anchor observations; destinations not checked.', 'observed_count': count, 'witnesses': safe_witnesses}, indent=2, ensure_ascii=True).replace('`', '\`') def _links(doc, resp, report): empty = 0 generic = 0 invalid = 0 empty_witnesses, generic_witnesses, invalid_witnesses = [], [], [] base_url = resp.final_url or resp.url effective, receipt = links.document_base(doc, base_url, csp=resp.headers.get('content-security-policy', '')) report.meta['anchor_resolution_basis'] = links.RESOLUTION_BASIS if receipt is not None: report.meta['anchor_base'] = receipt for a in doc.links: href = a.get("href") or "" if not href or href.startswith("#") or href.startswith("javascript:"): continue try: links.resolve_anchor(href, base_url, effective) except ValueError: invalid += 1 if len(invalid_witnesses) < ANCHOR_WITNESSES: invalid_witnesses.append({'href': href}) # Google documents image alt text and an otherwise-empty anchor's title # as source fallbacks. Keep them separate from visible/page text. text = (htmlx.collapse(a.text) or htmlx.collapse(a.image_alt_text) or htmlx.collapse(a.get("title"))) if not text: empty += 1 if len(empty_witnesses) < ANCHOR_WITNESSES: empty_witnesses.append({'href': href, 'label': text}) elif text.lower() in ("click here", "read more", "here", "link", "more"): generic += 1 if len(generic_witnesses) < ANCHOR_WITNESSES: generic_witnesses.append({'href': href, 'label': text}) if invalid: report.add(CAT, "low", "Malformed HTTP link URLs", f"{invalid} <a> href value(s) have invalid HTTP URL syntax and are omitted " "from HTTP link collection and crawl discovery. No network failure is inferred.", "Correct the link host, IPv6 brackets or port, then re-scan. " "Syntax rejection does not establish whether a destination is reachable.", rule_id="technical.links.invalid.url", evidence=_anchor_evidence(invalid, invalid_witnesses)) if empty: report.add(CAT, "low", "Links with no anchor text", f"{empty} <a> tags have no text, image alt text or title fallback.", "Give links descriptive text or meaningful image alt text. " "A title is only a fallback, not a full accessibility fix.", evidence=_anchor_evidence(empty, empty_witnesses)) if generic: report.add(CAT, "low", "Generic anchor text", f"{generic} links use phrases like 'click here'.", "Review link purpose and surrounding context; use descriptive labels where helpful. " "Keep concise navigation and avoid keyword insertion solely to change this phrase count.", evidence=_anchor_evidence(generic, generic_witnesses)) def _http_hygiene(resp, report): if resp.redirects: chain = len(resp.redirects) if chain > 1: report.add(CAT, "low", "Redirect chain", f"{chain} redirects before the final URL.", "Collapse to a single 301 to preserve equity and speed.") scheme = urlparse(resp.final_url or resp.url).scheme if scheme != "https": report.add(CAT, "critical", "Page not served over HTTPS", f"Final URL scheme is {scheme}.", "Serve all pages over HTTPS with a valid certificate.") ct = (resp.headers.get("content-type") or "").lower() if ct and "text/html" not in ct: report.add(CAT, "low", "Unexpected content-type", f"Content-Type is {ct}.", "Confirm the document is served as text/html.") if not resp.headers.get("content-encoding") and resp.headers: report.add(CAT, "low", "No compression header", "Response has no Content-Encoding (gzip/br).", "Enable gzip or Brotli compression to cut transfer size.") def _robots_txt(ctx, report): robots = ctx.get("robots_txt") if robots is None: report.add(CAT, "medium", "No robots.txt found", "Could not fetch /robots.txt.", "Add a robots.txt; reference the XML sitemap in it.") return rejected = {} references = sm.robots_sitemaps(robots, diagnostics=rejected) if rejected: report.add(CAT, "low", "Rejected sitemap URL references", sm.reference_note(sm.reference_diagnostics(rejected)), "Use absolute HTTP(S) sitemap URLs with valid hosts and ports in robots.txt. " "Correct rejected references and re-scan; syntax checks do not prove reachability.", rule_id="technical.sitemap.invalid.references", scope="site") return # do not endorse invalid directives as a passing sitemap reference if not references: report.add(CAT, "low", "robots.txt has no Sitemap directive", "No 'Sitemap:' line in robots.txt.", "Add 'Sitemap: https://…/sitemap.xml' to robots.txt.") else: report.ok(CAT, "robots.txt references a sitemap") def _sitemap(ctx, report): value = ctx.get('sitemap_discovery') receipt = sm.recorded_discovery(value) if value is not None: report.meta['sitemap_discovery'] = receipt or {'basis': 'unrecognized'} found = ctx.get('sitemap_found') if value is None else bool(receipt and receipt['verified_files']) if found: report.ok(CAT, "XML sitemap reachable", ctx.get("sitemap_url", "")) elif sm.discovery_note(value): return # coverage note, not proof of absence or a source penalty else: report.add(CAT, "medium", "No XML sitemap found", "No sitemap.xml at the common locations or in robots.txt.", "Publish an XML sitemap and submit it in Search Console.") def _norm(url: str): """Compatibility alias for the shared, local component-comparison key.""" return canonical.key(url)skills/seo-scan/scripts/brief.py34 KB7dbd20687ab7upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/cli.py3.4 KBc4433cfc17d1upstream ↗
"""Unified ``narwhal`` command — dispatches to the scan/crawl/schema tools. This is a thin router so the same code works three ways with no duplication: - ``narwhal scan|crawl|schema …`` (installed via uvx/pip) - ``python -m narwhal scan …`` (installed package) - ``python scan.py …`` / ``crawl_site.py`` (cloned repo / Claude Code plugin) Each subcommand forwards the remaining args to that tool's own ``main()``. """ from __future__ import annotations import sys try: from ._version import __version__ except ImportError: # running as loose scripts from _version import __version__ USAGE = """narwhal — SEO & GEO/LLMO scanner Usage: narwhal audit <url> [options] Comprehensive site audit (page + crawl + sitemap) narwhal scan <url> [options] Audit a single page narwhal compare <you> <rival...> Side-by-side competitor gap analysis (local-first) narwhal brief <you> <rival...> Page-grounded content brief (--gsc adds own queries) --topic "…" plans a new page narwhal crawl <url> [options] Audit a whole site (sitemap/link discovery) narwhal schema <Type> [options] Generate schema.org JSON-LD narwhal sitemap <url> [options] Validate a site's XML sitemap(s) narwhal llms <url> [options] Generate a starter llms.txt narwhal diff <old.json> <new.json> Compare two JSON reports (regression tracking) narwhal plan <report.json> [--repo .] Map findings to source owners and verification narwhal render <file.md> [options] Render a Markdown report as branded HTML/PDF narwhal vitals <url> [options] Real Core Web Vitals from CrUX (opt-in; needs an API key) narwhal gsc <url> [options] Real Search Console query data — striking distance, CTR laggards, decay, cannibalization (opt-in; OAuth — one-time setup: narwhal gsc --auth) narwhal mcp Run the MCP server (stdio) — needs the `mcp` extra narwhal --version Run any subcommand with -h for its options, e.g. `narwhal scan -h`. """ def main(argv=None) -> int: argv = list(sys.argv[1:] if argv is None else argv) if not argv or argv[0] in ("-h", "--help", "help"): print(USAGE) return 0 if argv[0] in ("-V", "--version", "version"): print(f"narwhal {__version__}") return 0 cmd, rest = argv[0], argv[1:] module = { "scan": "scan", "audit": "audit", "compare": "compare", "brief": "brief", "crawl": "crawl_site", "crawl_site": "crawl_site", "schema": "generate_schema", "sitemap": "validate_sitemap", "llms": "generate_llms", "diff": "diff_scan", "plan": "plan", "render": "render_report", "vitals": "crux", "crux": "crux", "gsc": "gsc", "mcp": "mcp_server", }.get(cmd) if module is None: print(f"Unknown command: {cmd!r}\n", file=sys.stderr) print(USAGE, file=sys.stderr) return 2 mod = _load(module) return mod.main(rest) def _load(name): """Import a sibling tool module whether we're a package or loose scripts.""" try: import importlib return importlib.import_module(f".{name}", __package__ or "") except (ImportError, TypeError): import importlib return importlib.import_module(name) if __name__ == "__main__": raise SystemExit(main())skills/seo-scan/scripts/compare.py23 KB688d0a211d36upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/crawl_site.py46 KBf75a82fbe5c4upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/crux.py11 KB3e3a10b4fce8upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/diff_scan.py45 KB35f6b227a8d1upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/generate_llms.py11 KBa369000ca6dcupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/generate_schema.py7.9 KB03eb6ba04ca8upstream ↗
#!/usr/bin/env python3 """Generate valid schema.org JSON-LD for the common rich-result types. Emits a ready-to-paste ``<script type="application/ld+json">`` block with the required and recommended properties for a type, filled from ``--field key=value`` pairs. Unknown required fields are left as clearly-marked TODO placeholders so nothing silently ships incomplete. Usage: python generate_schema.py Article --field headline="How GEO works" \ --field author="Jane Doe" --field datePublished=2026-01-15 python generate_schema.py --list python generate_schema.py LocalBusiness --field name="Acme" --pretty """ from __future__ import annotations import argparse import json import sys try: from .lib.json_input import DuplicateKeyError, unique_object except ImportError: # standalone script from lib.json_input import DuplicateKeyError, unique_object CONTEXT = "https://schema.org" # type -> (required, recommended). Kept in sync with audit_schema.py. TEMPLATES = { "Article": ([], ["headline", "author", "datePublished", "dateModified", "image", "publisher"]), "BlogPosting": ([], ["headline", "author", "datePublished", "image"]), "NewsArticle": ([], ["headline", "author", "datePublished", "image", "publisher"]), "Product": (["name"], ["image", "description", "brand", "url", "offers", "aggregateRating", "sku"]), "Organization": (["name"], ["url", "logo", "sameAs", "contactPoint"]), "LocalBusiness": (["name", "address"], ["telephone", "openingHours", "geo", "priceRange", "url"]), "WebSite": (["name", "url"], ["potentialAction"]), "BreadcrumbList": (["itemListElement"], []), "FAQPage": (["mainEntity"], []), "Recipe": (["name", "image"], ["recipeIngredient", "recipeInstructions", "author", "aggregateRating", "cookTime"]), "Event": (["name", "startDate", "location"], ["endDate", "offers", "description", "image"]), "JobPosting": (["title", "hiringOrganization", "datePosted"], ["employmentType", "jobLocation", "baseSalary"]), "VideoObject": (["name", "thumbnailUrl", "uploadDate"], ["description", "duration", "contentUrl"]), "Person": (["name"], ["url", "jobTitle", "sameAs", "image"]), "Course": (["name", "provider"], ["description", "offers"]), } # Sensible structured placeholders for non-scalar required fields. STRUCT_PLACEHOLDER = { "address": {"@type": "PostalAddress", "streetAddress": "TODO", "addressLocality": "TODO", "addressRegion": "TODO", "postalCode": "TODO", "addressCountry": "TODO"}, "author": {"@type": "Person", "name": "TODO author name"}, "publisher": {"@type": "Organization", "name": "TODO", "logo": {"@type": "ImageObject", "url": "TODO"}}, "location": {"@type": "Place", "name": "TODO", "address": "TODO"}, "hiringOrganization": {"@type": "Organization", "name": "TODO"}, "provider": {"@type": "Organization", "name": "TODO"}, "offers": {"@type": "Offer", "price": "TODO current price", "priceCurrency": "TODO ISO 4217 currency", "availability": "TODO schema.org ItemAvailability", "url": "TODO canonical offer URL", "itemCondition": "TODO schema.org item condition", "seller": {"@type": "Organization", "name": "TODO seller name"}}, "geo": {"@type": "GeoCoordinates", "latitude": "TODO", "longitude": "TODO"}, "itemListElement": [{"@type": "ListItem", "position": 1, "name": "TODO", "item": "TODO-url"}], "recipeInstructions": ["TODO step 1", "TODO step 2"], "recipeIngredient": ["TODO ingredient"], "mainEntity": [{"@type": "Question", "name": "TODO question?", "acceptedAnswer": {"@type": "Answer", "text": "TODO answer."}}], } def build(type_name: str, fields: dict, include_recommended: bool = True) -> dict: if type_name not in TEMPLATES: raise SystemExit(f"Unknown type {type_name!r}. Use --list to see supported types.") required, recommended = TEMPLATES[type_name] node = {"@context": CONTEXT, "@type": type_name} keys = list(required) + (recommended if include_recommended else []) for key in keys: if key in fields: node[key] = _coerce(fields[key]) elif key in required: node[key] = STRUCT_PLACEHOLDER.get(key, f"TODO: {key} (required)") elif key in STRUCT_PLACEHOLDER: node[key] = STRUCT_PLACEHOLDER[key] else: node[key] = f"TODO: {key} (recommended)" # allow arbitrary extra fields the caller passed for k, v in fields.items(): if k not in node: node[k] = _coerce(v) try: # Detach caller fields and shared placeholders, enforcing JSON value types. return json.loads(json.dumps(node, allow_nan=False, ensure_ascii=False).encode('utf-8'), object_pairs_hook=unique_object) except DuplicateKeyError: raise ValueError('Schema fields contain colliding JSON object keys; supply unique string keys.') from None except (TypeError, ValueError, RecursionError): raise ValueError('Schema fields must be finite UTF-8 JSON-compatible values within supported serialization limits.') from None def _coerce(value): if not isinstance(value, str): return value v = value.strip() if v.startswith(("{", "[")): duplicate = False def admit_object(pairs): nonlocal duplicate try: return unique_object(pairs) except DuplicateKeyError: duplicate = True return {} try: decoded = json.loads(v, object_pairs_hook=admit_object) except json.JSONDecodeError: return value except (ValueError, RecursionError): raise ValueError('JSON field cannot be decoded within supported parser limits.') from None # Defer rejection so malformed JSON keeps its literal-string fallback. if duplicate: raise ValueError('JSON field contains duplicate object keys; supply unique keys.') from None return decoded return value def main(argv=None) -> int: ap = argparse.ArgumentParser(description="Generate schema.org JSON-LD") ap.add_argument("type", nargs="?", help="schema type, e.g. Article, Product") ap.add_argument("--field", action="append", default=[], metavar="KEY=VALUE", help="set a property (repeatable); value may be JSON") ap.add_argument("--list", action="store_true", help="list supported types") ap.add_argument("--no-recommended", action="store_true", help="emit only required properties") ap.add_argument("--raw", action="store_true", help="print bare JSON without the <script> wrapper (not HTML-escaped)") ap.add_argument("--pretty", action="store_true", help="alias for default pretty output") args = ap.parse_args(argv) try: sys.stdout.reconfigure(encoding="utf-8", errors="replace") except (AttributeError, ValueError): pass if args.list or not args.type: print("Supported types:\n " + "\n ".join(sorted(TEMPLATES))) return 0 fields = {} for item in args.field: if "=" not in item: raise SystemExit(f"--field must be KEY=VALUE, got {item!r}") k, v = item.split("=", 1) fields[k.strip()] = v try: node = build(args.type, fields, include_recommended=not args.no_recommended) except ValueError as exc: print(f'Error: {exc}', file=sys.stderr) return 2 blob = json.dumps(node, indent=2, ensure_ascii=False) if args.raw: print(blob) else: # JSON quoting alone does not prevent HTML's script-closing delimiter. blob = blob.replace('<', '\<') print('<script type="application/ld+json">') print(blob) print("</script>") if "TODO" in blob: print("\n# NOTE: replace all TODO placeholders before publishing.", file=sys.stderr) return 0 if __name__ == "__main__": raise SystemExit(main())skills/seo-scan/scripts/gsc.py24 KBdb89d0c4631aupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/__init__.py47 B45cbee0ab07cupstream ↗
"""Shared library for the seo-scan toolkit."""skills/seo-scan/scripts/lib/authorship.py13 KB62d6ed835733upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/brand.py24 KB2caf38072765upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/budgets.py553 B6d1aabf8d403upstream ↗
"""Integer request and byte limits shared by toolkit entrypoints.""" def nonnegative_integer(value, name: str) -> None: """Reject invalid caps without coercing booleans, fractions or missing data.""" if type(value) is not int or value < 0: raise ValueError(f'{name} must be a nonnegative integer.') def positive_integer(value, name: str) -> None: """Reject zero and invalid byte budgets without coercing caller data.""" if type(value) is not int or value <= 0: raise ValueError(f'{name} must be a positive integer.')skills/seo-scan/scripts/lib/canonical.py7.7 KB52134a45a0deupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/cli_errors.py758 B11ee3aab7b23upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/code_fences.py1.5 KB30f2a4b62070upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/config.py8.1 KBe6d6d227d11fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/content_length.py4.8 KBc5373a45b7e0upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/content_quality.py3.4 KBd6e321d04bf0upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/date_cues.py8.7 KBe725280624e7upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/ecommerce.py35 KB77b00f8818b7upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/env.py2.5 KBbaed420b1c50upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/evidence_observation.py3.6 KB1871bdb698daupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/finding_urls.py2.3 KB475e3589798eupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/guides.py4.0 KB164dd86a2584upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/hreflang.py20 KBaf7a0d55f14cupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/htmlx.py17 KB1c66f2cd4a36upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/http.py33 KBd77aed4b1522upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/images.py12 KB62593991dd7fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/indexing.py4.2 KBdc4598ec7990upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/jsdiff.py8.4 KB61c460c208f3upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/json_input.py414 Bef9bb81ea0eaupstream ↗
"""Strict object-key admission for JSON input, without rewriting values.""" class DuplicateKeyError(ValueError): """A JSON object repeated a decoded key; never choose a winning value.""" def unique_object(pairs): result = {} for key, value in pairs: if key in result: raise DuplicateKeyError('JSON object contains duplicate keys.') result[key] = value return resultskills/seo-scan/scripts/lib/length_observation.py4.8 KBad7cb8f4c333upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/lexical_focus.py6.8 KBca27eca04ec4upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/links.py8.9 KB269dced50522upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/llms_resource.py6.9 KB58765fd000e8upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/markdown_text.py1.1 KB6cad2928c453upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/merchant_source.py4.8 KBbb13325b767eupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/microdata.py11 KBbd7d37bc9bbcupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/question_observation.py3.7 KBa148026d895aupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/rdfa.py9.9 KBe806ea67cd00upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/readability_observation.py6.3 KBaaffd608e8aaupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/report.py71 KB3f115a18d256upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/report_output.py1.8 KB8d2155d9260aupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/robots.py7.1 KB8d0a7c6f9729upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/schema_appearance.py4.9 KBe07ecc574ba9upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/schema_coverage.py4.4 KBecaa6fd2d44dupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/simhash.py3.2 KBd232aa795631upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/sitegraph.py11 KBe57fbbb9b6c3upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/sitemap.py16 KB4606d153f27dupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/sitemap_discovery.py3.1 KBab61ef762de7upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/source_parser.py602 Bf25dabf3c376upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/structured_data.py8.1 KB8c44f8b468cdupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/subtopic_observation.py3.3 KB58c07c56b154upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/template_source.py2.4 KBa9a5344a1d3cupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/text.py4.4 KB4094375c5707upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/lib/urlpaths.py555 B678a218b43c3upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/mcp_server.py15 KB7bc865ddb41aupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/plan.py104 KB7c3cd896e482upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/psi.py8.0 KB0fc139e13c89upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/render_report.py4.1 KBff52d415e924upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/scan.py18 KBe52dc1c0042dupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/scripts/validate_sitemap.py14 KBb295a9ba9f70upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/references/content-eeat.md24 KB3b6ca5ace156upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/references/geo-llmo.md16 KB5a3cec0c6356upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/references/remediation-plan.schema.json5.1 KB1fb6c4eda670upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/references/schema.md33 KB234ee08225c9upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/references/technical-seo.md33 KBafae4153fd7eupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/requirements.txt870 Bace8fa9880f4upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/__init__.py34 Bcde95b67b498upstream ↗
"""Offline Narwhal test suite."""skills/seo-scan/tests/_cli_process.py1.7 KBaf0e04762440upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/_measurement_browser.py270 Bb852da89fdddupstream ↗
"""Open native measurement details when checking their full evidence contents.""" def expand_measurements(page): page.emulate_media(media='screen') for summary in page.locator('details.measurement-details:not([open]) > summary').all(): summary.click()skills/seo-scan/tests/_smoke_support.py1.7 KB438187759f3dupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/action_cycle_smoke.py110 KBb4c62c3132bcupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/attribution_cue_smoke.py5.0 KB586acac75bf2upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/brand_layout_smoke.py5.1 KB5d0d18f61e45upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/canonical_comparison_smoke.py4.7 KBcae66b805cc1upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/comparative_evidence_smoke.py4.5 KBa7a9c9cadd2aupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/comparative_length_smoke.py5.4 KB90f00a152587upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/content_length_smoke.py4.2 KB4a81fdd5d7ecupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/crawl_table_smoke.py4.2 KBf54789fdbf03upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/crawl_url_identity_smoke.py4.6 KBef51f7e113deupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/date_cues_smoke.py6.1 KB5b528c725b43upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/document_base_links_smoke.py6.9 KB8ae65b69ff11upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/golden_reports.py2.0 KB34afa05f9c46upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/graph_depth_coverage_smoke.py5.5 KB41024d37e166upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/hreflang_source_smoke.py6.9 KB5991338e94d0upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/jsonld_error_stages_smoke.py3.9 KBfe82713a1cfeupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/lexical_focus_smoke.py4.6 KB1d7129eaf26fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/measurement_disclosure_smoke.py6.0 KB60127c42cbf6upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/native_score_table_smoke.py7.4 KBa2231d35e81bupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/page_schema_review_smoke.py4.2 KB68136a6f3748upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/question_observation_smoke.py4.8 KBa2bc049ab4a0upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/quick_win_preview_smoke.py4.7 KB8277a7625eeeupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/readability_observation_smoke.py5.7 KBf1ccbf47bd47upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/relative_link_paths_smoke.py4.2 KB09cd75f956f5upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/render_smoke.py12 KB79f291d3a85bupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/rendered_text_evidence_smoke.py5.2 KB20287e551905upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/report_headline_smoke.py5.4 KBd7da21bea334upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/report_table_smoke.py7.3 KB78c39ff7ec89upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/review_capture_smoke.py4.3 KB3ada0681c01bupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/schema_appearance_smoke.py4.6 KBd3a5903ff23fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/schema_coverage_smoke.py4.9 KBc809f3ff14daupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/schema_script_embedding_smoke.py2.6 KB75c69354f573upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/service_opt_in_smoke.py6.4 KB65921ae71154upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/style_review_smoke.py4.7 KB3afd6aaefa14upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/subtopic_observation_smoke.py3.9 KBa02384353433upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_aggregate_ranges.py9.5 KB6e68f94f8173upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_ai_crawler_roles.py8.2 KB657941c0ba92upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_anchor_source_handoff.py5.6 KB397c759eab4bupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_article_fields.py7.5 KBd815a4ce75beupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_auditors.py40 KBb7bd29bccb95upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_authorship_cues.py19 KBcb749fa5852eupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_brand_layout.py3.9 KB23a313cef9e3upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_brief_grounding.py4.3 KBf6762c8ebbb6upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_brief_query_coverage.py7.3 KB0910c2bc2e7aupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_brief_query_table.py2.3 KB13b913466f70upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_brief_rule_ownership.py6.2 KB3b6e0758e0a5upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_canonical_comparison.py18 KB7294478da4bcupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_capture_review_case.py14 KB8b45c373806fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_cli_artifact_saves.py4.8 KB08132a936babupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_cli_process.py4.8 KB11d1a1c6bb8cupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_cli_url_errors.py11 KB99fdd50e722eupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_code_fences.py7.4 KB5da3158ab26fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_cold_rdfa.py2.6 KBfe65467ec288upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_comparative_evidence.py9.4 KB6ccc01509fc7upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_comparative_length.py11 KB8fb064f73f02upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_compare_rule_ownership.py5.0 KB1426a7b76e4fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_compare_target.py4.7 KB634ef2ab9af4upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_comparison_budgets.py9.8 KBb39c0f3d5b52upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_comparison_coverage.py9.7 KB196668698e6bupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_comparison_html_source.py4.9 KBa96046805ba2upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_content_length.py16 KBcc7b499482bbupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_content_phrases.py9.3 KBd30cd56ef01dupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_crawl_budget_validation.py5.2 KB8bd80f6fb30fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_crawl_execution_scope.py17 KB03b65278df4eupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_crawl_indexing.py6.1 KBf3190f7e1e75upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_crawl_measurement_coverage.py17 KBad1ac35d6cb7upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_crawl_pacing.py5.1 KB34c7c76a731aupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_crawl_priority.py3.6 KBa3a871f4e2aeupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_crawl_rule_handoff.py6.2 KB1b4918abe6dcupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_crawl_table_literals.py7.4 KBb2e5d5182082upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_crawl_url_identity.py9.5 KBb151f355b42dupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_crawler_meta.py6.8 KBe1407552998fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_date_cues.py14 KBe32f41b34d4cupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_delivery_errors.py5.2 KBb7ce1de3889fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_diff_config.py8.3 KB17fddfc93c75upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_diff_crawl_coverage.py2.7 KBd3bb00449507upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_diff_crawl_rules.py11 KBeecef9556cabupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_diff_crawl_sample.py5.2 KB9c19eac94f07upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_diff_crawl_setting_presence.py5.5 KBfd33b7a376a5upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_diff_execution_evidence.py6.7 KB3148ebf64162upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_diff_explanations.py4.0 KB888fa87fa15dupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_diff_input_contract.py9.1 KB5128a0cfc5c5upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_diff_label_previews.py6.8 KBbd66850d8fceupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_diff_new_finding_verdicts.py8.5 KB20508d6d1c33upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_diff_output_safety.py10 KB0a3157434bdeupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_diff_read_budget.py4.9 KBc8a852bbff27upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_diff_repeated_rules.py7.1 KB25ac9f4abd49upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_diff_scope.py16 KB1f8cf56ceb71upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_diff_settings.py11 KB79162f1b0d0cupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_diff_severe_escalation.py4.8 KBf04040cff5f4upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_diff_target_labels.py3.7 KB0b1c637bb357upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_document_base_links.py19 KB3e411617fc22upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_ecommerce.py18 KB5e3e62eeb0a9upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_error_destinations.py5.3 KB1937e6510065upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_feature_notices.py6.5 KBb8e0cc70ce33upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_fetch_failures.py4.9 KBadaf4b23794eupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_finding_guides.py6.7 KB7dac82faea0cupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_finding_url_witnesses.py7.9 KB9be9bf34567fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_geo_text_cues.py19 KBeed2502d867aupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_golden_reports.py676 Bd02054e6755eupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_graph_depth_coverage.py9.1 KB7d6fb5b7c72dupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_graph_rankings.py4.0 KBb88c25135172upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_head_fallback_results.py5.3 KB0a62928dc376upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_head_info_cleanup.py5.6 KB127a4472ab3fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_head_probe_cleanup.py6.4 KBec87c2bf65abupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_header_target_witnesses.py6.9 KBd4a099f9392fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_heading_order.py4.9 KB38982a78e3a4upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_hreflang_crawl_acquisition.py15 KB1f9f79418ab1upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_hreflang_source_syntax.py22 KB116d896f0a9dupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_http_robots.py11 KB7adab14d371bupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_http_terminal_status.py5.0 KB31e5075aadeaupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_image_header_dimensions.py4.9 KBa2425d77d237upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_image_weight_evidence.py11 KBe9e7fc8522c7upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_inline_code.py5.8 KBb63eefa78a40upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_inline_links.py5.7 KB808ab46040b6upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_integrations.py11 KBbeb0964bf4e5upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_jpeg_header_boundaries.py3.2 KB2908a2f8b072upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_jpeg_marker_fill.py2.5 KB41d51ede17b7upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_js_baseline_coverage.py10 KB6e4474e8ee2fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_jsonld_error_stages.py11 KBbf2187ea7f55upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_jsonld_literals.py8.1 KB51c8082b6508upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_lexical_focus.py12 KB7a3bb456a328upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_link_label_fallbacks.py6.4 KBafc6260c3276upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_llms_artifact_userinfo.py5.1 KB2dc7e24f5b60upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_llms_budgets.py4.0 KB40182f228cd7upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_llms_literal_markdown.py7.0 KB2b48314c87b1upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_llms_metadata_coverage.py8.7 KB2a2f6fd51462upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_llms_redirect_context.py3.7 KB66afb6c60bd2upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_llms_resource.py21 KB6e4dc0b0e1e3upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_malformed_anchor_links.py10 KBdd7e13808f8cupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_malformed_link_handoff.py6.2 KB0017ece8d790upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_measurement_disclosure.py7.4 KBc95d5b2f5234upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_merchant_comparison_basis.py13 KB5a7985ee1e0eupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_merchant_comparison_coverage.py17 KBa95bfc4146f1upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_merchant_identity.py6.8 KBff36f2d63159upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_merchant_source.py7.9 KBc403c0270deeupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_merchant_urls.py4.3 KB60063af1355eupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_merchant_values.py5.8 KB5bb31659c598upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_microdata.py19 KB6887573663f4upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_mutation_gate.py12 KB1315df4248f0upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_native_score_table.py2.1 KB2f44883fec39upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_nonpublic_host_guard.py7.8 KB484986b294a2upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_offer_comparisons.py9.6 KB941afed33d45upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_optional_budget_preflight.py5.4 KB78bcbbde9d9bupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_page_schema_review.py18 KB342326c5841fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_parser.py8.9 KBc7a0f46eade0upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan.py23 KB74025a3fe84dupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_action_context.py5.9 KBe210a8740596upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_astro_page_routes.py4.1 KBf1c3e6317d95upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_audit_redirect.py7.6 KB0492523f7308upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_automation_eligibility.py16 KB92724bc6c752upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_baseline_preservation.py4.7 KB1a5c31a2550cupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_command_quoting.py5.3 KB498a9baa3f17upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_crawl_links.py7.5 KB2831def9ba0cupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_crawl_page_owners.py18 KBc1ba6d1e037eupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_evidence_handoff.py5.9 KB3a33e56c8026upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_group_overlaps.py4.8 KB78906fe516caupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_group_safety.py3.9 KB7a9c4b8f99a7upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_html_file_routes.py7.8 KB8ae00f0a1370upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_hugo_page_routes.py4.0 KB026bd1145a6eupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_input_validation.py8.7 KBe0a860de5da2upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_inventory_boundary.py4.0 KB00383a56abc1upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_inventory_errors.py4.8 KB7ba3be35a151upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_label_previews.py4.0 KB84297d061d3eupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_literal_paths.py3.6 KB001d0d850462upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_local_pairs.py4.4 KB1d4ce77dd136upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_manifest.py15 KB2abc91b2035fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_manifest_identity.py10 KBa2deaa6b3faeupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_markdown_verification.py5.0 KB990096d5e0ffupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_memory_baseline.py7.1 KB691ac4fc66faupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_next_discovery_owners.py4.7 KB717ef68eae2dupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_next_page_routes.py6.4 KB72025b69f3dbupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_nuxt_page_routes.py3.7 KBb424af0d2b2eupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_observation_selection.py3.5 KB15d29c968af0upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_output_safety.py7.6 KBdac36718e303upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_owner_contract.py3.8 KBe2d6cd599e1eupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_owner_preview.py4.4 KBc5f64ecc78dfupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_read_budget.py3.8 KBa9efce32ac1bupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_recommendation_preview.py4.5 KBd2af3915a32dupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_regression_gate.py4.0 KB6e443fa85c62upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_repeated_evidence.py8.0 KB5e3583dc6bbbupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_route_priority.py5.6 KBf8d821b3e8bfupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_scan_settings.py4.8 KBe0ef0eaffcb8upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_schema_contract.py7.0 KBffca8a25f8efupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_sitemap_containers.py14 KBec00cfa24147upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_sitemap_problem_counts.py4.9 KBc8820ab96692upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_sitemap_unverified_witnesses.py3.7 KB7ec8f4b863caupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_sitemap_verification.py14 KB96ea00e5fe4eupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_static_fallback.py1.5 KBae9f2c313f3fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_success_observations.py7.2 KBa6f74b073a2dupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_url_eligibility.py7.4 KB827781cda3ddupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_url_witnesses.py7.0 KB6e81ecef4c44upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_plan_verification_kind.py13 KB6522eb298ad4upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_point_prices.py9.2 KBed1b279098a1upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_product_names.py6.0 KB7847699daabdupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_prospective_cohort.py4.5 KB420239306a8cupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_question_observation.py9.2 KBced95e29a507upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_quick_win_previews.py5.2 KB68719784bf6dupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_range_probe_cleanup.py7.7 KB7d346cd08551upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_range_response_evidence.py3.2 KBdd86fb4cf4adupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_rdfa.py17 KB1f94180d5865upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_readability_observation.py14 KB26208cb1f81fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_recipe_fields.py11 KBcd4b580fe5dcupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_relative_link_paths.py9.0 KBe5f397bb1dcaupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_render_budget.py9.5 KB8b39c7d4a916upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_render_output_safety.py8.9 KB5213422b8f87upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_render_read_budget.py4.7 KB6a9253dd772cupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_rendered_text_evidence.py10 KB75f6d928028bupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_report_duplicate_keys.py5.1 KBfb327b306089upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_report_output.py2.3 KBc3925bbb36a4upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_reports.py12 KB6b0165a8763dupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_resource_range_coverage.py7.7 KB0be972f1f4d3upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_response_charset.py6.2 KB25055e446d48upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_review_corpus.py14 KB478a8cdc05fdupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_review_recording.py14 KB88172f7181ebupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_robots_bom.py4.2 KBef6e2c0b6811upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_robots_encoding.py7.1 KB2706dc92af85upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_robots_meta.py6.6 KB0ee9a52c37e0upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_robots_path_parameters.py2.6 KB2f897f500f7bupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_robots_wildcards.py4.2 KB842af208a3cbupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_rule_ownership.py12 KB43f8629b37c8upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_scan_scope.py9.8 KB2b45c48b55f6upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_scan_selection_errors.py3.0 KB1ea497d34ae7upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_schema_appearance.py9.4 KBc51aebe439f7upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_schema_coverage.py16 KB409c10ac5827upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_schema_duplicate_keys.py3.6 KB9839c8b92b61upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_schema_json_fields.py14 KB2cedb24560bbupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_schema_receipt_validation.py7.0 KB637f4886e926upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_schema_script_embedding.py3.7 KBdfac04813078upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_schema_source_coverage.py5.1 KBd24bb8ecf7aaupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_scope_selection_consistency.py3.7 KB62b279ef4da7upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_security_contract.py5.4 KB096b6e66204dupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_server_partial_response.py14 KB0a37a9732d15upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_service_opt_in.py12 KB7445dbddf824upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_site_rule_ownership.py6.7 KBdfc96e613fadupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_sitemap_decoded_budget.py7.7 KB09bf2b44ece9upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_sitemap_discovery_xml.py18 KBa0b01a92102fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_sitemap_fetch_completeness.py21 KBc06de1f7f16fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_sitemap_file_identity.py8.0 KB6418fa487463upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_sitemap_parse_coverage.py11 KBaf426fae50dcupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_sitemap_references.py17 KB47af3eaa8731upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_sitemap_response_states.py7.3 KB109d53e90b0eupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_sitemap_sample_spread.py4.1 KB87973751282bupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_source_warning_limits.py5.7 KB94d1ff8561e1upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_style_review.py9.8 KBe9ac82f8058aupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_subtopic_observation.py8.8 KB6d2fdef23954upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_summary_priority.py6.4 KB5d3d2a0d426aupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_table_alignment.py4.7 KB7974be8f7678upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_table_layout.py4.1 KBb1f0d4bdc7d0upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_table_pipes.py4.8 KBa181941b52aaupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_template_source.py9.7 KB3d966fd17fdfupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_tools.py26 KBf089f8552f8eupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_transport_byte_preflight.py4.4 KBdebb755c028dupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_unverified_link_witnesses.py6.9 KBccc15cd18befupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_version.py4.0 KB12e27e19e3a5upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/test_zero_prices.py3.3 KB63cf8c50c6c1upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
skills/seo-scan/tests/update_golden_reports.py218 Be0fcfb744977upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
README.mdupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
Plain-text copy, no login: /skill-bundles/aindong-narwhal-skills-seo-scan.md