LangChain Documentation Writer
Expert skill for creating and maintaining LangChain's unified documentation hosted on Mintlify platform.
Scope
**Apply these instructions to manually authored documentation only. Do NOT apply to:**
Files in `**/reference/**` directories (auto-generated API reference)Build artifacts and generated filesInstructions
1. Working Relationship
When assisting with documentation:
Push back on ideas when appropriate - cite sources and explain reasoningALWAYS ask for clarification rather than making assumptionsNEVER lie, guess, or make up information2. Project Context
Understand the technical foundation:
Format: MDX files with YAML frontmatter using Mintlify syntaxConfiguration: `docs.json` for navigation, theme, and settingsComponents: Standard Mintlify components3. Content Strategy
Follow these principles:
Document just enough for user success - avoid over-documentationPrioritize accuracy and usabilityMake content evergreen when possibleSearch for existing information before adding new content to avoid duplicationReference existing content when possibleCheck existing patterns for consistencyStart by making the smallest reasonable changes4. docs.json Configuration
When modifying `docs.json`:
Refer to the [docs.json schema](https://mintlify.com/docs.json)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"]
}
```
Note: Include trailing `/index` (no extension) to avoid parser warnings.
5. Frontmatter Requirements
Every MDX page must include:
`title`: Clear, descriptive, concise page title`description`: Concise summary for SEO/navigation6. Custom Code Language Fences
LangChain uses custom language fences for Python and JavaScript/TypeScript:
Use `:::python` for Python-specific contentUse `:::js` for JavaScript/TypeScript-specific contentClose both with `:::`**Important:** When these fences exist on a page like `/concepts/foo.mdx`, two pages are automatically generated:
`/python/concepts/foo.mdx``/javascript/concepts/foo.mdx`See `pipeline/preprocessors/markdown_preprocessor.py` for implementation details.
7. Snippets
Snippet files in `src/snippets/` are reusable MDX content:
Can be imported into multiple pagesUndergo special link preprocessing during buildAbsolute `/oss/` links are converted to relative paths**Critical:** When writing links in snippets, carefully read the docstrings and comments in `pipeline/core/builder.py` method `_process_snippet_markdown_file` (lines 807-872) to understand how snippet link preprocessing works.
8. Style Guide
Follow the [Google Developer Documentation Style Guide](https://developers.google.com/style):
**Required conventions:**
Second-person voice ("you")Prerequisites at start of procedural contentTest all code examples before publishingMatch style and formatting of existing pagesInclude both basic and advanced use casesLanguage tags on all code blocksAlt text on all imagesRoot relative paths for internal linksCorrect spelling and grammarSentence-case for headingsAmerican English spelling9. Do Not
**Never do the following:**
Skip frontmatter on any MDX fileUse absolute URLs for internal linksReview code blocks (denoted by triple backticks) as they are often incomplete snippetsInclude untested code examplesMake assumptions - always ask for clarificationInclude localization in relative links (e.g., `/python/` or `/javascript/`) - the build pipeline resolves these automatically10. Resources
For questions, refer to:
Mintlify MCP (if available)[Mintlify documentation](https://docs.mintlify.com/docs/introduction)[Google Developer Documentation Style Guide](https://developers.google.com/style)[Vale-compatible Google style guide](https://github.com/errata-ai/Google)Examples
Creating a New Documentation Page
```yaml
---
title: Getting Started with LangChain
description: Learn how to install and configure LangChain for your project
---
Getting Started with LangChain
Prerequisites:
Python 3.8+ or Node.js 16+Basic understanding of APIs:::python
```python
pip install langchain
```
:::
:::js
```javascript
npm install langchain
```
:::
```
Adding to Navigation
```json
{
"group": "Getting Started",
"pages": [
"getting-started/index",
"getting-started/installation",
"getting-started/quickstart"
]
}
```
Notes
Documentation quality directly impacts user successConsistency across all LangChain products is essentialAlways prioritize clarity and accuracy over comprehensivenessWhen in doubt, ask for clarification