360 Secure SkillHub
360 安全技能中心

Docstring Generator / 文档注释生成

从函数签名和类型提示推断参数、返回值与异常,自动生成中文 docstring 与内联注释,覆盖 Python、JavaScript、TypeScript、Rust;批量处理、项目风格学习与 AI 增强在材料中标注为 Pro 付费能力。

分类:开发
kingaiwork
kingaiwork
热度 0.00
最近更新 2026-07-05 16:10:09

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add kingaiwork/docstring-gen
兼容性
通用兼容
联网要求
联网要求未确认
数据出网
数据出网未确认
Metadata
name
docstring-gen
description
Auto-generate docstrings and comments from code signatures. / 从代码签名自动生成文档注释。
version
1.0.0
topics
["documentation","python","javascript","文档","注释"]
metadata
{"openclaw":{"requires":{"bins":["bash","curl"]},"emoji":"📄","homepage":"https://kingai.work/","install":[]}}

📄 Docstring Generator / 文档注释生成

Auto-generate docstrings and comments from code signatures. / 从代码签名自动生成文档注释。


Who This Is For / 适用人群

• A Python developer onboarded to a legacy codebase needs to understand hundreds of undocumented functions instantly. Docstring Generator rewrites every function's docstring in seconds. / 开发者接手遗留项目,函数全无注释,使用本工具批量生成文档,几秒内让旧代码清晰可维护。 • A TypeScript project enforces strict documentation standards before merge. The generator auto-creates JSDoc comments that pass linting rules. / 团队严格规定每个函数必须附带JSDoc注释,提交前自动生成通过lint校验的标准文档。 • An open-source maintainer wants to improve contributor experience. Using docstring-gen on the entire repo adds clear Chinese comments to all core functions. / 开源项目维护者希望让中文贡献者更好理解代码,一次运行即可为所有核心函数添加中文注释。

Core Capabilities / 核心能力

• Generates comprehensive docstrings from function signatures and type hints / 仅需函数签名,AI自动生成完整中文文档注释,注释风格可自定义,直接提升代码可读性 • Supports Python, JavaScript, TypeScript, and Rust / 覆盖主流编程语言,一键生成,告别手写注释的重复劳动 • Infers parameter descriptions and return values from context / 智能理解代码逻辑,自动推断参数含义与返回值,注释内容精准贴合实际 • Includes edge-case notes and usage examples in comments / 生成内容含边界情况说明与使用示例,让协作队友一目了然 • (Pro) Learns your project's comment style and naming conventions for consistent output / 专业版可学习项目注释风格与命名规范,全仓库注释风格统一 • (Pro) Generates inline comments for complex logic branches automatically / 专业版为复杂逻辑分支自动生成内联注释,大幅降低代码理解门槛

Try It Now / 立即体验

docstring-gen def parse_json(text: str) -> dict: Generates a docstring with Args, Returns, and Raises sections for the given function. / 为 parse_json 函数自动生成包含参数、返回值与异常说明的标准文档注释。 

Feature Comparison / 功能对比

Free Pro
Core / 核心 ✅ ✅
Batch / 批量 — ✅
AI / AI 增强 — ✅
SLA / 支持 Community Priority

• Unlock unlimited generation for large codebases with batch processing. • 解锁批量处理,大型代码库全量生成无限制,省去逐文件手动调用。 • Get consistent, project-tailored docstring style across your entire team. • 专业版定义全团队统一注释模板,代码规范落地更高效。 • Enable advanced comment generation for complex logic loops and conditionals. • 开启复杂逻辑循环与条件分支的高级内联注释,大幅降低代码理解时间。\n\n

     Upgrade Available    
  Free tier — zero config
  Pro tier — full automation + AI
  Enterprise — custom AI agents
  kingai.work

🖥️ RackNerd — 1GB KVM VPS / 高性能云服务器 https://my.racknerd.com/aff.php?aff=20179&pid=952

📈 moomoo — Stocks & Crypto Trading Up to $1,000 bonus / 最高 $1,000 奖励 https://j.moomoo.com/0CrlDz

Links / 链接