swe-programming-python
Python coding standards from authoritative docs/explanation/software-engineering/programming-languages/python/ documentation
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Python coding standards from authoritative docs/explanation/software-engineering/programming-languages/python/ documentation
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
AI agent development standards including frontmatter structure, naming conventions, tool access patterns, model selection, and reference documentation structure
Comprehensive project planning standards for plans/ directory including folder structure (ideas/, backlog/, in-progress/, done/), stage-aware naming convention (done uses YYYY-MM-DD__identifier/; backlog and in-progress use identifier/ with no date prefix), five-document file organization (README.md, brd.md, prd.md, tech-docs.md, delivery.md for multi-file default; single README.md for trivially-small single-file exception), BRD/PRD content-placement rules, Gherkin acceptance criteria, and the mandatory structured multiple-choice grilling gates (pre-write and post-write) for resolving design decisions with the user. Essential for creating structured, executable project plans.
Trunk Based Development workflow - all development on main branch with small frequent commits, minimal branching, and continuous integration. Covers when branches are justified (exceptional cases only), commit patterns, feature flag usage for incomplete work, environment branch rules (deployment only), and AI agent default behavior (the repo-wide default delivery mode is `worktree-to-pr` -- a short-lived plan branch in a disposable worktree pushed to a draft PR; direct push to main remains available as an explicit selection). Essential for understanding repository git workflow and keeping branches short-lived
Workflow pattern standards for creating multi-agent orchestrations including YAML frontmatter (name, description, tags, status, agents, parameters), execution phases (sequential/parallel/conditional), agent coordination patterns, and Gherkin success criteria. Essential for defining reusable, validated workflow processes.
Common software development workflow patterns shared across all language developer agents
Three-stage content quality workflow pattern (Maker creates, Checker validates, Fixer remediates) with detailed execution workflows. Use when working with content quality workflows, validation processes, audit reports, or implementing maker/checker/fixer agent roles.
| name | swe-programming-python |
| description | Python coding standards from authoritative docs/explanation/software-engineering/programming-languages/python/ documentation |
Progressive disclosure of Python coding standards for agents writing Python code.
Authoritative Source: docs/explanation/software-engineering/programming-languages/python/README.md
Usage: Auto-loaded for agents when writing Python code. Provides quick reference to idioms, best practices, and antipatterns.
Modules and Packages: lowercase_with_underscores
user_account.py, payment_processor.pyClasses: PascalCase
UserAccount, PaymentProcessorFunctions and Variables: lowercase_with_underscores
calculate_total(), find_user_by_id()user_name, total_amountConstants: UPPER_CASE_WITH_UNDERSCORES
MAX_RETRIES, DEFAULT_TIMEOUT, API_ENDPOINTPrivate: Single leading underscore
_internal_function(), _private_varType Hints: Use for all function signatures
def calculate_total(items: list[Item]) -> Decimal:
return sum(item.price for item in items)
Dataclasses: Use for data containers
from dataclasses import dataclass
@dataclass(frozen=True)
class UserAccount:
id: str
name: str
created_at: datetime
Pattern Matching: Use for complex conditionals
match payment:
case CreditCard(number=n):
process_credit_card(n)
case BankTransfer(account=a):
process_bank_transfer(a)
f-strings: Preferred for string formatting
message = f"User {name} has {count} items"
Specific Exceptions: Catch specific exceptions
try:
result = process_payment(amount)
except ValueError as e:
logger.error(f"Invalid amount: {e}")
except NetworkError as e:
logger.error(f"Network error: {e}")
Custom Exceptions: Define for domain errors
class ValidationError(Exception):
def __init__(self, field: str, message: str):
self.field = field
super().__init__(message)
Context Managers: Use for resource management
with open('file.txt', 'r') as f:
content = f.read()
pytest: Primary testing framework
def test_* for test functionsimport pytest
@pytest.mark.parametrize('input,expected', [
(5, 10),
(0, 0),
(-5, -10),
])
def test_double(input, expected):
assert double(input) == expected
Type Checking: Use mypy for static analysis
# Run: mypy src/
Input Validation: Validate all external input
SQL Injection: Use parameterized queries
cursor.execute("SELECT * FROM users WHERE id = ?", (user_id,))
Secrets Management: Never hardcode secrets
import os
from dotenv import load_dotenv
load_dotenv()
api_key = os.getenv('API_KEY')
For detailed guidance, refer to: