code-style-guide

定义项目统一的代码编写规范,涵盖 Python 编码格式、命名约定与文档标准,确保代码风格一致、可读性强且易于协作维护。

快捷安装

在终端运行此命令,即可一键安装该 Skill 到您的 Claude 中

npx skills add OpenHands/software-agent-sdk --skill "code-style-guide"

Code Style Guide

Follow these conventions for all code in this project.

Python

  • Use 4 spaces for indentation
  • Maximum line length: 88 characters (Black default)
  • Use type hints for function signatures
  • Prefer f-strings over .format() or % formatting

Naming Conventions

  • Classes: PascalCase
  • Functions/variables: snake_case
  • Constants: UPPER_SNAKE_CASE
  • Private members: _leading_underscore

Documentation

  • All public functions must have docstrings
  • Use Google-style docstrings
  • Include type information in docstrings when not using type hints