lang-python

Analyze Python public API surfaces via __all__ and naming conventions.

6|Updated Feb 28, 2026
One-click install
npx skills add https://github.com/xiaolai/docs-guardian-for-claude --skill lang-python-xiaolai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lang-python
Source: https://github.com/xiaolai/docs-guardian-for-claude/tree/main/skills/docs-guardian/languages/python
Command: npx skills add https://github.com/xiaolai/docs-guardian-for-claude --skill lang-python-xiaolai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Python projects often lack a consistent public API surface and uniform docstring formats, making API usage unclear and hard to maintain. This Skill analyzes Python modules to identify public symbols, respects all if present, and filters out internal members based on naming conventions.

Core Features & Use Cases

  • Public API surface detection using all and naming rules to determine module-level visibility.
  • Support for common docstring formats (Google, NumPy, Sphinx) to extract parameter and return information.
  • Documentation completeness checks and guidance to align code and docs across projects.

Quick Start

Run the Python language adapter on your codebase to identify public API surfaces, docstring formats, and documentation conventions.

Frequently Asked Questions about lang-python

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

FAQPage Schema
How do I detect the public API surface in a Python project?

Python public API surface detection works by analyzing __all__ declarations and applying naming conventions to determine module-level visibility. It identifies exposed functions, classes, methods, constants, and type aliases while filtering out internal members.

How do I check Python docstrings for missing parameter and return descriptions?

To check Python docstrings for missing parameter and return descriptions, parse Google, NumPy, or Sphinx formats to extract documentation expectations. The analysis highlights missing parameter and return descriptions and verifies alignment with code.

What is the best way to enforce documentation conventions across Python modules?

The best way to enforce documentation conventions across Python modules is to apply code analysis that extracts documentation expectations from Google, NumPy, and Sphinx formats. This provides structured results highlighting missing docstrings and verifying alignment with code.

Does the public API detection respect __all__ declarations in Python?

Yes, public API detection respects __all__ declarations in Python. If __all__ is present, the analysis uses it to determine module-level visibility; otherwise, it filters out internal members based on standard naming conventions.

Can I extract type aliases and constants as part of a Python public API surface?

Yes, you can extract type aliases and constants as part of a Python public API surface. The detection applies across functions, classes, methods, constants, and type aliases to comprehensively determine module-level visibility.

Why are my Python docstrings flagged as incomplete when using Sphinx format?

Python docstrings are flagged as incomplete when using Sphinx format if the analysis detects missing parameter or return descriptions, or finds misalignment between the documented expectations and the actual code signature.