seo-supervisor 0.0.0-stage → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/.claude-plugin/marketplace.json +16 -0
  2. package/.claude-plugin/plugin.json +14 -0
  3. package/CHANGELOG.md +31 -0
  4. package/LICENSE +25 -0
  5. package/README.md +197 -2
  6. package/bin/agents.mjs +65 -0
  7. package/bin/prompt.mjs +76 -0
  8. package/bin/seo-supervisor.mjs +144 -0
  9. package/commands/seo-audit.md +7 -0
  10. package/commands/seo-fix.md +13 -0
  11. package/commands/seo-launch.md +7 -0
  12. package/commands/seo-review.md +7 -0
  13. package/commands/seo-setup.md +19 -0
  14. package/package.json +45 -4
  15. package/skills/seo-supervisor/SKILL.md +199 -0
  16. package/skills/seo-supervisor/examples/sample-audit.json +440 -0
  17. package/skills/seo-supervisor/examples/sample-report.html +654 -0
  18. package/skills/seo-supervisor/examples/sample-report.md +257 -0
  19. package/skills/seo-supervisor/examples/security-tools-profile.md +73 -0
  20. package/skills/seo-supervisor/examples/snippets.md +134 -0
  21. package/skills/seo-supervisor/frameworks/nextjs.md +98 -0
  22. package/skills/seo-supervisor/frameworks/rails.md +34 -0
  23. package/skills/seo-supervisor/frameworks/spa.md +14 -0
  24. package/skills/seo-supervisor/planning.md +145 -0
  25. package/skills/seo-supervisor/profile-template.md +55 -0
  26. package/skills/seo-supervisor/report-format.md +146 -0
  27. package/skills/seo-supervisor/rules/ai-search.md +40 -0
  28. package/skills/seo-supervisor/rules/content.md +60 -0
  29. package/skills/seo-supervisor/rules/crawl-index.md +65 -0
  30. package/skills/seo-supervisor/rules/internal-linking.md +61 -0
  31. package/skills/seo-supervisor/rules/launch-monitoring.md +48 -0
  32. package/skills/seo-supervisor/rules/media.md +30 -0
  33. package/skills/seo-supervisor/rules/metadata.md +39 -0
  34. package/skills/seo-supervisor/rules/performance.md +33 -0
  35. package/skills/seo-supervisor/rules/rendering.md +42 -0
  36. package/skills/seo-supervisor/rules/sitemaps-robots.md +37 -0
  37. package/skills/seo-supervisor/rules/structured-data.md +75 -0
  38. package/skills/seo-supervisor/rules/trust-security.md +25 -0
  39. package/skills/seo-supervisor/rules/urls.md +46 -0
  40. package/skills/seo-supervisor/scripts/content-scan.mjs +173 -0
  41. package/skills/seo-supervisor/scripts/fonts/OFL-BricolageGrotesque.txt +93 -0
  42. package/skills/seo-supervisor/scripts/fonts/OFL-Geist.txt +93 -0
  43. package/skills/seo-supervisor/scripts/fonts/OFL-GeistMono.txt +93 -0
  44. package/skills/seo-supervisor/scripts/fonts/bricolage-grotesque.woff2 +0 -0
  45. package/skills/seo-supervisor/scripts/fonts/geist-mono.woff2 +0 -0
  46. package/skills/seo-supervisor/scripts/fonts/geist.woff2 +0 -0
  47. package/skills/seo-supervisor/scripts/render-report.mjs +706 -0
  48. package/skills/seo-supervisor/scripts/report-plan.mjs +162 -0
  49. package/skills/seo-supervisor/scripts/seo-crawl.mjs +703 -0
  50. package/skills/seo-supervisor/site-types/content.md +22 -0
  51. package/skills/seo-supervisor/site-types/ecommerce.md +27 -0
  52. package/skills/seo-supervisor/site-types/local-business.md +28 -0
  53. package/skills/seo-supervisor/site-types/services.md +22 -0
  54. package/skills/seo-supervisor/site-types/tools.md +127 -0
