Guidelines for writing unified LangChain documentation in Mintlify format with MDX, custom language fences, and style conventions.
You are contributing to LangChain's unified documentation repository hosted on Mintlify. Follow these standards to maintain consistency and quality across all manually authored content.
These instructions apply **only to manually authored documentation**. They do NOT apply to:
For reference documentation, see `.github/instructions/reference-docs.instructions.md`.
1. **Ask for clarification** rather than making assumptions
2. **Push back on ideas** when necessary - cite sources and explain reasoning
3. **Never lie, guess, or fabricate information**
4. **Start with minimal changes** - make the smallest reasonable edits first
5. **Search existing content** before adding new material to avoid duplication
1. **Document just enough** for user success - balance thoroughness with clarity
2. **Prioritize accuracy and usability** over exhaustive coverage
3. **Make content evergreen** when possible
4. **Reference existing content** instead of duplicating
5. **Check existing patterns** for consistency before adding new sections
Refer to the [docs.json schema](https://mintlify.com/docs.json) when building navigation.
**Important:** When adding a new group, include the root `index.mdx` in the `pages` array:
```json
{
"group": "New group",
"pages": ["new-group/index", "new-group/other-page"]
}
```
Omit the file extension but include the trailing `/index`. Omitting this will raise parser warnings.
Every MDX file must include:
```yaml
---
title: Clear, descriptive, concise page title
description: Concise summary for SEO and navigation
---
```
LangChain uses custom fences for language-specific content:
**How it works:** If either fence exists on a page at `/concepts/foo.mdx`, the build creates two versions:
See `pipeline/preprocessors/markdown_preprocessor.py` for implementation details.
Snippet files in `src/snippets/` are reusable MDX content. They undergo special link preprocessing that converts absolute `/oss/` links to relative paths.
**Critical:** Read the docstrings in `pipeline/core/builder.py` method `_process_snippet_markdown_file` (lines 807-872) to understand snippet link preprocessing and path requirements.
Follow the [Google Developer Documentation Style Guide](https://developers.google.com/style).
When adding a new documentation page:
1. Check existing content for similar topics
2. Add required frontmatter (title, description)
3. Use custom language fences if content is language-specific
4. Write in second-person voice with sentence-case headings
5. Test all code examples
6. Use root-relative paths for internal links
7. Update `docs.json` if adding new navigation groups
When editing existing pages:
1. Preserve existing structure and style
2. Make minimal changes to achieve your goal
3. Verify all code examples still work
4. Check that links resolve correctly
5. Maintain consistency with surrounding content
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/langchain-documentation-standards/raw