AGENT SKILL

coding-convention

Python coding conventions for this workspace. Use when writing or reviewing Python in taskflow-api or scan-simulator — apply automatically, without asking for confirmation.

License 许可
MIT
最近更新
2026-07-29
Stars
★ 14
Forks
9

01 前言 Front Matter

name
coding-convention
description
Python coding conventions for this workspace. Use when writing or reviewing Python in taskflow-api or scan-simulator — apply automatically, without asking for confirmation.

03 SKILL.md 正文

Coding Convention — Python

Agent behaviour

When writing or reviewing Python code anywhere in this workspace, apply the rules below automatically — do not ask for confirmation.

Formatting

  • Indentation: 4 spaces, never tabs.
  • Formatter: autopep8 (format-on-save); otherwise follow PEP 8.
  • Max line length: keep lines reasonable; the formatter's limit wins over hand-wrapping debates.

Naming

Element Style Example
Script files lower_snake_case run_test.py
Classes UpperCamelCase TaskService, ScanClient
Methods, functions lower_snake_case close_task(), parse_result()
Variables lower_snake_case file_path, task_count
Constants UPPER_SNAKE_CASE MAX_RETRIES, DEFAULT_TIMEOUT

Rules

  • Python 3 only.
  • CLI scripts always parse arguments with argparse — no hand-rolled sys.argv parsing.
  • Functional tests run against the scan simulator, never a real external service (see the workspace AGENTS.md).

04 同仓库更多 Skills