
rspress-description-generator
Generate missing description frontmatter for Rspress Markdown/MDX pages, including new docs pages and site-wide SEO metadata updates.
- Installs
- 500
- 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-description-generator- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads rspress-description-generator automatically when relevant.
- 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 description generator
The description field in Rspress frontmatter generates <meta name="description" content="..."> tags, which are used for search engine snippets, social media previews, and AI-oriented formats like llms.txt.
Step 1 — locate the docs root
- Find the Rspress config file. Search for
rspress.config.ts,.js,.mjs, or.cjs. It may be at the project root or inside a subdirectory likewebsite/. - Read the config and extract the
rootoption.- The value might be a plain string (
root: 'docs') or a JS expression (root: path.join(__dirname, 'docs')). In either case, determine the resolved directory path. - If
rootis set, resolve it relative to the config file's directory. - If
rootis not set, default todocsrelative to the config file's directory.
- The value might be a plain string (
- Confirm the directory exists. If neither
docsnor the configured root exists, check fordocas a fallback.
Step 2 — detect i18n structure
Rspress i18n projects place language subdirectories (e.g., en/, zh/) directly under the docs root:
docs/
├── en/
│ ├── guide/
│ └── index.md
└── zh/
├── guide/
└── index.md
Check if the docs root contains language subdirectories (two-letter codes like en, zh, ja, ko, etc.). If so, process each language directory separately — the description language should match the content language.
If there are no language subdirectories, treat the entire docs root as a single-language site.
Step 3 — scan and process files
Glob for **/*.md and **/*.mdx under the docs root. Exclude:
node_modules, build output (doc_build,.rspress,dist)_meta.json/_nav.json(sidebar/nav config files, not doc pages)**/shared/**directories (reusable snippets included via@import, not standalone pages)
For each file:
- Read the file.
- Check for existing
descriptionin frontmatter. If it exists and is non-empty, skip. - Check
pageTypein frontmatter. Forhomepages, derive the description from thehero.text/hero.taglinefields or the features list, not from body content. - Generate a description following the writing guidelines below.
- Insert
descriptioninto frontmatter:-
If the file has frontmatter with a
titlefield, insertdescriptionon the line aftertitle. -
If the file has frontmatter without
title, insertdescriptionas the first field. -
If the file has no frontmatter block, add one:
--- description: Your generated description here ---
-
YAML formatting
Most descriptions can be bare YAML strings:
description: Step-by-step guide to setting up your first Rspress site
If the description contains colons, quotes, or other special YAML characters, wrap in double quotes:
description: 'API reference for Rspress configuration: plugins, themes, and build options'
Step 4 — batch processing
For sites with many files, use parallel agent calls to process independent files simultaneously. Group by directory (e.g., all files in guide/, then all in api/) to maintain focus and consistency within each section.
After processing all files, do a quick scan to ensure no files were missed — re-glob and check for any remaining files without description.
Description writing guidelines
The description serves three audiences: search engines (Google snippet), AI systems (llms.txt, summarization), and humans (scanning search results). A good description helps all three.
Rules
- Length: 50–160 characters. Under 50 is too vague for search engines; over 160 gets truncated in snippets.
- Language: Match the document content. Chinese docs get Chinese descriptions, English docs get English descriptions.
- Be direct: State what the page covers. Avoid starting with "This document", "This page", "Learn about" — jump straight to the substance.
- Be specific: Mention concrete technologies, APIs, or concepts the page covers. "Configure Rspress plugins for search, analytics, and internationalization" beats "How to use plugins."
- No markdown: Plain text only, no formatting syntax.
Examples
Good:
| Content | Description |
|---|---|
| Plugin development guide | Create custom Rspress plugins using the Node.js plugin API and runtime hooks |
| MDX component usage | Import and use React components in MDX documentation files |
| Rspress 快速开始 | 从安装到本地预览,搭建 Rspress 文档站点的完整流程 |
| 主题配置 | 自定义 Rspress 主题的导航栏、侧边栏、页脚和暗色模式 |
| Home page (pageType: home) | Rspress documentation framework — fast, MDX-powered static site generator |
Bad:
| Description | Why |
|---|---|
| "About plugins" | Too vague — which plugins? what about them? |
| "This page explains how to configure the Rspress theme" | Wastes characters on "This page explains how to" |
| "Learn everything about Rspress!" | Marketing fluff, says nothing specific |
Documentation
- Frontmatter fields: https://rspress.rs/api/config/config-frontmatter
- Basic config (
rootoption): https://rspress.rs/api/config/config-basic - Full Rspress docs: https://rspress.rs/llms.txt
FAQ
What does the rspress-description-generator skill do?
Generate missing description frontmatter for Rspress Markdown/MDX pages, including new docs pages and site-wide SEO metadata updates.
How do I install rspress-description-generator?
Run npx skills add https://github.com/rstackjs/agent-skills --skill rspress-description-generator 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-description-generator/ (personal) or .claude/skills/rspress-description-generator/ (project).
Which AI agents can use rspress-description-generator?
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-description-generator 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-description-generator?
It is published by rstackjs in rstackjs/agent-skills. It has 500 recorded installs.
More from rstackjs/agent-skills
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.
rspress-best-practices
rstackjs/agent-skills
Configure, review, or troubleshoot Rspress v2 sites, including content conventions, navigation, MDX, assets, search, and deployment.
rspack-v2-upgrade
rstackjs/agent-skills
Use when upgrading a Rspack 1.x project to v2, including dependency and configuration updates.
Popular docs & writing skills
grill-with-docs
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
lark-markdown
open.feishu.cn
飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。
writing-beats
mattpocock/skills
Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.
writing-shape
mattpocock/skills
Writing, exploit: shape raw material into an article, paragraph by paragraph.
writing-fragments
mattpocock/skills
Writing, explore: mine raw fragments, no structure yet.
writing-for-agents
mattpocock/skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.