营销与写作

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.

  • 502 次安装
  • 97 星标
  • 收录于

安装命令

npx skills add https://github.com/rstackjs/agent-skills --skill rspress-description-generator

SKILL.md

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

  1. 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 like website/.
  2. Read the config and extract the root option.
    • 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 root is set, resolve it relative to the config file's directory.
    • If root is not set, default to docs relative to the config file's directory.
  3. Confirm the directory exists. If neither docs nor the configured root exists, check for doc as a fallback.

Step 2 — detect i18n structure

Rspress i18n projects place language subdirectories (e.g., en/, zh/) directly under the docs root:

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

  1. 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 like website/.
  2. Read the config and extract the root option.
    • 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 root is set, resolve it relative to the config file's directory.
    • If root is not set, default to docs relative to the config file's directory.
  3. Confirm the directory exists. If neither docs nor the configured root exists, check for doc as a fallback.

Step 2 — detect i18n structure

Rspress i18n projects place language subdirectories (e.g., en/, zh/) directly under the docs root: