基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/jr2804/mcp-config-converter --skill coding-principles命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| 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: