Agent Skillslatitude-dev/latitude-llm › mintlify-preview

mintlify-preview

GitHub

用于在本地启动 Mintlify 文档服务以进行实时预览。通过指定 Node 22 环境运行 mint dev,解决版本兼容问题,支持热重载,便于迭代和检查 docs/ 目录下的产品文档内容。

.agents/skills/mintlify-preview/SKILL.md latitude-dev/latitude-llm

Trigger Scenarios

用户要求启动文档预览或运行 Mintlify 需要查看或编辑 docs/ 目录下的 .mdx/.md 页面及导航配置

Install

npx skills add latitude-dev/latitude-llm --skill mintlify-preview -g -y
More Options

Non-standard path

npx skills add https://github.com/latitude-dev/latitude-llm/tree/development/.agents/skills/mintlify-preview -g -y

Use without installing

npx skills use latitude-dev/latitude-llm@mintlify-preview

指定 Agent (Claude Code)

npx skills add latitude-dev/latitude-llm --skill mintlify-preview -a claude-code -g -y

安装 repo 全部 skill

npx skills add latitude-dev/latitude-llm --all -g -y

预览 repo 内 skill

npx skills add latitude-dev/latitude-llm --list

SKILL.md

Frontmatter
{
    "name": "mintlify-preview",
    "license": "MIT",
    "description": "Run the public Mintlify product docs site locally for live preview. Use when previewing or iterating on docs under `docs\/` (`.mdx`\/`.md` pages, `docs.json` nav), or when the user says \"start the docs\", \"run mintlify\", \"preview the docs site\".",
    "compatibility": "opencode"
}

Mintlify docs local preview

The public product docs site lives in docs/ (docs.json + topical .mdx/.md pages). It is served locally with the Mintlify CLI (mint dev). This is the product docs site, not dev-docs/ — for durable internal domain docs see the docs skill.

TL;DR — start the server

Run from the docs/ directory (where docs.json lives), on a non-default port so it doesn't collide with the web app on 3000:

cd docs
PATH="$(ls -d "$HOME"/.nvm/versions/node/v22.*/bin 2>/dev/null | sort -V | tail -1):$PATH" mint dev --port 3333

Then open http://localhost:3333. A page at docs/<folder>/<file>.mdx is served at http://localhost:3333/<folder>/<file> (e.g. docs/monitors/overview.mdx/monitors/overview). The server hot-reloads on edits to any .mdx/.md or docs.json.

Prefer running it in the background and tailing the output until you see ✓ preview ready.

Why the PATH prefix (node version gotcha)

Mintlify does not run on Node 25+. This repo's default/active Node is often 25, which fails with:

erro mintlify is not supported on node versions 25+ (current version 25.9.0).

The PATH=... prefix above pins an installed Node 22 LTS (from nvm) for just this command, without changing the repo's active Node. If no v22.* is installed, install one (nvm install 22) or use any LTS <25. mise/nvm activate in a child shell won't help — prefix the PATH on the command itself.

Keep the CLI current (schema gotcha)

docs.json uses current Mintlify schema features (e.g. styling.codeblocks as an object). An outdated CLI rejects valid config with:

🚨 Invalid docs.json: #.styling.codeblocks: Expected ... received 'object'

Fix by updating the CLI, not by editing docs.json (the checked-in config is correct for the real deploy):

PATH="$(ls -d "$HOME"/.nvm/versions/node/v22.*/bin 2>/dev/null | sort -V | tail -1):$PATH" mint update

The mint and legacy mintlify binaries can live under different Node versions and update independently. Update the same binary you run mint dev with (i.e. under Node 22).

Verify it's up

curl -s -o /dev/null -w '%{http_code}\n' http://localhost:3333/        # 307 redirect to first page — fine
curl -s -o /dev/null -w '%{http_code}\n' http://localhost:3333/monitors/overview   # 200 = page resolves

Rules

  • Never edit docs.json to satisfy a stale local CLI. Update the CLI instead.
  • Add new pages to the nav in docs.json (the navigation.groups[].pages arrays). A .mdx file that isn't referenced there won't appear in the sidebar.
  • Use port 3333 (or any free port ≠ 3000) so the docs server and the web dev server can run together.
  • <Frame>/<img> blocks pointing at missing docs/images/... files render as broken-image placeholders — expected until the assets land.

Version History

  • 2479822 Current 2026-08-20 10:36

Same Skill Collection

.agents/skills/agentation-watch-mode/SKILL.md
.agents/skills/analyze-problem/SKILL.md
.agents/skills/api-endpoints/SKILL.md
.agents/skills/architecture-boundaries/SKILL.md
.agents/skills/artifact-designer/SKILL.md
.agents/skills/async-jobs-and-events/SKILL.md
.agents/skills/authentication/SKILL.md
.agents/skills/backoffice/SKILL.md
.agents/skills/better-auth-best-practices/SKILL.md
.agents/skills/code-style/SKILL.md
.agents/skills/database-clickhouse/SKILL.md
.agents/skills/database-postgres/SKILL.md
.agents/skills/docs/SKILL.md
.agents/skills/effect-and-errors/SKILL.md
.agents/skills/env-configuration/SKILL.md
.agents/skills/explain-diff-html/SKILL.md
.agents/skills/fix-datadog-issues/SKILL.md
.agents/skills/gh-issue/SKILL.md
.agents/skills/humanizer/SKILL.md
.agents/skills/managing-maintenance-windows/SKILL.md
.agents/skills/notifications/SKILL.md
.agents/skills/production-release/SKILL.md
.agents/skills/review-pr-comments/SKILL.md
.agents/skills/testing/SKILL.md
.agents/skills/toolchain-commands/SKILL.md
.agents/skills/web-frontend/SKILL.md
.agents/skills/ci-watchdog/SKILL.md
.agents/skills/create-pr/SKILL.md
.agents/skills/temporal-developer/SKILL.md

Metadata

Files
0
Version
2479822
Hash
dec8c718
Indexed
2026-08-20 10:36

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-26 06:32
浙ICP备14020137号-1 $방문자$