scaffold-archipy-decoratorlisted
Install: claude install-skill SyntaxArc/archipy-plugin
# Scaffold ArchiPy Decorator
## Scope
**Only** `helpers/decorators/`. Do not create utils or interceptors here.
## Before writing files
1. Inspect existing decorators, call sites, and the installed ArchiPy version for a matching decorator.
2. Infer sync/async style and project naming from the target call site.
3. Ask only for unresolved behavior. Prefer an ArchiPy decorator whenever it fits.
4. Preserve existing decorator modules; do not overwrite.
## Prefer ArchiPy
Examples:
- `from archipy.helpers.decorators.cache import ttl_cache_decorator`
- `from archipy.helpers.decorators.sqlalchemy_atomic import postgres_sqlalchemy_atomic_decorator`
- `from archipy.helpers.decorators.sqlalchemy_atomic import async_postgres_sqlalchemy_atomic_decorator`
- `trace_span` / `trace_root` (+ async twins) from `archipy.helpers.decorators.tracing`
- `measure_duration` / `count_calls` (+ async twins) from `archipy.helpers.decorators.metrics`
- `timeout_decorator`, `retry_decorator`, `singleton_decorator`, `timing_decorator`, and
`grpc_rate_limit_decorator` under `archipy.helpers.decorators`
Show correct usage on a sample function; do not reimplement. UoW decorators belong on **logics**, not
services/repositories.
## Custom decorator
Create `helpers/decorators/<name>.py`:
```python
from __future__ import annotations
import functools
import logging
import time
from collections.abc import Callable
from typing import ParamSpec, TypeVar
logger = logging.getLogger(__name__)
P = ParamSpe