# LLM Best Practices > Opinionated reference site of best practices for dev, writing, and AI agent work. Pages are atomic, YAML-fronted, and stable enough to cite in agent prompts. AI agents: read https://llmbestpractices.com/start-here.md first. It says where to start for each task, how to read pages, and how to cite them. Append `.md` to any URL below to get the raw markdown source instead of rendered HTML. `https://llmbestpractices.com/coding/python` becomes `https://llmbestpractices.com/coding/python.md`. Every page is served both ways from this domain; prefer the markdown form for parsing and the HTML form when citing to a human. The full corpus is at https://llmbestpractices.com/llms-full.txt. ## Primary - [LLM Info](https://llmbestpractices.com/llm-info): Machine-readable site description, usage policy, and instructions for AI assistants; the front door defined by the LLM discoverability standard. - [Start Here](https://llmbestpractices.com/start-here): The protocol for AI agents: where to start for each task, how to route and read pages, how to apply the rules, and how to cite them. - [Identity](https://llmbestpractices.com/identity): Brand reference with design tokens: fonts, type scale, light and dark color palettes, logo, favicon, and downloadable media assets. ## Key pages - [The LLM discoverability standard](https://llmbestpractices.com/seo/llm-discoverability-standard): The five files, one brand page, and one footer link that make a site legible to AI assistants; the standard this domain anchors. - [How to Cite](https://llmbestpractices.com/meta/how-to-cite): Citation format for humans and agents, including draft warnings and section anchors. - [Generative engine optimization (GEO, AEO, LLM SEO)](https://llmbestpractices.com/seo/generative-engine-optimization): GEO, AEO, and LLM SEO as one practice: treat it as SEO measured at the citation, how Google, Bing Copilot, ChatGPT Search, Perplexity, and Claude source answers, which crawlers to allow, and what to ignore. - [Launch a New Site: Zero-to-Indexed Runbook](https://llmbestpractices.com/howto/launch-a-new-site): Ordered checklist from empty repo to live, indexed, and AI-discoverable. - [The /llms.txt Standard](https://llmbestpractices.com/seo/llms-txt): What /llms.txt is, where it lives, and how to author it. ## Meta - [About](https://llmbestpractices.com/meta/about): What llmbestpractices.com is, who maintains it, how the vault is produced, and how AI assistance is used and reviewed. - [Accessibility Statement](https://llmbestpractices.com/meta/accessibility): Conformance target, testing process, known limitations, and how to report an accessibility issue on llmbestpractices.com. - [Changelog](https://llmbestpractices.com/meta/changelog): Reverse-chronological log of meaningful schema, content, and structure changes to the site. - [How to Cite LLM Best Practices](https://llmbestpractices.com/meta/how-to-cite): The citation form humans and agents use when quoting a page from this site, including draft warnings and section anchors. - [LLM Info Standard](https://llmbestpractices.com/meta/llm-info-standard): The YAML frontmatter schema and body conventions every page on this site follows. - [Privacy](https://llmbestpractices.com/meta/privacy): What this site collects, stores, and shares: nothing, except the standard request logs your hosting provider keeps. ## Writing - [Anti-Slop Writing Rules](https://llmbestpractices.com/writing/anti-slop): Banned words and constructions, paragraph-level tells of AI authorship, and before-and-after rewrites that fix them. - [Article Structure](https://llmbestpractices.com/writing/articles): Skeletons, ledes, sectioning, and length rules for long-form pieces and reference pages. - [Documentation best practices for AI software products](https://llmbestpractices.com/writing/documentation-for-ai-products): Document AI products for humans and the agents that read the docs: machine-readable structure, exact model facts, stated limits, and dated claims. - [Editorial Style Guide](https://llmbestpractices.com/writing/editorial-style): Punctuation, capitalization, numbers, code references, links, lists, and citation format used across every page. - [Headlines and Subheads](https://llmbestpractices.com/writing/headlines): Headline patterns, title length, keyword placement, and subhead rules that serve readers, search, and routing agents. - [Site-level slop](https://llmbestpractices.com/writing/site-level-slop): Patterns that make a site read as generated only across pages (templated openers, near-duplicates, uniform cadence, date sweeps) and how to catch each. - [Technical writing standards for developer documentation](https://llmbestpractices.com/writing/technical-writing-standards): Standards for developer docs: task-first pages, one job per page, runnable tested examples, one term per concept, and docs versioned with the code. - [Voice and Tone](https://llmbestpractices.com/writing/voice): Neutral playbook voice: lead with the rule, name the thing, vary rhythm. The voice every page on this site uses. ## Coding - [General Coding Principles](https://llmbestpractices.com/coding/general-principles): Language-agnostic rules for naming, comments, error boundaries, dependencies, the four test cases, and when to abstract or optimize. - [Git](https://llmbestpractices.com/coding/git): One logical change per commit, message format, Conventional Commits, rebase versus merge, force-push rules, hooks, secret handling, and squash-merge defaults. - [Pine Script: Best Practices](https://llmbestpractices.com/coding/pine-script): Pine Script v6 for TradingView: pick the script kind, declare limits, use var for state, wire alerts, and publish libraries; strategies have their own page. - [Pine Script: request.security and Repainting](https://llmbestpractices.com/coding/pine-script-security): Avoid repainting in Pine v6: the close[1] with lookahead_on pattern for higher-timeframe data, barstate.isconfirmed, barmerge modes, and request call limits. - [Pine Script: Strategies](https://llmbestpractices.com/coding/pine-script-strategies): Pine v6 strategy() setup with realistic costs, entry and exit calls without the removed when parameter, fill timing, and how to read the Strategy Tester. - [Python: Best Practices](https://llmbestpractices.com/coding/python): Python 3.14 baseline: pyproject.toml with uv, ruff, a strict type checker, pytest, and where the deeper Python pages live. - [Python: Async and Asyncio](https://llmbestpractices.com/coding/python-async): asyncio rules for Python 3.11 and later: TaskGroup over gather, timeouts, cancellation, keeping the event loop unblocked, and testing with pytest-asyncio. - [Python: uv, Dependencies, and Packaging](https://llmbestpractices.com/coding/python-dependency-management): uv workflow for environments, lockfiles, dependency groups, CI installs, vulnerability audits, and building and publishing a package to PyPI. - [Python: Performance](https://llmbestpractices.com/coding/python-performance): Profile before optimizing, fix algorithms, vectorize with numpy, and choose threads, processes, subinterpreters, or the free-threaded 3.14 build. - [Python: Security](https://llmbestpractices.com/coding/python-security): Pydantic validation at boundaries, parameterized SQL, unsafe deserialization and archive extraction, subprocess and secrets handling, and SSRF defenses. - [Python: Testing](https://llmbestpractices.com/coding/python-testing): pytest 9 configuration and strict mode, fixture scope, parametrize and subtests, Hypothesis, monkeypatch over MagicMock, and coverage floors. - [Python: Type Hints](https://llmbestpractices.com/coding/python-typing): Python 3.12 to 3.14 typing: PEP 695 generics and type aliases, TypeVar defaults, TypeIs, Self and override, deferred annotations, and runtime introspection. - [Shell Scripting: Best Practices](https://llmbestpractices.com/coding/shell): Bash defaults: strict mode and its gaps, quoting, shellcheck in CI, [[ ]], EXIT traps, portability, and absolute paths in scheduled jobs. - [Swift: Best Practices](https://llmbestpractices.com/coding/swift): Swift 6.4 baseline: language mode, default isolation, value types, no force-unwrapping, explicit errors, Swift Testing, and where each deeper Swift page lives. - [Swift: Concurrency, Actors, and Sendable](https://llmbestpractices.com/coding/swift-concurrency): Swift 6.2 to 6.4 concurrency: default MainActor isolation, @concurrent, structured tasks, cancellation, reentrant actors, Sendable, and bridging callbacks. - [Swift: Optionals and Error Handling](https://llmbestpractices.com/coding/swift-error-handling): Use optionals for absence and throws for failure: no force-unwrapping, guard let, domain error types, typed throws for closed sets, and catch at the boundary. - [Swift Modules: SPM Layout and Access Control](https://llmbestpractices.com/coding/swift-modules): Swift Package Manager layout by feature, narrowest access levels including package, import access levels, Bundle.module, and per-target language mode. - [Swift: Value Types and Protocols](https://llmbestpractices.com/coding/swift-protocols): Default to structs and enums; use a class only when identity matters; keep protocols small, prefer some over any, and add conditional conformance. - [Swift Testing](https://llmbestpractices.com/coding/swift-testing): Write new Swift tests with Swift Testing (@Test, #expect, #require, parameterized, parallel by default); keep XCTest for UI and performance tests. - [Testing](https://llmbestpractices.com/coding/testing): Testing trophy over the pyramid, zero flake tolerance, deterministic tests, behavior-named tests, snapshot and mock limits, and coverage as a floor. - [TypeScript: Best Practices](https://llmbestpractices.com/coding/typescript): TypeScript 6 and 7 baseline: strict by default, unknown over any, schema parsing at boundaries, discriminated unions, ESM, and running .ts on Node directly. - [TypeScript: Generics](https://llmbestpractices.com/coding/typescript-generics): When to add a type parameter, extends constraints, inference with NoInfer and const parameters, Result types, infer, and keeping application generics simple. - [TypeScript: Type Narrowing](https://llmbestpractices.com/coding/typescript-narrowing): Narrow unions with typeof, instanceof, in, discriminants, inferred and user-defined predicates, never exhaustiveness, and assertion functions. - [TypeScript: Runtime Validation](https://llmbestpractices.com/coding/typescript-runtime-validation): Parse every untyped boundary with a schema (Zod by default, Valibot for bundle size), derive types from it, and validate env, forms, and query strings. - [TypeScript: Strict Mode](https://llmbestpractices.com/coding/typescript-strict-mode): What strict enables, the three flags it omits (noUncheckedIndexedAccess, exactOptionalPropertyTypes, noImplicitOverride), and how to migrate a loose codebase. - [TypeScript: tsconfig.json](https://llmbestpractices.com/coding/typescript-tsconfig): tsconfig for TypeScript 6 and 7: new defaults, removed options, baseline configs for bundlers and Node, and project references for monorepos. - [TypeScript: Types vs Interfaces](https://llmbestpractices.com/coding/typescript-types-vs-interfaces): Default to type; use interface for public object shapes that consumers may augment; extends versus intersections and when type is the only option. - [TypeScript: Utility Types](https://llmbestpractices.com/coding/typescript-utility-types): When to reach for Pick, Omit, Partial, Record, Exclude, ReturnType, and Awaited, the mistakes that follow each, and the small helpers worth writing yourself. ## Comparisons - [Astro vs Hugo](https://llmbestpractices.com/comparisons/astro-vs-hugo): Pick Astro 7 for content sites with interactive components, MDX, and typed content; pick Hugo when build speed, one binary, and zero JavaScript matter more. - [Aurora vs RDS Postgres](https://llmbestpractices.com/comparisons/aurora-vs-rds-postgres): Pick RDS for PostgreSQL for cost and community Postgres; pick Aurora PostgreSQL for faster failover, up to 15 readers, Serverless, and Global Database. - [AWS vs Cloudflare](https://llmbestpractices.com/comparisons/aws-vs-cloudflare): Put Cloudflare in front for DNS, CDN, WAF, Workers, and zero-egress R2; keep AWS behind it for managed databases, private networking, and compliance. - [Bun vs Node.js](https://llmbestpractices.com/comparisons/bun-vs-node): Use Node.js LTS for production services needing wide compatibility; use Bun for scripts, tests, and services where its all-in-one toolchain saves work. - [Claude vs GPT](https://llmbestpractices.com/comparisons/claude-vs-gpt): Choose Claude or GPT by task and platform: Claude for agentic coding and multi-cloud buying, GPT for image generation, realtime voice, and cheap tokens. - [Cloudflare Workers vs AWS Lambda](https://llmbestpractices.com/comparisons/cloudflare-workers-vs-aws-lambda): Pick Workers for short, latency-sensitive requests near users, billed on CPU time; pick Lambda for memory-heavy, long-running, VPC-bound, or AWS-event work. - [CSS Modules vs styled-components](https://llmbestpractices.com/comparisons/css-modules-vs-styled-components): Use CSS Modules (or Tailwind) for new React projects; styled-components is in maintenance mode, so keep it only in existing code and plan a gradual exit. - [Cypress vs Puppeteer](https://llmbestpractices.com/comparisons/cypress-vs-puppeteer): Use Cypress for UI test suites and Puppeteer for scripted browser work such as scraping, screenshots, and PDF generation; Playwright covers both jobs. - [Docker vs Podman](https://llmbestpractices.com/comparisons/docker-vs-podman): Pick Docker (Engine 29, Compose, BuildKit) as the default for development and CI; pick Podman 6 for daemonless, rootless hosts and systemd services via Quadlet. - [DynamoDB vs Postgres](https://llmbestpractices.com/comparisons/dynamodb-vs-postgres): Use Postgres by default; use DynamoDB for known key lookups at very large scale, serverless operations, or multi-Region active-active tables on AWS. - [ESLint vs Biome](https://llmbestpractices.com/comparisons/eslint-vs-biome): Use Biome 2.5 for new projects wanting lint and format in one Rust binary; keep ESLint 10 plus Prettier for plugin depth, custom rules, or framework presets. - [FastAPI vs Django](https://llmbestpractices.com/comparisons/fastapi-vs-django): Pick FastAPI for API-first services with OpenAPI, Pydantic, and async I/O; pick Django 6 when the admin, ORM, auth, and migrations should exist on day one. - [Gemini vs Claude](https://llmbestpractices.com/comparisons/gemini-vs-claude): Choose Gemini for low-cost multimodal, voice, and image work in Google's stack; choose Claude for long-horizon agents and multi-cloud access; verify with evals. - [Grafana vs Datadog](https://llmbestpractices.com/comparisons/grafana-vs-datadog): Pick Datadog for one integrated managed platform and fast setup; pick the Grafana stack (Prometheus, Loki) for open standards, self-hosting, and cost control. - [htmx vs React](https://llmbestpractices.com/comparisons/htmx-vs-react): Pick htmx for server-rendered apps where the server owns state and interactions swap regions; pick React for rich client state, offline use, or a frontend team. - [Jest vs Vitest](https://llmbestpractices.com/comparisons/jest-vs-vitest): Use Vitest for new web and library projects (Vitest 5, Vite-powered, native ESM and TypeScript); keep Jest for React Native and large existing suites. - [JWT vs Session Cookies](https://llmbestpractices.com/comparisons/jwt-vs-session-cookies): For browser sessions, use an opaque session ID in an HttpOnly cookie with a server-side store; use short-lived JWTs only for service claims and OAuth. - [Lodash vs Native JS](https://llmbestpractices.com/comparisons/lodash-vs-native): Use native JavaScript for new code; add lodash-es or es-toolkit only for deep merge, debounce, throttle, or cloning non-cloneable values. - [MongoDB vs Postgres](https://llmbestpractices.com/comparisons/mongodb-vs-postgres): Pick Postgres 18 for most new workloads, since JSONB covers common document patterns; pick MongoDB 9 for document-native data needing native sharding or Atlas. - [Monorepo vs Polyrepo](https://llmbestpractices.com/comparisons/monorepo-vs-polyrepo): Use a monorepo when packages share types or changes cross package boundaries; use polyrepo for independently released artifacts and hard access boundaries. - [Next.js vs Astro](https://llmbestpractices.com/comparisons/nextjs-vs-astro): Pick Next.js 16 for app-shaped products with auth and per-user data; pick Astro 7 for content-shaped sites that should ship little or no JavaScript. - [nginx vs Caddy](https://llmbestpractices.com/comparisons/nginx-vs-caddy): Pick Caddy for automatic HTTPS, HTTP/3 by default, and short config; pick nginx for its modules, fine tuning, and existing expertise; ingress-nginx is retired. - [OAuth vs JWT](https://llmbestpractices.com/comparisons/oauth-vs-jwt): OAuth is a delegation protocol and JWT a token format, not alternatives: use OAuth with PKCE for delegated access and sign-in, and JWTs as short-lived tokens. - [Ollama vs llama.cpp](https://llmbestpractices.com/comparisons/ollama-vs-llamacpp): Pick Ollama for the simplest local model management and API; pick llama.cpp for control over builds, quantization, and hardware backends, or to embed inference. - [OpenAI SDK vs LangChain](https://llmbestpractices.com/comparisons/openai-sdk-vs-langchain): Use the provider SDK (OpenAI or Anthropic) for production agents you must debug and control; use LangChain 1.x or LangGraph for portable, durable workflows. - [Pinecone vs pgvector](https://llmbestpractices.com/comparisons/pinecone-vs-pgvector): Pick pgvector 0.8 when vectors sit beside relational data in Postgres you already run; pick Pinecone for a managed vector service with no database operations. - [Playwright vs Cypress](https://llmbestpractices.com/comparisons/playwright-vs-cypress): Pick Playwright 1.63 for new end-to-end suites needing Chromium, Firefox, and WebKit; keep Cypress 16 for existing suites and teams that value its runner. - [Postgres vs MySQL](https://llmbestpractices.com/comparisons/postgres-vs-mysql): Pick Postgres 18 for new application data; pick MySQL 9.7 LTS when you already run MySQL, depend on Vitess sharding, or have deep MySQL operations skill. - [Postman vs Bruno](https://llmbestpractices.com/comparisons/postman-vs-bruno): Pick Bruno for offline, plain-text API collections kept in the repo; pick Postman when you need shared workspaces, governance, or its platform features. - [Prisma vs Drizzle](https://llmbestpractices.com/comparisons/prisma-vs-drizzle): Pick Prisma 7 for a schema-first workflow with generated types and managed migrations; pick Drizzle for SQL-shaped queries and a TypeScript schema. - [Python vs TypeScript](https://llmbestpractices.com/comparisons/python-vs-typescript): Pick Python for data, ML, and scripting; pick TypeScript for web products sharing types with a frontend; split services at the network boundary. - [React vs Vue](https://llmbestpractices.com/comparisons/react-vs-vue): Pick React 19 for ecosystem depth, hiring, Server Components, and React Native; pick Vue 3 with Nuxt 4 for gentler ramp-up and one official answer per concern. - [Redis vs Memcached](https://llmbestpractices.com/comparisons/redis-vs-memcached): Pick Redis 8 (AGPL option) or BSD fork Valkey for caching with data structures, persistence, and pub/sub; pick Memcached only for a pure key-value cache. - [REST vs GraphQL](https://llmbestpractices.com/comparisons/rest-vs-graphql): Pick REST for public and CRUD APIs since HTTP caching is free; pick GraphQL for client-driven aggregation; use tRPC when one TypeScript repo owns both ends. - [Rust vs Go](https://llmbestpractices.com/comparisons/rust-vs-go): Pick Rust for memory safety without a GC, predictable latency, or WebAssembly and embedded targets; pick Go for services, CLIs, and fast builds. - [Server vs Client Components](https://llmbestpractices.com/comparisons/server-vs-client-components): Default to Server Components for data, secrets, and zero-JS rendering; add 'use client' to the smallest component needing state, effects, or browser APIs. - [SQLite vs Postgres](https://llmbestpractices.com/comparisons/sqlite-vs-postgres): Pick SQLite for single-writer apps, local-first tools, and per-tenant databases with Litestream backups; pick Postgres when several processes or hosts write. - [SST vs CDK](https://llmbestpractices.com/comparisons/sst-vs-cdk): Pick SST (Pulumi-based, live dev loop, AWS and Cloudflare components) for app-centric stacks; pick AWS CDK (CloudFormation) for platform teams and governance. - [SvelteKit vs Next.js](https://llmbestpractices.com/comparisons/sveltekit-vs-nextjs): Pick SvelteKit 2 (Svelte 5) for small teams wanting a compiler-first framework with less ceremony; pick Next.js 16 for the React ecosystem and hiring. - [SWC vs Babel](https://llmbestpractices.com/comparisons/swc-vs-babel): Use the transform your framework ships (SWC in Next.js, Oxc in Vite 8); keep Babel only for Babel-only plugins such as the React Compiler or macros. - [Tailwind vs CSS Modules](https://llmbestpractices.com/comparisons/tailwind-vs-css-modules): Pick Tailwind 4 for teams with a shared design system and fast layout iteration; pick CSS Modules for bespoke components; avoid mixing them in one component. - [TanStack Query vs SWR](https://llmbestpractices.com/comparisons/tanstack-query-vs-swr): Pick TanStack Query v5 for mutations, optimistic updates, infinite lists, and devtools; pick SWR 2 for small read-mostly apps that want the smaller API. - [Turborepo vs Nx](https://llmbestpractices.com/comparisons/turborepo-vs-nx): Pick Turborepo 2 for task caching on top of existing workspaces with minimal config; pick Nx 23 for a project graph, generators, plugins, and distributed CI. - [TypeScript vs Flow](https://llmbestpractices.com/comparisons/typescript-vs-flow): Use TypeScript for every new project (TypeScript 7 is the native Go compiler); keep Flow only in codebases that already run it under active Meta-style tooling. - [TypeScript vs JavaScript](https://llmbestpractices.com/comparisons/typescript-vs-javascript): Use TypeScript 7.x for anything with several authors or a lifespan beyond a quarter; use plain JavaScript or JSDoc for scripts, prototypes, and tiny embeds. - [Vercel vs Cloudflare](https://llmbestpractices.com/comparisons/vercel-vs-cloudflare): Pick Vercel for Next.js with preview deployments and minimal setup; pick Cloudflare Workers for lower, flatter cost, edge storage, and any framework. - [Vite vs Webpack](https://llmbestpractices.com/comparisons/vite-vs-webpack): Use Vite 8 (Rolldown and Oxc) for new frontend projects; keep Webpack 5 only for apps tied to its loaders, or move them to Rspack first. - [Yarn vs pnpm](https://llmbestpractices.com/comparisons/yarn-vs-pnpm): Use pnpm 12 by default for strict dependency isolation and a shared store; use Yarn 4 only for Plug'n'Play or constraints; move off Yarn Classic. - [Zod vs Valibot](https://llmbestpractices.com/comparisons/zod-vs-valibot): Pick Zod 4 for ecosystem reach and server-side use; pick Valibot 1 when client bundle size or edge cold start is the constraint; Zod Mini narrows the gap. - [Zustand vs Jotai](https://llmbestpractices.com/comparisons/zustand-vs-jotai): Use Zustand 5 for store-shaped client state with colocated actions; use Jotai 3 for many small atoms with derived values and fine-grained subscriptions. - [Zustand vs Redux](https://llmbestpractices.com/comparisons/zustand-vs-redux): Pick Zustand 5 for most new React apps; pick Redux Toolkit 2 when RTK Query, strict action-based structure, or an existing Redux codebase is the constraint. ## File Organization - [Config Files](https://llmbestpractices.com/file-organization/config-files): One manifest per ecosystem, no duplicated settings, the .env cascade and what to commit, no machine-specific config, and startup validation. - [Dotfiles](https://llmbestpractices.com/file-organization/dotfiles): Use ~/.config first, sync with chezmoi or stow, keep secrets and per-machine values out of the repo, and lay out stow packages correctly. - [Folder Hierarchy](https://llmbestpractices.com/file-organization/folder-hierarchy): Keep trees shallow, group by feature, give each folder one concept, expose a public surface per package, and mirror the runtime model. - [Large Codebase Patterns](https://llmbestpractices.com/file-organization/large-codebase): Scale a codebase with data ownership, folder-level CODEOWNERS, a modular monolith first, enforced boundaries, sharded CI, and expand-contract migrations. - [Monorepo Patterns](https://llmbestpractices.com/file-organization/monorepo): When a monorepo earns its keep, workspaces before build graphs, affected-only CI, per-package CODEOWNERS, and the costs that appear later. - [Naming Conventions](https://llmbestpractices.com/file-organization/naming-conventions): Use kebab-case files unless the toolchain says otherwise, per-language casing, role-based names, no abbreviated domain nouns, ISO dates, and mirrored tests. - [Project Structure](https://llmbestpractices.com/file-organization/project-structure): One project per repo, when src/ earns its keep, canonical Python, Node, Rust, and Go layouts, where tests live, a short repo root, and gitignored build output. ## Frontend - [Accessibility](https://llmbestpractices.com/frontend/accessibility): WCAG 2.2 AA release checklist: contrast, keyboard and focus, skip links, alt text, labels, target size, accessible auth, reduced motion, and automated tests. - [Frontend best practices for AI-first applications](https://llmbestpractices.com/frontend/ai-first-applications): Build LLM frontends for slow, streamed, fallible output: stream early, show state and sources, keep outputs editable, treat errors as normal, sanitize output. - [Astro: Best Practices](https://llmbestpractices.com/frontend/astro): Astro 7 rules: when to pick Astro, file structure, the 7.0 defaults that break upgrades, astro add, the SEO baseline, and GitHub Pages deployment. - [Astro: Actions](https://llmbestpractices.com/frontend/astro-actions): Astro Actions are type-safe, Zod-validated server functions in src/actions/index.ts for client code, zero-JS forms, and server code; authorize in every handler. - [Astro: Content Collections](https://llmbestpractices.com/frontend/astro-content-collections): Astro 7 content collections: glob and file loaders, Zod 4 schemas from astro/zod, getCollection and render(), references, live collections, and deferRender. - [Astro: Image Optimization](https://llmbestpractices.com/frontend/astro-image-optimization): Use Image and Picture from astro:assets: WebP default, the priority prop for LCP, responsive layout, remote domain allowlists, and src vs public. - [Astro: Islands Architecture](https://llmbestpractices.com/frontend/astro-islands): Choose client:load, idle, visible, media, or only for Astro islands, share state with a store, and defer personalized content with server:defer. - [Astro: MDX Integration](https://llmbestpractices.com/frontend/astro-mdx): Use @astrojs/mdx in Astro 7: components in content, the components prop instead of MDXProvider, and Sätteri versus unified for remark and rehype plugins. - [Astro: Performance](https://llmbestpractices.com/frontend/astro-performance): Keep Astro pages at zero JS by default, audit dist/_astro, use the stable Fonts API, mark the LCP image with priority, tune prefetching, and rely on scoped CSS. - [Astro: Server-Side Rendering](https://llmbestpractices.com/frontend/astro-ssr): Astro 7 on-demand rendering: static output with prerender = false per route, adapter choice, request APIs, sessions, astro:env secrets, and route caching. - [Astro: View Transitions](https://llmbestpractices.com/frontend/astro-view-transitions): Add animated navigation with Astro's ClientRouter: transition:name, animate, and persist, fallback modes, re-running scripts, and opting out. - [Palantir Blueprint Best Practices](https://llmbestpractices.com/frontend/blueprint): Pick Blueprint 6 for data-dense React UIs: which packages and CSS to import, the BlueprintProvider root setup, and the v5 to v6 renames that trip teams. - [Blueprint: Overlays and Dialogs](https://llmbestpractices.com/frontend/blueprint-overlays): Blueprint 6 overlays: mount one provider, control Dialog open state in the parent, always set a title, Popover vs Tooltip, and await OverlayToaster.create. - [Blueprint: Table](https://llmbestpractices.com/frontend/blueprint-table): Blueprint 6 Table for large virtualized datasets: import table.css, set numRows to the data length, pass cellRendererDependencies, and choose selectionModes. - [Blueprint: Theming](https://llmbestpractices.com/frontend/blueprint-theming): Retheme Blueprint 6 by overriding --bp-* tokens; toggle bp6-dark or data-bp-color-scheme for dark mode; Sass overrides after compiled CSS do nothing. - [Modern CSS](https://llmbestpractices.com/frontend/css): Layout primitives, custom properties, cascade layers, :has(), container queries, logical properties, fluid type, and a Baseline table as of October 2026. - [CSS: Animations](https://llmbestpractices.com/frontend/css-animations): Pick transition or @keyframes by state, animate transform and opacity, honor prefers-reduced-motion, use @starting-style, and gate scroll-driven animations. - [CSS: Cascade Layers](https://llmbestpractices.com/frontend/css-cascade-layers): Use @layer to set explicit CSS precedence: declare the order once, quarantine third-party CSS, retire !important, and order Tailwind v4's layers correctly. - [CSS: Container Queries](https://llmbestpractices.com/frontend/css-container-queries): Use @container for component-level responsive layout: declare container-type, name nested containers, size with cqi; size queries are widely available. - [CSS: Custom Properties](https://llmbestpractices.com/frontend/css-custom-properties): Use CSS custom properties as the design-token layer: define on :root, override by scope, give var() fallbacks, and register typed properties with @property. - [CSS: Flexbox](https://llmbestpractices.com/frontend/css-flexbox): Flex for one-dimensional layout: main versus cross axis, gap over margins, the grow/shrink/basis shorthand, and min-width: 0 for children that must shrink. - [CSS: Grid](https://llmbestpractices.com/frontend/css-grid): Use Grid for two-dimensional layout: size tracks with fr, minmax, and auto-fill; align nested content with subgrid; use minmax(0, 1fr) to stop overflow. - [CSS: :has() Selector](https://llmbestpractices.com/frontend/css-has-selector): :has() styles an element based on its descendants or following siblings: form state, layout, and absence rules; Baseline widely available since June 2026. - [Forms](https://llmbestpractices.com/frontend/forms): Build native HTML forms first: bound labels, specific type and autocomplete, server validation always, :user-invalid, FormData, and no disabled submit buttons. - [Semantic HTML](https://llmbestpractices.com/frontend/html): Baseline HTML checklist for every page: lang, landmarks, heading order, labeled controls, minimal head, image alt and dimensions; links to each detail page. - [HTML: ARIA Patterns](https://llmbestpractices.com/frontend/html-aria-patterns): ARIA rules and patterns: native elements first, the four rules of ARIA use, live regions, tabs with roving tabindex, and why to avoid a custom listbox. - [HTML: Head Tags](https://llmbestpractices.com/frontend/html-head-tags): The head tags every page needs, in order: charset, viewport, title, description, canonical, Open Graph, theme-color, and favicons, plus how Google treats them. - [HTML: Link rel Attribute](https://llmbestpractices.com/frontend/html-links-rel): When to use each rel value: noopener (implied by target=_blank), noreferrer, sponsored, ugc, nofollow, preload, preconnect, prefetch, canonical, and manifest. - [HTML: Microdata](https://llmbestpractices.com/frontend/html-microdata): How itemscope, itemtype, and itemprop work, the nested-itemscope bug, and the steps to migrate legacy Microdata to the JSON-LD that Google recommends. - [HTML: Multimedia](https://llmbestpractices.com/frontend/html-multimedia): Responsive images with srcset, sizes, and picture; width and height against layout shift; fetchpriority for LCP; video with captions, no autoplay with sound. - [HTML: Semantic Elements](https://llmbestpractices.com/frontend/html-semantic-elements): Use the element that names the role (main, article, section, nav, aside, header, footer, search); know which become landmarks and need an accessible name. - [HTML: Tables](https://llmbestpractices.com/frontend/html-tables): Use tables for tabular data only: caption, thead/tbody/tfoot, th with scope, and headers/id for multi-level headers; use grid or flexbox for layout. - [Next.js Best Practices](https://llmbestpractices.com/frontend/nextjs): Next.js 16.3 App Router rules: server components and actions, opt-in Cache Components, async request APIs, proxy.ts, Node runtime, and 16 breaking changes. - [Next.js: App Router](https://llmbestpractices.com/frontend/nextjs-app-router): Next.js 16 App Router routing: layouts, route groups, parallel routes (default.js required), intercepting routes, typed props, and Pages Router migration. - [Next.js: Async Request APIs](https://llmbestpractices.com/frontend/nextjs-async-dynamic-apis): In Next.js 16, params, searchParams, cookies(), headers(), and draftMode() must be awaited; covers typegen props, the codemod, and Suspense placement. - [Next.js: Caching and Invalidation](https://llmbestpractices.com/frontend/nextjs-caching): Next.js 16 Cache Components: opt in with use cache, set cacheLife and cacheTag, pass request data as arguments, invalidate with updateTag or revalidateTag. - [Next.js: Image Optimization](https://llmbestpractices.com/frontend/nextjs-image-optimization): next/image in Next.js 16: set sizes, mark the LCP image (priority is deprecated), placeholders, remotePatterns, the 16 default changes, and loaders. - [Next.js: Instant Navigations](https://llmbestpractices.com/frontend/nextjs-instant-navigation): Next.js 16.3 Instant Navigations: enable cacheComponents and partialPrefetching, use Suspense and use cache so navigations render at once, test with instant(). - [Next.js: Metadata API](https://llmbestpractices.com/frontend/nextjs-metadata-api): The Next.js 16 Metadata API: metadata and generateMetadata, metadataBase, canonicals, OG images with next/og, icons, sitemap.ts, robots.ts, and JSON-LD. - [Next.js: Middleware (proxy.ts)](https://llmbestpractices.com/frontend/nextjs-middleware): Next.js 16 proxy.ts (formerly middleware.ts): Node.js only, matcher rules, redirect vs rewrite vs next, header forwarding, and auth checks in server actions. - [Next.js: Route Handlers](https://llmbestpractices.com/frontend/nextjs-route-handlers): Route handlers in Next.js 16: route.ts method exports, awaited params, validation and status codes, streaming, GET caching, and when to prefer server actions. - [Next.js: Server Actions](https://llmbestpractices.com/frontend/nextjs-server-actions): Server Actions in Next.js 16: use server, every action is a public endpoint, per-action auth, updateTag vs revalidateTag, sequential dispatch, and deploy skew. - [React Best Practices](https://llmbestpractices.com/frontend/react): React 19.3 rule set: composition, state placement, the 19.x API map (use, Actions, Activity, ViewTransition), opt-in Compiler, and server vs client components. - [React Compiler](https://llmbestpractices.com/frontend/react-compiler): React Compiler 1.0 is a stable, opt-in build plugin that auto-memoizes; enable it per build tool, verify it, and keep manual memoization only where it pays. - [React: Error Boundaries](https://llmbestpractices.com/frontend/react-error-boundaries): Error boundaries are class-based in React 19 and catch render errors only; use react-error-boundary, resetKeys, root error hooks, and error.tsx in Next.js. - [React: Forms](https://llmbestpractices.com/frontend/react-forms): React 19 form patterns: uncontrolled inputs with form actions, useActionState, useOptimistic, server-side Zod validation, and keeping secrets out of state. - [React: Hooks](https://llmbestpractices.com/frontend/react-hooks): React 19 hook rules: top-level calls, useState vs useReducer, when an Effect is justified, custom hook naming, and where the memoization rules live. - [React: Performance](https://llmbestpractices.com/frontend/react-performance): Profile first, memoize last; virtualize long lists with TanStack Virtual, split code at routes, remove data waterfalls, use selectors for high-frequency state. - [React: Server Components](https://llmbestpractices.com/frontend/react-server-components): React 19 Server Components: the use client module boundary, serializable props, promises with use(), per-request dedupe, and keeping RSC packages patched. - [React: State Management](https://llmbestpractices.com/frontend/react-state-management): Local state first, URL state for shareable views, Zustand or Jotai for client globals, context for low-frequency values, and server data kept out of state. - [React: Suspense and Transitions](https://llmbestpractices.com/frontend/react-suspense): React 19 Suspense boundary placement, fallback design, useTransition vs useDeferredValue, ViewTransition (stable in 19.3), and SSR streaming. - [shadcn/ui Best Practices](https://llmbestpractices.com/frontend/shadcn): shadcn/ui copies component source into your repo: run init once, add components one at a time, diff upstream changes with add --diff, keep accessibility intact. - [shadcn/ui: Composition](https://llmbestpractices.com/frontend/shadcn-composition): Compose shadcn with compound components; use asChild on the Radix base and render on the Base UI base; extend variants with cva; pass ref as a plain prop. - [shadcn/ui: Forms](https://llmbestpractices.com/frontend/shadcn-forms): Build shadcn forms with Field components, React Hook Form Controller, and Zod; set data-invalid and aria-invalid; use useActionState for Server Actions. - [shadcn/ui: Theming](https://llmbestpractices.com/frontend/shadcn-theming): Retheme shadcn by editing semantic CSS variables on :root and .dark in globals.css, mapped with @theme inline; never hardcode colors in component files. - [Streaming response patterns for chat interfaces](https://llmbestpractices.com/frontend/streaming-chat-interfaces): Stream LLM output to a chat UI through your own route: SSE vs streamed fetch, mid-stream errors, partial JSON, cancellation to the provider, and recovery. - [Tailwind v4: Best Practices](https://llmbestpractices.com/frontend/tailwind): Tailwind v4 conventions: CSS-first config, utility-first composition, arbitrary values, class detection, and Prettier, ESLint, and IntelliSense tooling. - [Tailwind v4: Dark Mode](https://llmbestpractices.com/frontend/tailwind-dark-mode): Tailwind v4 dark mode follows prefers-color-scheme by default; use @custom-variant for a class or data toggle, set it before paint, and sync theme-color. - [Tailwind: Migration Strategies](https://llmbestpractices.com/frontend/tailwind-migration): Upgrade v3 to v4 with npx @tailwindcss/upgrade and review the renamed utilities and behavior changes; migrate custom CSS or CSS Modules leaf-first. - [Tailwind v4: Plugins and Extensions](https://llmbestpractices.com/frontend/tailwind-plugins): Extend Tailwind v4 in CSS with @utility and @custom-variant; load JavaScript plugins such as typography and forms with @plugin; skip plugins v4 made redundant. - [Tailwind v4: Responsive Design](https://llmbestpractices.com/frontend/tailwind-responsive): Build mobile-first with sm:/md:/lg: viewport variants for page layout and built-in @container variants for components; v4 needs no container-queries plugin. - [Tailwind v4: Theme and Design Tokens](https://llmbestpractices.com/frontend/tailwind-theme): Define tokens once in @theme to get CSS variables and utilities; know when to use inline, static, and initial; switch themes at runtime by overriding variables. - [Tailwind v4: Variants and State Modifiers](https://llmbestpractices.com/frontend/tailwind-variants): Style state from CSS with group-*, peer-*, has-*, supports-*, aria-*, data-*, and arbitrary variants; know that v4 stacks variants left to right. ## How To - [How to add JSON-LD structured data to a static site](https://llmbestpractices.com/howto/add-jsonld-to-static-site): Pick schema.org types per page kind, generate JSON-LD from frontmatter, inject it into the server-rendered head with matching URLs, and validate before deploy. - [How to audit dependencies](https://llmbestpractices.com/howto/audit-dependencies): Run npm audit, pnpm audit, or pip-audit, triage by reachability, fix or override, re-test, and add pull-request and weekly CI audits that fail on high severity. - [How to audit llms.txt with Claude](https://llmbestpractices.com/howto/audit-llms-txt-with-claude): Check llms.txt against the sitemap with shell diffs first, then have Claude judge description quality with a JSON-schema response, and add a CI count check. - [How to bootstrap and audit a vault](https://llmbestpractices.com/howto/bootstrap-a-research-vault): Generate an Obsidian vault from a spec with the vault-architect scripts, run its auditor, close the autofix loop, and build the semantic-audit bundle. - [How to build an MCP server](https://llmbestpractices.com/howto/build-an-mcp-server): Build a stdio MCP server with the v2 TypeScript SDK (@modelcontextprotocol/server), register a zod tool, test in MCP Inspector, and add it to Claude Code. - [How to configure pgvector on Neon](https://llmbestpractices.com/howto/configure-pgvector-on-neon): Enable the vector extension on a Neon database, create an embedding table, insert vectors with psycopg, add an HNSW cosine index, and tune hnsw.ef_search. - [How to configure TypeScript strict mode](https://llmbestpractices.com/howto/configure-typescript-strict): Turn on strict one flag at a time, fix tsc errors by code, add noUncheckedIndexedAccess, and gate CI; TypeScript 6 and 7 default strict to true. - [How to configure VS Code for TypeScript projects](https://llmbestpractices.com/howto/configure-vscode-for-typescript-projects): Commit .vscode/settings.json to pin the workspace TypeScript, format and fix on save with Biome, recommend extensions, and use project references in monorepos. - [How to connect Claude to Postgres via MCP](https://llmbestpractices.com/howto/connect-claude-to-postgres-via-mcp): Create a read-only Postgres role, register the DBHub MCP server in Claude Code with an env-var DSN, and confirm it can read schema but not write. - [How to debug a slow Postgres query](https://llmbestpractices.com/howto/debug-postgres-slow-query): Enable pg_stat_statements, rank queries by total time, read EXPLAIN (ANALYZE, BUFFERS), add an index with CREATE INDEX CONCURRENTLY, and recheck under load. - [How to deploy a static site to Cloudflare](https://llmbestpractices.com/howto/deploy-a-static-site-to-cloudflare-pages): Deploy a static site (Quartz 4 example) with Workers static assets and Workers Builds, add a custom domain, and verify; Pages settings for existing projects. - [How to deploy FastAPI on Fly.io](https://llmbestpractices.com/howto/deploy-fastapi-on-fly): Containerize a FastAPI app, run fly launch, check fly.toml autostop settings, create and attach Fly Managed Postgres, set secrets, deploy, and verify with curl. - [How to deploy a Quartz site to GitHub Pages](https://llmbestpractices.com/howto/deploy-quartz-site): Clone Quartz 4, set baseUrl, add the Actions workflow, enable Pages with the Actions source, point a custom domain, and verify with curl. - [How to deploy to Vercel](https://llmbestpractices.com/howto/deploy-to-vercel): Import a Git repository into Vercel, scope environment variables per environment, override build settings in vercel.json, add a custom domain, and use previews. - [Launch a New Site: Zero-to-Indexed Runbook](https://llmbestpractices.com/howto/launch-a-new-site): Ordered checklist from empty repo to a live, indexed, AI-discoverable site: repo, deploy, DNS, discoverability files, search registration, and verification. - [How to master Google Search Console](https://llmbestpractices.com/howto/master-google-search-console): Verify a Domain property, submit the sitemap, read Performance and Core Web Vitals, diagnose indexing with URL Inspection, and handle Manual Actions. - [How to migrate CSS to Tailwind](https://llmbestpractices.com/howto/migrate-css-to-tailwind): Install Tailwind v4, drop duplicate resets, move design tokens into @theme, convert components one at a time, and sort classes with the Prettier plugin. - [How to migrate from npm to pnpm](https://llmbestpractices.com/howto/migrate-from-npm-to-pnpm): Install pnpm, import package-lock.json, fix phantom dependencies and blocked build scripts, move workspace settings to pnpm-workspace.yaml, and update CI. - [How to migrate a Postgres database](https://llmbestpractices.com/howto/migrate-postgres-database): Move one database between hosts with pg_dump and pg_restore: custom-format dump, parallel restore, verify counts and sequences, cut over with a write freeze. - [How to migrate React to Server Components](https://llmbestpractices.com/howto/migrate-react-to-server-components): Move a Next.js App Router app to Server Components: find client-only code, push 'use client' to leaves, fetch in async server components, verify bundle size. - [How to measure and fix Core Web Vitals](https://llmbestpractices.com/howto/optimize-core-web-vitals): Measure LCP, INP, and CLS with Lighthouse, CrUX, and the web-vitals library, apply the standard fix per metric, and re-measure at the 75th percentile. - [How to optimize images for the web](https://llmbestpractices.com/howto/optimize-images-for-web): Resize to display size, convert to WebP and AVIF with a Sharp script, serve with picture and srcset, set width and height, and lazy-load all but the LCP image. - [How to point a custom domain at GitHub Pages](https://llmbestpractices.com/howto/point-a-custom-domain-at-github-pages): Register the domain in Pages settings, verify it, add apex A/AAAA and www CNAME records, confirm with dig, then enforce HTTPS. - [How to run a Quartz static site locally](https://llmbestpractices.com/howto/run-a-quartz-static-site-locally): Install Node 22, run npm ci and npx quartz build --serve on a Quartz 4 checkout, then fix port, cache, and git-date errors. - [How to run Claude Code with an MCP server](https://llmbestpractices.com/howto/run-claude-code-with-mcp): Add a remote HTTP or local stdio MCP server to Claude Code with claude mcp add or .mcp.json, scope it, allow specific tools, and verify with /mcp. - [How to run pa11y locally and in CI](https://llmbestpractices.com/howto/run-pa11y-locally): Install pa11y-ci, write .pa11yci.json, scan a local build, fix common WCAG failures, set a threshold and scoped ignores, and gate PRs in GitHub Actions. - [How to run an SEO-safe site migration](https://llmbestpractices.com/howto/seo-migration-playbook): Inventory URLs, build a 1:1 redirect map, stage on noindex, verify with a parallel crawl, flip DNS, submit sitemaps, and monitor redirects for four weeks. - [How to set up Bun as a package manager](https://llmbestpractices.com/howto/set-up-bun-as-a-package-manager): Install Bun, let bun install migrate an existing lockfile to bun.lock, run scripts and tests, trust install scripts explicitly, and update CI with setup-bun. - [How to set up Claude Code on a new repository](https://llmbestpractices.com/howto/set-up-claude-code): Install Claude Code with the native installer, generate and trim CLAUDE.md with /init, add a TODO.md backlog, and land the first PR with acceptance criteria. - [How to set up Cloudflare R2](https://llmbestpractices.com/howto/set-up-cloudflare-r2): Create an R2 bucket, make a scoped API token, connect a custom public domain, and use the bucket from the AWS CLI and boto3 through the S3-compatible endpoint. - [How to set up a Cloudflare Tunnel](https://llmbestpractices.com/howto/set-up-cloudflare-tunnel): Install cloudflared, create a tunnel, write config.yml with ingress rules and a catch-all, route a hostname through Cloudflare DNS, and run it under systemd. - [How to set up Cloudflare Workers](https://llmbestpractices.com/howto/set-up-cloudflare-workers): Scaffold a Worker with create-cloudflare, write a fetch handler, bind KV in wrangler.jsonc, test with wrangler dev, deploy, and verify with curl. - [How to set up GitHub Actions cache](https://llmbestpractices.com/howto/set-up-github-actions-cache): Cache dependencies with setup-node's cache input, add actions/cache for build outputs and browsers, key on lockfile hashes, and avoid stale or leaked caches. - [How to set up Ollama locally](https://llmbestpractices.com/howto/set-up-ollama-locally): Install Ollama, pull and run a model, bake a system prompt and context size into a Modelfile, and call the local REST and OpenAI-compatible APIs on port 11434. - [How to set up Postgres locally](https://llmbestpractices.com/howto/set-up-postgres-locally): Install Postgres, create a non-superuser role and database, connect over TCP with password auth, set DATABASE_URL, and fix peer-authentication errors. - [How to set up pytest](https://llmbestpractices.com/howto/set-up-pytest): Declare pytest and pytest-cov in pyproject.toml, set testpaths, share fixtures in conftest.py, check discovery with --collect-only, and set a CI coverage floor. - [How to set up a RAG pipeline](https://llmbestpractices.com/howto/set-up-rag-pipeline): Build a minimal RAG pipeline: chunk documents, embed with Voyage, store vectors in pgvector, retrieve top-k, and answer with claude-sonnet-5-5 citing sources. - [How to ship /llms.txt and /llms-full.txt](https://llmbestpractices.com/howto/ship-llms-txt): Generate /llms.txt from page frontmatter at build time, optionally emit /llms-full.txt, place both at the site root, and verify them with curl. - [How to ship static-site SEO end-to-end](https://llmbestpractices.com/howto/static-site-seo): Configure a Quartz 4 build to emit canonicals, sitemap, robots.txt, JSON-LD, and agent files at build time, then verify the output with curl before deploy. - [How to submit a new site to search engines](https://llmbestpractices.com/howto/submit-a-new-site-to-search-engines): Register a launched site with Google Search Console, Bing Webmaster Tools, and IndexNow: verify, submit the sitemap, request indexing, and automate pings. - [How to wire up the Anthropic SDK](https://llmbestpractices.com/howto/wire-up-anthropic-sdk): Install the anthropic Python package, send a claude-sonnet-5-5 Messages request, enable adaptive thinking, stream, get structured output, and run a tool loop. - [How to write a Cursor rule](https://llmbestpractices.com/howto/write-a-cursor-rule): Write .cursor/rules/*.mdc files with the right frontmatter and activation mode, concrete conventions, and a good-versus-avoid example, then test in Agent mode. - [How to write a CLAUDE.md from scratch](https://llmbestpractices.com/howto/write-claude-md-from-scratch): Write a CLAUDE.md under 200 lines: mission, schema, commands, folder map, and a how-to-add checklist, then verify it loaded with /context. - [How to write LLM-friendly content for a public site](https://llmbestpractices.com/howto/write-llm-friendly-content): Retrofit a content site for agents: summary frontmatter, /llms.txt, JSON-LD, raw Markdown per page, named rules, and atomic pages, then test with a model. - [How to write meta descriptions](https://llmbestpractices.com/howto/write-meta-descriptions): Write a unique, outcome-first meta description per page, set it in frontmatter or the framework's metadata API, and compare CTR in Search Console after 4 weeks. - [How to write tests for FastAPI](https://llmbestpractices.com/howto/write-tests-for-fastapi): Test FastAPI with TestClient, isolate the database with a rollback session override, stub external services via dependency_overrides, and reset after each test. ## Backend - [Auth Sessions: Best Practices](https://llmbestpractices.com/backend/auth-sessions): Use opaque session IDs in __Host- HttpOnly Secure SameSite cookies, rotate on login, detect refresh-token reuse, add CSRF tokens, and revoke on the server. - [ChromaDB Best Practices](https://llmbestpractices.com/backend/chromadb): ChromaDB 1.x decision rules: when it fits, which client to use, retrieval defaults, and when to move to pgvector or Qdrant. - [ChromaDB: Collections and Embeddings](https://llmbestpractices.com/backend/chromadb-collections): Design ChromaDB 1.x collections: one per retrieval task, distance set at creation, flat metadata, one owner for embeddings, a new collection per model change. - [ChromaDB: Metadata Filters and Hybrid Retrieval](https://llmbestpractices.com/backend/chromadb-filters): Write ChromaDB 1.x where and where_document filters correctly: explicit $and, array metadata, case-sensitive matching, and application-side hybrid retrieval. - [ChromaDB: Persistence, Server Mode, and Backup](https://llmbestpractices.com/backend/chromadb-persistence): Run ChromaDB 1.x with PersistentClient or chroma run, mount /data, add a reverse proxy for auth, mitigate CVE-2026-45829, and back up the data directory. - [ChromaDB: Scale Limits and Migration](https://llmbestpractices.com/backend/chromadb-scale-limits): Size single-node ChromaDB with Chroma's RAM formula, watch latency, memory, and recall, then migrate to pgvector, Qdrant, or Chroma Cloud with dual writes. - [Email Deliverability: SPF, DKIM, DMARC](https://llmbestpractices.com/backend/email-deliverability): Authenticate mail with aligned SPF, DKIM, and DMARC on a sending subdomain, meet Gmail and Yahoo bulk-sender rules, and raise DMARC from none to reject. - [FastAPI Best Practices](https://llmbestpractices.com/backend/fastapi): FastAPI 0.142 on Pydantic 2: version baseline, route layout, and which page covers models, dependencies and lifespan, async I/O, background tasks, and OpenAPI. - [FastAPI: Async I/O](https://llmbestpractices.com/backend/fastapi-async-io): Use async def only when everything inside is awaited, plain def for blocking code, mind the 40-thread limiter, and size workers and DB pools together. - [FastAPI: Background Tasks](https://llmbestpractices.com/backend/fastapi-background-tasks): Use BackgroundTasks for small best-effort work after the response; move payments, webhooks, and retries to a real queue and write tasks idempotently. - [FastAPI: Dependencies and Lifespan](https://llmbestpractices.com/backend/fastapi-dependencies): Use Depends for per-request resources with correct yield scope, lifespan for app-wide resources, Annotated aliases, and dependency_overrides in tests. - [FastAPI: OpenAPI and Docs](https://llmbestpractices.com/backend/fastapi-openapi): Keep FastAPI's OpenAPI 3.1 schema accurate with response models, status codes, and clean operation IDs; turn off docs for private APIs; use Hey API for clients. - [FastAPI: Pydantic v2 Models](https://llmbestpractices.com/backend/fastapi-pydantic): Separate Pydantic v2 input and output models, prefer Field constraints over validators, use validate_by_name for aliases, and validate JSON once at the edge. - [Database Migrations](https://llmbestpractices.com/backend/migrations): Ship forward-only, idempotent migrations with the app, use lock_timeout and CONCURRENTLY on live tables, and rename columns with expand and contract. - [Observability](https://llmbestpractices.com/backend/observability): Use OpenTelemetry (OTLP) for traces, metrics, and logs, emit structured JSON logs with trace IDs, build RED and USE dashboards, and sample traces deliberately. - [Stripe Payments: Best Practices](https://llmbestpractices.com/backend/payments-stripe): Stripe rules: verify webhooks on the raw body, pin the API version, set prices server-side, use idempotency keys and restricted keys, fulfill from events. - [Postgres Best Practices](https://llmbestpractices.com/backend/postgres): Postgres 18 defaults: what changed in 18, primary key and schema rules, connection pooling, and which deep-dive page covers each topic. - [Postgres: EXPLAIN and Query Plans](https://llmbestpractices.com/backend/postgres-explain): Read the plan before tuning: EXPLAIN ANALYZE top-down, compare estimated to actual rows, and use pg_stat_statements to find what to tune. - [Postgres: Full-Text Search](https://llmbestpractices.com/backend/postgres-full-text-search): Store a weighted STORED tsvector with a GIN index, query with websearch_to_tsquery, add pg_trgm for fuzzy matching, and know when to switch engines. - [Postgres: Indexes](https://llmbestpractices.com/backend/postgres-indexes): Pick the index type from the query shape: B-tree by default, GIN for JSONB and full-text, GiST for ranges, BRIN for huge append-only tables; build CONCURRENTLY. - [Postgres: JSONB](https://llmbestpractices.com/backend/postgres-jsonb): Use JSONB for variable-shape data, index with GIN, and promote any key you filter or sort on to a real column. - [Postgres: Partitioning](https://llmbestpractices.com/backend/postgres-partitioning): Range-partition tables that outgrow memory or need DROP-based retention, automate with pg_partman, and keep unique keys and pruning in mind. - [Postgres: Replication](https://llmbestpractices.com/backend/postgres-replication): Streaming replication for read scale and failover; logical replication for selective copies and upgrades; replicas are not backups; bound slot WAL retention. - [Postgres: Vacuum and Bloat](https://llmbestpractices.com/backend/postgres-vacuum): Tune autovacuum per hot table, watch dead tuples and transaction ID age, repack online with pg_repack instead of VACUUM FULL. - [Prisma Best Practices](https://llmbestpractices.com/backend/prisma): Prisma 7 hub: version status, the minimal setup (prisma.config.ts, prisma-client generator, driver adapter), and which page covers each task. - [Prisma Client: Setup, Adapters, and Extensions](https://llmbestpractices.com/backend/prisma-client): Construct PrismaClient once with a driver adapter, run prisma generate explicitly, log queries safely, and use $extends for soft delete and computed fields. - [Prisma Migrations](https://llmbestpractices.com/backend/prisma-migrations): Author with migrate dev, ship with migrate deploy, baseline existing databases, detect drift with migrate diff, and squash with the documented steps. - [Prisma Connection Pooling](https://llmbestpractices.com/backend/prisma-pooling): Size the driver pool in Prisma 7, put PgBouncer in transaction mode in front when needed, use a direct URL for the CLI, and set Accelerate via accelerateUrl. - [Prisma Raw Queries](https://llmbestpractices.com/backend/prisma-raw-queries): Use $queryRaw and $executeRaw tagged templates for SQL the query builder cannot express; compose with Prisma.sql, never concatenate, and handle BigInt results. - [Prisma Schema](https://llmbestpractices.com/backend/prisma-schema): Model schema.prisma for Prisma 7: provider-only datasource, prisma-client generator with output, ids, unique constraints, explicit onDelete, and native types. - [Prisma Transactions](https://llmbestpractices.com/backend/prisma-transactions): Choose the $transaction array or interactive form, set isolation and timeouts, retry P2034, order locks, and prefer atomic update operators. - [Prisma 6 to 7 Upgrade](https://llmbestpractices.com/backend/prisma-v6-to-v7-upgrade): Upgrade Prisma 5 or 6 to 7: check the toolchain, switch to the prisma-client generator and prisma.config.ts, add a driver adapter, and replace removed features. - [SQLite Best Practices](https://llmbestpractices.com/backend/sqlite): When SQLite fits (single writer, local disk), the WAL pragmas to set, the WAL-reset bug and patched versions, safe backups, and driver choices. - [Supabase: Best Practices](https://llmbestpractices.com/backend/supabase): Supabase setup, CLI migrations, connection modes, publishable and secret API keys, and the 2026 change to explicit Data API grants. - [Supabase Row Level Security: Best Practices](https://llmbestpractices.com/backend/supabase-rls): Supabase RLS rules: grants plus policies, RLS on every exposed table, USING with WITH CHECK, wrapped auth.uid(), security_invoker views, no client secret key. - [Inbound Webhooks: Security Best Practices](https://llmbestpractices.com/backend/webhooks): Verify the HMAC over the raw body in constant time, enforce a timestamp window, dedupe by event id, return 2xx fast, and accept two secrets during rotation. ## Cheatsheets - [AI Crawler User-Agents](https://llmbestpractices.com/cheatsheets/ai-crawlers): AI crawler robots.txt tokens from OpenAI, Anthropic, Google, Perplexity, Apple, Meta, and others, with each one's job and whether robots.txt controls it. - [ARIA Attributes Cheatsheet](https://llmbestpractices.com/cheatsheets/aria-attributes): ARIA naming, state, live-region, and relationship attributes with when to use each, name precedence, and the aria-hidden and aria-label gotchas. - [AWS CLI Commands Cheatsheet](https://llmbestpractices.com/cheatsheets/aws-cli-commands): AWS CLI v2 commands for s3, ec2, lambda, sts, and iam, with region and profile precedence, --query usage, and the v2 payload and pager gotchas. - [Bash One-Liners Cheatsheet](https://llmbestpractices.com/cheatsheets/bash-one-liners): Bash parameter expansion, jobs and traps, arithmetic, and tests, with the quoting and error-handling gotchas. - [Cron Syntax Cheatsheet](https://llmbestpractices.com/cheatsheets/cron-syntax): Cron field grammar, special characters, common schedules, per-platform timezones (cron, GitHub Actions, Kubernetes, EventBridge), and the OR-semantics trap. - [CSS Grid Areas Cheatsheet](https://llmbestpractices.com/cheatsheets/css-grid-areas): grid-template-areas syntax, the grid-template shorthand, responsive re-templating, and the rules that make an area declaration invalid. - [CSS Pseudo-Classes and Pseudo-Elements Cheatsheet](https://llmbestpractices.com/cheatsheets/css-pseudo-classes): State and structural pseudo-classes and common pseudo-elements (:focus-visible, :nth-child, ::before, ::marker, ::backdrop) with specificity. - [CSS Selectors Cheatsheet](https://llmbestpractices.com/cheatsheets/css-selectors): CSS type, class, attribute, combinator, and logical selectors (:is, :where, :not, :has) with specificity scores and gotchas. - [CSS Units Cheatsheet](https://llmbestpractices.com/cheatsheets/css-units): Which CSS unit to use for type, spacing, mobile full-height layouts, grid tracks, and container-relative sizing, with viewport and container unit gotchas. - [curl Cheatsheet](https://llmbestpractices.com/cheatsheets/curl-flags): curl flags for method, body, headers, auth, output, redirects, and TLS, plus API-testing recipes and the gotchas that hide server errors. - [Docker Commands Cheatsheet](https://llmbestpractices.com/cheatsheets/docker-commands): Docker and Compose commands to build, run, inspect, network, and clean up, with the pruning and port-binding gotchas. - [Dockerfile Syntax Cheatsheet](https://llmbestpractices.com/cheatsheets/dockerfile-syntax): Dockerfile instructions with syntax and notes, a cache-friendly multi-stage example, and the gotchas around ARG scope, COPY ownership, and signal handling. - [find, grep, awk, sed Cheatsheet](https://llmbestpractices.com/cheatsheets/find-grep-awk-sed): find, grep, awk, and sed expressions, the pipelines that chain them, and the GNU vs BSD and quoting gotchas. - [GitHub CLI (gh) Cheatsheet](https://llmbestpractices.com/cheatsheets/gh-cli): gh commands for auth, pull requests, issues, repos, workflow runs, releases, and gh api with --jq, plus the interactive-prompt and pagination gotchas. - [Git Commands Cheatsheet](https://llmbestpractices.com/cheatsheets/git-commands): Git commands grouped by intent (inspect, undo, branch, sync, stash, recover), a short alias set, and the gotchas that lose work. - [Git Merge Strategies Cheatsheet](https://llmbestpractices.com/cheatsheets/git-merge-strategies): Fast-forward, no-ff, squash, and rebase compared by resulting history, plus ours/theirs semantics and the -s and -X options. - [Git Rebase Cheatsheet](https://llmbestpractices.com/cheatsheets/git-rebase): Interactive rebase todo commands, rebase --onto recipes, conflict steps, autosquash, and the flags that make rebasing safe. - [HTTP Status Codes Cheatsheet](https://llmbestpractices.com/cheatsheets/http-status-codes): HTTP status codes worth using, an action-to-status table for REST endpoints, and an RFC 9457 error body. - [JavaScript Array Methods Cheatsheet](https://llmbestpractices.com/cheatsheets/javascript-array-methods): JavaScript array methods grouped by copy versus mutate, with return values, ES2023 non-mutating methods, Object.groupBy, and sort, reduce, and forEach gotchas. - [jq Cheatsheet](https://llmbestpractices.com/cheatsheets/jq-syntax): jq selectors, filters, formats, CLI flags, and ready-to-paste recipes for filtering, reshaping, and updating JSON, with the null and streaming gotchas. - [VS Code Keyboard Shortcuts Cheatsheet](https://llmbestpractices.com/cheatsheets/keyboard-shortcuts-vscode): Default VS Code shortcuts for navigation, editing, multi-cursor, search, refactoring, terminal, and debugging on macOS and Windows, with the Linux differences. - [Kubernetes Commands Cheatsheet](https://llmbestpractices.com/cheatsheets/kubernetes-commands): kubectl commands to switch context, inspect, apply, roll back, read logs, exec, port-forward, and debug, with resource shortnames and selectors. - [LLM Prompt Patterns Cheatsheet](https://llmbestpractices.com/cheatsheets/llm-prompt-patterns): Copy-ready prompt skeletons for XML delimiters, few-shot, reasoning, system and user roles, and schema-constrained output, with Claude API notes. - [macOS Keyboard Shortcuts Cheatsheet](https://llmbestpractices.com/cheatsheets/macos-keyboard): macOS shortcuts for Finder, screenshots, window and app switching, window tiling, text editing, and system actions, checked against Apple's shortcut reference. - [Markdown Syntax Cheatsheet](https://llmbestpractices.com/cheatsheets/markdown-syntax): Which Markdown features work in CommonMark, GitHub, Obsidian, and MDX, with syntax for tables, footnotes, math, callouts, wikilinks, and frontmatter. - [Nginx Config Cheatsheet](https://llmbestpractices.com/cheatsheets/nginx-config): Nginx contexts, location matching order, reverse proxy, SPA fallback, TLS with http2 on, gzip, and the proxy_pass, add_header, and alias gotchas. - [OpenSSL Commands Cheatsheet](https://llmbestpractices.com/cheatsheets/openssl-commands): OpenSSL 3 commands to generate keys and certificates, inspect them, test live TLS, convert formats, and confirm a key matches a certificate. - [Postgres EXPLAIN Cheatsheet](https://llmbestpractices.com/cheatsheets/postgres-explain): Lookup table for EXPLAIN ANALYZE scan, join, and sort nodes, the cost and timing fields, and the symptoms that point to a missing index or stale statistics. - [Postgres Functions Cheatsheet](https://llmbestpractices.com/cheatsheets/postgres-functions): Postgres aggregate, date and time, and JSONB functions and operators with examples, return-type notes, and the jsonb_set, age, and now() gotchas. - [Postgres Types Cheatsheet](https://llmbestpractices.com/cheatsheets/postgres-types): Postgres column types for text, numbers, time, JSON, arrays, and UUIDs with storage sizes, identity vs serial, and the timestamptz, jsonb, and UUID v7 choices. - [Postgres Window Functions Cheatsheet](https://llmbestpractices.com/cheatsheets/postgres-window-functions): Postgres window functions: ranking, lag and lead, running aggregates, PARTITION BY, frame clauses, and the default-frame and WHERE gotchas. - [Python Collections Cheatsheet](https://llmbestpractices.com/cheatsheets/python-collections): Python collections module reference for Counter, defaultdict, namedtuple, deque, ChainMap, and OrderedDict with the patterns each one replaces. - [Python itertools Cheatsheet](https://llmbestpractices.com/cheatsheets/python-itertools): Python itertools functions for chaining, slicing, combinatorics, grouping, and running reductions, with the groupby sorting rule and infinite-iterator gotchas. - [Python Regex (re module) Cheatsheet](https://llmbestpractices.com/cheatsheets/python-regex): Python re module functions, flags, Python-only syntax such as named and atomic groups, and the match, fullmatch, findall, and Unicode gotchas. - [Python String Formatting Cheatsheet](https://llmbestpractices.com/cheatsheets/python-string-formatting): Python f-strings, str.format, format_map, percent formatting, and t-strings, with the format-spec grammar and the quoting and lazy-logging gotchas. - [React Hooks Cheatsheet](https://llmbestpractices.com/cheatsheets/react-hooks): React hooks lookup: state, effect, ref, context, memoization, and React 19 hooks like use and useActionState, with dependency and stale-closure gotchas. - [Regex Cheatsheet](https://llmbestpractices.com/cheatsheets/regex-patterns): Regex syntax, flag differences across Python, JavaScript, PCRE, and POSIX, validated patterns for email, URL, and dates, and anchor and backtracking gotchas. - [schema.org Types Cheatsheet](https://llmbestpractices.com/cheatsheets/schema-org-types): Which schema.org types still earn Google rich results, required and recommended fields for Article, Product, and Organization, and the @id reference pattern. - [SQL Joins Cheatsheet](https://llmbestpractices.com/cheatsheets/sql-joins): SQL join types with the filter that selects each row set, LATERAL and self joins, semi and anti joins, and the NULL and row-multiplication bugs. - [SSH Config Cheatsheet](https://llmbestpractices.com/cheatsheets/ssh-config): ~/.ssh/config patterns: Host blocks, ProxyJump, connection multiplexing, safe defaults, Include and Match, and ordering rules. - [Swift Collection Methods Cheatsheet](https://llmbestpractices.com/cheatsheets/swift-collection-methods): Swift Sequence and Collection methods (map, filter, reduce, sorted, zip, lazy) with return types and the forEach, reversed, and reduce gotchas. - [tmux Commands Cheatsheet](https://llmbestpractices.com/cheatsheets/tmux-commands): tmux sessions, windows, panes, copy mode (emacs and vi keys), and a minimal ~/.tmux.conf for persistent terminal workspaces. - [TSX/JSX Syntax Cheatsheet](https://llmbestpractices.com/cheatsheets/tsx-jsx-syntax): JSX and TSX syntax patterns for expressions, conditional rendering, lists and keys, fragments, and typed props, events, and refs under React 19 types. - [TypeScript Narrowing Patterns Cheatsheet](https://llmbestpractices.com/cheatsheets/typescript-narrowing-patterns): TypeScript narrowing reference: typeof, instanceof, in, type predicates, discriminated unions, assertion functions, and exhaustive switches. - [TypeScript Utility Types Cheatsheet](https://llmbestpractices.com/cheatsheets/typescript-utility-types): TypeScript built-in utility types such as Partial, Pick, Omit, Record, and ReturnType, with examples and the Omit, Record, and overload gotchas. - [Vim Commands Cheatsheet](https://llmbestpractices.com/cheatsheets/vim-commands): Vim modes, motions, operators, text objects, search and replace, registers, and macros, with the Vim-regex and register gotchas. ## SEO - [The /agents.txt File](https://llmbestpractices.com/seo/agents-txt): The /agents.txt file: a root-level key-value policy that tells AI agents what they may do, where to start reading, and which standard the site follows. - [AI citation tracking: measuring GEO results](https://llmbestpractices.com/seo/ai-citation-tracking): Measure whether ChatGPT Search, Perplexity, Gemini, AI Overviews, and Copilot cite a site using Bing and Google AI reports, fixed prompts, and server logs. - [AI-assisted content: Google and Bing policies](https://llmbestpractices.com/seo/ai-content-policies): What Google and Bing allow for AI-assisted publishing: scaled content abuse, near-duplicates, prompt injection, cloaking, fake dates, and a release audit. - [Google AI Overviews and AI Mode](https://llmbestpractices.com/seo/ai-overviews): How Google's AI Overviews and AI Mode choose supporting links, what eligibility requires, the Search Console report and opt-out, and snippet directives. - [The ai.txt Proposal](https://llmbestpractices.com/seo/ai-txt): What ai.txt is, its directive format, why robots.txt tokens are the control vendors honor, the IETF AIPREF track, and the house standard's permissive form. - [Google algorithm history](https://llmbestpractices.com/seo/algorithm-history): Google's named updates from Panda to the September 2026 spam update: what each targeted, its status now, and every announced rollout since 2024. - [The answer-first content pattern](https://llmbestpractices.com/seo/answer-first-content): Open every page and section with a direct, self-contained answer that readers and AI assistants can lift verbatim; an editorial habit, not an engine rule. - [Master SEO audit checklist](https://llmbestpractices.com/seo/audit-checklist): Pass-fail SEO audit tables for crawl, performance, on-page, content, linking, and structured data, plus a 30-minute quick pass and a quarterly pass. - [Backlinks and link building](https://llmbestpractices.com/seo/backlinks): Earn backlinks with original research, reference pages, and broken-link rebuilding; track referring domains; stay inside Google's link spam policy. - [Keyword cannibalization](https://llmbestpractices.com/seo/cannibalization): Prevent, detect, and fix two pages competing for one query: a keyword-per-page map, a Search Console check, then a 301 merge, sharper intent, or noindex. - [Content SEO](https://llmbestpractices.com/seo/content): Hub for content SEO: match page format to search intent, cover a topic in depth instead of one keyword, keep dates honest, and remove thin pages. - [Content Clusters and Pillar Pages](https://llmbestpractices.com/seo/content-clusters): One pillar page plus supporting cluster pages, the three link types that bind them, an orphan and depth audit, and how this vault maps to clusters. - [Content refresh and pruning](https://llmbestpractices.com/seo/content-refresh): When to refresh, merge, noindex, or delete a page: refresh triggers, a drift check, honest date signals, and keeping URLs intact when consolidating. - [Google core updates and helpful content](https://llmbestpractices.com/seo/core-updates): How Google core and spam updates behave, what to do after a drop, and what the helpful-content guidance (in core since March 2024) asks, plus a checklist. - [Core Web Vitals: Thresholds and Fixes](https://llmbestpractices.com/seo/core-web-vitals): LCP at or under 2.5s, INP at or under 200ms, CLS at or under 0.1 at the 75th percentile of field data, and the fixes that move each metric. - [Crawl Budget: When It Matters and How to Manage It](https://llmbestpractices.com/seo/crawl-budget): Crawl budget matters for sites with 10k+ fast-changing URLs or 1M+ pages; block low-value URL spaces in robots.txt, return real 404s, keep lastmod accurate. - [Site discoverability files](https://llmbestpractices.com/seo/discoverability-files): Catalog of every root and /.well-known/ file a public site ships, with body rules for robots.txt, sitemaps, security.txt, and agent files, plus a curl check. - [E-E-A-T and author entities](https://llmbestpractices.com/seo/e-e-a-t): What E-E-A-T is in Google's guidance, how to show each pillar, the Who/How/Why self-check with AI disclosure, and one author entity in Person JSON-LD. - [E-commerce SEO](https://llmbestpractices.com/seo/ecommerce-seo): Rank product and category pages with Product schema and real reviews, keep URLs stable through stockouts and variants, and control facet crawling per Google. - [Generative engine optimization (GEO, AEO, LLM SEO)](https://llmbestpractices.com/seo/generative-engine-optimization): GEO, AEO, and LLM SEO as one practice: SEO measured at the citation, how major engines source answers, which crawlers to allow, and what to ignore. - [SEO glossary](https://llmbestpractices.com/seo/glossary): Short definitions of the search, crawling, structured data, performance, and AI-search terms used across this site, each linked to its deep-dive page. - [Hreflang and international SEO](https://llmbestpractices.com/seo/hreflang): Choose a ccTLD, subdomain, or subdirectory structure for locales, then write hreflang with valid codes, self-references, reciprocal pairs, and x-default. - [The /identity page](https://llmbestpractices.com/seo/identity-page): The /identity page: one crawlable page listing a site's fonts, colors, logo, favicon, and media assets, with a YAML token block agents can read. - [Image SEO](https://llmbestpractices.com/seo/image-seo): Descriptive filenames and alt text, width and height to prevent CLS, AVIF and WebP with a fallback, lazy loading below the fold, and thumbnail metadata. - [IndexNow: Push URL Changes to Search Engines](https://llmbestpractices.com/seo/indexnow): Push new, updated, and deleted URLs to Bing, Yandex, Seznam, Naver, Yep, Amazon, and the Internet Archive with one IndexNow POST; Google does not participate. - [Internal Linking](https://llmbestpractices.com/seo/internal-linking): Descriptive anchor text, hub-and-spoke linking, a three-click depth target, orphan audits, and linking up, across, and down within a topic cluster. - [JavaScript SEO](https://llmbestpractices.com/seo/javascript-seo): How Google renders JavaScript, which rendering mode to pick, SPA patterns that hide content from crawlers, and the URL Inspection and view-source checks. - [Keyword Research](https://llmbestpractices.com/seo/keyword-research): Tool stack, intent classification, SERP checks to confirm intent, long-tail versus head terms, and mapping every term to one page in a cluster. - [The LLM Discoverability Standard](https://llmbestpractices.com/seo/llm-discoverability-standard): The six items every site ships for AI assistants: /llm-info, /llms.txt, /robots.txt, /agents.txt, a footer link, and /identity, verified on deployed output. - [The /llms.txt Standard](https://llmbestpractices.com/seo/llms-txt): What /llms.txt is (llmstxt.org v2, August 2026), its format, the house Primary, Key pages, and About sections, who reads it, and why Google ignores it. - [Local SEO](https://llmbestpractices.com/seo/local-seo): When local SEO applies, plus claiming Google Business Profile, LocalBusiness markup, per-city pages, consistent NAP, and earning reviews legitimately. - [Markdown twins: serving page source to agents](https://llmbestpractices.com/seo/markdown-twins): Serve each page's raw markdown at its URL plus .md, announce it in the llms.txt header, link it with rel=alternate, and keep it identical for every client. - [Mobile-First Indexing and Mobile Usability](https://llmbestpractices.com/seo/mobile-first): Google indexes the mobile version: ship one responsive site, keep content parity with desktop, skip AMP, and set the viewport, touch targets, and text size. - [News SEO](https://llmbestpractices.com/seo/news-seo): Rank in Google News and Top Stories: meet the news content policies, mark up NewsArticle with accurate dates and authors, keep URLs stable, publish fast. - [Open Graph Images](https://llmbestpractices.com/seo/og-images): Ship a per-page 1200x630 og:image with declared dimensions and an absolute URL, generate it from frontmatter, bust caches on change, debug with validators. - [Page Speed Beyond Core Web Vitals](https://llmbestpractices.com/seo/page-speed): TTFB, FCP, image formats and lazy loading, render-blocking CSS, fonts, and scripts, and performance budgets: the speed fixes Core Web Vitals does not cover. - [Pagination and faceted navigation](https://llmbestpractices.com/seo/pagination-and-facets): Self-canonical each paginated page on real linked URLs, and stop faceted filters from making endless crawlable URLs by disallowing them in robots.txt first. - [Redirects for SEO](https://llmbestpractices.com/seo/redirects): Choose 301, 302, 307, or 308, handle query strings, and avoid traffic loss from chains, loops, noindex or 404 targets, soft 404s, and homepage dumps. - [Robots Directives: robots.txt, Meta Robots, X-Robots-Tag](https://llmbestpractices.com/seo/robots-directives): Use robots.txt for crawling, meta robots or X-Robots-Tag for indexing, and snippet directives for what Google and Bing may show, including in AI answers. - [Schema Markup Deep Dive](https://llmbestpractices.com/seo/schema-markup-deep): Field-level JSON-LD for Product, Course, VideoObject, and DefinedTerm, with the required and recommended properties Google lists for each. - [SERP features and featured snippets](https://llmbestpractices.com/seo/serp-features): Match the featured snippet format (paragraph, list, table), write visible Q&A for People Also Ask, and control snippets with nosnippet and max-snippet. - [Site architecture for SEO](https://llmbestpractices.com/seo/site-architecture): Keep priority pages within three clicks, map URL folders to topic clusters one-to-one, use short stable kebab-case slugs, and add BreadcrumbList JSON-LD. - [Sitemaps: index, lastmod, and format extensions](https://llmbestpractices.com/seo/sitemaps-deep): Split sitemaps past 50,000 URLs or 50 MB behind an index, set accurate lastmod, and follow the news (two-day, 1,000-entry) and image (1,000 per URL) rules. - [Structured Data with JSON-LD](https://llmbestpractices.com/seo/structured-data): Which schema.org types to ship in JSON-LD, which Google rich results exist as of October 2026 and which are retired, and how to validate honestly. - [Structured data for AI crawlers](https://llmbestpractices.com/seo/structured-data-for-ai-crawlers): Which JSON-LD schemas help AI crawlers parse a page, how sameAs entity grounding works, and why markup the visible content does not back earns nothing. - [Technical SEO](https://llmbestpractices.com/seo/technical): The pre-publish checklist for crawlability: robots.txt, sitemap, self-referential canonicals, one URL form, heading structure, and server-rendered HTML. - [Title tags](https://llmbestpractices.com/seo/title-tags): Write one unique title per page, keyword first, brand last, about 50 to 60 characters; avoid Google rewrite triggers; iterate on Search Console CTR. - [Video SEO](https://llmbestpractices.com/seo/video-seo): Rank video with a dedicated watch page, VideoObject markup (name, thumbnailUrl, uploadDate), an on-page transcript, WebVTT captions, and a video sitemap. ## Prompt Engineering - [Chain-of-Thought Prompting](https://llmbestpractices.com/prompt-engineering/chain-of-thought): Use prompted chain-of-thought for multi-step tasks on models without built-in thinking; keep the scratchpad out of replies; majority-vote for high stakes. - [Context engineering for LLM applications](https://llmbestpractices.com/prompt-engineering/context-engineering): Decide what enters the context window per call: retrieve instead of stuffing, put documents first and the question last, compact history safely, and log it. - [Output constraints](https://llmbestpractices.com/prompt-engineering/output-constraints): Shape LLM prose output with example-backed formats, unit-based length limits, escape hatches, and a validate-then-retry loop; use structured output for JSON. - [Prompt caching strategies](https://llmbestpractices.com/prompt-engineering/prompt-caching-strategies): Raise prompt-cache hit rate: stable byte-identical prefix first, per-request content last, deterministic chunk order, and cache controls per provider. - [Prompt chaining](https://llmbestpractices.com/prompt-engineering/prompt-chaining): Split multi-step LLM work into narrow prompts that each have one job, pass only a small typed payload between steps, and keep state in the orchestration code. - [Prompt design best practices](https://llmbestpractices.com/prompt-engineering/prompt-design): Core prompt rules: be specific and explain why, separate system from user content, tag sections, show examples, say what to do, and eval every change. - [Prompt evals and regression testing](https://llmbestpractices.com/prompt-engineering/prompt-evals): Test prompts like code: a fixed eval set from real traffic, a task-matched metric, CI regression runs on every change, and a sign-test gate for promotion. - [Prompt Injection Defense in the Prompt](https://llmbestpractices.com/prompt-engineering/prompt-injection-defense): Prompt-level injection defenses: keep untrusted content out of the system prompt, mark and encode it as data, screen it with a classifier, and test in evals. - [Migrating prompts to new models](https://llmbestpractices.com/prompt-engineering/prompt-migration): Move prompts to a newer model: baseline, drop rejected parameters (prefill, sampling, budget_tokens, forced tool_choice), prune old workarounds, re-run evals. - [Prompt templates](https://llmbestpractices.com/prompt-engineering/prompt-templates): Build production prompts as templates: one delimiter style, named placeholders, stable regions first, user input last, versioned beside the calling code. - [Prompting and configuring reasoning models](https://llmbestpractices.com/prompt-engineering/reasoning-model-prompting): Prompt reasoning models with goals, not steps; set effort or thinking levels, reserve output headroom, skip sampling parameters (Claude, OpenAI, Gemini). ## AI Agents - [AI agent architecture patterns](https://llmbestpractices.com/ai-agents/agent-architecture-patterns): Start with one augmented LLM call, use workflows (chaining, routing, orchestrator-worker) for known steps, and an autonomous agent only for open-ended tasks. - [Claude Agent SDK and claude -p](https://llmbestpractices.com/ai-agents/claude-agent-sdk): Run Claude Code's agent loop from code with the Agent SDK (Python, TypeScript) or from scripts with claude -p; set tools, permissions, and settingSources. - [Claude Code: Workflow Patterns](https://llmbestpractices.com/ai-agents/claude-code): Give Claude Code a written brief, a check it can run, and explicit non-goals; the failure modes and guardrails that follow from that. - [Claude Code: CLAUDE.md](https://llmbestpractices.com/ai-agents/claude-code-claude-md): CLAUDE.md is session context, not enforced configuration; keep it under 200 lines, concrete, and limited to what Claude cannot derive from the code. - [Claude Code: Context and Cost Management](https://llmbestpractices.com/ai-agents/claude-code-context): Keep Claude Code sessions sharp and cheap: inspect with /context, clear or compact at task boundaries, delegate reads to subagents, set model and effort early. - [Claude Code: Hooks](https://llmbestpractices.com/ai-agents/claude-code-hooks): Use hooks for actions that must run every time: PreToolUse exit 2 blocks a call, PostToolUse formats edits, Stop gates a turn, UserPromptSubmit adds context. - [Claude Code: MCP Integration](https://llmbestpractices.com/ai-agents/claude-code-mcp): Add MCP servers with claude mcp add or .mcp.json, choose a scope, keep secrets in env expansions, and allow or deny tools with mcp__server__tool rules. - [Claude Code: Permissions](https://llmbestpractices.com/ai-agents/claude-code-permissions): Pick a permission mode (auto starts from v2.1.283), write deny, ask, and allow rules with correct Bash wildcards, and sandbox or hook what must hold. - [Claude Code: Skills](https://llmbestpractices.com/ai-agents/claude-code-skills): Package procedures as .claude/skills//SKILL.md; control invocation with disable-model-invocation, pass $ARGUMENTS, and keep SKILL.md under 500 lines. - [Claude Code: Subagents](https://llmbestpractices.com/ai-agents/claude-code-subagents): Define subagents in .claude/agents/*.md with scoped tools and model, isolate file writers with isolation: worktree, and give each worker one branch and one PR. - [Cost Control](https://llmbestpractices.com/ai-agents/cost-control): Cut LLM agent spend with prompt caching, batch APIs, effort settings, context trimming, and spend caps; measure cost per task, not cost per token. - [Embeddings for Retrieval](https://llmbestpractices.com/ai-agents/embeddings): Pick an embedding model as of 2026-10 (Voyage, OpenAI, Cohere, Google) by bake-off on your corpus, tag vectors with the model, and migrate via a shadow index. - [Embeddings: Cost Control](https://llmbestpractices.com/ai-agents/embeddings-cost-control): Cut embedding spend with batch endpoints (OpenAI and Google 50 percent, Voyage 33 percent), content-hash caching, deduplication, and per-run token budgets. - [Embeddings: Dimensions and Normalization](https://llmbestpractices.com/ai-agents/embeddings-dimensionality): Shorten Matryoshka embeddings with measured recall, re-normalize after truncation, and set the index metric so cosine, dot product, and L2 agree. - [Embeddings: Semantic Cache](https://llmbestpractices.com/ai-agents/embeddings-semantic-cache): Build a semantic cache for LLM answers: tune the similarity threshold on labeled pairs, scope entries by tenant and prompt version, and store them in pgvector. - [Agent Evaluation](https://llmbestpractices.com/ai-agents/evaluation): Measure agent quality with a versioned golden set, code and LLM-judge grading, a recorded baseline, per-slice scores, and cost and latency beside quality. - [Few-Shot Examples and Rules](https://llmbestpractices.com/ai-agents/few-shot): Use examples for format, tone, and boundaries, rules for universal constraints; write three to five diverse tagged examples with negatives and tune by eval. - [MCP Authorization](https://llmbestpractices.com/ai-agents/mcp-authorization): Authorize an MCP server under the 2026-07-28 spec: RFC 9728 discovery, client registration order, PKCE, issuer checks, resource indicators, scope step-up. - [MCP: Elicitation](https://llmbestpractices.com/ai-agents/mcp-elicitation): Ask users for input from an MCP server via InputRequiredResult and elicitation/create (2026-07-28); use form mode for flat data and URL mode for secrets. - [MCP: Logging and Debugging](https://llmbestpractices.com/ai-agents/mcp-logging): Log MCP servers to stderr and OpenTelemetry since protocol logging is deprecated, emit one structured line per tool call, and debug with MCP Inspector. - [MCP: Protocol Fundamentals](https://llmbestpractices.com/ai-agents/mcp-protocol): MCP in the 2026-07-28 revision: stateless JSON-RPC with per-request _meta, tools, resources, prompts, multi round-trip requests, and the deprecated features. - [MCP: Resources](https://llmbestpractices.com/ai-agents/mcp-resources): Expose read-only data as URI-addressed MCP resources, subscribe to changes with subscriptions/listen, and return resource links instead of large payloads. - [MCP: Security](https://llmbestpractices.com/ai-agents/mcp-security): Secure an MCP server: OAuth 2.1 resource-server rules, no token passthrough, caller-bound handles, least-privilege scopes, secret redaction, rate limits. - [MCP Servers](https://llmbestpractices.com/ai-agents/mcp-servers): Ship an MCP server for integrations agents revisit, scope one per domain and auth boundary, and see the linked page for each design concern. - [MCP: Tool Design](https://llmbestpractices.com/ai-agents/mcp-tool-design): MCP tool rules: spec-safe names, descriptions with examples, workflow-shaped tools, isError for recoverable failures, outputSchema with structuredContent. - [MCP: Transports](https://llmbestpractices.com/ai-agents/mcp-transports): Use stdio for local MCP servers and Streamable HTTP for remote ones: one POST endpoint, routing headers, no sessions or stream resumption in 2026-07-28. - [Model Routing and Fallback Ladders](https://llmbestpractices.com/ai-agents/model-routing): Route each LLM request to the smallest model tier that passes your eval, normalize parameters per tier, and build a fallback ladder with a gate at every rung. - [Multi-Agent Patterns](https://llmbestpractices.com/ai-agents/multi-agent): Use multiple agents only for parallel, context-heavy, or tool-isolated work; wire orchestrator-worker or reviewer loops with typed handoffs and hard caps. - [Ollama Best Practices](https://llmbestpractices.com/ai-agents/ollama): When a local Ollama model beats a hosted API, how to pick a model and quantization by memory budget, and how to size context length. - [Ollama: Modelfile](https://llmbestpractices.com/ai-agents/ollama-modelfile): Write an Ollama Modelfile that pins a base model tag, system prompt, and parameters into a named local model; import GGUF or safetensors weights. - [Ollama: API and Deployment](https://llmbestpractices.com/ai-agents/ollama-serving): Call Ollama via native, OpenAI-compatible, or Anthropic-compatible endpoints, tune concurrency and keep-alive, and run it behind an authenticating proxy. - [Prompt Injection Defense for Agent Systems](https://llmbestpractices.com/ai-agents/prompt-injection-defense): Limit prompt injection damage in agents with least-privilege tools, channel separation, confirmation gates, sandboxes, output validation, and audit logs. - [RAG Best Practices](https://llmbestpractices.com/ai-agents/rag): Decide whether you need RAG, then follow the pipeline (chunk, embed, retrieve, rerank, cite, evaluate) and handle freshness, caching, and untrusted chunks. - [RAG: Chunking](https://llmbestpractices.com/ai-agents/rag-chunking): Chunk on document structure at 200 to 800 tokens with small overlap, attach metadata, add per-chunk context, and re-chunk when the embedding model changes. - [RAG: Citations](https://llmbestpractices.com/ai-agents/rag-citations): Ground RAG answers with Claude's native citations, fall back to chunk-ID prompting plus validation on other models, and show sources in the UI. - [RAG: Evaluation](https://llmbestpractices.com/ai-agents/rag-eval): Score RAG retrieval (recall@k, MRR, nDCG) and generation (faithfulness, relevance) separately on a golden set, and gate CI on slice regressions. - [RAG: Reranking](https://llmbestpractices.com/ai-agents/rag-reranking): Rerank 30 to 100 retrieved candidates down to the few chunks the prompt sees, with a hosted (Cohere, Voyage, Jina) or self-hosted BGE reranker chosen by eval. - [RAG: Retrieval](https://llmbestpractices.com/ai-agents/rag-retrieval): Run dense and BM25 retrieval in parallel and fuse with RRF, pre-filter on metadata, size k by recall, and add query expansion or HyDE only if the eval gains. - [RAG: Vector Databases](https://llmbestpractices.com/ai-agents/rag-vector-databases): Pick Pinecone, Qdrant, Weaviate, pgvector, or ChromaDB by operational fit and filtering behavior, tune three HNSW knobs, and plan migration early. - [How to build reliable AI agents in production](https://llmbestpractices.com/ai-agents/reliable-agents-in-production): Production checklist for LLM agents: narrow scope, minimal tools, bounded loops, idempotent retries, checkpoints, per-step traces, evals as release gates. - [Role Framing](https://llmbestpractices.com/ai-agents/role-framing): Set a short concrete role, audience, and tone in the system prompt; use roles for voice and scope, not accuracy; add calibration and anti-sycophancy rules. - [Structured Output: Schemas, Strict Tools, and Validation](https://llmbestpractices.com/ai-agents/structured-output): Use schema-enforced structured outputs or strict tool use, stay within each provider's schema subset, validate at the boundary, and never regex JSON from prose. - [System Prompts](https://llmbestpractices.com/ai-agents/system-prompts): Put durable rules in the system prompt as four labeled blocks with checkable constraints and refusal rules, and version prompts like code with evals. - [Tool use and function calling best practices](https://llmbestpractices.com/ai-agents/tool-use-and-function-calling): Define workflow-shaped tools with long descriptions and strict typed schemas, validate inputs anyway, return actionable errors, and use auto tool_choice. ## Knowledge Vaults - [Atomic Notes](https://llmbestpractices.com/knowledge-vaults/atomic-notes): One idea per note, titles written as claims, 100 to 500 words, three to seven explained outbound links, and status promoted only on review. - [Decision Journals](https://llmbestpractices.com/knowledge-vaults/decision-journals): Journal decisions at decision time with an immutable pre-decision section, append outcomes later, run a pre-mortem, and review by decision class. - [Linking and Tags](https://llmbestpractices.com/knowledge-vaults/linking-and-tags): Links carry meaning and tags carry state: explain every link, alias for readability, cite paragraphs with block references, and grow MOCs from clusters. - [Rigor Frameworks](https://llmbestpractices.com/knowledge-vaults/rigor-frameworks): Map a vault's domain to a rigor framework (MECE, ADR, IRAC, claim-evidence-counter and more), layer frameworks when domains differ, and encode each as schema. - [Semantic Audit](https://llmbestpractices.com/knowledge-vaults/semantic-audit): Judge defects code cannot detect with a fixed six-dimension rubric, evidence-gated verdicts, a strict output schema, and deterministic-flag ordering. - [Source Verification](https://llmbestpractices.com/knowledge-vaults/source-verification): Link every empirical claim to a source note, track atoms extracted per source, date verification so it expires, and gate publishable claims on corroboration. - [Team Vaults](https://llmbestpractices.com/knowledge-vaults/team-vaults): Run a shared vault on Git, design merge conflicts out with atomicity and append conventions, hold one naming authority, and keep decisions owned. - [Vault Architecture](https://llmbestpractices.com/knowledge-vaults/vault-architecture): Design a knowledge vault as a numbered folder tree with scoped note types, declared in a vault-spec.yaml and generated from it rather than hand-built. - [Vault Audit](https://llmbestpractices.com/knowledge-vaults/vault-audit): Run a spec-driven deterministic auditor, read its rule ids (C, S, M series), triage by root cause, autofix only the mechanical tier, and re-run for the delta. - [Vault Evolution](https://llmbestpractices.com/knowledge-vaults/vault-evolution): Grow a vault with four additive moves (new note type, schema migration, layered framework, deprecate to archive); never rebuild it. - [Vault Frontmatter Schema](https://llmbestpractices.com/knowledge-vaults/vault-frontmatter-schema): Type every note in YAML, give each type its own required fields, write empty arrays instead of omitting keys, and extend the schema per framework. - [Vault Maintenance](https://llmbestpractices.com/knowledge-vaults/vault-maintenance): Weekly, monthly, and quarterly vault reviews, the Dataview gates each one walks, and the maintenance budget that limits how much architecture a vault can carry. - [Vault Orchestration](https://llmbestpractices.com/knowledge-vaults/vault-orchestration): The loop an agent runs against a vault (capture, extract, link, audit, promote), its fixed prompts with input and output contracts, and bulk-write guardrails. - [Vault Pull Request Review](https://llmbestpractices.com/knowledge-vaults/vault-pull-request-review): Gate a shared vault's merges on the auditor, map its severities to the review scale, hand-review only the semantic tier, and never squash decision history. ## iOS - [Core Data Best Practices](https://llmbestpractices.com/ios/core-data): Core Data stack setup, merge policies, context concurrency and object IDs, fetch requests, batch operations, and SwiftUI integration for existing apps. - [Core Data Migrations: Lightweight, Staged, and Custom](https://llmbestpractices.com/ios/core-data-migrations): Core Data schema evolution: lightweight migration, when to use staged migration or a mapping model, model versioning rules, and testing against fixture stores. - [Core Data vs SwiftData: When Each Wins](https://llmbestpractices.com/ios/core-data-swiftdata-comparison): Decision guide for Core Data or SwiftData: deployment target, existing stores, missing SwiftData features, CloudKit sharing, coexistence, and Sendable rules. - [MapKit Best Practices](https://llmbestpractices.com/ios/mapkit): MapKit for SwiftUI (iOS 17+): Map content, Marker versus Annotation, selection, manual clustering, overlays, Look Around, and user location. - [MapKit Camera: Position, Animation, and Follow Mode](https://llmbestpractices.com/ios/mapkit-camera): Drive a SwiftUI Map with one MapCameraPosition: animated moves, framing coordinates, follow-user mode, MapCamera pitch and heading, and reading changes. - [MapKit Search: Local Search, Completions, and Geocoding](https://llmbestpractices.com/ios/mapkit-search): MKLocalSearch queries, MKLocalSearchCompleter autocomplete, MKGeocodingRequest replacing CLGeocoder in iOS 26, PlaceDescriptor, and cancelling stale searches. - [SwiftData Best Practices](https://llmbestpractices.com/ios/swiftdata): SwiftData for iOS 17 to 27: model and query setup, versioned schema migration, indexes, inheritance, sectioned queries, background work, and CloudKit limits. - [SwiftUI Best Practices](https://llmbestpractices.com/ios/swiftui): SwiftUI on iOS 26 and 27: @Observable and lazy @State, typed NavigationStack paths, @Entry environment values, previews, body performance, and accessibility. ## Ops - [Blameless Postmortems](https://llmbestpractices.com/ops/blameless-postmortems): Write a postmortem within 48 hours of every SEV1 and escalated SEV2, keep it blameless, and use a fixed structure (timeline, root cause, impact, action items). - [CI/CD Pipelines: Best Practices](https://llmbestpractices.com/ops/ci-cd): Order CI gates cheapest-first (lint, typecheck, test, build, deploy), cache dependencies, require status checks by job name, and deploy only from main. - [Cloudflare](https://llmbestpractices.com/ops/cloudflare): Cloudflare front-door setup: proxy by default, SSL/TLS Full (strict), Rules over Page Rules, Workers over new Pages projects, and the free protections. - [Cloudflare: Cache Rules](https://llmbestpractices.com/ops/cloudflare-cache-rules): Cache Rules replace Page Rules: Cloudflare's default caching, rule order and quotas, cache-key limits by plan, tiered caching, cf-cache-status, and purge scope. - [Cloudflare: DNS](https://llmbestpractices.com/ops/cloudflare-dns): Proxied vs DNS-only records, CNAME flattening at the apex, the TTL-1-means-auto gotcha, DNSSEC with the DS record at the registrar, and how to verify changes. - [Cloudflare: Durable Objects](https://llmbestpractices.com/ops/cloudflare-durable-objects): Durable Objects are single-instance stateful actors with SQLite storage: setup, WebSocket hibernation, alarms, and when to choose them over KV or R2. - [Cloudflare: Workers KV](https://llmbestpractices.com/ops/cloudflare-kv): Workers KV is eventually consistent and read-optimized: 60-second propagation, one write per second per key, bulk ops, and when to use Durable Objects or D1. - [Cloudflare: R2 Object Storage](https://llmbestpractices.com/ops/cloudflare-r2): R2 is S3-compatible object storage with no egress fees: prices against S3, S3 SDK setup, multipart uploads, lifecycle rules, presigned URLs, and when S3 wins. - [Cloudflare: Security Headers](https://llmbestpractices.com/ops/cloudflare-security-headers): Set HSTS, CSP, Referrer-Policy, and Permissions-Policy with Response Header Transform Rules; roll CSP out report-only first; transforms run after the cache. - [Cloudflare: Workers](https://llmbestpractices.com/ops/cloudflare-workers): Workers limits and pricing in 2026, the fetch handler, bindings to KV, R2, and D1, wrangler workflow, Node compatibility, and when to pick Workers over servers. - [Disaster Recovery: Best Practices](https://llmbestpractices.com/ops/disaster-recovery): Set RPO and RTO first, back up databases and secrets, keep copies in a separate account and region, alert on missed backups, and drill restores quarterly. - [Error Tracking: Best Practices](https://llmbestpractices.com/ops/error-tracking): Configure Sentry or an equivalent: set environment and release, upload source maps and keep them out of the deploy, scrub PII, and alert on new issues. - [GitHub Pages Deployment](https://llmbestpractices.com/ops/github-pages): GitHub Pages limits, deploying from GitHub Actions with current action versions, custom domain and HTTPS behind Cloudflare, and the usual causes of 404s. - [Hostinger VPS](https://llmbestpractices.com/ops/hostinger-vps): Run an app on a Hostinger VPS: harden, deploy by tag, systemd service, Caddy, backups, monitoring, plus journalctl specifics and what Hostinger's backups cover. - [Hostinger VPS: Backups with restic](https://llmbestpractices.com/ops/hostinger-vps-backups): Encrypted off-box VPS backups with restic: repository init, a cron script with a root-only env file, retention, integrity checks, and restore drills. - [Hostinger VPS: Server Hardening](https://llmbestpractices.com/ops/hostinger-vps-hardening): First-hour hardening for a fresh Ubuntu or Debian VPS: non-root user, key-only SSH checked with sshd -T, UFW default-deny, fail2ban, and unattended upgrades. - [Hostinger VPS: Reverse Proxy with Caddy](https://llmbestpractices.com/ops/hostinger-vps-reverse-proxy-caddy): Install Caddy from its official apt repository, write a Caddyfile, set security headers, and make certificates work behind Cloudflare with Origin CA or DNS-01. - [Incident Response: Best Practices](https://llmbestpractices.com/ops/incident-response): Severity levels, on-call escalation, incident channel and roles, status cadence, and the mitigate-first sequence for the first ten minutes of an outage. - [LLM evaluation and testing in production](https://llmbestpractices.com/ops/llm-evaluation-in-production): Evaluate LLM systems in production: golden sets from real traffic, noise-tolerant offline eval gates in CI, task-matched metrics, and calibrated LLM-as-judge. - [LLM observability and monitoring guide](https://llmbestpractices.com/ops/llm-observability): Trace every LLM request with prompt and model version, track tokens, cost, and latency, monitor quality, redact PII at capture, alert on silent degradation. - [LLMOps best practices](https://llmbestpractices.com/ops/llmops-best-practices): Run LLM features in production: version prompts, pin model IDs, gate releases on evals, trace requests, cap cost, and ship behind flags with fallbacks. - [Namecheap DNS](https://llmbestpractices.com/ops/namecheap-dns): Namecheap record types including ALIAS at the apex, TXT verification, MX priority, TTL planning, and delegating nameservers to Cloudflare without downtime. - [Postgres in Production](https://llmbestpractices.com/ops/postgres-prod): Run Postgres on a managed provider; restore-test backups, add PITR over dumps, drill failover, pool connections, and alert on slow queries and vacuum. - [Pre-Launch Readiness Checklist](https://llmbestpractices.com/ops/pre-launch-checklist): Clear before real traffic: day-one breakage, six security checks (secrets, RLS, rate limits, auth, validation, email auth), legal basics, and error tracking. - [Secrets and Environment Variables: Best Practices](https://llmbestpractices.com/ops/secrets-and-env): Keep secrets out of client bundles and git, scan history, use Supabase publishable vs secret keys correctly, and rotate anything that leaks. - [Supabase backups: PITR and pg_dump](https://llmbestpractices.com/ops/supabase-backups): Supabase daily backups by plan, why PITR replaces them, PITR cost and restore behavior, what backups exclude, and nightly pg_dump to a separate account. - [Vercel Deployment](https://llmbestpractices.com/ops/vercel): Set up Vercel: keep the framework preset, default to Node.js on Fluid compute, scope env vars, use ISR, and point custom domains at Vercel behind Cloudflare. - [Vercel: Analytics](https://llmbestpractices.com/ops/vercel-analytics): Set up Vercel Web Analytics and Speed Insights, know what each collects, and budget events: Hobby gets 50,000 a month, Pro pays per event. - [Vercel: Edge Functions](https://llmbestpractices.com/ops/vercel-edge-functions): Vercel's Edge runtime is no longer the default and Vercel recommends Node.js; when Edge still fits, its API and size limits, and how to migrate. - [Vercel: Environment Variables](https://llmbestpractices.com/ops/vercel-env-vars): Scope Vercel env vars per environment, use the Secret type for credentials, redeploy after changes, stay under the 64 KB and 5 KB limits, and rotate safely. - [Vercel: Preview Deployments](https://llmbestpractices.com/ops/vercel-preview-deployments): Every non-production push gets a preview URL; new projects default to Deployment Protection; isolate Preview credentials and pick protection per audience. ## Tooling - [Claude Code Workflow](https://llmbestpractices.com/tooling/claude-code-workflow): Day-to-day Claude Code patterns for a repo you return to: anchor files, the brief loop, phase-and-verify, worktree isolation, PR tooling, and failure modes. - [GitHub Workflow](https://llmbestpractices.com/tooling/github): Hub for the GitHub workflow: protected main, short-lived branches, repository defaults, and which page owns each topic. - [GitHub Actions](https://llmbestpractices.com/tooling/github-actions): Workflow structure, current action major versions, caching, least-privilege tokens, concurrency, injection and pinning rules, and reusable workflows. - [GitHub Branch Protection](https://llmbestpractices.com/tooling/github-branch-protection): Use rulesets over classic branch protection: required reviews, status checks, linear history, force-push blocks, and the bypass gaps that silently disable them. - [GitHub CLI](https://llmbestpractices.com/tooling/github-cli): Core gh commands for PRs, issues, runs, and the API; token auth for scripts; and --json with --jq for scriptable output. - [GitHub PR Workflow](https://llmbestpractices.com/tooling/github-pr-workflow): Conventional Commits PR titles, squash merge, draft PRs, CODEOWNERS routing, auto-merge prerequisites, and review etiquette. - [GitHub Releases](https://llmbestpractices.com/tooling/github-releases): Semver tags from main, draft-then-publish releases, label-driven generated notes, injection-safe release workflows, and immutable releases. - [GitHub Secrets](https://llmbestpractices.com/tooling/github-secrets): OIDC over static cloud keys (including the 2026 immutable subject claim), secret scopes, log-masking limits, secret scanning availability, and rotation. - [Obsidian Workflow](https://llmbestpractices.com/tooling/obsidian): Structure a publish-ready Obsidian vault: MOCs over deep folders, daily notes as scratch, wikilinks, frontmatter, templates outside content, and few plugins. - [Obsidian: Essential Plugins](https://llmbestpractices.com/tooling/obsidian-plugins): Which Obsidian core features to use first (Bases, Properties), then Templater, Dataview, Tag Wrangler, Pandoc, and Latex Suite, and plugins to avoid. - [Obsidian: Publishing to Quartz](https://llmbestpractices.com/tooling/obsidian-publishing-to-quartz): Publish an Obsidian vault with Quartz 4.5: content directory, frontmatter keys Quartz reads, wikilink resolution, ignorePatterns, aliases, obsidian-export. - [Obsidian: Templater Templates](https://llmbestpractices.com/tooling/obsidian-templates): Write Templater templates: a frontmatter base template, tp.date formats, JavaScript blocks, folder templates, tp.file.include, and re-running on notes. - [Quartz Best Practices](https://llmbestpractices.com/tooling/quartz): Hub for Quartz 4.5.x: which major this site runs, when to pick Quartz, Node and update policy, this site's deviations from stock, and where each topic lives. - [Quartz Layout and Components](https://llmbestpractices.com/tooling/quartz-components): How quartz.layout.ts places components in slots, the responsive wrappers, ConditionalRender, and writing a custom Preact component in Quartz 4.5. - [Quartz Config: quartz.config.ts](https://llmbestpractices.com/tooling/quartz-config): The fields of quartz.config.ts in Quartz 4.5: baseUrl, ignorePatterns, which frontmatter keys set dates, theme and font modes, and titles. - [Quartz Debugging](https://llmbestpractices.com/tooling/quartz-debugging): Read --verbose output, diagnose silent wikilink, date, and draft problems, understand quartz/.quartz-cache, and verify public/ in Quartz 4.5. - [Quartz Deployment](https://llmbestpractices.com/tooling/quartz-deployment): Deploy a Quartz 4 build: the GitHub Pages workflow, the CNAME emitter, Cloudflare Pages and Vercel settings, and why not to set immutable cache headers. - [Quartz Plugins](https://llmbestpractices.com/tooling/quartz-plugins): Quartz 4.5 transformer, filter, and emitter plugins: build phases that set ordering, RemoveDrafts vs ExplicitPublish, AliasRedirects, and custom plugins. ## Security - [Security & Application Hardening](https://llmbestpractices.com/security): Cross-cutting hub indexing every security page (RLS, secrets, auth, webhooks, injection defense, headers, pre-launch); the pages live under Backend, Ops, Coding, AI Agents, and Prompt Engineering. - [OWASP Top 10 for LLM Applications](https://llmbestpractices.com/security/owasp-llm-top-10): The OWASP Top 10 for LLM Applications 2026 (LLM01 to LLM10): what changed from 2025, the separate Agentic Top 10, and this site's page for each risk. - [OWASP Top 10: Web Application Security](https://llmbestpractices.com/security/owasp-top-10): The OWASP Top 10:2025 web risk categories (A01 to A10) with what changed from 2021, each mapped to the page on this site that covers it. ## Glossary - [Glossary of Dev & AI Terms](https://llmbestpractices.com/glossary): Index of atomic, one-concept term definitions; the individual terms are listed under Optional below. ## Optional These entries are atomic glossary term definitions, one concept per page. AI consumers that truncate large files can skip this section; every load-bearing page is listed above it. - [ACID](https://llmbestpractices.com/glossary/acid): ACID is the transaction guarantee of Atomicity, Consistency, Isolation, and Durability that makes a multi-statement write all-or-nothing and crash-safe. - [Agent loop](https://llmbestpractices.com/glossary/agent-loop): An agent loop calls the model, runs requested tools, feeds results back, and repeats until the model answers without a tool call; step limits bound the run. - [ai.txt](https://llmbestpractices.com/glossary/ai-txt): ai.txt is a proposed plain-text file at /ai.txt declaring a site's preferences for AI training and use of its content; no major vendor documents honoring it. - [Atomic commit](https://llmbestpractices.com/glossary/atomic-commit): An atomic commit holds one logical change that builds and passes tests on its own and can be reverted without collateral damage. - [BASE](https://llmbestpractices.com/glossary/base): BASE (Basically Available, Soft state, Eventually consistent) describes systems that stay responsive during failures by accepting temporarily stale data. - [Box Model](https://llmbestpractices.com/glossary/box-model): The CSS box model renders every element as content, padding, border, and margin; box-sizing decides whether width includes padding and border. - [B-tree Index](https://llmbestpractices.com/glossary/btree-index): A B-tree index is PostgreSQL's default index: a balanced tree of sorted keys serving equality, range, ORDER BY, and IS NULL queries. - [Canonical URL](https://llmbestpractices.com/glossary/canonical-url): A canonical URL is the preferred address for content reachable at several URLs, set with rel=canonical as a strong hint; self-reference it on indexable pages. - [Cascade](https://llmbestpractices.com/glossary/cascade): The CSS cascade is the algorithm that picks one winning declaration per property: origin and importance, inline, layers, specificity, then source order. - [Chain-of-thought](https://llmbestpractices.com/glossary/chain-of-thought): Chain-of-thought prompting has a model write reasoning steps first; it helps non-reasoning models on multi-step problems and adds little on reasoning models. - [citext](https://llmbestpractices.com/glossary/citext): citext is a PostgreSQL extension type that stores text as given but compares, sorts, and enforces uniqueness case-insensitively. - [CLS (Cumulative Layout Shift)](https://llmbestpractices.com/glossary/cls): CLS scores unexpected layout movement as the largest burst of shifts on a page; good is 0.1 or less at the 75th percentile, fixed mainly by reserving space. - [Code splitting](https://llmbestpractices.com/glossary/code-splitting): Code splitting divides a JavaScript bundle into chunks loaded on demand via dynamic import(), cutting the initial payload. - [Completion](https://llmbestpractices.com/glossary/completion): A completion is the text a model generates for a prompt; check stop_reason before trusting it, because a max_tokens stop means the output was cut off. - [Connection Pool](https://llmbestpractices.com/glossary/connection-pool): A connection pool keeps a bounded set of open database connections that code borrows and returns, avoiding a handshake per query. - [Container Query](https://llmbestpractices.com/glossary/container-query): A container query applies CSS based on a named ancestor's size, so a component adapts to its slot instead of the viewport. - [Context window](https://llmbestpractices.com/glossary/context-window): The context window is the maximum tokens a model handles per request, input and output; Claude Fable 5.1, Opus 5.5, and Sonnet 5.5 offer 1M, Haiku 4.5 200K. - [Conventional Commits](https://llmbestpractices.com/glossary/conventional-commits): Conventional Commits (spec 1.0.0) is a commit-message format, type(scope)!: description, that tooling reads to build changelogs and pick the next SemVer bump. - [Core Web Vitals](https://llmbestpractices.com/glossary/core-web-vitals): Core Web Vitals are Google's three field-measured metrics, LCP, INP, and CLS, each judged at the 75th percentile; a page passes only if all three are good. - [CORS (Cross-Origin Resource Sharing)](https://llmbestpractices.com/glossary/cors): CORS is the HTTP-header protocol a server uses to tell browsers which other origins may read its responses; the browser enforces it. - [Crawl budget](https://llmbestpractices.com/glossary/crawl-budget): Crawl budget is the set of URLs Googlebot can and wants to crawl on a site; it matters only for very large or fast-changing sites. - [CSP (Content Security Policy)](https://llmbestpractices.com/glossary/csp): CSP is a response header declaring which sources may supply scripts, styles, frames, and connections, limiting the damage of XSS. - [CSR (Client-Side Rendering)](https://llmbestpractices.com/glossary/csr): CSR sends a near-empty HTML shell and builds the page in the browser with JavaScript, so first paint waits for the bundle. - [CSS Flexbox](https://llmbestpractices.com/glossary/css-flexbox): CSS Flexbox is a one-dimensional layout model that distributes items along a main axis set by flex-direction, suited to toolbars, nav bars, and centering. - [CSS Grid](https://llmbestpractices.com/glossary/css-grid): CSS Grid is a two-dimensional layout system that places items into rows and columns defined by tracks, areas, or the grid-template shorthand. - [Custom Property](https://llmbestpractices.com/glossary/custom-property): A CSS custom property is a --name property read with var(), enabling design tokens and runtime theming without preprocessors. - [Deadlock](https://llmbestpractices.com/glossary/deadlock): A deadlock is a circular lock wait between transactions; PostgreSQL detects it, aborts one with SQLSTATE 40P01, and the application must retry. - [Debouncing and throttling](https://llmbestpractices.com/glossary/debouncing): Debouncing runs a function once after a quiet period; throttling runs it at most once per interval. Debounce for final values, throttle for continuous updates. - [Dependency injection](https://llmbestpractices.com/glossary/dependency-injection): Dependency injection supplies a component's collaborators from outside instead of constructing them inside, making it swappable and testable. - [Distillation](https://llmbestpractices.com/glossary/distillation): Distillation trains a smaller student model on a larger teacher's outputs to approach it on one task at lower cost; check the teacher's terms first. - [E-E-A-T](https://llmbestpractices.com/glossary/e-e-a-t): E-E-A-T (Experience, Expertise, Authoritativeness, Trust) is Google's content quality framework; it is not a ranking factor itself, and Trust matters most. - [em vs rem](https://llmbestpractices.com/glossary/em-vs-rem): em is relative to the element's own font-size and compounds when nested; rem is relative to the root font-size and stays predictable. - [Embedding](https://llmbestpractices.com/glossary/embedding): An embedding is a fixed-length vector representing text or other input so that similar meaning lands nearby; use one model per index and re-embed on any switch. - [Evaluation harness](https://llmbestpractices.com/glossary/evaluation-harness): An evaluation harness runs a model or pipeline over a fixed test set, scores each output, and reports metrics so prompt and model changes can be compared in CI. - [Eventual Consistency](https://llmbestpractices.com/glossary/eventual-consistency): Eventual consistency guarantees replicas converge to one value once writes stop, with no promise on when or on what reads return meanwhile. - [Few-shot prompting](https://llmbestpractices.com/glossary/few-shot-prompting): Few-shot prompting puts input and output examples in the prompt so the model learns the format or rule; Anthropic recommends 3 to 5 diverse examples. - [Fine-tuning](https://llmbestpractices.com/glossary/fine-tuning): Fine-tuning trains a model on curated examples to lock in a format, style, or skill; it does not reliably add facts, and hosted options are narrowing. - [Foreign Data Wrapper](https://llmbestpractices.com/glossary/foreign-data-wrapper): A foreign data wrapper (FDW) is a PostgreSQL extension that exposes an external source, such as another database or a CSV file, as a table queryable with SQL. - [Foreign key](https://llmbestpractices.com/glossary/foreign-key): A foreign key is a column that must match a primary or unique key in another table, so the database rejects orphaned rows. - [GIN Index](https://llmbestpractices.com/glossary/gin-index): A GIN (Generalized Inverted Index) maps each element of a composite value, such as a tsvector lexeme, JSONB key, or array item, to the rows containing it. - [Golden set (eval set)](https://llmbestpractices.com/glossary/golden-set): A golden set, also called an eval set, is a fixed hand-verified collection of inputs and ground-truth outputs used to score an LLM system and catch regressions. - [Guardrails](https://llmbestpractices.com/glossary/guardrails): Guardrails are checks in your code, outside the model, on inputs, tool calls, and outputs; use them where failure has a cost, since prompts are probabilistic. - [Hallucination](https://llmbestpractices.com/glossary/hallucination): A hallucination is confident model output not supported by the input or facts; mitigate with grounding and verification, and track the rate on a fixed eval set. - [Has Selector](https://llmbestpractices.com/glossary/has-selector): The CSS :has() pseudo-class matches an element when a relative selector inside it matches, acting as a parent and previous-sibling selector. - [Hash routing](https://llmbestpractices.com/glossary/hash-routing): Hash routing stores the SPA route in the URL fragment after #, which browsers never send to the server. - [Hot/Cold Storage](https://llmbestpractices.com/glossary/hot-cold-storage): Hot/cold storage tiers data by access frequency: recent rows stay on fast storage and cache, old rows move to cheaper tiers. - [Hydration](https://llmbestpractices.com/glossary/hydration): Hydration attaches event handlers and state to server-rendered HTML in the browser; a hydration mismatch is a server and client render that disagree. - [Idempotent](https://llmbestpractices.com/glossary/idempotent): An idempotent operation leaves the same state whether run once or many times with the same input, which makes retries safe. - [Immutable data](https://llmbestpractices.com/glossary/immutable-data): Immutable data is never modified after creation; an update returns a new value, which simplifies concurrency, caching, and change detection. - [IndexNow](https://llmbestpractices.com/glossary/indexnow): IndexNow is an open push protocol for telling Bing, Yandex, Naver, Seznam, Yep, and Amazon when URLs change; Google does not support it. - [INP (Interaction to Next Paint)](https://llmbestpractices.com/glossary/inp): INP is the Core Web Vital for interaction latency, roughly the slowest click, tap, or key press on a page; good is 200 ms or less at the 75th percentile. - [ISR (Incremental Static Regeneration)](https://llmbestpractices.com/glossary/isr): ISR serves a prerendered page from cache and regenerates it in the background after a revalidation window, giving CDN speed with bounded staleness. - [Jailbreak](https://llmbestpractices.com/glossary/jailbreak): A jailbreak is a crafted user input that gets a model to ignore its safety training; it differs from prompt injection but, like it, can only be contained. - [JSONB Path](https://llmbestpractices.com/glossary/jsonb-path): jsonpath is PostgreSQL's SQL/JSON path language for filtering inside jsonb; GIN indexes accelerate it only for equality clauses via the @? and @@ operators. - [LCP (Largest Contentful Paint)](https://llmbestpractices.com/glossary/lcp): LCP is the Core Web Vital for when the largest visible image or text block renders; good is 2.5 s or less at the 75th percentile. - [LLM-as-judge](https://llmbestpractices.com/glossary/llm-as-judge): LLM-as-judge scores one model's outputs with another model against a rubric to scale evaluation, but needs bias controls and calibration against human grades. - [llms.txt](https://llmbestpractices.com/glossary/llms-txt): llms.txt is a proposed Markdown index at /llms.txt that points LLM agents to a site's key pages; coding agents use it, Google says Search does not. - [Materialized Path](https://llmbestpractices.com/glossary/materialized-path): Materialized path stores each tree node's full ancestor path in a column so subtree queries become prefix matches. - [Materialized view](https://llmbestpractices.com/glossary/materialized-view): A materialized view stores a query's result physically so it can be indexed, trading staleness until the next refresh for fast reads. - [MCP (Model Context Protocol)](https://llmbestpractices.com/glossary/mcp): MCP is an open JSON-RPC protocol exposing tools, resources, and prompts to AI clients; the 2026-07-28 revision is stateless and drops the initialize handshake. - [Monorepo and polyrepo](https://llmbestpractices.com/glossary/monorepo): A monorepo keeps many projects in one repository with shared tooling and atomic cross-project commits; a polyrepo gives each project its own repo and releases. - [Multimodal](https://llmbestpractices.com/glossary/multimodal): A multimodal model accepts more than text in one request; Claude reads images and PDFs, bills images by pixel area, and returns text only. - [MVCC (Multiversion Concurrency Control)](https://llmbestpractices.com/glossary/mvcc): MVCC keeps multiple row versions so each statement reads a consistent snapshot; in PostgreSQL reads never block writes and dead row versions need vacuuming. - [N+1 query](https://llmbestpractices.com/glossary/n-plus-one-query): An N+1 query problem is one query for a list plus one extra query per row for related data, so cost grows with list size. - [Optimistic locking](https://llmbestpractices.com/glossary/optimistic-locking): Optimistic locking detects write conflicts at update time with a version check instead of holding a row lock. - [Partition Key](https://llmbestpractices.com/glossary/partition-key): A partition key is the column or expression that routes each row to a partition or shard; choose it from the filter nearly every query uses. - [Planner-executor](https://llmbestpractices.com/glossary/planner-executor): Planner-executor splits an agent into a planner that writes the steps and an executor that runs them one at a time, replanning when a step breaks the plan. - [Prompt cache](https://llmbestpractices.com/glossary/prompt-cache): Prompt caching reuses a prompt's processed prefix across requests; on Claude, reads cost about 0.1x base input and an early change invalidates the rest. - [Prompt injection](https://llmbestpractices.com/glossary/prompt-injection): Prompt injection smuggles attacker instructions into a model through untrusted content; defend by limiting what the agent can do, since filters alone fail. - [Query Plan and Planner](https://llmbestpractices.com/glossary/query-plan): A query plan is the tree of scans, joins, and sorts the cost-based planner picks for a SQL statement, using table statistics from ANALYZE. - [Read replica](https://llmbestpractices.com/glossary/read-replica): A read replica is a continuously updated copy of the primary that serves read-only queries; writes always go to the primary. - [Reasoning model](https://llmbestpractices.com/glossary/reasoning-model): A reasoning model thinks before it answers; control its depth with effort settings, not sampling parameters, token budgets, or step-by-step prompts. - [Replication Lag](https://llmbestpractices.com/glossary/replication-lag): Replication lag is the delay between a commit on the primary and its visibility on a replica, measured in time or WAL bytes. - [Reranker](https://llmbestpractices.com/glossary/reranker): A reranker is a cross-encoder that scores query-document pairs together to reorder retrieval results; add one when recall is fine but top hits are off-topic. - [Retrieval-augmented generation (RAG)](https://llmbestpractices.com/glossary/retrieval-augmented-generation): RAG retrieves relevant passages from a knowledge base at query time and puts them in the prompt, grounding answers in current, private, or citable data. - [Secondary index](https://llmbestpractices.com/glossary/secondary-index): A secondary index is any index on non-primary-key columns; it speeds matching reads and slows every write that touches its columns. - [Semantic cache](https://llmbestpractices.com/glossary/semantic-cache): A semantic cache returns a stored response when a prompt's embedding is close to a cached one; the similarity threshold decides savings versus wrong answers. - [Semantic versioning (SemVer)](https://llmbestpractices.com/glossary/semantic-versioning): Semantic versioning (SemVer 2.0.0) uses MAJOR.MINOR.PATCH: MAJOR for breaking changes, MINOR for compatible features, PATCH for compatible fixes. - [Sequential Scan](https://llmbestpractices.com/glossary/sequential-scan): A sequential scan reads every heap page of a table in physical order; it is the planner's fallback when no index is cost-effective. - [Server component](https://llmbestpractices.com/glossary/server-component): A React Server Component renders only on the server, ships no JavaScript of its own, and never hydrates. - [Sharding](https://llmbestpractices.com/glossary/sharding): Sharding splits a table's rows across independent database servers by a shard key, so no node holds the full dataset or takes all writes. - [Side effect](https://llmbestpractices.com/glossary/side-effect): A side effect is any state change outside a function's return value, such as mutating an argument, writing to disk, or making a network call. - [Specificity](https://llmbestpractices.com/glossary/specificity): CSS specificity is the (ID, class, type) weight of a selector that decides which rule wins within the same origin and layer. - [SSG (Static Site Generation)](https://llmbestpractices.com/glossary/ssg): SSG renders every page to static HTML at build time and serves it from a CDN with no per-request server work. - [SSR (Server-Side Rendering)](https://llmbestpractices.com/glossary/ssr): SSR generates a page's complete HTML on the server for each request, so the browser paints real content before JavaScript runs. - [Stop sequence](https://llmbestpractices.com/glossary/stop-sequence): A stop sequence is a string that halts generation when the model emits it; use one for a known end marker and keep max_tokens as the hard ceiling. - [Structured output](https://llmbestpractices.com/glossary/structured-output): Structured output makes a model return data matching a JSON Schema; use schema-constrained decoding when code reads the response, and still validate values. - [Suspense boundary](https://llmbestpractices.com/glossary/suspense-boundary): A Suspense boundary shows a fallback while something in its subtree is not ready, and sets how a page streams and hydrates. - [System prompt](https://llmbestpractices.com/glossary/system-prompt): A system prompt is the operator instruction, sent apart from the conversation, that sets a model's role, rules, and format; keep it stable and version it. - [Temperature](https://llmbestpractices.com/glossary/temperature): Temperature rescales next-token odds; current Claude models accept only the default and OpenAI reasoning models reject it, so steer with effort and prompts. - [Token](https://llmbestpractices.com/glossary/token): A token is the unit of text a model reads and writes, and of limits and pricing; count with the target provider's tool, since tokenizers differ by model. - [Tool use (function calling)](https://llmbestpractices.com/glossary/tool-use): Tool use (function calling) lets a model request that your code run a defined function and continue from the result; validate arguments before executing. - [Top-p (nucleus sampling)](https://llmbestpractices.com/glossary/top-p): Top-p samples from the smallest set of likely tokens whose probabilities sum to p; current Claude models accept only the default, so it suits older models. - [Transaction isolation](https://llmbestpractices.com/glossary/transaction-isolation): Transaction isolation sets what one transaction can see of others' changes; PostgreSQL implements three distinct levels, defaulting to Read Committed. - [Tree shaking](https://llmbestpractices.com/glossary/tree-shaking): Tree shaking removes unused exports from the ES module graph before bundling, shrinking the final bundle. - [Twelve-factor app](https://llmbestpractices.com/glossary/twelve-factor): The twelve-factor app is a methodology for portable services: externalized config, stateless processes, logs as streams, and disposable workers. - [Vacuum and autovacuum](https://llmbestpractices.com/glossary/vacuum): VACUUM reclaims space from dead MVCC row versions and freezes old transaction IDs; autovacuum is the PostgreSQL daemon that runs VACUUM and ANALYZE per table. - [Vector similarity](https://llmbestpractices.com/glossary/vector-similarity): Vector similarity scores how close two embeddings are, by cosine, dot product, or Euclidean distance; use the metric the embedding model was trained for. - [Viewport](https://llmbestpractices.com/glossary/viewport): The viewport is the visible area where a page renders; the viewport meta tag and dvh, svh, and lvh units control how mobile layouts size to it. - [Virtual DOM](https://llmbestpractices.com/glossary/virtual-dom): The virtual DOM is an in-memory tree a framework re-renders on each state change and diffs against the previous one to apply minimal real DOM changes. - [Write-ahead log (WAL)](https://llmbestpractices.com/glossary/write-ahead-log): The write-ahead log records every change before data files change, giving crash recovery, replication, and point-in-time restore; SQLite has a WAL mode too. - [Write Amplification](https://llmbestpractices.com/glossary/write-amplification): Write amplification is the ratio of bytes physically written to bytes logically changed, driven by indexes, WAL, MVCC versions, and compaction. ## About Owner: LLM Best Practices Maintainers Standard followed: https://llmbestpractices.com Updated: 2026-10-01 License: CC BY 4.0; attribute "LLM Best Practices (llmbestpractices.com)". Contact: https://github.com/AXIA-Enterprises/llmbestpractices/issues