scaffold-decorator
Add or wire helpers/decorators, preferring ArchiPy's (ttl_cache, atomic UoW, trace_span, measure_duration, retry).
Skill by SyntaxArc
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/syntaxarc-scaffold-decorator
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/scaffold-decorator
What's inside
- Skill name
scaffold-decorator- Description
- Add or wire helpers/decorators, preferring ArchiPy's (ttl_cache, atomic UoW, trace_span, measure_duration, retry). Use for "cache this function", "add timing/tracing/retry", or "write a decorator".
- License
- MIT
- Instructions
- 107 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Scaffold ArchiPy Decorator
## Scope
**Only** `helpers/decorators/`. Do not create utils or interceptors here.
## Read first
Read these plugin rules in full before generating files (paths relative to this skill directory; Claude Code: `${CLAUDE_SKILL_DIR}/../../rules/`):
- `../../rules/using-archipy-decorators.mdc`
## 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 import ttl_cache`
- `from archipy.adapters.base.sqlalchemy.atomic import postgres_sqlalchemy_atomic` (detects `async def`)
- `trace_span` / `trace_root` (+ async twins) from `archipy.helpers.decorators.tracing`
- `measure_duration` / `count_calls` (+ async twins) from `archipy.helpers.decorators.metrics`
- `timeout`, `retry`, `singleton`, `timing`, and
`grpc_rate_limit` 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 inspect
import logging
import time
from collections.abc import Callable
from typing import ParamSpec, TypeVar
logger = logging.getLogger(__name__)
P = ParamSpec("P")
R = TypeVar("R")
def timed(func: Callable[P, R]) -> Callable[P, R]:
"""Log wall-clock duration of a sync call.
Args:
func: Callable to wrap.
Returns:
Wrapped callable that logs elapsed milliseconds.
Raises:
TypeError: If `func` is a coroutine function — use an async twin instead.
Example:
@timed
def build_report(order_id: str) -> str:
...
"""
if inspect.iscoroutinefunction(func):
raise TypeError(f"{func.__qualname__} is async; use an async twin instead of timed()")
@functools.wraps(func)
def wrapper(*args: P.args, **kwargs: P.kwargs) -> R:
started = time.perf_counter()
try:
return func(*args, **kwargs)
finally:
elapsed_ms = (time.perf_counter() - started) * 1000
logger.debug("%s took %.2f ms", func.__qualname__, elapsed_ms)
return wrapper
```
- Use `functools.wraps`
- Preserve types where practical (`ParamSpec` / `TypeVar`)
- Google-style docstring with Args/Returns and a usage example
- **No** concrete adapter imports at module level
- One decorator detects `async def` with `inspect.iscoroutinefunction` and returns a sync or async wrapper
## Do not
- Wrap an `async def` with a sync wrapper (it would return an un-awaited coroutine).
## Verify
Run formatter/linter and focused tests for return values, exceptions, and metadata/signature preservation. Report the
reused ArchiPy API or files created, plus commands run.
## Docs
- https://syntaxarc.github.io/ArchiPy/tutorials/helpers/
- Bundled skill reference: `../archipy-docs/reference/helpers.md` (Decorators section), resolved relative to this `SKILL.md`'s
directory in the plugin installation — not the app workspace.From SyntaxArc/archipy-plugin, MIT.
More from SyntaxArc/archipy-plugin
- 0.601score
scaffold-observability
SyntaxArc
Configure ArchiPy 5.x OpenTelemetry traces, metrics, logs, and instrumentation.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-logic
SyntaxArc
Scaffold an ArchiPy logic (use case) under logics/{domain}/ with a unit-of-work decorator and DTO I/O.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
archipy-docs
SyntaxArc
Answer how-to questions about ArchiPy 5.x in an app (config, DI, adapters, helpers, errors, layout, observability) from the bundled reference and live docs.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-adapter
SyntaxArc
Scaffold a domain adapter under repositories/{domain}/adapters/ wrapping an ArchiPy adapter or external client.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-bdd
SyntaxArc
Scaffold Behave BDD tests that drive an ArchiPy app through its REST/gRPC services layer against real testcontainers (Postgres, Redis, Kafka, Temporal, …).
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-domain
SyntaxArc
Scaffold a full ArchiPy domain slice (DTOs, errors, repository + adapter, logic, service).
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-health-checks
SyntaxArc
Scaffold FastAPI/gRPC liveness, readiness, and startup health checks, graceful shutdown, and optional Kubernetes probes.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-interceptor
SyntaxArc
Add or wire cross-cutting FastAPI/gRPC interceptors or middleware, preferring ArchiPy's.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-models
SyntaxArc
Scaffold ArchiPy models under models/: domain/repository DTOs, errors, optional entities and types.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
redis-search
SyntaxArc
Scaffold RediSearch full-text, vector, or search-cache adapters in an ArchiPy app.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-app
SyntaxArc
Bootstrap a new ArchiPy service layout (configs, models, repositories, logics, services, helpers, manage.py).
SkillAFreshness: A★ 3Claude Code +9 - 0.595score
docs-observability
SyntaxArc
Open ArchiPy OpenTelemetry guidance (traces, metrics, logs)
SkillAFreshness: A★ 3Claude Code +9
Signals
- Stars
- 3
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Oct 18, 2026 (10 days ago)
- Last release
- Oct 18, 2026 (10 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/SyntaxArc/archipy-plugin
- Website
- syntaxarc.github.io/ArchiPy/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from SyntaxArc
- 0.601score
archipy-docs
SyntaxArc
Answer how-to questions about ArchiPy 5.x in an app (config, DI, adapters, helpers, errors, layout, observability) from the bundled reference and live docs.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-adapter
SyntaxArc
Scaffold a domain adapter under repositories/{domain}/adapters/ wrapping an ArchiPy adapter or external client.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
redis-search
SyntaxArc
Scaffold RediSearch full-text, vector, or search-cache adapters in an ArchiPy app.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-app
SyntaxArc
Bootstrap a new ArchiPy service layout (configs, models, repositories, logics, services, helpers, manage.py).
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-logic
SyntaxArc
Scaffold an ArchiPy logic (use case) under logics/{domain}/ with a unit-of-work decorator and DTO I/O.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-bdd
SyntaxArc
Scaffold Behave BDD tests that drive an ArchiPy app through its REST/gRPC services layer against real testcontainers (Postgres, Redis, Kafka, Temporal, …).
SkillAFreshness: A★ 3Claude Code +9
Cite this page
scaffold-decorator skill. Agent Mart. https://agentmart.dev/skills/syntaxarc-scaffold-decorator (last updated 2026-10-24)