@@ -0,0 +1,257 @@
1
+ # SEO report: Example Security (sample data)
2
+
3
+ https://security.example · 214 pages crawled · Next.js 16 (App Router) · tools, content, services · 17 Nov 2026 · fix
4
+
5
+ **SEO health score: 49/100 (Poor).** Not ready: 2 blockers to fix first.
6
+
7
+ 2 open blockers hold the score at 49 until fixed.
8
+
9
+ **Fix the 2 blockers and the score rises to 90/100 (Excellent).** The 2 fixes from this run earned **7** points. You'll see them once the blockers are fixed. F-002 needs you: the agent won't change it without your go-ahead.
10
+
11
+ Close to launch-ready: the tool pages are server-rendered and well structured, but two blockers remain. Shareable scan reports are indexable, and 36 DNS-lookup tool pages share most of their text. Two earlier fixes (canonicals and the sitemap host) are in and verified.
12
+
13
+ Open: 7 (2 blocker, 1 high, 1 decision, 2 medium, 1 low) · Fixed: 2 · Rules passing: 14 of 21
14
+
15
+ ## Area scores
16
+
17
+ | Area | Score | Open findings | Top issue |
18
+ | --- | ---: | ---: | --- |
19
+ | Interactive tools | 53 | 2 | 1,240 shareable scan reports are indexable |
20
+ | Headings & content | 59 | 1 | 36 tool pages share most of their text |
21
+ | AI search | 60 | 1 | robots.txt blocks OAI-SearchBot and PerplexityBot |
22
+ | Metadata | 60 | 1 | 14 titles are longer than 60 characters |
23
+ | Crawling & indexing | 65 | 1 | Unknown URLs return 200 on the first request (soft 404) |
24
+ | Trust & security | 80 | 1 | No /.well-known/security.txt |
25
+ | Internal linking | 100 | 0 | All checks pass |
26
+ | Performance | 100 | 0 | All checks pass |
27
+ | Rendering | 100 | 0 | All checks pass |
28
+ | Sitemaps & robots | 100 | 0 | All checks pass |
29
+ | Structured data | 100 | 0 | All checks pass |
30
+ | URLs & canonicals | 100 | 0 | All checks pass |
31
+
32
+ ## SEO plan
33
+
34
+ Status: Built (approved 2026-11-16) · Progress: 83% · 1 already right, 4 built, 1 to create · 2 need you
35
+
36
+ A free security-tools site with a docs section. Setup added one metadata helper, the sitemap and robots.txt, Organization and SoftwareApplication schema, breadcrumbs, and the missing /docs parent page. The security disclosure page is waiting for the owner to approve its draft.
37
+
38
+ Setup also fixed 2 audit findings in code: F-003, F-004.
39
+
40
+ | Page | Type | Status | Target | Title | Description | H1 | Schema | Parent | Needs you |
41
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
42
+ | / | Home | Already right | free website security tools | Free Website Security Tools \| Example Security | | Free security tools | Organization, WebSite | | |
43
+ | /tools | Tools listing | Built | website security checker tools | Security Checkers: SSL, DNS, Headers \| Example Security | | Security tools | CollectionPage, ItemList, BreadcrumbList | / | |
44
+ | /tools/{slug} ×36 | Tool page | Built | {tool} checker | {Tool name}: Free {Check} \| Example Security | Check {thing} for any domain in seconds. Free, no sign-up: see what's wrong and how to fix it. | {Tool name} | WebApplication, BreadcrumbList | /tools | |
45
+ | /pricing | Pricing page | Built | security monitoring pricing | Pricing \| Example Security | | Simple pricing for teams | WebPage, BreadcrumbList | / | Facts: Confirm the Team plan price before it goes into the page copy |
46
+ | /docs | Docs hub | Built | example security api docs | Docs \| Example Security | | Docs | CollectionPage, BreadcrumbList | / | |
47
+ | /security | Disclosure policy | To create | example security vulnerability disclosure | Report a Vulnerability \| Example Security | | Report a vulnerability | WebPage | / | Copy: Approve the drafted disclosure policy and add the security contact (draft: drafts/security.md) |
48
+
49
+ Intros for new pages (approving the plan approves these words):
50
+
51
+ - /docs: Guides and API reference for Example Security. Start with the API guide to run checks from your own scripts.
52
+
53
+ ## Decisions needed
54
+
55
+ ### Launch the 36 DNS tools now or after rewriting?
56
+
57
+ They're live in staging and linked from the tools hub.
58
+
59
+ - Rewrite first (2–3 days)
60
+ - Launch 6 core types now, hold the rest
61
+
62
+ **Recommended:** Launch the 6 most-searched types now with unique copy and hold the rest.
63
+
64
+ ### F-008: Should AI search crawlers be allowed?
65
+
66
+ The robots file blocks every AI crawler, including the search crawlers that decide whether the site is cited in ChatGPT and Perplexity answers.
67
+
68
+ - Allow all AI crawlers
69
+ - Block training crawlers only (GPTBot, ClaudeBot, Google-Extended, CCBot)
70
+ - Block all (current)
71
+
72
+ **Recommended:** Block training only, so the tools can still be cited in AI answers.
73
+
74
+ ## What was changed
75
+
76
+ - **F-004** The sitemap listed localhost URLs: sitemap.ts uses the same SITE_URL constant as the metadata helper. (`src/app/sitemap.ts`). Verified: re-crawl 17 Nov: all 214 URLs on https://security.example
77
+ - **F-003** 52 canonicals pointed at the staging host: metadataBase now reads SITE_URL, which fails the build if missing; production env updated. (`src/lib/seo.ts`, `next.config.ts`). Verified: re-crawl 17 Nov: 0 canonicals on the wrong host
78
+
79
+ ## Findings
80
+
81
+ ### F-001 · Blocker · 1,240 shareable scan reports are indexable
82
+
83
+ Status: Open · Area: Interactive tools · Rule: TOOL-05 · Cases: 1240
84
+
85
+ **What's wrong.** Every scan creates a public `/r/{id}/` page with no noindex. 1,240 were found through internal links, each showing another company's domain and results. Related: CRAWL-10.
86
+
87
+ **Why it matters.** Thousands of thin, near-identical pages look like scaled content to Google, and they publish data about other people's domains.
88
+
89
+ **How to fix.** Send `X-Robots-Tag: noindex, follow` for `/r/:path*` in `next.config.ts` headers, keep them out of the sitemap, and expire them after 30 days.
90
+
91
+ | Where | Detail |
92
+ | --- | --- |
93
+ | https://security.example/r/8f2k1/ | 200, no robots meta, no X-Robots-Tag |
94
+ | `src/app/r/[id]/page.tsx:12` | metadata has no robots field |
95
+
96
+ 1238 more cases not listed.
97
+
98
+ ### F-002 · Blocker · Needs you · 36 tool pages share most of their text
99
+
100
+ Status: Open · Area: Headings & content · Rule: CONTENT-04 · Cases: 418
101
+
102
+ **What's wrong.** The DNS-record tools (A, AAAA, MX, TXT, CNAME and 31 more) use one intro, one how-to and one FAQ set with only the record type swapped. The crawler found 418 page pairs sharing over 60% of their main text; the content scan found 36 intros collapse to 2 distinct texts.
103
+
104
+ **Why it matters.** Pages that differ only by a swapped name are treated as scaled or doorway content and can hold down the whole site.
105
+
106
+ **How to fix.** Write a specific intro, checks and FAQs for each record type in `src/data/tools/dns.ts`, or merge the rare types into one DNS lookup tool with a type selector.
107
+
108
+ | Where | Detail |
109
+ | --- | --- |
110
+ | https://security.example/tools/mx-lookup/ | 78% shared with /tools/txt-lookup/ |
111
+ | `src/data/tools/dns.ts:8` | intro: `Look up the ${type} records for any domain…` |
112
+
113
+ 416 more cases not listed.
114
+
115
+ ### F-005 · High · Unknown URLs return 200 on the first request (soft 404)
116
+
117
+ Status: Open · Area: Crawling & indexing · Rule: CRAWL-05
118
+
119
+ **What's wrong.** A never-seen URL like `/tools/does-not-exist/` returns 200 with an empty page the first time, then 404 on later requests.
120
+
121
+ **Why it matters.** Google wastes crawls on these and may index junk URLs.
122
+
123
+ **How to fix.** Validate the slug at the top of `src/app/tools/[slug]/page.tsx` and call `notFound()` before anything suspends.
124
+
125
+ | Where | Detail |
126
+ | --- | --- |
127
+ | https://security.example/seo-supervisor-404-probe-x1/ | 200, x-nextjs-postponed: 1 |
128
+
129
+ ### F-008 · Decision · robots.txt blocks OAI-SearchBot and PerplexityBot
130
+
131
+ Status: Needs decision · Area: AI search · Rule: AI-02
132
+
133
+ **What's wrong.** The robots file blocks every AI crawler, including the search crawlers that decide whether the site is cited in ChatGPT and Perplexity answers.
134
+
135
+ **Why it matters.** Blocking search crawlers keeps a free-tools brand out of AI answers; blocking only training crawlers is a common middle ground.
136
+
137
+ **How to fix.** Decide the policy and record it in the SEO profile.
138
+
139
+ **Decision needed.** Should AI search crawlers be allowed?
140
+
141
+ - Allow all AI crawlers
142
+ - Block training crawlers only (GPTBot, ClaudeBot, Google-Extended, CCBot)
143
+ - Block all (current)
144
+
145
+ Recommended: Block training only, so the tools can still be cited in AI answers.
146
+
147
+ | Where | Detail |
148
+ | --- | --- |
149
+ | https://security.example/robots.txt | User-agent: OAI-SearchBot / Disallow: / |
150
+
151
+ ### F-007 · Medium · 14 titles are longer than 60 characters
152
+
153
+ Status: Open · Area: Metadata · Rule: META-01 · Cases: 14
154
+
155
+ **What's wrong.** Tool titles append “Free Online Tool” and the brand, e.g. 74 characters for the SSL checker.
156
+
157
+ **Why it matters.** Long titles get cut off in results, often losing the brand or the key phrase.
158
+
159
+ **How to fix.** Shorten the tool title pattern in `src/lib/seo.ts` to “{Tool} - Free {Thing} Check”.
160
+
161
+ | Where | Detail |
162
+ | --- | --- |
163
+ | https://security.example/tools/ssl-checker/ | 74 chars: SSL Certificate Checker - Free Online SSL Test Tool \| Example Security |
164
+
165
+ 13 more cases not listed.
166
+
167
+ ### F-006 · Medium · 9 tool forms use placeholder text instead of labels
168
+
169
+ Status: Open · Area: Interactive tools · Rule: TOOL-03 · Cases: 9
170
+
171
+ **What's wrong.** The domain field on 9 tools has `placeholder="Enter domain"` and no `<label>`; errors appear only as a red border.
172
+
173
+ **Why it matters.** Unlabelled fields hurt accessibility and leave the page without clear text about what it does; visitors who hit an error leave.
174
+
175
+ **How to fix.** Add a visible `<label for>`, helper text via `aria-describedby`, and a text error with `role=alert` in the shared `DomainInput` component.
176
+
177
+ | Where | Detail |
178
+ | --- | --- |
179
+ | `src/components/tools/DomainInput.tsx:21` | <input placeholder="Enter domain"> |
180
+
181
+ 8 more cases not listed.
182
+
183
+ ### F-009 · Low · No /.well-known/security.txt
184
+
185
+ Status: Open · Area: Trust & security · Rule: TRUST-02
186
+
187
+ **What's wrong.** The path returns 404.
188
+
189
+ **Why it matters.** Researchers look for it first; a security company without one looks careless.
190
+
191
+ **How to fix.** Publish one following RFC 9116 (template in the skill's examples/snippets.md).
192
+
193
+ | Where | Detail |
194
+ | --- | --- |
195
+ | https://security.example/.well-known/security.txt | status 404 |
196
+
197
+ ### F-004 · High · The sitemap listed localhost URLs
198
+
199
+ Status: Fixed · Area: Sitemaps & robots · Rule: MAP-02 · Cases: 214
200
+
201
+ **What's wrong.** All 214 `<loc>` entries used `http://localhost:3000`.
202
+
203
+ **Why it matters.** Google ignores sitemap URLs on the wrong host, so new pages are found slowly.
204
+
205
+ **How to fix.** Build sitemap URLs from the production origin.
206
+
207
+ **What was done.** sitemap.ts uses the same SITE_URL constant as the metadata helper. Files: `src/app/sitemap.ts`. Verified: re-crawl 17 Nov: all 214 URLs on https://security.example.
208
+
209
+ | Where | Detail |
210
+ | --- | --- |
211
+ | https://security.example/sitemap.xml | <loc>http://localhost:3000/tools/</loc> |
212
+
213
+ 213 more cases not listed.
214
+
215
+ ### F-003 · High · 52 canonicals pointed at the staging host
216
+
217
+ Status: Fixed · Area: URLs & canonicals · Rule: URL-04 · Cases: 52
218
+
219
+ **What's wrong.** Canonicals on tool and guide pages used `https://staging.security.example` because `NEXT_PUBLIC_SITE_URL` was unset in the production build.
220
+
221
+ **Why it matters.** Canonicals on the wrong host send ranking signals to a site that shouldn't be indexed.
222
+
223
+ **How to fix.** Set the production origin in one place and use it for `metadataBase`.
224
+
225
+ **What was done.** metadataBase now reads SITE_URL, which fails the build if missing; production env updated. Files: `src/lib/seo.ts`, `next.config.ts`. Verified: re-crawl 17 Nov: 0 canonicals on the wrong host.
226
+
227
+ | Where | Detail |
228
+ | --- | --- |
229
+ | https://security.example/tools/ssl-checker/ | canonical → https://staging.security.example/tools/ssl-checker/ |
230
+
231
+ 51 more cases not listed.
232
+
233
+ ## Passed checks
234
+
235
+ - **REND-01** Content is in the server HTML, not only in JavaScript (src/app/tools/[slug]/page.tsx is a server component)
236
+ - **REND-02** Collapsed content stays in the HTML
237
+ - **CONTENT-01** Exactly one H1 per page
238
+ - **CONTENT-02** Heading levels are not skipped
239
+ - **SCHEMA-01** JSON-LD parses without errors
240
+ - **SCHEMA-02** Organization and WebSite schema on the home page (src/app/layout.tsx:44)
241
+ - **SCHEMA-04** Schema matches what the page visibly shows
242
+ - **URL-02** One trailing-slash style, the other variant redirects
243
+ - **CRAWL-07** No internal links to broken pages
244
+ - **LINK-02** No orphan pages
245
+ - **TOOL-06** Secrets never leave the browser (JWT and hash tools run client-side)
246
+ - **PERF-03** The first image is not lazy-loaded
247
+
248
+ ## Limits of this audit
249
+
250
+ - **Core Web Vitals field data:** Site not live yet; no CrUX data. Lighthouse lab scores are in notes.
251
+ - **CDN/WAF behaviour toward search and AI crawlers:** Can't be seen from a local crawl; check after launch with URL Inspection.
252
+ - Crawled a production build on localhost:3123, mapped to https://security.example.
253
+ - Lighthouse (mobile, lab): LCP 1.9 s, CLS 0.02, TBT 140 ms on the SSL checker.
254
+
255
+ ## How the score works
256
+
257
+ Every checked rule is worth 10 points. A rule that passes, or whose findings are all fixed, earns 10. A rule with open findings earns by its worst one: low 8, medium or decision 6, high 3, blocker 0. The score is the share of points earned. Each open blocker caps it: one at 59, two at 49, three at 39. While a blocker is open, the panel also shows the score you reach once it is fixed. Area scores use the same rules within each area.
@@ -0,0 +1,73 @@
1
+ # SEO profile: Security tools and services site (example)
2
+
3
+ <!-- A finished profile: a cybersecurity company with free public tools, guides and penetration-testing services.
4
+ "Brand" and example-security.com are placeholders. -->
5
+
6
+ Last reviewed: 2026-11-17 · Owner: Head of web
7
+
8
+ ## Site
9
+ - **Production origin:** https://example-security.com
10
+ - **Staging / previews:** noindex header + password on every non-production deployment
11
+ - **Framework:** Next.js App Router; tools served by a separate API
12
+ - **Site types:** tools · content · services
13
+ - **Brand in titles:** "Brand", template `%s | Brand`
14
+ - **Content source:** tool registry served by the API (`/v1/tools`), CMS for blog, learn, templates, checklists and glossary
15
+
16
+ ## Decisions
17
+ | Decision | Value | Why |
18
+ | --- | --- | --- |
19
+ | Trailing slash | **always** | Agreed URL map; `trailingSlash: true` |
20
+ | Preferred host | apex | |
21
+ | AI crawlers | allow all | Citations in AI answers are distribution for a free-tools brand |
22
+ | Staging protection | noindex header + auth | |
23
+ | Sitemap lastmod | content `updatedAt` | |
24
+ | Pagination | `?page=N`, self-canonical | |
25
+ | Thin browse pages | noindex below 3 items | |
26
+ | Scan results | shown on the tool page; share links `/r/{id}/` noindex and expire | |
27
+ | Platform pages | live only when the feature works | |
28
+ | FAQ schema | only where the FAQ is visible | No Google rich result since May 2026; Bing and AI engines still read it |
29
+
30
+ ## URL map
31
+ | Pattern | Page type | Breadcrumb | Indexable | Schema |
32
+ | --- | --- | --- | --- | --- |
33
+ | `/resources/` | Hub | Home › Resources | yes | CollectionPage, ItemList |
34
+ | `/blog/` | Hub | Home › Resources › Blog | yes | CollectionPage, ItemList |
35
+ | `/blog/{post}/` | Post | Home › Resources › Blog › {Category} › {Post} | yes | BlogPosting |
36
+ | `/blog/{category}/` | Browse | Home › Resources › Blog › {Category} | 3+ posts | CollectionPage |
37
+ | `/blog/{category}/{sub}/` | Browse | … › {Category} › {Sub} | 3+ posts | CollectionPage |
38
+ | `/learn/{guide}/` | Guide | Home › Resources › Learn › {Topic} › {Guide} | yes | Article |
39
+ | `/learn/{topic}/` | Browse | Home › Resources › Learn › {Topic} | 3+ guides | CollectionPage |
40
+ | `/tools/{tool}/` | Tool | Home › Resources › Tools › {Tool} | yes | WebPage, WebApplication (SecurityApplication), FAQPage |
41
+ | `/templates/{template}/` | Download | Home › Resources › Templates › {Template} | yes | DigitalDocument |
42
+ | `/checklists/{checklist}/` | Download | Home › Resources › Checklists › {Checklist} | yes | DigitalDocument |
43
+ | `/glossary/{term}/` | Term | Home › Resources › Glossary › {Term} | yes | DefinedTerm |
44
+ | `/compare/{comparison}/` | Comparison | Home › Compare › {Comparison} | yes | Article, ItemList |
45
+ | `/paths/{path}/` | Path | Home › Paths › {Path} | yes | WebPage, ItemList |
46
+ | `/penetration-testing/{target}/` | Service | Home › Penetration testing › {Target} | yes | Service |
47
+ | `/penetration-testing/sample-report/{target}/` | Sample report | … › Sample report › {Target} | yes | WebPage |
48
+ | `/compliance/{framework}/` | Service | Home › Compliance › {Framework} | yes | Service |
49
+ | `/solutions/{solution}/` | Service | Home › Solutions › {Solution} | yes | Service |
50
+ | `/pricing/` | Pricing | Home › Pricing | yes | Service + Offers |
51
+ | `/platform/{feature}/` | Product | – | only when live | – |
52
+ | `/r/{id}/` | Scan result | – | noindex | none |
53
+
54
+ "Resources" appears only in the breadcrumb, never in URLs. Every breadcrumb parent is a real page. Post and category slugs share `/blog/{slug}/`, and guide and topic slugs share `/learn/{slug}/`, so a unique check covers both.
55
+
56
+ ## Hubs that must exist
57
+ `/resources/`, `/blog/`, `/learn/`, `/tools/`, `/templates/`, `/checklists/`, `/glossary/`, `/compare/`, `/paths/`, `/penetration-testing/`, `/penetration-testing/sample-report/`, `/compliance/`, `/solutions/`
58
+
59
+ ## Noindex by design
60
+ Scan result links, internal search, browse pages under 3 items, account and sign-in.
61
+
62
+ ## Internal linking
63
+ - **Up:** breadcrumb as in the map.
64
+ - **Across:** 3–6 tools from the same family, and 3–5 posts or guides from the same category or topic.
65
+ - **Forward / loops:** blog post → glossary → learn guide → tool → template or checklist → path → service page → back to posts and guides. Inside each tool family, "next check" links form a loop.
66
+
67
+ ## Claims
68
+ - **Banned:** customer counts, certifications or awards not on the confirmed list, invented ratings.
69
+
70
+ ## Accepted exceptions
71
+ | Rule | Where | Why accepted | Until |
72
+ | --- | --- | --- | --- |
73
+ | TRUST-01 is treated as high | whole site | A security brand must pass its own header checks | permanent |
@@ -0,0 +1,134 @@
1
+ # Copy-ready snippets
2
+
3
+ Replace `example.com`, "Brand" and the paths. Each snippet names the rule it serves. Framework-specific code (metadata helper, robots.ts, sitemap.ts, JSON-LD component, headers) is in `frameworks/`.
4
+
5
+ ## Organization + WebSite, once in the root layout (SCHEMA-02)
6
+ ```json
7
+ {
8
+ "@context": "https://schema.org",
9
+ "@graph": [
10
+ {
11
+ "@type": "Organization",
12
+ "@id": "https://example.com/#organization",
13
+ "name": "Brand",
14
+ "url": "https://example.com/",
15
+ "logo": { "@type": "ImageObject", "url": "https://example.com/logo-512.png", "width": 512, "height": 512 },
16
+ "sameAs": ["https://github.com/brand", "https://www.linkedin.com/company/brand", "https://x.com/brand"],
17
+ "contactPoint": { "@type": "ContactPoint", "contactType": "customer support", "email": "support@example.com" }
18
+ },
19
+ {
20
+ "@type": "WebSite",
21
+ "@id": "https://example.com/#website",
22
+ "url": "https://example.com/",
23
+ "name": "Brand",
24
+ "inLanguage": "en",
25
+ "publisher": { "@id": "https://example.com/#organization" }
26
+ }
27
+ ]
28
+ }
29
+ ```
30
+
31
+ ## Tool page `@graph` (TOOL-08, SCHEMA-03)
32
+ ```json
33
+ {
34
+ "@context": "https://schema.org",
35
+ "@graph": [
36
+ { "@type": "WebPage", "@id": "https://example.com/tools/dmarc-checker/#webpage",
37
+ "url": "https://example.com/tools/dmarc-checker/", "name": "DMARC Checker - Free DMARC Record Lookup",
38
+ "description": "Enter a domain to look up its DMARC record, check the policy and reporting addresses, and get clear steps to fix problems.",
39
+ "isPartOf": { "@id": "https://example.com/#website" },
40
+ "breadcrumb": { "@id": "https://example.com/tools/dmarc-checker/#breadcrumb" },
41
+ "mainEntity": { "@id": "https://example.com/tools/dmarc-checker/#app" }, "dateModified": "2026-11-12" },
42
+ { "@type": "WebApplication", "@id": "https://example.com/tools/dmarc-checker/#app",
43
+ "name": "DMARC Checker", "url": "https://example.com/tools/dmarc-checker/",
44
+ "applicationCategory": "SecurityApplication", "operatingSystem": "Any", "browserRequirements": "Requires JavaScript",
45
+ "isAccessibleForFree": true, "offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" },
46
+ "publisher": { "@id": "https://example.com/#organization" } },
47
+ { "@type": "BreadcrumbList", "@id": "https://example.com/tools/dmarc-checker/#breadcrumb",
48
+ "itemListElement": [
49
+ { "@type": "ListItem", "position": 1, "name": "Home", "item": "https://example.com/" },
50
+ { "@type": "ListItem", "position": 2, "name": "Tools", "item": "https://example.com/tools/" },
51
+ { "@type": "ListItem", "position": 3, "name": "DMARC checker" } ] },
52
+ { "@type": "FAQPage", "@id": "https://example.com/tools/dmarc-checker/#faq",
53
+ "isPartOf": { "@id": "https://example.com/tools/dmarc-checker/#webpage" },
54
+ "mainEntity": [ { "@type": "Question", "name": "What is a good DMARC policy?",
55
+ "acceptedAnswer": { "@type": "Answer", "text": "Start with p=none to collect reports. Once SPF and DKIM pass for all senders, move to p=quarantine, then p=reject." } } ] }
56
+ ]
57
+ }
58
+ ```
59
+
60
+ ## Service page (SVC-03)
61
+ ```json
62
+ {
63
+ "@context": "https://schema.org",
64
+ "@type": "Service",
65
+ "@id": "https://example.com/penetration-testing/api/#service",
66
+ "name": "API Penetration Testing",
67
+ "serviceType": "API penetration testing",
68
+ "url": "https://example.com/penetration-testing/api/",
69
+ "description": "Manual and automated testing of REST and GraphQL APIs against the OWASP API Security Top 10, with a retest included.",
70
+ "provider": { "@id": "https://example.com/#organization" },
71
+ "areaServed": "Worldwide"
72
+ }
73
+ ```
74
+
75
+ ## Heading outline for a tool or guide page (CONTENT-01, CONTENT-02)
76
+ ```
77
+ H1 DMARC Record Checker
78
+ H2 How to use the DMARC checker
79
+ H2 What this tool checks
80
+ H3 Policy (p=)
81
+ H3 Reporting addresses (rua and ruf)
82
+ H2 How to read your results
83
+ H2 Common DMARC problems and fixes
84
+ H2 Frequently asked questions
85
+ H3 What is a good DMARC policy?
86
+ H3 How long does a DMARC change take to work?
87
+ H2 Related tools
88
+ ```
89
+
90
+ ## security.txt at `/.well-known/security.txt` (TRUST-02)
91
+ ```
92
+ Contact: mailto:security@example.com
93
+ Expires: 2027-11-16T00:00:00.000Z
94
+ Policy: https://example.com/security/disclosure/
95
+ Acknowledgments: https://example.com/security/thanks/
96
+ Preferred-Languages: en
97
+ Canonical: https://example.com/.well-known/security.txt
98
+ ```
99
+
100
+ ## llms.txt (MAP-07, optional)
101
+ ```
102
+ # Brand
103
+
104
+ > One sentence on what the site and company do.
105
+
106
+ ## Tools
107
+ - [SSL Checker](https://example.com/tools/ssl-checker/): Checks a certificate's chain, expiry and hostname match.
108
+
109
+ ## Services
110
+ - [API penetration testing](https://example.com/penetration-testing/api/): Testing of REST and GraphQL APIs against the OWASP API Top 10.
111
+ ```
112
+
113
+ ## IndexNow ping (MAP-08)
114
+ ```bash
115
+ # Host the key at https://example.com/<key>.txt first. Reaches Bing, Yandex, Seznam, Naver and others; not Google.
116
+ curl -X POST "https://api.indexnow.org/indexnow" -H "Content-Type: application/json; charset=utf-8" \
117
+ -d '{"host":"example.com","key":"<key>","keyLocation":"https://example.com/<key>.txt","urlList":["https://example.com/tools/dmarc-checker/"]}'
118
+ ```
119
+
120
+ ## Quick checks with curl (REND-01, URL-02, CRAWL-03)
121
+ ```bash
122
+ URL=https://example.com/tools/dmarc-checker/
123
+ # What a crawler without JavaScript sees. Each line should print something.
124
+ curl -s "$URL" | grep -o '<h1[^>]*>[^<]*'
125
+ curl -s "$URL" | grep -c '<h2'
126
+ curl -s "$URL" | grep -o 'application/ld+json'
127
+ curl -s "$URL" | grep -o 'What is a good DMARC policy' # an FAQ answer is in the HTML
128
+ # Trailing slash (site uses slashes): a 308/301 to the slashed URL, while files stay 200 with no slash
129
+ curl -sI https://example.com/tools/dmarc-checker | head -1
130
+ curl -sI https://example.com/sitemap.xml | head -1
131
+ # Production must not be noindex (run after every deploy; fail the pipeline on output)
132
+ curl -sI https://example.com/ | grep -i '^x-robots-tag:.*noindex'
133
+ curl -s https://example.com/ | grep -i '<meta[^>]*name="robots"[^>]*noindex'
134
+ ```
@@ -0,0 +1,98 @@
1
+ # Next.js (App Router)
2
+
3
+ How the rules map onto Next.js. Check `next.config.*`, `app/layout.tsx`, `app/robots.ts`, `app/sitemap.ts`, the metadata helper (often `lib/seo.ts`) and any `middleware.ts` / `proxy.ts`.
4
+
5
+ ## Audit like this
6
+ - **Crawl a production build, not `next dev`:** `next build`, then start it with `node node_modules/next/dist/bin/next start -p 3123`. On Windows, `npx` leaves a stray node process when stopped. Dev mode renders differently.
7
+ - **`NEXT_PUBLIC_*` values are baked in at build time.** An existing `.next` build may carry staging values (site URL, indexing flag). Check the canonicals in the crawl and say which build you crawled.
8
+ - **Find every page's metadata source:** `export const metadata`, `generateMetadata`, and the layout's title template.
9
+
10
+ ## Next.js 16 with Cache Components (`cacheComponents: true`)
11
+ - Route segment config such as `revalidate`, `dynamic` and `dynamicParams` doesn't apply in this mode; caching uses `"use cache"` and `cacheLife`. The `generateStaticParams` / `dynamicParams = false` advice below is for the classic model.
12
+ - **Soft 404 risk:** a page can start streaming with status 200 before a `notFound()` inside a dynamic section runs. Unknown slugs then return 200 on the first request (look for an `x-nextjs-postponed` header). Validate the slug at the top of the page, before anything suspends, and confirm with the crawler's soft-404 probe, which always uses a never-seen URL. A second request to the same URL usually returns 404, so a manual `curl` repeated on one URL can look fine. Always test a fresh URL. Don't trust code comments that say it can't happen.
13
+
14
+ ## Patterns that pass
15
+
16
+ **One metadata helper (META-03, URL-04, META-06)**
17
+ ```ts
18
+ // lib/seo.ts
19
+ import type { Metadata } from "next";
20
+ export const SITE = process.env.NEXT_PUBLIC_SITE_URL!; // one production origin
21
+ export function pageMeta(p: { title: string; description: string; path: string; noindex?: boolean; nofollow?: boolean; image?: string }): Metadata {
22
+ return {
23
+ title: p.title, // layout template adds " | Brand"
24
+ description: p.description,
25
+ alternates: { canonical: p.path }, // resolved against metadataBase; path in the site's slash style
26
+ robots: p.noindex
27
+ ? { index: false, follow: !p.nofollow } // search/filters/results: follow; account/admin/sign-in/404: nofollow too
28
+ : { index: true, follow: true, googleBot: { index: true, follow: true, "max-image-preview": "large", "max-snippet": -1 } },
29
+ openGraph: { title: p.title, description: p.description, url: p.path, images: [p.image ?? "/opengraph-image"] },
30
+ twitter: { card: "summary_large_image", title: p.title, description: p.description },
31
+ };
32
+ }
33
+ // app/layout.tsx: metadataBase: new URL(SITE), title: { default: "…", template: "%s | Brand" }
34
+ ```
35
+ - Setting `openGraph` in a page **replaces** the inherited image unless you include `images` (META-04).
36
+ - Use `title: { absolute: … }` when the title already contains the brand.
37
+
38
+ **Trailing slash (URL-02):** `trailingSlash: true | false` in `next.config`. It 308-redirects the other form. Built-in slash redirects run before your `redirects()`, so legacy redirects can chain (CRAWL-08); put them at the edge or cover both forms.
39
+
40
+ **robots and staging (CRAWL-01, CRAWL-03, CRAWL-04)**
41
+ ```ts
42
+ // app/robots.ts
43
+ export default function robots() {
44
+ if (process.env.SITE_INDEXABLE !== "true") return { rules: [{ userAgent: "*", allow: "/" }] }; // noindex comes from the header below
45
+ return { rules: [{ userAgent: "*", allow: "/", disallow: ["/api/", "/*_rsc="] }], sitemap: `${SITE}/sitemap.xml` };
46
+ }
47
+ // next.config: headers() → when not indexable, { source: "/:path*", headers: [{ key: "X-Robots-Tag", value: "noindex, nofollow" }] }
48
+ ```
49
+ Per-path headers work the same way, e.g. keeping shareable result links out of the index (TOOL-05, CRAWL-10):
50
+ ```ts
51
+ // next.config.ts
52
+ async headers() {
53
+ return [{ source: "/r/:path*", headers: [{ key: "X-Robots-Tag", value: "noindex, follow" }] }];
54
+ },
55
+ ```
56
+
57
+ **Sitemap (MAP-01 to MAP-04):** built from the content source, filtered to published items, with `lastModified` from `updatedAt`. Never `new Date()`. Use `generateSitemaps()` or route handlers when you need an index.
58
+ ```ts
59
+ // app/sitemap.ts
60
+ import type { MetadataRoute } from "next";
61
+ import { getTools, getPosts } from "@/lib/content";
62
+ import { SITE } from "@/lib/seo";
63
+
64
+ const newest = (d: string[]) => [...d].sort().at(-1);
65
+ const url = (path: string) => `${SITE}${path}`; // paths already in the site's slash style
66
+
67
+ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
68
+ const tools = (await getTools()).filter(t => t.status === "live");
69
+ const posts = (await getPosts()).filter(p => p.status === "live");
70
+ return [
71
+ { url: url("/tools/"), lastModified: newest(tools.map(t => t.updatedAt)) },
72
+ ...tools.map(t => ({ url: url(`/tools/${t.slug}/`), lastModified: t.updatedAt })),
73
+ ...posts.map(p => ({ url: url(`/blog/${p.slug}/`), lastModified: p.updatedAt })),
74
+ // hubs, browse pages with 3+ items, and other content types the same way
75
+ ];
76
+ }
77
+ ```
78
+
79
+ **Static pages from data (CRAWL-11, REND-01):** `generateStaticParams()` from published items, `export const dynamicParams = false` (unknown slugs give 404) or `notFound()` in the page, `revalidate` for ISR. `permanentRedirect()` for renamed items.
80
+
81
+ **Server rendering (REND-01, REND-02):** pages are server components; only widgets are `"use client"`. Never `dynamic(() => import(…), { ssr: false })` for anything with text. Accordions render children always and hide them with CSS.
82
+
83
+ **JSON-LD (SCHEMA-01)**
84
+ ```tsx
85
+ export function JsonLd({ data }: { data: object }) {
86
+ return <script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(data).replace(/</g, "\\u003c") }} />;
87
+ }
88
+ ```
89
+
90
+ **Images and fonts (PERF-03):** `next/image` with `priority` on the LCP image only, `sizes` set, `fill` inside a sized box. `next/font` with `display: "swap"`.
91
+
92
+ **OG images (META-04):** `opengraph-image.tsx` per route segment using `ImageResponse`.
93
+
94
+ ## Common traps
95
+ - No `metadataBase`, so canonicals and OG URLs are relative or point at localhost.
96
+ - A robots **string** in a page overriding the layout's robots object.
97
+ - `export const dynamic = "force-dynamic"` on pages that could be static, which is slower and can depend on APIs.
98
+ - Middleware that redirects signed-in users must never change what crawlers get on public URLs.
@@ -0,0 +1,34 @@
1
+ # Ruby on Rails
2
+
3
+ How the rules map onto Rails. Check `config/routes.rb`, `app/views/layouts/application.html.erb`, the helpers that set meta tags, the sitemap and robots controllers, and `ApplicationController`.
4
+
5
+ ## Audit like this
6
+ - Crawl `bin/rails s -e production` locally (assets precompiled), or staging.
7
+
8
+ ## Patterns that pass
9
+
10
+ **Meta tags from one helper (META-03):** `content_for :title` / `:description`, or a `meta_tags` helper, set per action and rendered once in the layout. A canonical helper builds the URL from a configured host plus `request.path`, stripping the query string, fragment and stray `www.` (URL-04):
11
+ ```ruby
12
+ def canonical_url(path = request.path)
13
+ "#{ENV.fetch('SITE_URL')}#{path.split('?').first}"
14
+ end
15
+ ```
16
+
17
+ **Trailing slash (URL-02):** Rails routes match `/page` and `/page/` alike, so both return 200. Redirect the non-preferred form in nginx, the CDN or Rack middleware, and generate links in one style.
18
+
19
+ **robots.txt and staging (CRAWL-03, CRAWL-04):** serve robots from a controller keyed on `ENV["SEO_ALLOW_INDEXING"]`. Set `X-Robots-Tag` in `ApplicationController`:
20
+ ```ruby
21
+ before_action { response.set_header("X-Robots-Tag", "noindex, nofollow") unless ENV["SEO_ALLOW_INDEXING"] == "true" }
22
+ ```
23
+ Add `noindex, follow` for any request with filter or search parameters (CRAWL-10).
24
+
25
+ **Sitemaps (MAP-01 to MAP-04):** a `SitemapsController` serving an index plus `/sitemaps/:kind.xml` built with `builder`. `lastmod` comes from `updated_at`; cache it for an hour.
26
+
27
+ **Status codes (CRAWL-05):** `raise ActionController::RoutingError` or `head :not_found` for unknown records, `head :gone` for removed ones, and `redirect_to …, status: :moved_permanently` for renames. Route-level legacy redirects: `get "/old", to: redirect("/new/", status: 301)`.
28
+
29
+ **JSON-LD (SCHEMA-01):** render from a hash with `json_escape`:
30
+ ```erb
31
+ <script type="application/ld+json"><%= raw json_escape(schema_hash.to_json) %></script>
32
+ ```
33
+
34
+ **Turbo:** make sure full page loads render all SEO content; don't load content only through Turbo frames that crawlers won't request (REND-01).
@@ -0,0 +1,14 @@
1
+ # Single-page apps: React, Vue or Vite without server rendering
2
+
3
+ A client-rendered SPA serves an empty shell (`<div id="root"></div>`), which fails REND-01 for most crawlers. The crawler flags it as `client-rendered`.
4
+
5
+ ## Options, best first
6
+ 1. **Move the public pages to a framework that renders on the server or at build time** (Next.js, Remix, Astro, Nuxt, SvelteKit). Keep the app part as a client app behind login.
7
+ 2. **Pre-render the public routes at build time** (vike / vite-plugin-ssr prerender, react-snap, Astro islands for marketing pages). Every route gets real HTML with its own title, meta, canonical and JSON-LD.
8
+ 3. **Last resort:** a single landing page with complete static HTML in `index.html`. Client-only meta (react-helmet) is invisible to crawlers that don't run JavaScript.
9
+
10
+ ## Hosting traps
11
+ - **Soft 404s (CRAWL-05):** a catch-all rewrite to `index.html` (`vercel.json` rewrites, Netlify `/* /index.html 200`) returns 200 for every unknown URL. Pre-render a real `404.html` and rewrite only known routes, or return 404 from the edge.
12
+ - **Sitemaps and robots** are static files in `public/`. Generate `sitemap.xml` at build time from the route list.
13
+ - **Trailing slash:** set the host's `trailingSlash` / `cleanUrls` option and keep links consistent.
14
+ - **Hash routing** (`/#/page`) is invisible to search engines. Use history routing.