SEO for SaaS
Start
AI snippets

Agent rules

Standing rules for CLAUDE.md, .cursor/rules or Copilot instructions.

Agent rulesStanding rules for CLAUDE.md, .cursor/rules or Copilot, so later edits keep the blog's contract.rules@2 · api v1
Or open inClaude CodeCursorLovableReplit
# SEO for SaaS blog: rules for this codebase

The blog renders articles from the SEO for SaaS content API. Articles are written and updated there; this code only reads and renders them.

- Data comes through `lib/seoforsaas/client.ts` (`createClient`, `listAllArticles`, `getArticle`) with `SEOFORSAAS_PROJECT_ID` and `SEOFORSAAS_CONTENT_KEY`. Read them on the server or at build time only; never in browser code, never in source files.
- Article bodies render through `components/seoforsaas/article.tsx`: `<Article blocks={…} components={…} />`. Restyle one block by passing a component for its type; do not edit the installed files or render HTML.
- Never `dangerouslySetInnerHTML` (or any raw-HTML API) for article content. Rich text is an array of text runs; keep each link's `rel`.
- Head tags come from `article.seo`; structured data is `article.seo.jsonLd`, rendered once, as it is.
- Headings carry stable `id`s: keep them as anchors. An unknown block type renders nothing, never an error.
- Article URLs have no trailing slash, matching `seo.canonicalPath`.
- The webhook endpoint (if any) verifies the Standard Webhooks signature against the raw body before doing anything, and only refreshes: it never reads content from the payload.
- Reference: https://seoforsaas.dev/llms.txt

Where it goes

AgentFile
Claude CodeCLAUDE.md (or AGENTS.md) at the project root
Cursor.cursor/rules/seoforsaas.mdc
GitHub Copilot.github/copilot-instructions.md