scaffold-archipy-logic

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

A guide for creating an ArchiPy Python class that represents one business use case, such as user registration. It uses a unit of work, meaning the related database changes are handled as one transaction, and passes structured input and output objects.

In plain words
What is it for?
Use it to scaffold a logic class under a domain folder, select synchronous or asynchronous database handling, inject a repository, and expose typed input and output methods.
Why use it?
It gives new application logic a consistent structure, keeps database access behind an injected repository, and helps ensure changes succeed or fail together.

Skill for Claude Code

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

Part of the archipy plugin — 12 skills, 19 commands shipped together

Good fit Use it to scaffold a logic class under a domain folder, select synchronous or asynchronous database handling, inject a repository, and expose typed input and output methods.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/syntaxarc/archipy-plugin/scaffold-archipy-logic
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-logic
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 12 skills, 19 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-logic

README.md
[![agentmods](https://agentmods.dev/badge/skills/syntaxarc/archipy-plugin/scaffold-archipy-logic.svg)](https://agentmods.dev/skills/syntaxarc/archipy-plugin/scaffold-archipy-logic)
Your own site
<a href="https://agentmods.dev/skills/syntaxarc/archipy-plugin/scaffold-archipy-logic"><img src="https://agentmods.dev/badge/skills/syntaxarc/archipy-plugin/scaffold-archipy-logic.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 525 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.00040 $0.00525
Opus 5 $0.00020 $0.00262
Sonnet 5 $0.00008 $0.00105
Haiku 4.5 $0.00004 $0.00052

Measured 7d ago against content hash f699f4c781e4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

scaffold-archipy-logic 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 7d ago.

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-logic/SKILL.md · 75 lines

What it actually says

Scaffold ArchiPy Logic

Before writing files

Ask the user for:

  1. Domain name (e.g. user)
  2. Logic name / file stem (e.g. user_registrationuser_registration_logic.py)
  3. Sync or async atomic (default sync if postgres+sqlalchemy; async if postgres+sqlalchemy-async)

Prefer ArchiPy

uv add "archipy[postgres,sqlalchemy]"
# or: uv add "archipy[postgres,sqlalchemy-async]"

Generate

logics/<domain>/
└── <name>_logic.py

Stub shape:

  • Google-style class/method docstrings; double quotes; X | Y typing.
  • Constructor injects the domain repository (or port) — do not construct adapters.
  • Public method: domain *InputDTO in → domain *OutputDTO out.
  • Decorate with postgres_sqlalchemy_atomic_decorator or async_postgres_sqlalchemy_atomic_decorator.
from archipy.helpers.decorators.sqlalchemy_atomic import postgres_sqlalchemy_atomic_decorator


class UserRegistrationLogic:
    """Handles user registration within a single database transaction."""

    def __init__(self, user_repository: UserRepository) -> None:
        self._user_repository = user_repository

    @postgres_sqlalchemy_atomic_decorator
    def register_user(self, input_dto: UserRegistrationInputDTO) -> UserRegistrationOutputDTO:
        """Validate and create a user.

        Args:
            input_dto: Registration data from the service layer.

        Returns:
            Output DTO for the newly created user.
        """
        ...

Create missing domain DTO stubs under models/dtos/<domain>/domain/v1/ if they do not exist.

Constraints

  • No FastAPI / gRPC imports.
  • May call other domain logics; never another domain’s repository.
  • No atomic / UoW decorators on repositories or services — only logics.
  • Wire via DI in configs/containers.py.

Docs

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. 7d ago First seen · 75 lines · 40 tokens per session scan A f699f4c781e4

Subscribe to this mod's changes

scaffold-archipy-logic is a skill published in the GitHub repository SyntaxArc/archipy-plugin (2 stars, last pushed 14d ago), licensed MIT. It adds 40 tokens to every session and 525 once invoked, about $0.0002 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