원클릭으로
coding-principles
Universal coding principles and best practices for maintainable software
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Universal coding principles and best practices for maintainable software
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | coding-principles |
| description | Universal coding principles and best practices for maintainable software |
| license | MIT |
| compatibility | opencode |
| metadata | {"related_python_guidelines":"For Python-specific implementation, use skill `python-guidelines`","related_testing_strategy":"For testing approaches, use skill `testing-strategy`"} |
Provide universal coding principles and best practices that apply across programming languages and project types.
Maintainability:
Readability:
# Universal git workflow
# Feature branches: feature/<name>
# Bug fixes: fix/<description>
# Documentation: docs/<topic>
# Releases: release/v<version>
# Commit message format
# Type: feat, fix, docs, style, refactor, perf, test, chore
# Scope: optional module/component
# Subject: imperative, present tense, <50 chars
# Body: optional detailed explanation
# Footer: optional breaking changes, issue references
# Universal boolean flag pattern
class FeatureFlags:
def __init__(self, **flags):
self._flags = flags
def is_enabled(self, flag_name):
return self._flags.get(flag_name, False)
def enable(self, flag_name):
self._flags[flag_name] = True
def disable(self, flag_name):
self._flags[flag_name] = False
Use this skill when:
# Universal environment variable handling
import os
from typing import Optional
def get_env_var(name: str, default: Optional[str] = None) -> str:
"""Get environment variable with validation"""
value = os.environ.get(name, default)
if value is None:
raise ValueError(f"Required environment variable {name} not set")
return value
# Universal error handling
def safe_operation(func, *args, **kwargs):
"""Execute function with universal error handling"""
try:
return func(*args, **kwargs)
except Exception as e:
# Log error with context
log_error(f"Operation {func.__name__} failed: {str(e)}")
# Return graceful fallback
return get_fallback_value(func)
Applies to:
Python import style guidelines for absolute and relative imports
Python naming conventions for variables, constants, files, and directories
Python pathlib usage guidelines for file and directory operations
Python refactoring triggers and guidelines for code size limits
UV command-line usage patterns for Python project management
UV command automation and project lifecycle management patterns powered by the uv-mcp server