Back to list
jr2804

python-naming

by jr2804

This project converts MCP server configurations from any format into the one for your coding agent of choice - just by using any available LLM!

2🍴 0📅 Jan 21, 2026

SKILL.md


Python Naming Conventions

What I Do

Provide Python naming conventions for variables, functions, classes, constants, files, and directories.

Naming Rules

Variables and Functions

# 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

Classes

# Use PascalCase for classes
class DataProcessor:
    pass

class ConfigurationError(Exception):
    pass

Constants

# 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 = ","

Files and Directories

# 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

When to Use Me

Use this skill when:

  • Naming variables, functions, or classes
  • Defining constants
  • Creating file/directory path parameters
  • Reviewing code for naming consistency

Key Rules

  1. Clarity over brevity - user_input_path > uip
  2. Consistent conventions - Apply same pattern throughout
  3. Avoid magic values - Use constants for repeated values
  4. Type hints required - Always annotate types
  5. Domain-appropriate names - Use context-relevant terminology

Score

Total Score

75/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

Reviews

💬

Reviews coming soon