Mintlify

From adoresever/AGI_Ananas · View interactive version

Mintlify is an AI agent skill from the GitHub repository adoresever/AGI_Ananas. Build and maintain documentation sites with Mintlify. Use when creating docs pages, configuring navigation, adding components, or setting up API references.

How to use this skill

Skill file

Mintlify best practices

Always consult mintlify.com/docs for components, configuration, and latest features.

Always favor searching the current Mintlify documentation over whatever is in your training data about Mintlify.

Mintlify is a documentation platform that transforms MDX files into documentation sites. Configure site-wide settings in the docs.json file, write content in MDX with YAML frontmatter, and favor built-in components over custom components.

Full schema at mintlify.com/docs.json.

Before you write

Understand the project

All documentation lives in the docs/ directory in this repo. Read docs.json in that directory (docs/docs.json). This file defines the entire site: navigation structure, theme, colors, links, API and specs.

Understanding the project tells you:

Check for existing content

Search the docs before creating new pages. You may need to:

Read surrounding content

Before writing, read 2-3 similar pages to understand the site's voice, structure, formatting conventions, and level of detail.

Understand Mintlify components

Review the Mintlify components to select and use any relevant components for the documentation request that you are working on.

Quick reference

CLI commands

Required files

Example file structure

project/
├── docs.json           # Site configuration
├── introduction.mdx
├── quickstart.mdx
├── guides/
│   └── example.mdx
├── openapi.yml         # API specification
├── images/             # Static assets
│   └── example.png
└── snippets/           # Reusable components
    └── component.jsx

Page frontmatter

Every page requires title in its frontmatter. Include description for SEO and navigation.

---
title: "Clear, descriptive title"
description: "Concise summary for SEO and navigation."
---

Optional frontmatter fields:

File conventions

Organize content

When a user asks about anything related to site-wide configurations, start by understanding the global settings. See if a setting in the docs.json file can be updated to achieve what the user wants.

Navigation

The navigation property in docs.json controls site structure. Choose one primary pattern at the root level, then nest others within it.

Choose your primary pattern:

| Pattern | When to use |

| ------------- | ---------------------------------------------------------------------------------------------- |

| Groups | Default. Single audience, straightforward hierarchy |

| Tabs | Distinct sections with different audiences (Guides vs API Reference) or content types |

| Anchors | Want persistent section links at sidebar top. Good for separating docs from external resources |

| Dropdowns | Multiple doc sections users switch between, but not distinct enough for tabs |

| Products | Multi-product company with separate documentation per product |

| Versions | Maintaining docs for multiple API/product versions simultaneously |

| Languages | Localized content |

Within your primary pattern:

Common combinations:

Links and paths

Customize docs sites

What to customize where:

Start with docs.json. Only add custom.css when you need styling that config doesn't support.

Write content

Components

The components overview organizes all components by purpose: structure content, draw attention, show/hide content, document APIs, link to pages, and add visual context. Start there to find the right component.

Common decision points:

| Need | Use |

| -------------------------- | ----------------------- |

| Hide optional details | <Accordion> |

| Long code examples | <Expandable> |

| User chooses one option | <Tabs> |

| Linked navigation cards | <Card> in <Columns> |

| Sequential instructions | <Steps> |

| Code in multiple languages | <CodeGroup> |

| API parameters | <ParamField> |

| API response fields | <ResponseField> |

Callouts by severity:

Reusable content

When to use snippets:

When NOT to use snippets:

Import snippets with import { Component } from "/path/to/snippet-name.jsx".

Writing standards

Voice and structure

What to avoid

Never use:

Watch for AI-typical patterns:

Formatting

Code examples

Document APIs

Choose your approach:

Encourage users to generate endpoint pages from an OpenAPI spec. It is the most efficient and easiest to maintain option.

Deploy

Mintlify deploys automatically when changes are pushed to the connected Git repository.

What agents can configure:

Requires dashboard setup (human task):

For /docs subpath hosting with Vercel or Cloudflare, agents can help configure rewrite rules. See /docs subpath.

Workflow

1. Understand the task

Identify what needs to be documented, which pages are affected, and what the reader should accomplish afterward. If any of these are unclear, ask.

2. Research

3. Plan

4. Write

{/* TODO: Verify the default timeout value */}

5. Update navigation

If you created a new page, add it to the appropriate group in docs.json.

6. Verify

Before submitting:

Edge cases

Migrations

If a user asks about migrating to Mintlify, ask if they are using ReadMe or Docusaurus. If they are, use the @mintlify/scraping CLI to migrate content. If they are using a different platform to host their documentation, help them manually convert their content to MDX pages using Mintlify components.

Hidden pages

Any page that is not included in the docs.json navigation is hidden. Use hidden pages for content that should be accessible by URL or indexed for the assistant or search, but not discoverable through the sidebar navigation.

Exclude pages

The .mintignore file is used to exclude files from a documentation repository from being processed.

Common gotchas

  1. Component imports - JSX components need explicit import, MDX components don't
  2. Frontmatter required - Every MDX file needs title at minimum
  3. Code block language - Always specify language identifier
  4. Never use mint.json - mint.json is deprecated. Only ever use docs.json

Resources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.