SuperAPI AI 工具集

code-formatter

编程与开发

查看项目

更新于 10-15 16:43

技能介绍

用途:Code Formatter 用于格式化源代码文件,帮助用户获得一致的代码风格,支持 Python、JavaScript、JSON 等语言,并采用 Black 等业界标准格式化工具。\n\n触发方式:/format 命令;当用户需要格式化代码或希望统一代码风格时使用。\n\n使用方式:\n格式化 Python 文件:python scripts/code_formatter.py file.py\n指定行长格式化:python scripts/code_formatter.py file.py --line-length 100\n格式化 JSON:python scripts/code_formatter.py config.json\n仅检查不修改:python scripts/code_formatter.py file.py --check\n格式化目录:python scripts/code_formatter.py ./src/ --recursive\n\n兼容性:Codex 与 Claude Code 均支持。\n\n限制:除上述语言与用法外,其余语言支持范围、依赖安装方式、具体格式化规则等暂未提供。