docs-from-docs — Import from another docs platform
The actual work is done by the docs-platform-importer subagent (Haiku, pinned model) shipped in docs-claude-plugins. This skill is the knowledge base — the subagent is the executor.
Workflow#
-
Name the project — don't invent it. Take the name from the source repo name, the existing docs site's brand (
<title>/og:site_name), or the platform config's title field. Use it for thedocs-output/<name>/folder and the workspace display name. If none is readable, ask the user — never use a placeholder. -
Identify the platform. Read the repo root for the marker file:
Marker Platform mint.json/docs.jsonMintlify SUMMARY.mdat rootGitBook docusaurus.config.js/.tsDocusaurus theme.config.tsx+ Next.jsNextra .vitepress/config.*VitePress astro.config.*+@astrojs/starlightStarlight -
Read the navigation. Each platform stores nav differently —
mint.json#navigation,SUMMARY.md,docusaurus.config.js#sidebars,.vitepress/config.ts#themeConfig.sidebar. Build a flat list of{label, sourcePath}entries in display order. -
Copy and normalise pages. For every entry, read the source
.md/.mdxand write todocs-output/<name>/<derived-path>.md. Drop platform-specific frontmatter keys that don't translate; keeptitle,description,slug. Convert:- Mintlify
<Card>,<CardGroup>,<Accordion>,<Note>→ plain Markdown headings + lists, callouts as> **Note:** ... - Docusaurus
<Tabs>,<TabItem>→ headings (### Tab name) with content underneath - GitBook
{% hint %}→> **Hint:** ...;{% tabs %}→ headings - Nextra
<Callout>→> **Note:** ... - Strip every
importline at the top of.mdxfiles; Docsbook renders plain Markdown.
- Mintlify
-
Rewrite internal links. Replace platform-specific paths (e.g. Docusaurus
/docs/intro) with relative paths between output files. Leave externalhttps://links untouched. -
Carry over assets. Copy any
static/,public/, orimages/directories referenced by the imported pages intodocs-output/<name>/_assets/and update image src accordingly. -
Write
_branding.json. Pullcolors.primary/theme.accentfrom the platform config. If absent, leaveaccentColorout so the workspace configurator skipsupdate_branding.
Guardrails#
- Never lose content. If a custom component cannot be normalised, paste its inner text verbatim and add
> **TODO:** original used <ComponentName>, may need styling tweak. - Preserve heading hierarchy — do not flatten H3s into H2s to "look cleaner".
- Hard-skip
.mdxfiles that are pure React (no markdown text) — log towarnings, don't error. - Keep slugs URL-stable: if the original was
/docs/getting-started/installation, write togetting-started/installation.md, notinstallation.md. - When committing into an existing repo, write to the repo root (or an existing
docs/folder if present) — never add a new top-leveldocs/wrapper for a fresh repo. The project name comes from the source, not a guess. - Active voice, second person — but only when rewriting your own additions. Imported content stays as-is.
Acceptance Criteria#
- Platform identified from marker file before any conversion runs
- Navigation reproduced in the output folder structure
- Platform-specific MDX components normalised to plain Markdown
- Internal links rewritten to relative paths between output files
- Referenced images copied into
_assets/ -
_branding.jsoncarries the platform's accent color when present, otherwise omits it