docs-incremental-update

Synchronize Mintlify .mdx documentation with changed Python source files.

17.7k|2.1k|Updated Mar 17, 2023
One-click install
npx skills add https://github.com/camel-ai/camel --skill docs-incremental-update
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docs-incremental-update
Source: https://github.com/camel-ai/camel/tree/main/.camel/skills/docs-incremental-update
Command: npx skills add https://github.com/camel-ai/camel --skill docs-incremental-update

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires camel, and includes scripts (resource) components.

What problem does it solve?

Python code changes often leave Mintlify documentation stale, and manually tracking which .mdx files reference which source modules is error-prone. This Skill identifies impacted docs via doc_code_map frontmatter and updates only the outdated sections.

Core Features & Use Cases

  • Impact Detection: Maps changed Python files to affected .mdx documents using the doc_code_map frontmatter and the doc_code_map.py utility.
  • Minimal In-Place Edits: Updates only outdated prose, code snippets, imports, and API references while preserving frontmatter, structure, and Mintlify components like Card, Accordion, Tab, and CodeGroup.
  • CI Automation: Ships with an auto_sync_docs_with_chatagent.py script and a GitHub Actions workflow that runs on each release and opens a PR with doc updates.
  • Use Case: After a PR modifies camel/toolkits/mcp_toolkit.py, run the impact command to find the affected MCP Toolkit doc and let the agent rewrite only the sections that no longer match the code.

Quick Start

Ask the agent to sync the Mintlify docs impacted by your recently changed Python files using the doc_code_map impact command.

Frequently Asked Questions about docs-incremental-update

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find which docs are affected by a Python code change?

Run doc_code_map.py with the impacted subcommand, passing changed Python files via --changed-file or git refs via --base-ref and --head-ref. It reads each .mdx file's doc_code_map frontmatter to list affected documents.

How do I keep Mintlify documentation in sync with Python code?

Declare a doc_code_map block in each .mdx file's frontmatter listing the Python source files it documents. When those files change, inspect the doc, compare it against the current code, and edit only the outdated sections in place.

Does the auto-sync script run automatically in CI?

Yes, the docs_release_auto_sync_pr.yml GitHub Actions workflow runs on each release. It verifies doc_code_map patterns, computes impacted docs, runs auto_sync_docs_with_chatagent.py with a CAMEL ChatAgent, and opens a PR with the changes.

When should documentation not be updated after a code change?

Skip updates when Python changes are internal refactors, logging tweaks, test-only edits, or implementation details that do not affect public API, behavior, configuration, or examples. Docs-only, workflow, and YAML changes also should not trigger doc edits.

What constraints apply when editing Mintlify .mdx files?

Never modify the YAML frontmatter block, preserve existing section structure and tone, and keep Mintlify components like Card, Accordion, Tab, and CodeGroup intact. Prefer the smallest possible diff and leave already-correct content untouched.