python-docs
Skill4 starsChanged 6 months agoMITView on GitHub
Create, update, and sync Python project documentation from source code. Use when asked to document a module, generate API references, create architecture diagrams with Mermaid, update docs after code changes, or keep documentation in sync with source. Triggers include "document", "write docs", "update docs", "sync docs", "architecture diagram", "module docs", "API reference", "document this module", "docs are outdated", or when code changes require corresponding documentation updates.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- Sean-Michael/skillstheir own version, first seen Mar 18, 2026
- StacklokLabs/skills-mcptheir own version, first seen Jan 7, 2026
- jarosser06/drifttheir own version, first seen Dec 9, 2025
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- StacklokLabs/skills-mcp★ 4same name
- jarosser06/drift★ 1same name
- Sean-Michael/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository37 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- adaptSkill
- animateSkill
- arrangeSkill
- auditSkill
- bolderSkill
- clarifySkill
- code-refactorSkill
- colorizeSkill
- critiqueSkill
- delightSkill
- distillSkill
- extractSkill
- frontend-designSkill
- gitlab-integrationSkill
- git-operationsSkill
- hardenSkill
- industrial-ai-researchSkill
- latex-paper-enSkill
- latex-thesis-zhSkill
- mermaid-diagramsSkill
- normalizeSkill
- onboardSkill
- optimizeSkill
- overdriveSkill
- paper-auditSkill
- polishSkill
- pydanticSkill
- python-best-practicesSkill
- pytorch-lightningSkill
- quieterSkill
- remotion-best-practicesSkill
- research-paper-writingSkill
- skill-creatorSkill
- teach-impeccableSkill
- typesetSkill
- typst-paperSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 42
Update the relevant index (docs/artalk/README.md or docs/README.md)
- Distinctive: line 44
Verify no broken relative links remain
- Very specific: line 70
Only document public API (no _private members unless they are essential)
- Distinctive: line 72
Use exact types from source — do not generalize or simplify
- Distinctive: line 105
When source code changes, update corresponding documentation.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Python Documentation
Generate and maintain documentation for Python projects by analyzing source code.
Docs Folder Layout
docs/
├── README.md # Project-level documentation index
├── artalk/ # ARTalk package docs (maps to src/artalk/)
│ ├── README.md # ARTalk docs index with module table
│ ├── architecture.md # System architecture with Mermaid diagrams
│ ├── core.md # Core types, config, constants
│ └── pipeline.md # High-level orchestration API
└── modules/ # Non-ARTalk module docs (maps to other src/ packages)
├── _template.md # Template for new module docs
├── logging_utils.md # Logging utilities (maps to src/logging_utils/)
└── segmentation.md # Segmentation module (maps to src/segmentation/)File Placement Rules
| Source location | Doc location | Index to update |
src/artalk/ | docs/artalk/<module>.md | docs/artalk/README.md module table |
src/artalk/ (architecture) | docs/artalk/architecture.md | docs/artalk/README.md module table |
src/<other_pkg>/ | docs/modules/<pkg>.md | docs/README.md structure tree |
- ARTalk sub-module docs go in
docs/artalk/(e.g.,motion.md,renderer.md,tracking.md) - Non-ARTalk package docs go in
docs/modules/ - New module doc template lives at
docs/modules/_template.md - Cross-references between artalk docs use relative paths:
[core.md](core.md) - Cross-references from modules/ to artalk/ use:
[artalk](../artalk/)
After Creating/Moving Any Doc
- Update the relevant index (
docs/artalk/README.mdordocs/README.md) - Fix all cross-reference links affected by the change
- Verify no broken relative links remain
Workflow Selection
| Request | Workflow |
| Document a module | Create Module Doc |
| Architecture / system diagram | Create Architecture Doc |
| Code changed, update docs | Sync Docs |
| Check doc accuracy | Sync Docs (audit mode) |
Create Module Doc
- Determine doc location — use the file placement rules above
- Explore the module — read
__init__.py, all.pyfiles, identify public classes, functions, protocols, constants - Extract structure:
- Classes: name, bases, fields (with types and defaults), methods (with signatures)
- Functions: name, params, return type, docstring summary
- Constants: name, value, type
- Protocols/ABCs: interface contracts
- Identify relationships — imports between modules, inheritance, composition, protocol implementations
- Write the doc using the template in references/module-template.md
- Update the index — add entry to
docs/artalk/README.mdmodule table ordocs/README.mdstructure tree - Verify accuracy — cross-check every class name, method signature, and constant value against source
Key rules:
- Only document public API (no
_privatemembers unless they are essential) - Include runnable code examples with expected output
- Use exact types from source — do not generalize or simplify
- Link to related module docs with relative paths
Create Architecture Doc
- Map the package — identify all top-level modules and sub-modules
- Trace dependencies — grep imports to build the dependency graph
- Identify data flow — follow primary data types through the pipeline, noting tensor shapes or type transformations
- Select diagrams from patterns in references/architecture-template.md:
- System overview (flowchart TD)
- Module dependency graph (flowchart TD)
- Data flow with types/shapes (flowchart TD)
- Configuration hierarchy (classDiagram)
- Subsystem detail (flowchart TD per subsystem)
- Write the doc — place in the appropriate package docs dir (e.g.,
docs/artalk/architecture.md) - Update the index — ensure architecture doc is listed in the package README
- Validate Mermaid — ensure all
```mermaidblocks use valid syntax: correct diagram type keyword, quoted labels with special characters, proper arrow syntax
Mermaid quick reference:
flowchart TD — top-down flowchart
flowchart LR — left-right flowchart
classDiagram — class/config hierarchy
sequenceDiagram — temporal interactions
graph LR/TD — simple directed graphNode syntax: ID["Label with<br/>line break"], ID{Decision}, ID([Rounded])
Edge syntax: A --> B, A -->|label| B, A -.->|dashed| B
Subgraphs: subgraph "Title" ... end
Sync Docs
When source code changes, update corresponding documentation.
- Detect changes — use
git diff(or compare source vs docs) to identify what changed:- New classes, functions, or modules
- Renamed or removed public API
- Changed signatures, types, or default values
- New constants or configuration fields
- Map changes to docs — use the source-to-doc mapping in references/sync-workflow.md
- Apply updates following the checklist in references/sync-workflow.md
- Verify — confirm every change in source is reflected in docs, and no stale references remain
Priority order for sync:
- Breaking changes — removed/renamed API, changed signatures
- New public API — new classes, functions, modules
- Value changes — updated constants, defaults, config fields
- Diagrams — update architecture diagrams if module structure or data flow changed
- Index files — update
docs/artalk/README.mdanddocs/README.mdif structure changed
Documentation Style
- Heading hierarchy:
#doc title,##sections,###subsections,####items - Tables for API references (method, description), config options, constants
- Code blocks with language tag (
python,bash,yaml,mermaid) - Cross-references as relative markdown links:
[core.md](core.md) - Footer with package version and last-updated date
- Concise prose — one sentence per concept, no filler
- Match existing doc style in the project when updating
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

