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-rolledsys.argvparsing. - Functional tests run against the scan simulator, never a real external service (see the workspace AGENTS.md).
04 同仓库更多 Skills
route-to-flow
Answer "what code implements this?" from a ticket, spec, or plain question — returns the registered call chain from the flow registry plus the impact of changing it.
release-note
Draft a release note from recent commits/closed tickets. Used in Part 2 of the session as the "simple skill" example.
implement-feature
Multi-step pipeline that takes a ticket from research to PR — research → spec → code → review + test → PR. Use for any ticket in agent-hub/tickets/.
git-open-pr
Draft well-structured Pull Request titles and descriptions. Use whenever the user wants to open a PR, write a pull request, draft a PR description, or prepare a PR for review — also when they give a ticket ID or branch name alongside code changes without saying "pull request".
git-commit
Use when suggesting a commit message, branching, staging, committing, merging, resolving conflicts, or pushing in any project of this workspace.