基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/jr2804/mcp-config-converter --skill python-naming命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | python-naming |
| description | Python naming conventions for variables, constants, files, and directories |
| license | MIT |
| compatibility | opencode |
| metadata | {"related_coding_principles":"For general coding standards, use skill `coding-principles`","related_python_guidelines":"For type annotations and style, use skill `python-guidelines`"} |
Provide Python naming conventions for variables, functions, classes, constants, files, and directories.
# Use snake_case for variables and functions
user_name = "alice"
input_data = get_input()
# Avoid single-letter names except for loop counters or math
for i in range(10): # OK - loop counter
x = coordinate[i] # OK - mathematical variable
# Avoid generic names
# BAD: data, info, temp, x, y
# GOOD: user_data, config_info, temp_file, user_coordinates
# Avoid abbreviations unless widely recognized
# BAD: usr_nm, cfg, calc_val
# GOOD: user_name, config, calculated_value
# Use PascalCase for classes
class DataProcessor:
pass
class ConfigurationError(Exception):
pass
# Use UPPER_SNAKE_CASE for constants
MAX_BUFFER_SIZE = 1024
DEFAULT_TIMEOUT_SECONDS = 30
# Define magic numbers as constants
INPUT_FILE_ENCODING = "utf-8"
OUTPUT_DELIMITER = ","
# Use _file suffix for filename variables
input_file: Path
output_file: Path
# Use _dir suffix for directory path variables
input_dir: Path
output_dir: Path
# NEVER mix these up
# BAD: input_file = Path("path/to/dir") # Confusing
# BAD: output_dir = Path("file.txt") # Confusing
# Use _path ONLY in rare exceptional cases when truly unclear
# Prefer _file or _dir instead
Use this skill when:
user_input_path > uip