scaffold-archipy-decorator

scaffold-archipy-decorator is a skill for Claude Code from SyntaxArc/archipy-plugin. It costs 61 tokens per session (718 once invoked), scanned A, original, MIT.

A code scaffold for adding decorators to an ArchiPy application. A decorator is a reusable wrapper that adds behavior to a function, such as caching, retries, timing, tracing, or database transaction handling.

In plain words
What is it for?
Use it to add or connect caching, database transactions, tracing, retries, timeouts, timing, singleton behavior, or gRPC rate limiting.
Why use it?
It helps reuse ArchiPy's existing wrappers correctly and keeps shared function behavior out of the main business logic.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the archipy plugin — 13 skills, 20 commands shipped together

Good fit Use it to add or connect caching, database transactions, tracing, retries, timeouts, timing, singleton behavior, or gRPC rate limiting.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/syntaxarc/archipy-plugin/scaffold-archipy-decorator
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add SyntaxArc/archipy-plugin --skill scaffold-archipy-decorator
Clone the repo
git clone --depth 1 https://github.com/SyntaxArc/archipy-plugin

Made for: Claude Code.

Or install archipy, the plugin that ships this one along with the rest of its 13 skills, 20 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for scaffold-archipy-decorator

README.md
[![agentmods](https://agentmods.dev/badge/skills/syntaxarc/archipy-plugin/scaffold-archipy-decorator.svg)](https://agentmods.dev/skills/syntaxarc/archipy-plugin/scaffold-archipy-decorator)
Your own site
<a href="https://agentmods.dev/skills/syntaxarc/archipy-plugin/scaffold-archipy-decorator"><img src="https://agentmods.dev/badge/skills/syntaxarc/archipy-plugin/scaffold-archipy-decorator.svg" alt="Measured on agentmods" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 718 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00061 $0.00718
Opus 5 $0.00030 $0.00359
Sonnet 5 $0.00012 $0.00144
Haiku 4.5 $0.00006 $0.00072

Measured today against content hash 8994170f000e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

scaffold-archipy-decorator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/scaffold-archipy-decorator/SKILL.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

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 = 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.

    Example:
        @timed
        def build_report(order_id: str) -> str:
            ...
    """

    @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

Read the full file on GitHub · 98 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +6 lines · +6 tokens per session 8994170f000e
  2. 7d ago First seen · 92 lines · 55 tokens per session scan A af93730d91c9

Subscribe to this mod's changes

scaffold-archipy-decorator is a skill published in the GitHub repository SyntaxArc/archipy-plugin (2 stars, last pushed today), licensed MIT. It adds 61 tokens to every session and 718 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

fastapi-templates

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

wshobson/agents · 37 tokens

telnyx-numbers-python

Search, order, and manage phone numbers by location, features, and coverage.

team-telnyx/ai · 23 tokens

telnyx-ai-outbound-voice-python

End-to-end setup for making a Telnyx AI assistant call a phone number. Covers provisioning a phone number, creating a TeXML application, assigning the number, configuring telephony settings, whitelisting destination countries, and triggering outbound calls via scheduled events. Use this skill (not…

team-telnyx/ai · 97 tokens

specx-component-architecture

Design or review specx core scope boundaries in Python services. Use when deciding where code belongs across packaged scoped foundation bases, optional local foundation extensions, core/, capabilities, delivery, infrastructure, shared/, and ioc; when adding guardrails or splitting use cases, services, DTOs, schemas…

maksimzayats/specx · 74 tokens

specx-project-structure

Create or reshape a Python FastAPI service repo into the specx clean core/delivery architecture using packaged scoped foundation bases. Use when starting an API backend, adding the first src package, or establishing AGENTS.md, core/, optional local foundation/, delivery/, infrastructure, ioc/, migrations, and tests.

maksimzayats/specx · 75 tokens

specx-add-core-use-case

Add or refactor a specx core scope use case. Use when implementing an externally meaningful application action under a core scope usecases package, adding same-file command/query inputs, result DTOs, coordinating services, opening a unit-of-work transaction, or moving behavior out of delivery or infrastructure into…

maksimzayats/specx · 70 tokens