Comprehensive guidelines for writing and maintaining LangChain documentation on Mintlify platform with MDX, consistent style, and proper structure.
Apply LangChain's unified documentation standards when working on manually authored documentation for LangChain products and services hosted on Mintlify.
Apply these instructions to manually authored documentation ONLY. Explicitly exclude:
For reference documentation, consult `.github/instructions/reference-docs.instructions.md`.
1. Push back on ideas when warranted - cite sources and explain reasoning
2. ALWAYS ask for clarification rather than making assumptions
3. NEVER lie, guess, or fabricate information
**Format:**
1. Document just enough for user success - balance completeness with clarity
2. Prioritize accuracy and usability
3. Make content evergreen when possible
4. Search for existing information before adding new content to avoid duplication
5. Reference existing content when appropriate
6. Check existing patterns for consistency
7. Start by making the smallest reasonable changes
1. Refer to the [docs.json schema](https://mintlify.com/docs.json) when building navigation
2. When adding a new group, ensure the root `index.mdx` is included in the `pages` array:
```json
{
"group": "New group",
"pages": ["new-group/index", "new-group/other-page"]
}
```
**Important:** Include the trailing `/index` (without extension). Omitting it causes Mintlify parser warnings.
Every MDX file must include:
```yaml
---
title: Clear, descriptive, concise page title
description: Concise summary for SEO/navigation
---
```
LangChain uses custom language fences for Python and JavaScript/TypeScript:
**Behavior:** If these fences exist on a page (e.g., `/concepts/foo.mdx`), the build creates two language-specific pages:
**Implementation:** See `pipeline/preprocessors/markdown_preprocessor.py`
Snippet files in `src/snippets/` are reusable MDX content importable into multiple pages.
**Critical:** Snippets undergo special link preprocessing that converts absolute `/oss/` links to relative paths. When writing links in snippets, carefully consider path segments.
**Reference:** Read docstrings and comments in `pipeline/core/builder.py` method `_process_snippet_markdown_file` (lines 807-872) to understand snippet link preprocessing behavior and path structure requirements.
Follow the [Google Developer Documentation Style Guide](https://developers.google.com/style). Also available as [Vale-compatible implementation](https://github.com/errata-ai/Google).
**Key Requirements:**
1. Do not skip frontmatter on any MDX file
2. Do not use absolute URLs for internal links
3. Do not review code blocks (denoted by ```) as they are often incomplete snippets
4. Do not include untested code examples
5. Do not make assumptions - always ask for clarification
6. Do not include localization in relative links (e.g., `/python/` or `/javascript/`) - the build pipeline resolves these automatically
1. **Before writing:** Search for existing content to avoid duplication
2. **While writing:** Follow Google Developer Documentation Style Guide
3. **Code examples:** Test thoroughly before publishing
4. **Links:** Use root-relative paths, no localization prefixes
5. **Images:** Always include descriptive alt text
6. **Formatting:** Match existing page structure and style
7. **Review:** Verify frontmatter, test links, check code blocks
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/langchain-documentation-guidelines-xrjjn4/raw