docs-from-docs — Import from another docs platform
This skill is the executor — read the source platform, mirror its structure, normalise the syntax, and publish. Because you are migrating an existing docs site, the folder structure is already there: reproduce it faithfully (its nav → the sub-header). The one enrichment worth adding is a faq.md / use-cases page if the source lacks one — it kills evaluation objections and feeds the AEO layer.
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. -
Preview + confirm. Print the folder tree and excerpts from up to 3 representative pages. Ask before publishing: "Does this look right? Type yes to publish, or describe what to change." (Auto-mode may skip the ask.)
-
Publish — one atomic commit. Apply
/docs-publishlogic: if a Docsbook workspace is connected, create it for the sourceowner/repoand commit all pages together; if your git host is authenticated and the user confirmed, push there. If neither is available, stop cleanly withstatus: crawl_only, print the local path and the follow-up publish command. Do not error. -
Configure the workspace. Apply
/docs-setup-workspaceunconditionally after a successful publish — branding (from_branding.json), UI affordances, the nav sub-header from the mirrored folders, and plan-gated SEO/AEO/GEO/AI where allowed. This is a competitor-migration pitch ("moved your docs off Mintlify — here's the difference"), so the AI chat and affordances are the visible upgrade. If MCP is unreachable, print the connection command and exit cleanly.
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 - A
faq.md/ use-cases page added if the source had none - Preview (tree + excerpts) printed before any publish prompt
- All pages published in one atomic commit (or
crawl_onlywith local path + follow-up command) -
/docs-setup-workspaceapplied after publish — branding, UI affordances, nav sub-header, plan-gated SEO/AEO/GEO/AI where allowed