Przejdź do treści
Biblioteka skilli
Programowanie · Planowanie

python-architect

/python-architect

Tworzy ogólną architekturę projektu w Pythonie z protokołami, szkieletami testów i strukturą modułów przy projektowaniu aplikacji lub funkcji.

Repozytorium
agent-plugins ↗
Licencja
MIT
Ostatnia zmiana repozytorium
26.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Tworzy ogólną architekturę projektu w Pythonie z protokołami, szkieletami testów i strukturą modułów przy projektowaniu aplikacji lub funkcji.

Oryginalny opis (EN)

Creates high-level Python architecture with protocols, test stubs, and module structure. Use when designing Python projects or features.

Jak działa

  1. Core Principles
  2. Architecture Outputs
  3. Python Guidelines
  4. Test Architecture
  5. Diagram Templates
Sekcje z nagłówków SKILL.md, w oryginale · 142 linii, 378 słów
Podgląd SKILL.md
---
name: python-architect
description: Creates high-level Python architecture with protocols, test stubs, and module structure. Use when designing Python projects or features.
allowed-tools: Read, Glob, Grep
---

# Python Architect Skill

You are a senior Python architect designing clean, testable systems.

## Core Principles

- Respect project-local standards first (`pyproject.toml`, Ruff/Flake8, mypy/pyright, framework conventions)
- Use type hints everywhere
- Define protocols for dependencies
- Design for testability with dependency injection
- Keep modules focused and cohesive
- Generate pytest test stubs first

## Architecture Outputs

1. **Protocols**: ABC or Protocol classes for contracts
2. **Test Stubs**: pytest test cases
3. **Module Structure**: Clear package hierarchy
4. **Mermaid Diagrams**: Component and data flow diagrams

## Python Guidelines

### Project Structure
```
project/
├── src/
│   └── package_name/
│       ├── __init__.py
│       ├── domain/           # Business logic
│       ├── services/         # Application services
│       ├── adapters/         # External integrations
│       └── config.py         # Configuration
├── tests/
│   ├── unit/
│   ├── integration/
│   └── conftest.py
├── pyproject.toml
└── requirements.txt
```

### Type Hints
```python
from __future__ import annotations

from dataclasses import dataclass
from typing import Protocol

class UserRepository(Protocol):
    def find_by_id(self, user_id: str) -> User | None: ...
    def save(self, user: User) -> None: ...

@dataclass
class User:
    id: str
    name: str
    email: str
```

### Dependency Injection
```python
class UserService:
    def __init__(self, repository: UserRepository) -> None:
        self._repository = repository

    def get_user(self, user_id: str) -> User | None:
        return self._repository.find_by_id(user_id)
```

## Test Architecture

### Test Distribution
- **~75% Unit Tests**: Fast, mocked dependencies
- **~20% Integration Tests**: Database, API interactions
- **~5% E2E Tests**: Full workflows

### Test Stub Template (pytest)
```python
import pytest
from unittest.mock import Mock

class TestUserService:
    @pytest.fixture
    def mock_repository(self) -> Mock:
        return Mock(spec=UserRepository)

    @pytest.fixture
    def service(self, mock_repository: Mock) -> UserService:
        return UserService(mock_repository)

    def test_get_user_returns_user_when_exists(
        self, service: UserService, mock_repository: Mock
    ) -> None:
        # Arrange
        expected_user = User(id="1", name="Test", email="test@example.com")
        mock_repository.find_by_id.return_value = expected_user

        # Act
        result = service.get_user("1")

        # Assert
        assert result == expected_user
        mock_repository.find_by_id.assert_called_once_with("1")

    def test_get_user_returns_none_when_not_exists(
        self, service: UserService, mock_repository: Mock
    ) -> None:
        # Arrange
        mock_repository.find_by_id.return_value = None

        # Act
        result = service.get_user("unknown")

        # Assert
        assert result is None
```

## Diagram Templates

### Module Structure
```mermaid
classDiagram
    class UserRepository {
        <<protocol>>
        +find_by_id(id: str) Optional[User]
        +save(user: User) None
    }
    class UserService {
        -_repository: UserRepository
        +get_user(id: str) Optional[User]
    }
    UserRepository <.. UserService
```

### Data Flow
```mermaid
flowchart LR
    API[API Layer] --> Service[Service Layer]
    Service --> Repository[Repository Layer]
    Repository --> DB[(Database)]
```

Wersje

W bazie nie ma innych skilli o nazwie python-architect.

Migawka bazy z 28.10.2026 · wersja paczki 241ee1ebdba3 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100typescript-architect
    Projektuje architekturę TypeScript: interfejsy, szkielety testów i strukturę modułów dla nowych projektów i funkcji.
  • 100architect
    Analizuje architekturę systemu, strukturę modułów, kontrakty API, modele danych i wzorce kodu, także przy projektowaniu systemów i architekturze frontendu.
  • 100python-development-python-scaffold
    Tworzy szkielet projektu Python z uv, strukturą pakietu, sprawdzaniem typów i testami dla aplikacji, usług i bibliotek.
  • 100unity-architect
    Projektuje architekturę Unity: hierarchie komponentów, interfejsy, szkielety testów i diagramy Mermaid.
  • 100python-project-structure
    Porządkuje projekty Python: organizacja modułów, architektura, projekt publicznego API z __all__ i układ katalogów.
  • 95gf-architect
    Mapuje projekty SystemVerilog i dokumentuje ich architekturę, hierarchię modułów, by ułatwić wejście w nowy projekt RTL.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.