MCPInstall

rspress-best-practices

Configure, review, or troubleshoot Rspress v2 sites, including content conventions, navigation, MDX, assets, search, and deployment.

Installs
540
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/rstackjs/agent-skills --skill rspress-best-practices
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads rspress-best-practices automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Rspress best practices

Apply these rules when writing or reviewing Rspress (v2) sites.

Configuration

  • Use rspress.config.ts and defineConfig from @rspress/core
  • Set root explicitly when docs are not under the default docs/ directory
  • Keep site-wide settings such as title, description, icon, logo, base, and lang in config instead of repeating them in page files
  • Prefer first-class Rspress options before custom theme code or low-level bundler overrides
  • Keep custom theme code in a top-level theme/ directory and import original theme pieces from @rspress/core/theme-original

CLI

  • Use rspress dev for local development
  • Use rspress build for production output
  • Use rspress preview only for local preview of the built site
  • Use rspress eject only when CSS variables, class overrides, or layout wrapping cannot solve the customization

Docs structure and navigation

  • Keep docs content under one clear docs root and group pages by topic or workflow, not by team ownership
  • Use _meta.json or _nav.json to control sidebar and navigation labels/order instead of encoding order in filenames
  • Put reusable MDX snippets or shared components in shared files instead of duplicating them across pages
  • Keep landing pages concise and link to deeper task-oriented guides from them

Writing and frontmatter

  • Add clear title and description frontmatter, and set sidebar, outline, navbar, or footer only when page defaults are not enough
  • Use pageType: home, doc, doc-wide, custom, or blank intentionally based on layout needs
  • Write task-first headings and short intros; avoid marketing-heavy copy in technical docs
  • Prefer one topic per page and split overly long pages by workflow or feature area
  • Keep code examples minimal, runnable, and version-accurate

MDX and components

  • Use MDX for interactive docs and embedded components, but keep the main narrative understandable as plain markdown
  • Prefer documented Rspress theme/runtime APIs over importing from internal source paths
  • For app-wide UI or providers, use globalUIComponents or theme overrides instead of repeating imports in each page

Theme and styling

  • Prefer CSS variables for brand colors, spacing, and surface styling
  • Prefer BEM class overrides or Layout slots before ejecting built-in components
  • In theme/ files, keep export * from '@rspress/core/theme-original' unless intentionally replacing a named export
  • Avoid full component ejection unless config, CSS, and wrapping cannot meet the requirement

I18n, Search, And AI

  • For multilingual sites, organize locale content under per-language directories and keep navigation mirrored where practical
  • Keep descriptions and other frontmatter text in the same language as the page content
  • Configure search intentionally: use local search for small or medium sites, and hosted search when scale or cross-version indexing requires it
  • Enable llms or ssgMd only when the site benefits from machine-readable outputs, and keep descriptions accurate because those outputs surface page summaries

Assets and public files

  • Import source-managed images and components from docs/theme source when they belong to the content
  • Use public/ only for assets that must keep stable URL paths, such as favicons, social images, or download files
  • Reference public assets by absolute site path and make sure they still work when base is set

Plugins and integration

  • Prefer official Rspress plugins for search, preview, and API-doc scenarios before building custom solutions
  • For component or library docs, use @rspress/plugin-preview and @rspress/plugin-api-docgen when interactive demos or API tables are needed
  • Keep plugin usage explicit in config and remove unused plugins to reduce maintenance cost

Build, Deploy, And debugging

  • Validate both rspress dev and rspress build; a page that works in dev can still fail during static generation
  • Verify broken links, missing assets, and wrong base handling before deployment
  • Keep generated output out of source control unless the hosting workflow explicitly requires committed artifacts
  • When debugging content issues, inspect the resolved docs root, frontmatter, and theme overrides before assuming a bundler problem

Documentation

  • For the latest Rspress docs, read https://rspress.rs/llms.txt
  • Use the config and API docs when checking exact option names or current behavior

FAQ

What does the rspress-best-practices skill do?

Configure, review, or troubleshoot Rspress v2 sites, including content conventions, navigation, MDX, assets, search, and deployment.

How do I install rspress-best-practices?

Run npx skills add https://github.com/rstackjs/agent-skills --skill rspress-best-practices in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/rspress-best-practices/ (personal) or .claude/skills/rspress-best-practices/ (project).

Which AI agents can use rspress-best-practices?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is rspress-best-practices safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains rspress-best-practices?

It is published by rstackjs in rstackjs/agent-skills. It has 540 recorded installs.

More from rstackjs/agent-skills

View all →

rsbuild-best-practices

rstackjs/agent-skills

Configure, review, or troubleshoot Rsbuild applications, including build/dev commands, assets, type checking, and bundle optimization.

rstest-best-practices

rstackjs/agent-skills

Set up, write, or review Rstest tests and configuration, including environments, mocks, snapshots, coverage, and CI.

rslib-best-practices

rstackjs/agent-skills

Configure, review, or troubleshoot Rslib library builds, output formats, declarations, dependency handling, and integrations.

rspack-best-practices

rstackjs/agent-skills

Configure, review, or troubleshoot Rspack builds, including loaders, CSS, assets, type checking, bundle optimization, and profiling.

rspack-v2-upgrade

rstackjs/agent-skills

Use when upgrading a Rspack 1.x project to v2, including dependency and configuration updates.

AI & Agents517 installs

rspress-description-generator

rstackjs/agent-skills

Generate missing description frontmatter for Rspress Markdown/MDX pages, including new docs pages and site-wide SEO metadata updates.

Docs & Writing500 installs

Popular code quality & workflow skills

View category →

grill-me

mattpocock/skills

A relentless interview to sharpen a plan or design.

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

domain-modeling

mattpocock/skills

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

codebase-design

mattpocock/skills

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.