name: sphinx-docs-sync description: Two-way comparison and synchronization of Sphinx documentation across sibling projects. Discovers discrepancies in conf.py, install.md, index.md toctree, pyproject.toml docs dependencies, extra-deps sections, readme badges, and static assets. Use when you want to align documentation structure, catch stale dependencies, or push improvements across your Sphinx-enabled repositories. model: sonnet disable-model-invocation: true allowed-tools: Bash, Read, Grep, Glob, Agent argument-hint: '[path-or-github-url ...]'
Context
![ -d docs ] && echo "docs/ exists" || echo "No docs/ directory"
![ -f docs/conf.py ] && head -5 docs/conf.py || echo "No docs/conf.py"
!ls ../*/docs/conf.py 2>/dev/null | head -20 || echo "No sibling projects with docs/conf.py"
Instructions
You audit Sphinx documentation consistency across sibling projects. Find discrepancies in both directions: improvements this project can borrow from siblings, and improvements this project can push to siblings.
This skill is the procedure layer; the rule layer is .claude/agents/sphinx-docs.md. It carries the canonical conventions: {click:run} directives, recipes for configuration.md/cli.md/install.md, the standard page roster, conf.py hygiene, MyST/admonition rules, high-frequency lapses. When a discrepancy maps to a rule, cite the agent section so the user reads the rationale alongside the proposed change. When you find a pattern not yet codified, propose adding it to the agent rather than fixing it in each repo independently.
Discover projects
If $ARGUMENTS are provided, each argument is a local directory path or a GitHub repository URL (https://github.com/owner/repo or owner/repo). For GitHub URLs, clone into a tmpdir with gh repo clone. Otherwise, scan the parent directory of the cwd for projects with a docs/conf.py.
Filter out forks: check git remote get-url origin and skip projects whose upstream repo name doesn't match the directory name (a local click/ pointing to a fork of pallets/click). Focus on the user's own projects.
List the discovered projects and confirm with the user before proceeding.
Collect documentation inventory
For each project, collect (parallelize with sub-Agents when possible). For each artifact, the agent section in parentheses is where the convention lives — diff the project against that section, not against your own preferences.
docs/conf.py(agent §docs/conf.pyhygiene, § Standard extension set). Read the full file. Surface settings present in some projects but missing from others; deprecated/renamed settings; conditional imports for Python versions below the project's floor;read_text()calls withoutencoding=. Cross-check the extension list against the canonical set; flag projects missingsphinx_issues,sphinxext.opengraph, orsphinxcontrib.mermaidthat would benefit from them. Confirmmyst_enable_extensionsmatches the canonical alphabetized list. Verifyclick_extra.sphinx.myst_docstringsordering (must precedesphinx_autodoc_typehints) and correspondingclick-extra[sphinx]entry in[dependency-groups] docs.conf.pywarning/strictness governance (agent §suppress_warningsgovernance, §nitpick_ignoregovernance, § Linkcheck and intersphinx). Audit eachsuppress_warnings,nitpick_ignore, andlinkcheck_ignoreentry: does it carry a comment naming the failing case and the reason for suppression? Flag uncommented entries. Re-test linkcheck-ignored hosts on each audit pass; remove entries that have started working again. Suggest migrating per-anchorlinkcheck_anchors_ignorepatterns to per-hostlinkcheck_anchors_ignore_for_urlwhen the entire host is JS-rendered.docs/index.md(agent § Standard page roster). Diff toctree shape, page ordering, octicon icons (cross-check against the canonical octicon registry), and presence/absence of standard pages.docs/install.md(agent § Recipes ›install.md). Diff section roster, install-method tab order, executables table format, Repology badge, Python compatibility matrix structure, gh attestation verify section.docs/cli.mdanddocs/configuration.md(agent § Recipes). Diff the auto-region between markers and confirm the regenerator script (docs/docs_update.py) follows the same shape across projects.- Auto-region marker naming (agent § Auto-generated reference tables, marker naming convention). Grep all
docs/*.mdfor<!-- start -->/<!-- end -->pairs; flag any bare markers, recommend renaming to<!-- {feature}-{kind}-start -->. Confirm that named markers across siblings use consistent{kind}slugs (table,sankey,mindmap,autodata,automodule,autodoc,reference). - Theme assets (agent §
conf.pyhygiene › Theme assets and OpenGraph). Confirmhtml_logo = "assets/logo-square.svg",html_favicon = "assets/favicon.svg", andogp_image = "assets/banner-social-light.png"when banner assets exist. Flag projects withsphinxext.opengraphenabled but noogp_imageset. Suggest the user run/brand-assetson flagged projects to regenerate or backfill the asset set in one pass. sphinx_issuesmigration (agent § Migrating offsphinx_issues). Grep each project for{issue}/{pr}/{user}/{commit}(MyST) and:issue:/:pr:/:user:/:commit:(reST) across*.md,*.rst,*.py. Flag every occurrence and offer to apply the migration recipe in one pass per repo. After replacement, drop"sphinx_issues"fromextensionsinconf.py,"sphinx-issues>=…"from[dependency-groups] docs, and anyissues_github_pathsetting unused by other extensions.pyproject.tomldocs dependency group. Compare against whatconf.pyactually imports — flag undeclared imports and declared-but-unimported deps. Don't change version pins unless provably stale (a conditional dep on a Python version below the project's floor; a transitively-constrained loose pin held by a meta-extra likeclick-extra[sphinx]).readme.md. Compare badge sets and section structure. Flag a## Developmentsection whenclaude.mdexists in the same repo (per agent § High-frequency lapses).- Sphinx tests (agent § Sphinx tests). Look for
tests/sphinx/,tests/test_sphinx_*.py, ortest_sphinx_crossrefs.py. Note which projects have render-tests and which don't; suggest adopting cross-reference render tests where the docs surface complex{role}cross-refs. - Static assets and auto-generated files. Compare
docs/_static/,docs/assets/,.rstfiles,docs_update.py. Hunt for stale.rstorphans from past package renames.
Compare and report
Present findings as tables organized by category:
### Category name
| Issue | Severity | Direction | Projects |
|:------|:---------|:----------|:---------|
| description (cite agent § X) | bug/align/enhance | borrow/push | list |
Group, in this order:
- Bug fixes (stale deps, missing declared deps, broken links).
- Structural alignment (toctree, page naming,
conf.pysettings). - Content improvements (install.md sections, extra-deps tables, badges).
For each row, name the agent section that authorizes the change (e.g., "agent § Standard page roster: docs/agents toctree entry missing"). If a discrepancy doesn't map to any agent section, flag it as a candidate for new agent content rather than a fix to push.
Implement
After presenting the report, ask the user which items to apply. When they confirm, group edits by project to minimize context switches.
Procedural guards
These are about how you run the audit, not what counts as a violation:
- Always verify file existence before recommending changes based on cross-project patterns. A "missing" file may not apply (e.g., shell completion only matters for CLI projects; binaries only for projects with
nuitka.enabledin[tool.repomatic]). - When a dependency appears in multiple groups (main, extras, docs), the version may be intentionally loose in one group because it's transitively constrained. Verify before flagging.
- Respect project-specific opt-outs:
[tool.repomatic] excludeandincludelists are authoritative. A page or component listed inexcludeis intentionally absent. - Never silently bump a version pin. Loose pins are sometimes intentional; tight pins always have a reason. Flag, don't fix.
Next steps
Suggest the user run:
/repomatic-auditfor broader workflow and config alignment across the same projects./repomatic-depsto analyze dependency graphs for projects with stale or divergent docs deps.- Opting into the
sphinx-docsagent (repomatic init agents/sphinx-docs) on any project that drifted significantly — Claude will then auto-load the conventions when working in that repo.
API Documentation Generator
Documentation
Automatically generates OpenAPI/Swagger API documentation.
Technical Writer
Documentation
Writes clear technical documentation following top style guides.
Project Documentation Lookup
Documentation
Find project information in the docs/ folder using a three-step strategy: orient, locate the right file, report.