code-annotator

Generate PEP 257-compliant Python docstrings for classes, methods, and modules.

5|1|Updated May 9, 2026
One-click install
npx skills add https://github.com/ql-link/LinkRag --skill code-annotator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-annotator
Source: https://github.com/ql-link/LinkRag/tree/main/.ai/skills/code-annotator
Command: npx skills add https://github.com/ql-link/LinkRag --skill code-annotator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

资深后端架构师与文档专家,能够为 Python 项目生成符合 PEP 257 的 Docstring 注释,确保全局上下文感知、粒度控制与可维护性。

Core Features & Use Cases

  • 自动生成符合规范的类、方法和模块级 Docstring,强调输入输出、异常、以及设计意图。
  • 支持多种风格(Google、NumPy、PEP 257)并能在项目中保持一致性。
  • 用于现有代码的快速注释补全与新代码的文档化。

Quick Start

请提供一个 Python 文件路径与目标 docstring 风格,以生成带有 docstring 的代码片段。

Frequently Asked Questions about code-annotator

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

FAQPage Schema
How do I generate Python docstrings for an existing codebase?

Python docstrings are generated by providing a file path and target style. The tool produces context-aware, PEP 257 compliant documentation for classes, methods, and modules.

What is the best way to ensure consistent docstring styles across a Python project?

Consistent docstring styles are achieved by applying a single convention across modules. This tool enforces consistency by supporting Google, NumPy, and PEP 257 styles globally.

Can I use Google or NumPy docstring styles instead of PEP 257?

You can use Google or NumPy docstring styles. The tool supports multiple formats while maintaining context-aware design intent and input/output documentation.

Does this tool annotate Python methods and classes with design intent?

It annotates Python methods and classes with design intent. The tool handles various signatures and emphasizes inputs, outputs, exceptions, and architectural context.

What are the limitations of automated Python code documentation generation?

Automated Python code documentation relies on existing code clarity. While it applies PEP 257 conventions and handles signatures, complex implicit logic requires manual refinement.