From pysmith
Copy-paste ready code patterns for Python backend development. Includes Repository, Service, Middleware, Caching, Retry, Rate Limiter, Error Handling, Background Task, and Dependency Injection patterns. Use when implementing common architectural patterns or looking for production-ready code snippets.
npx claudepluginhub jugrajsingh/skillgarden --plugin pysmithThis skill is limited to using the following tools:
Copy-paste ready implementations for common backend patterns.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Copy-paste ready implementations for common backend patterns.
| Pattern | Use Case |
|---|---|
| Repository | Data access abstraction |
| Service Layer | Business logic encapsulation |
| Middleware | Request/response processing |
| Caching | Redis-based caching with decorator |
| Retry | Exponential backoff for external calls |
| Rate Limiter | Token bucket rate limiting |
| Error Handling | Structured application errors |
| Background Task | Graceful async task management |
| Dependency Injection | FastAPI DI patterns |
Read references/patterns.md for complete implementations.
Each pattern includes:
class BaseRepository(ABC, Generic[T]):
async def get(self, id: str) -> T | None: ...
async def create(self, entity: T) -> T: ...
async def list(self, limit: int = 100) -> list[T]: ...
@dataclass
class ServiceResult(Generic[T]):
success: bool
data: T | None = None
error: str | None = None
@classmethod
def ok(cls, data: T) -> "ServiceResult[T]": ...
@classmethod
def fail(cls, error: str) -> "ServiceResult[T]": ...
@retry(max_attempts=3, delay=1.0, exceptions=(ConnectionError,))
async def fetch_external_api(url: str) -> dict: ...
def get_user_service(
repo: Annotated[UserRepository, Depends(get_user_repo)],
) -> UserService:
return UserService(repo)
For complete implementations, read references/patterns.md.