بنقرة واحدة
python-rules
Comprehensive Python coding rules covering style, patterns, testing, and security
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Comprehensive Python coding rules covering style, patterns, testing, and security
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Turn unstructured documents into validated, auditable structured data with clear schemas and edge-case handling
Verification loop for Django projects: migrations, linting, tests with coverage, security scans, and deployment readiness checks before release or PR.
Java coding standards for Spring Boot services: naming, immutability, Optional usage, streams, exceptions, generics, and project layout.
Verification loop for Spring Boot projects: build, static analysis, tests with coverage, security scans, and diff review before release or PR.
Software architecture specialist for system design, scalability, and technical decision-making. Use when planning new features, refactoring large systems, or making architectural decisions.
Build and compilation error resolution specialist. Fixes build/type errors with minimal diffs, no architectural changes. Use when build fails or type errors occur.
| name | python-rules |
| description | Comprehensive Python coding rules covering style, patterns, testing, and security |
ALWAYS create new objects, NEVER mutate existing ones:
// Pseudocode
WRONG: modify(original, field, value) -> changes original in-place
CORRECT: update(original, field, value) -> returns new copy with change
Rationale: Immutable data prevents hidden side effects, makes debugging easier, and enables safe concurrency.
MANY SMALL FILES > FEW LARGE FILES:
Prefer immutable data structures:
from dataclasses import dataclass
@dataclass(frozen=True)
class User:
name: str
email: str
from typing import NamedTuple
class Point(NamedTuple):
x: float
y: float
ALWAYS handle errors comprehensively:
ALWAYS validate at system boundaries:
Before marking work complete:
When implementing new functionality:
Encapsulate data access behind a consistent interface:
Use a consistent envelope for all API responses:
from typing import Protocol
class Repository(Protocol):
def find_by_id(self, id: str) -> dict | None: ...
def save(self, entity: dict) -> dict: ...
from dataclasses import dataclass
@dataclass
class CreateUserRequest:
name: str
email: str
age: int | None = None
with statement) for resource managementTest Types (ALL required):
MANDATORY workflow:
Use pytest as the testing framework.
pytest --cov=src --cov-report=term-missing
Use pytest.mark for test categorization:
import pytest
@pytest.mark.unit
def test_calculate_total():
...
@pytest.mark.integration
def test_database_connection():
...
Before ANY commit:
import os
from dotenv import load_dotenv
load_dotenv()
api_key = os.environ["OPENAI_API_KEY"] # Raises KeyError if missing
bandit -r src/
If security issue found: