Update documentation pages to match source code changes on the current branch
54
61%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.claude/skills/update-docs/SKILL.mdUpdate documentation pages to reflect source code changes on the current branch. Analyzes the diff against main, maps changed source files to their corresponding doc pages, and makes targeted edits.
/update-docs [DOCS_PATH]DOCS_PATH (optional): Path to the docs repository root. If not provided, ask the user.Examples:
/update-docs /Users/me/src/docs/update-docsIf DOCS_PATH was provided as an argument, use it. Otherwise, ask the user for the path to their docs repository.
Verify the path exists and contains api-reference/server/services/ subdirectory.
Get the current pipecat branch name:
git rev-parse --abbrev-ref HEADIn the docs repo, create a new branch off main with a matching name:
cd DOCS_PATH && git checkout main && git pull && git checkout -b {branch-name}-docsFor example, if the pipecat branch is feat/new-service, the docs branch becomes feat/new-service-docs.
All doc edits in subsequent steps are made on this branch.
Run:
git diff main..HEAD --name-onlyFilter to files that could affect documentation:
src/pipecat/services/**/*.py (service implementations)src/pipecat/transports/**/*.py (transport implementations)src/pipecat/serializers/**/*.py (serializer implementations)src/pipecat/processors/**/*.py (processor implementations)src/pipecat/audio/**/*.py (audio utilities)src/pipecat/turns/**/*.py (turn management)src/pipecat/observers/**/*.py (observers)src/pipecat/pipeline/**/*.py (pipeline core)src/pipecat/flows/**/*.py (Pipecat Flows)Ignore __init__.py, __pycache__, test files, and files that only contain type re-exports.
For each changed source file, resolve the doc page to edit. Read the mapping file at .claude/skills/update-docs/SOURCE_DOC_MAPPING.md and apply this resolution order. Confirm every candidate path exists in DOCS_PATH before using it.
.mdx file exists (glob/ls it under DOCS_PATH). If it exists, use it.DOCS_PATH for the file's main class name (see the mapping file's Search section).Never edit a path you haven't confirmed exists. If a candidate path doesn't resolve, fall through to the search step.
For each mapped pair:
git diff main..HEAD -- <source_file>Identify what changed by comparing source to docs:
__init__ signature to the Configuration section's <ParamField> entriesInputParams(BaseModel) class fields to the InputParams table_register_event_handler calls and event handler definitions to Event Handlers sectionFor each doc page that needs updates, edit only the sections that need changes. Preserve all other content exactly as-is.
<ParamField> tags, use them; if it uses tables, use tablesConfiguration (constructor params):
<ParamField path="name" type="type" default="value"> format if the page already uses itInputParams (runtime settings):
| Parameter | Type | Default | Description |InputParams(BaseModel) classUsage (code examples):
Notes:
Event Handlers:
Overview / Key Features / Prerequisites:
Guides at DOCS_PATH/pipecat/ and DOCS_PATH/pipecat-flows/ reference specific class names, parameters, imports, and code patterns. After completing reference doc edits, check if any guides need updates too.
For each changed source file, collect the class names, renamed parameters, and changed imports from the diff. Search the guides directory:
grep -rl "ClassName\|old_param_name" DOCS_PATH/pipecat/ DOCS_PATH/pipecat-flows/For each guide that references changed code:
Guide directories:
pipecat/learn/ — conceptual tutorials (pipeline, LLM, STT, TTS, etc.)pipecat/fundamentals/ — practical how-tos (metrics, recording, transcripts, etc.)pipecat/features/ — feature-specific guides (Gemini Live, OpenAI audio, WhatsApp, etc.)pipecat/telephony/ — telephony integration guides (Twilio, Plivo, Telnyx, etc.)pipecat-flows/guides/ — Pipecat Flows guides (nodes-and-messages, functions, context-strategies, state-management, actions); check these when src/pipecat/flows/** changedAfter processing all mapped pairs, check for two kinds of gaps:
Missing pages: Source files that resolved to no doc page (pattern, non-standard table, and search all came up empty) and are not on the skip list. For each, tell the user:
Missing sections: Mapped doc pages that are missing standard sections compared to the source. For example, a transport page with no Configuration section, or a service page with no InputParams table when the source defines InputParams(BaseModel). Flag these and offer to add the missing sections.
If the user wants a new page, do all three of the following:
Create the new .mdx file under DOCS_PATH/api-reference/server/services/{category}/{provider}.mdx using this template structure:
---
title: "Service Name"
description: "Brief description"
---
## Overview
[Description from class docstring or source analysis]
<CardGroup cols={2}>
[Cards for API reference and examples if available]
</CardGroup>
## Installation
```bash
uv add "pipecat-ai[package-name]"[Environment variables and account setup]
[ParamField entries for constructor params]
[Table of InputParams fields, if the service has them]
[Minimal working example][Important caveats]
[Event table and example code]
#### 8b: Add to docs.json
Add the new page path to `DOCS_PATH/docs.json` in the correct navigation group. The path format is `api-reference/server/services/{category}/{provider}` (without the `.mdx` extension).
Find the matching group in the navigation structure:
- **STT** → `"group": "Speech-to-Text"` under Services
- **TTS** → `"group": "Text-to-Speech"` under Services
- **LLM** → `"group": "LLM"` under Services
- **S2S** → `"group": "Speech-to-Speech"` under Services
- **Transport** → `"group": "Transport"` under Services
- **Serializer** → `"group": "Serializers"` under Services
- **Image generation** → `"group": "Image Generation"` under Services
- **Video** → `"group": "Video"` under Services
- **Memory** → `"group": "Memory"` under Services
- **Vision** → `"group": "Vision"` under Services
- **Analytics** → `"group": "Analytics & Monitoring"` under Services
Insert the new entry **alphabetically** within the group's `pages` array. For example, adding a new STT service "foo":
```json
{
"group": "Speech-to-Text",
"pages": [
"api-reference/server/services/stt/assemblyai",
"api-reference/server/services/stt/aws",
...
"api-reference/server/services/stt/foo",
...
]
}Add a new row to the correct category table in DOCS_PATH/api-reference/server/services/supported-services.mdx.
Use this format:
| [DisplayName](/api-reference/server/services/{category}/{provider}) | `uv add "pipecat-ai[package]"` |To determine the correct values:
pyproject.toml extras or the import pattern in the source code. For example, if the service is in src/pipecat/services/foo/, the package is typically foo.No dependencies required instead.Insert the new row alphabetically within the table. Match the column alignment of the existing rows.
A new page's title and description become its llms.txt entry and its
citation label in AI tools, and the docs repo's metadata lint enforces them:
- Pipecat suffix (Mintlify appends it). Add a
sidebarTitle when the title runs past 30 chars.og:title if set, else title) — add an
og:title when another page already uses the same short title.The docs repo checks in llms.txt (a navigation-ordered index built from each
page's frontmatter) and llms-full.txt (every page's full body). Its metadata
lint fails when either is stale, so regenerate them after any page edit,
docs.json navigation change, or new page.
Prettier reflows MDX and llms-full.txt embeds the page bodies verbatim, so
formatting has to settle before generation:
cd DOCS_PATH
npx prettier --ignore-unknown --write <edited files>
node scripts/gen-llms-txt.mjsCommit the doc edits together with the regenerated llms.txt and
llms-full.txt. Generating before formatting leaves them stale — as does
relying on the repo's pre-commit hook, which formats pages after generation has
already run.
node scripts/docs-meta-lint.mjs reports the same staleness and frontmatter
findings CI will.
After all edits are complete, print a summary:
## Documentation Updates
### Updated reference pages
- `api-reference/server/services/stt/deepgram.mdx` — Updated Configuration (added `new_param`), InputParams (updated `language` default)
- `api-reference/server/services/tts/elevenlabs.mdx` — Updated Event Handlers (added `on_connected`)
- `api-reference/pipecat-flows/flow-manager.mdx` — Updated FlowManager constructor (added `new_param`)
### Updated guides
- `pipecat/learn/speech-to-text.mdx` — Updated code example (renamed `old_param` → `new_param`)
- `pipecat-flows/guides/state-management.mdx` — Updated FlowManager init example
### New service pages
- `api-reference/server/services/tts/newprovider.mdx` — Created page, added to docs.json (Text-to-Speech), added to supported-services.mdx
### Unmapped source files
- `src/pipecat/services/newprovider/tts.py` — NewProviderTTSService (no doc page exists)
### Skipped files
- `src/pipecat/services/ai_service.py` — internal base class[X], {placeholder}) or assistant meta ("I hope this helps") in a page — this skill runs unattended in CI, so nothing downstream will catch it.<ParamField>/table entry do. After editing a code example or renaming a param, re-read the surrounding prose for stale references.<ParamField> already format these inside tables.services/google/llm.py are shared bases. Check which services import from them and update all affected doc pages.Before finishing, verify:
docs.json in the correct group, alphabeticallysupported-services.mdx in the correct table, alphabeticallyllms.txt and llms-full.txt regenerated and committed6659b78
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.