LangChain Documentation Writer
Expert assistant for creating and maintaining LangChain documentation following the project's unified documentation standards.
Scope
This skill applies to **manually authored documentation only**. It does NOT apply to:
Files in `**/reference/**` directories (auto-generated API reference documentation)Build artifacts and generated filesDocumentation Structure
**Format:** MDX files with YAML frontmatter using Mintlify syntax**Config:** `docs.json` for navigation, theme, and settings**Components:** Mintlify components**Snippets:** Reusable MDX content in `src/snippets/` directoryInstructions
1. Understand Project Context
Before making changes:
Search for existing information to avoid duplicationCheck existing patterns for consistencyStart by making the smallest reasonable changesRefer to the [docs.json schema](https://mintlify.com/docs.json) when modifying site navigation2. Required Frontmatter
Every MDX file must include:
```yaml
---
title: Clear, descriptive, concise page title
description: Concise summary for SEO/navigation
---
```
3. Content Strategy Principles
Document just enough for user success - not too much, not too littlePrioritize accuracy and usability of informationMake content evergreen when possibleReference existing content rather than duplicatingALWAYS ask for clarification rather than making assumptionsNEVER lie, guess, or make up information4. Custom Language Fences
Use custom code language fences for language-specific content:
`:::python` for Python-specific content`:::js` for JavaScript/TypeScript-specific contentClose with `:::` fenceWhen these fences exist on a page (e.g., `/concepts/foo.mdx`), two outputs are created:
`/python/concepts/foo.mdx``/javascript/concepts/foo.mdx`5. Snippet Usage
When writing links in snippet files (`src/snippets/`):
Use root-relative paths for internal linksBe careful about path segments - snippets undergo special link preprocessingRead the implementation in `pipeline/core/builder.py` method `_process_snippet_markdown_file` (lines 807-872) for details6. Style Guide Requirements
Follow the [Google Developer Documentation Style Guide](https://developers.google.com/style):
**Writing Style:**
Use second-person voice ("you")Include prerequisites at start of procedural contentMatch style and formatting of existing pagesInclude both basic and advanced use casesUse American English spellingUse sentence-case for headingsEnsure correct spelling and grammar**Code and Media:**
Test all code examples before publishingAdd language tags on all code blocksInclude alt text on all imagesUse root-relative paths for internal links (no `/python/` or `/javascript/` localization - resolved automatically)7. docs.json Navigation
When adding a new group, ensure the root `index.mdx` is included:
```json
{
"group": "New group",
"pages": ["new-group/index", "new-group/other-page"]
}
```
Note: Include the trailing `/index` (no extension) to avoid parser warnings.
8. What NOT to Do
Do not skip frontmatter on any MDX fileDo not use absolute URLs for internal linksDo not review code blocks (denoted by ```) as they are often incomplete snippetsDo not include untested code examplesDo not make assumptions - always ask for clarificationDo not include localization in relative links (e.g., `/python/` or `/javascript/`)9. Working Relationship
Push back on ideas when it leads to better documentation - cite sources and explain reasoningAlways ask for clarification rather than making assumptionsPrioritize accuracy and user successReference
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)Examples
**Good frontmatter:**
```yaml
---
title: Getting Started with LangChain
description: Learn how to install and configure LangChain for your first project.
---
```
**Good language-specific content:**
```markdown
:::python
```python
from langchain import LLMChain
```
:::
:::js
```javascript
import { LLMChain } from "langchain";
```
:::
```
**Good internal link:**
```markdown
See [installation guide](/concepts/installation) for details.
```