diff --git a/snippets/setup-agent-prompt-text.mdx b/snippets/setup-agent-prompt-text.mdx
new file mode 100644
index 0000000000..02f4414197
--- /dev/null
+++ b/snippets/setup-agent-prompt-text.mdx
@@ -0,0 +1,30 @@
+{/* vale off */}
+
+{/* The agent setup prompt as a string, for the introduction page's collapsible
+ prompt card. It is a verbatim copy of the body in
+ /snippets/setup-agent-prompt.mdx — the component serializes its
+ children's source instead of evaluating them, so it cannot be handed this
+ variable. EDIT BOTH FILES TOGETHER; .github/workflows/check-prompt-sync.yml
+ fails the build if they drift. */}
+
+export const SETUP_AGENT_PROMPT = `Get my documentation live on a published Mintlify site. You are successfully done when you give me the live URL and confirm it loads. Tell me clearly whenever a step needs my input—do everything else yourself. If this prompt was pasted before (for example, after a restart), continue from where things left off instead of starting over. If you don't have terminal or command execution access, tell me to follow the manual steps at [mintlify.com/start](https://mintlify.com/start) instead. Everything below requires running commands and requires Node.js v20.17.0+ (LTS versions recommended).
+
+1. Ask for my existing content that will be used for my Mintlify site. This may be a local folder or a repo. Verify the source before building: echo back exactly what you're reading and list its top-level contents so I can confirm it's right. If you can't access something I named (private repos return 404, same as nonexistent), stop and ask. Never substitute a different source.
+2. Check whether \`mint\` is installed with \`mint --version\`. If it's missing, install it with \`npm i -g mint\` (or \`pnpm add -g mint\`). If it's already installed, run \`mint update\` instead of reinstalling.
+3. Run \`mint status\`. If it already shows an organization, skip to step 7.
+4. Needs me: If \`mint status\` shows I'm not logged in, ask me directly whether I already have a Mintlify account. Don't guess.
+ - If I have one: run \`mint login\`. You need me for browser steps and to approve access.
+ - If I don't: ask me for my first name, last name, company, and email if I haven't given them already—never invent these. Run \`mint signup --firstName [firstName] --lastName [lastName] --company [company] --email [email]\` as a background task since it blocks until I click a verification link that can take several minutes.
+5. Needs me: I'll check my email and click the verification link. That opens a browser tab that automatically finishes the rest of account creation/logging in. I must approve the CLI, then connect a GitHub repository or let Mintlify host one. Tell me clearly this step is mine, then wait for it before continuing.
+6. Run \`mint status\` again to confirm an organization and subdomain now exist. The subdomain isn't provisioned until I select or connect a repository during the step 5 browser flow — so if \`mint status\` shows my organization but no subdomain yet, that almost always means I haven't finished the repo step, not that anything is broken. Don't treat it as an error or poll blindly: wait until I confirm I've completed onboarding, then re-run \`mint status\`. Provisioning can still lag a few seconds after that, so retry a few times before concluding something is wrong.
+7. Needs me: ask for the URL of the repository connected to my Mintlify project — \`mint status\` doesn't expose it, so you can't look it up yourself. Clone it once I give it to you.
+8. Check what's in that repo. If I connected my own existing docs repo, my content is already there — don't overwrite it. If Mintlify created the repo, it contains starter template content — replace that with my actual docs content from step 1. Only use \`mint new [directory]\` if I want a different theme or template than what's in the repo — scaffold it locally, then use its output in place of the seeded content.
+9. Preview with \`mint dev\`, which generally starts on \`http://localhost:3000\` unless that port is in use. It blocks until stopped, so run it as a background task. Verify the preview loads, then stop it before continuing.
+10. Commit and push your changes. Mintlify deploys automatically on push.
+11. Needs me: If I want a custom domain, run \`mint add-domain \`. It prints the DNS records I need to add with my domain provider. Tell me the DNS records, since only I can configure them at my registrar. Make it clear that this is a step I must complete.
+12. Confirm my site is live: fetch \`https://.mintlify.site\` (find the subdomain via \`mint status\`) and confirm it loads. If I added a custom domain in step 11, also fetch that domain and confirm it loads before calling this step done—DNS propagation can lag, so retry a few times before treating a failed fetch as an error.
+13. Set yourself up to keep working here: install the [Mintlify skill](https://mintlify.com/docs/ai/skillmd.md) with \`npx skills add https://mintlify.com/docs\`, then register the [admin MCP server](https://mintlify.com/docs/ai/model-context-protocol.md) at \`https://mcp.mintlify.com\` for your specific tool. For example, \`claude mcp add --transport http mintlify https://mcp.mintlify.com\` for Claude Code or fetch https://mintlify.com/docs/ai/mintlify-mcp.md for instructions for Claude, Cursor, Codex, or ChatGPT. Do this step yourself—don't ask me to run these commands.
+14. Needs me: the first admin MCP tool call opens a browser window for OAuth login. Approve it there. Most tools don't load newly added MCP servers mid-session — if the Mintlify tools don't show up, tell me to restart you and we'll pick up from here.
+15. If any command fails in a way not covered above, stop and tell me the exact error rather than guessing or retrying blindly. If it looks like something's wrong on Mintlify's end rather than in what you're doing, check https://status.mintlify.com or point me to https://mintlify.com/docs/contact-support.`;
+
+{/* vale on */}
diff --git a/snippets/setup-agent-prompt.mdx b/snippets/setup-agent-prompt.mdx
index 6f0ab77c77..304760f280 100644
--- a/snippets/setup-agent-prompt.mdx
+++ b/snippets/setup-agent-prompt.mdx
@@ -1,3 +1,8 @@
+{/* The prompt below is duplicated as a string in
+ /snippets/setup-agent-prompt-text.mdx for the introduction page.
+ EDIT BOTH FILES TOGETHER; .github/workflows/check-prompt-sync.yml fails the
+ build if they drift. */}
+
{/* vale off */}
From 5d61a2721f8bdf873dc4f5523189b5e4bffc2067 Mon Sep 17 00:00:00 2001
From: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>
Date: Thu, 24 Sep 2026 15:38:55 -0700
Subject: [PATCH 3/6] Keep one copy of the setup prompt and use built-in icons
- Move SetupPrompt and the prompt text into snippets/setup-prompt.jsx and use
it on both the home page and the quickstart. The built-in copies
its children's source, so {VAR} copies the literal
"{VAR}" (verified in mint dev). One component removes the duplicate text,
the sync script, and its workflow.
- Replace the hand-copied Lucide SVGs with Mintlify's , and drop the
local Icon component that shadowed it.
- Only show "Copied" when the clipboard write succeeds. On failure, expand the
prompt so it can be copied by hand.
Co-Authored-By: Claude Opus 5.5 (1M context)
---
.github/scripts/check-prompt-sync.mjs | 64 -------
.github/workflows/check-prompt-sync.yml | 24 ---
index.mdx | 163 ++----------------
quickstart.mdx | 4 +-
snippets/setup-agent-prompt.mdx | 30 ----
...agent-prompt-text.mdx => setup-prompt.jsx} | 74 ++++++--
6 files changed, 79 insertions(+), 280 deletions(-)
delete mode 100644 .github/scripts/check-prompt-sync.mjs
delete mode 100644 .github/workflows/check-prompt-sync.yml
delete mode 100644 snippets/setup-agent-prompt.mdx
rename snippets/{setup-agent-prompt-text.mdx => setup-prompt.jsx} (62%)
diff --git a/.github/scripts/check-prompt-sync.mjs b/.github/scripts/check-prompt-sync.mjs
deleted file mode 100644
index d9475d0420..0000000000
--- a/.github/scripts/check-prompt-sync.mjs
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * The agent setup prompt lives in two files:
- *
- * snippets/setup-agent-prompt.mdx — card used on the quickstart
- * snippets/setup-agent-prompt-text.mdx — the same text as a JS string, used by
- * the introduction page's own prompt card
- *
- * They have to be separate because the component serializes its
- * children's *source* rather than evaluating them, so it cannot be handed a
- * variable. This script fails CI if the two ever drift apart.
- */
-
-import { readFileSync } from "node:fs";
-
-const CARD = "snippets/setup-agent-prompt.mdx";
-const TEXT = "snippets/setup-agent-prompt-text.mdx";
-
-function fromPromptCard(path) {
- const lines = readFileSync(path, "utf8").split("\n");
- const open = lines.findIndex((l) => l.startsWith(" l.trim() === "");
- if (open === -1 || close === -1 || close < open) {
- throw new Error(`${path}: could not find a ... block`);
- }
- return lines.slice(open + 1, close).join("\n").trim();
-}
-
-function fromConstant(path) {
- const src = readFileSync(path, "utf8");
- const match = src.match(/export const SETUP_AGENT_PROMPT = `([\s\S]*)`;/);
- if (!match) {
- throw new Error(`${path}: could not find the SETUP_AGENT_PROMPT template literal`);
- }
- return match[1]
- .replace(/\\`/g, "`")
- .replace(/\\\$\{/g, "${")
- .replace(/\\\\/g, "\\")
- .trim();
-}
-
-const card = fromPromptCard(CARD);
-const text = fromConstant(TEXT);
-
-if (card === text) {
- console.log(`The setup prompt matches in ${CARD} and ${TEXT}.`);
- process.exit(0);
-}
-
-const cardLines = card.split("\n");
-const textLines = text.split("\n");
-const firstDiff = cardLines.findIndex((line, i) => line !== textLines[i]);
-
-console.error(`The setup prompt has drifted between ${CARD} and ${TEXT}.`);
-console.error("Edit one, then copy the change into the other.\n");
-
-if (firstDiff !== -1) {
- console.error(`First difference at line ${firstDiff + 1}:`);
- console.error(` ${CARD}:\n ${cardLines[firstDiff] ?? "(missing)"}`);
- console.error(` ${TEXT}:\n ${textLines[firstDiff] ?? "(missing)"}`);
-} else {
- console.error(`${CARD} has ${cardLines.length} lines, ${TEXT} has ${textLines.length}.`);
-}
-
-process.exit(1);
diff --git a/.github/workflows/check-prompt-sync.yml b/.github/workflows/check-prompt-sync.yml
deleted file mode 100644
index 64f3ba2376..0000000000
--- a/.github/workflows/check-prompt-sync.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-name: Check setup prompt sync
-
-on:
- pull_request:
- paths:
- - snippets/setup-agent-prompt.mdx
- - snippets/setup-agent-prompt-text.mdx
- - .github/scripts/check-prompt-sync.mjs
- - .github/workflows/check-prompt-sync.yml
-
-permissions:
- contents: read
-
-jobs:
- check:
- name: Check setup prompt sync
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v6
- - uses: actions/setup-node@v6
- with:
- node-version: 24
- package-manager-cache: false
- - run: node .github/scripts/check-prompt-sync.mjs
diff --git a/index.mdx b/index.mdx
index 5cdee4a0a0..ee9aa78b53 100644
--- a/index.mdx
+++ b/index.mdx
@@ -6,62 +6,26 @@ keywords: ["overview", "platform", "getting started", "features"]
boost: 3
---
-import { SETUP_AGENT_PROMPT } from "/snippets/setup-agent-prompt-text.mdx";
+import { SetupPrompt } from "/snippets/setup-prompt.jsx";
{/* Styles live in home.css, scoped to `.mint-home`. They port the tokens from
the Mintlify landing design system: warm neutral surfaces, hairline rails,
- 6px cards, and a brand green that shifts hue between light and dark. */}
+ and 6px cards, using the site's theme colors. */}
{/* vale Mintlify.Semicolons = NO */}
-export const Icon = ({ children }) => {
- return (
-
- );
-};
-
-export const ArrowIcon = () => {
- return (
-
- );
-};
-
export const HomeCard = ({ icon, title, description, href }) => {
return (
- {icon}
+
+
+
-
-
-
-
-
- }
+ icon="rocket"
title="Quickstart"
description="Deploy your first docs site in minutes with our step-by-step guide"
href="/quickstart"
/>
-
-
-
- }
+ icon="terminal"
title="CLI installation"
description="Install the CLI to preview and develop your docs locally"
href="/installation"
/>
-
-
-
- }
+ icon="square-pen"
title="Web editor"
description="Make quick updates and manage content with our browser-based editor"
href="/editor/index"
/>
-
-
-
-
-
- }
+ icon="layout-grid"
title="Components"
description="Build rich, interactive documentation with our ready-to-use components"
href="/components/accordions"
diff --git a/quickstart.mdx b/quickstart.mdx
index c2fdccba37..c8bb902223 100644
--- a/quickstart.mdx
+++ b/quickstart.mdx
@@ -5,7 +5,7 @@ keywords: ["quickstart", "deploy", "get started", "first steps", "tutorial", "se
boost: 3
---
-import SetupAgentPrompt from "/snippets/setup-agent-prompt.mdx";
+import { SetupPrompt } from "/snippets/setup-prompt.jsx";
After you complete this guide, you'll have a live documentation site ready to customize and update.
@@ -18,7 +18,7 @@ After you complete this guide, you'll have a live documentation site ready to cu
The prompt splits the quickstart into tasks your agent can complete and directs it to ask you for any information it needs while getting everything set up.
-
+
{/* vale Mintlify.OxfordComma = NO */}
diff --git a/snippets/setup-agent-prompt.mdx b/snippets/setup-agent-prompt.mdx
deleted file mode 100644
index 304760f280..0000000000
--- a/snippets/setup-agent-prompt.mdx
+++ /dev/null
@@ -1,30 +0,0 @@
-{/* The prompt below is duplicated as a string in
- /snippets/setup-agent-prompt-text.mdx for the introduction page.
- EDIT BOTH FILES TOGETHER; .github/workflows/check-prompt-sync.yml fails the
- build if they drift. */}
-
-{/* vale off */}
-
-
-Get my documentation live on a published Mintlify site. You are successfully done when you give me the live URL and confirm it loads. Tell me clearly whenever a step needs my input—do everything else yourself. If this prompt was pasted before (for example, after a restart), continue from where things left off instead of starting over. If you don't have terminal or command execution access, tell me to follow the manual steps at [mintlify.com/start](https://mintlify.com/start) instead. Everything below requires running commands and requires Node.js v20.17.0+ (LTS versions recommended).
-
-1. Ask for my existing content that will be used for my Mintlify site. This may be a local folder or a repo. Verify the source before building: echo back exactly what you're reading and list its top-level contents so I can confirm it's right. If you can't access something I named (private repos return 404, same as nonexistent), stop and ask. Never substitute a different source.
-2. Check whether `mint` is installed with `mint --version`. If it's missing, install it with `npm i -g mint` (or `pnpm add -g mint`). If it's already installed, run `mint update` instead of reinstalling.
-3. Run `mint status`. If it already shows an organization, skip to step 7.
-4. Needs me: If `mint status` shows I'm not logged in, ask me directly whether I already have a Mintlify account. Don't guess.
- - If I have one: run `mint login`. You need me for browser steps and to approve access.
- - If I don't: ask me for my first name, last name, company, and email if I haven't given them already—never invent these. Run `mint signup --firstName [firstName] --lastName [lastName] --company [company] --email [email]` as a background task since it blocks until I click a verification link that can take several minutes.
-5. Needs me: I'll check my email and click the verification link. That opens a browser tab that automatically finishes the rest of account creation/logging in. I must approve the CLI, then connect a GitHub repository or let Mintlify host one. Tell me clearly this step is mine, then wait for it before continuing.
-6. Run `mint status` again to confirm an organization and subdomain now exist. The subdomain isn't provisioned until I select or connect a repository during the step 5 browser flow — so if `mint status` shows my organization but no subdomain yet, that almost always means I haven't finished the repo step, not that anything is broken. Don't treat it as an error or poll blindly: wait until I confirm I've completed onboarding, then re-run `mint status`. Provisioning can still lag a few seconds after that, so retry a few times before concluding something is wrong.
-7. Needs me: ask for the URL of the repository connected to my Mintlify project — `mint status` doesn't expose it, so you can't look it up yourself. Clone it once I give it to you.
-8. Check what's in that repo. If I connected my own existing docs repo, my content is already there — don't overwrite it. If Mintlify created the repo, it contains starter template content — replace that with my actual docs content from step 1. Only use `mint new [directory]` if I want a different theme or template than what's in the repo — scaffold it locally, then use its output in place of the seeded content.
-9. Preview with `mint dev`, which generally starts on `http://localhost:3000` unless that port is in use. It blocks until stopped, so run it as a background task. Verify the preview loads, then stop it before continuing.
-10. Commit and push your changes. Mintlify deploys automatically on push.
-11. Needs me: If I want a custom domain, run `mint add-domain `. It prints the DNS records I need to add with my domain provider. Tell me the DNS records, since only I can configure them at my registrar. Make it clear that this is a step I must complete.
-12. Confirm my site is live: fetch `https://.mintlify.site` (find the subdomain via `mint status`) and confirm it loads. If I added a custom domain in step 11, also fetch that domain and confirm it loads before calling this step done—DNS propagation can lag, so retry a few times before treating a failed fetch as an error.
-13. Set yourself up to keep working here: install the [Mintlify skill](https://mintlify.com/docs/ai/skillmd.md) with `npx skills add https://mintlify.com/docs`, then register the [admin MCP server](https://mintlify.com/docs/ai/model-context-protocol.md) at `https://mcp.mintlify.com` for your specific tool. For example, `claude mcp add --transport http mintlify https://mcp.mintlify.com` for Claude Code or fetch https://mintlify.com/docs/ai/mintlify-mcp.md for instructions for Claude, Cursor, Codex, or ChatGPT. Do this step yourself—don't ask me to run these commands.
-14. Needs me: the first admin MCP tool call opens a browser window for OAuth login. Approve it there. Most tools don't load newly added MCP servers mid-session — if the Mintlify tools don't show up, tell me to restart you and we'll pick up from here.
-15. If any command fails in a way not covered above, stop and tell me the exact error rather than guessing or retrying blindly. If it looks like something's wrong on Mintlify's end rather than in what you're doing, check https://status.mintlify.com or point me to https://mintlify.com/docs/contact-support.
-
-
-{/* vale on */}
diff --git a/snippets/setup-agent-prompt-text.mdx b/snippets/setup-prompt.jsx
similarity index 62%
rename from snippets/setup-agent-prompt-text.mdx
rename to snippets/setup-prompt.jsx
index 02f4414197..54ac2a1dbc 100644
--- a/snippets/setup-agent-prompt-text.mdx
+++ b/snippets/setup-prompt.jsx
@@ -1,13 +1,12 @@
-{/* vale off */}
+// The agent setup prompt and the card that displays it, used on the home page
+// and the quickstart. This is the only copy of the prompt. The built-in
+// component copies its children's source text, so it can't render a
+// variable, and snippets can't import other snippets. The prompt lives inside
+// the component because Mintlify only extracts the imported export from a
+// snippet, not other module-level constants.
-{/* The agent setup prompt as a string, for the introduction page's collapsible
- prompt card. It is a verbatim copy of the body in
- /snippets/setup-agent-prompt.mdx — the component serializes its
- children's source instead of evaluating them, so it cannot be handed this
- variable. EDIT BOTH FILES TOGETHER; .github/workflows/check-prompt-sync.yml
- fails the build if they drift. */}
-
-export const SETUP_AGENT_PROMPT = `Get my documentation live on a published Mintlify site. You are successfully done when you give me the live URL and confirm it loads. Tell me clearly whenever a step needs my input—do everything else yourself. If this prompt was pasted before (for example, after a restart), continue from where things left off instead of starting over. If you don't have terminal or command execution access, tell me to follow the manual steps at [mintlify.com/start](https://mintlify.com/start) instead. Everything below requires running commands and requires Node.js v20.17.0+ (LTS versions recommended).
+export const SetupPrompt = () => {
+ const prompt = `Get my documentation live on a published Mintlify site. You are successfully done when you give me the live URL and confirm it loads. Tell me clearly whenever a step needs my input—do everything else yourself. If this prompt was pasted before (for example, after a restart), continue from where things left off instead of starting over. If you don't have terminal or command execution access, tell me to follow the manual steps at [mintlify.com/start](https://mintlify.com/start) instead. Everything below requires running commands and requires Node.js v20.17.0+ (LTS versions recommended).
1. Ask for my existing content that will be used for my Mintlify site. This may be a local folder or a repo. Verify the source before building: echo back exactly what you're reading and list its top-level contents so I can confirm it's right. If you can't access something I named (private repos return 404, same as nonexistent), stop and ask. Never substitute a different source.
2. Check whether \`mint\` is installed with \`mint --version\`. If it's missing, install it with \`npm i -g mint\` (or \`pnpm add -g mint\`). If it's already installed, run \`mint update\` instead of reinstalling.
@@ -27,4 +26,59 @@ export const SETUP_AGENT_PROMPT = `Get my documentation live on a published Mint
14. Needs me: the first admin MCP tool call opens a browser window for OAuth login. Approve it there. Most tools don't load newly added MCP servers mid-session — if the Mintlify tools don't show up, tell me to restart you and we'll pick up from here.
15. If any command fails in a way not covered above, stop and tell me the exact error rather than guessing or retrying blindly. If it looks like something's wrong on Mintlify's end rather than in what you're doing, check https://status.mintlify.com or point me to https://mintlify.com/docs/contact-support.`;
-{/* vale on */}
+ const [copied, setCopied] = useState(false);
+ const [expanded, setExpanded] = useState(false);
+
+ const copy = () => {
+ navigator.clipboard
+ .writeText(prompt)
+ .then(() => {
+ setCopied(true);
+ setTimeout(() => setCopied(false), 1600);
+ })
+ .catch(() => {
+ // Clipboard access can be denied. Expand the prompt so it can be copied by hand.
+ setExpanded(true);
+ });
+ };
+
+ return (
+