Agent skill

Specx Add Infrastructure Adapter

by maksimzayats in maksimzayats/specx

Add technical infrastructure adapters for specx core scopes.

MITAuto-check passedDatabases

Install Specx Add Infrastructure Adapter

skills CLI
$ npx skills add maksimzayats/specx --skill specx-add-infrastructure-adapter -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install maksimzayats/specx specx-add-infrastructure-adapter --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/maksimzayats/specx.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/specx-add-infrastructure-adapter .claude/skills/specx-add-infrastructure-adapter && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
specx-add-infrastructure-adapter
GitHub stars
202
Token cost
~1k tokens
SKILL.md length
448 words
Files
3 (incl. references)
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Add technical infrastructure adapters for specx core scopes.

  • Works in 12 steps: Define or reuse a repository under… → Define or reuse a gateway under… → Put concrete implementations under → …
  • Implementing SQLAlchemy repositories and Alembic-backed persistence
  • SKILL.md covers Workflow, Code Style and References
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Specx Add Infrastructure Adapter is an agent skill from maksimzayats/specx. Add technical infrastructure adapters for specx core scopes. Use when implementing SQLAlchemy repositories and Alembic-backed persistence, Redis stores, HTTP/network clients, file or queue adapters, unit-of-work implementations, gateway implementations for external APIs or SDKs such as OpenAI, or explicit diwire bindings for core scope repository and gateway ports.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `agents/openai.yaml` and `references/adapter.md`).

It sits in Databases, covering ORMs and data access and Database migrations. It works with OpenAI, Redis and SQLAlchemy. The repository describes itself as: ⚙️ Executable architecture guardrails and agent skills for building structured Python services! The licence is MIT.

When your agent uses it

  • Implementing SQLAlchemy repositories and Alembic-backed persistence
  • HTTP/network clients
  • Unit-of-work implementations
  • Gateway implementations for external APIs

Example prompts

  • “/specx-add-infrastructure-adapter”

Workflow steps

12 steps, taken from the first numbered list in SKILL.md.

  1. Define or reuse a repository under repositories/ for owned persistence.
  2. Define or reuse a gateway under gateways/ for outbound business
  3. Put concrete implementations under
  4. Inject external clients, session factories, Redis clients, SDK clients, or
  5. A bounded short-lived client factory may stay beside its scope adapter. Put
  6. Give long-lived app-owned infrastructure resources an explicit async
  7. Keep technical query/request code in infrastructure.
  8. Repositories may return entities. Gateways must not return entities; return
  9. Translate low-level exceptions into core exceptions only when callers need to
  10. For transactional persistence, implement an active UnitOfWork and a
  11. Register adapter bindings in private _register_dependencies(...) inside
  12. Add focused integration tests only when the adapter has meaningful

What it can do on your machine

Read from SKILL.md and the folder at commit 9362406. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Specx Add Infrastructure Adapter loads about 1k tokens when it runs, and up to ~7.9k if it reads all its reference files. Until then it costs about 101 tokens; SKILL.md has 448 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~101
When it runs · the whole SKILL.md, loaded when a task matches
~1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from maksimzayats/specx at commit 9362406, republished under its MIT licence (© maksimzayats). 448 words, ~1,000 tokens.

Download SKILL.mdSave it as .claude/skills/specx-add-infrastructure-adapter/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
specx-add-infrastructure-adapter
description
Add technical infrastructure adapters for specx core scopes. Use when implementing SQLAlchemy repositories and Alembic-backed persistence, Redis stores, HTTP/network clients, file or queue adapters, unit-of-work implementations, gateway implementations for external APIs or SDKs such as OpenAI, or explicit `diwire` bindings for core scope repository and gateway ports.

specx Add Infrastructure Adapter

Use this skill whenever code talks to external systems. Read references/adapter.md before writing adapters.

Workflow

  1. Define or reuse a repository under repositories/ for owned persistence. Repository ports inherit BaseRepository and mark required methods with @abstractmethod.
  2. Define or reuse a gateway under gateways/ for outbound business capabilities to external systems such as OpenAI, payments, email, queues, or external HTTP APIs. Gateway ports inherit BaseGateway, mark required methods with @abstractmethod, declare external effects, and do not return entities.
  3. Put concrete implementations under core/<scope>/infrastructure/<technology>/.
  4. Inject external clients, session factories, Redis clients, SDK clients, or project-owned client factories. Do not hide client construction inside business methods. Generated HTTP adapters use httpx2, imported from the httpx2 namespace; do not generate new legacy httpx imports.
  5. A bounded short-lived client factory may stay beside its scope adapter. Put every app-owned pooled client factory or wrapper under top-level infrastructure/<technology>/, even with only one current consumer.
  6. Give long-lived app-owned infrastructure resources an explicit async close() method; FastAPI lifecycle owns calling it on shutdown.
  7. Keep technical query/request code in infrastructure.
  8. Repositories may return entities. Gateways must not return entities; return DTOs, primitives, enums, or explicit result objects. Do not return ORM models or SDK response objects to core.
  9. Translate low-level exceptions into core exceptions only when callers need to handle them. Catch narrow driver or SDK exceptions, preserve the cause, and never expose raw provider messages, SQL, parameters, bodies, or URLs.
  10. For transactional persistence, implement an active UnitOfWork and a UnitOfWorkManager; register the manager, not repositories, active UoWs, or UoW providers for use-case injection.
  11. Register adapter bindings in private _register_dependencies(...) inside ioc/container.py. Register every technical resource once at its owner boundary and close that same app-scoped instance from lifecycle.
  12. Add focused integration tests only when the adapter has meaningful project-owned behavior to protect; do not add generic CRUD or upstream library tests just because an adapter file exists.
  13. For SQLAlchemy adapters, add or update Alembic migrations with $specx-sqlalchemy-migrations.
Show full SKILL.md (113 more words)Show less

Logging is top-level runtime infrastructure, not a core-scope adapter. Put stdlib logging setup in infrastructure/logging/configurator.py with a LoggingConfigurator that inherits BaseConfigurator; do not create gateway ports or injected logger bindings for it.

For /readyz, implement required dependency checks as core/health gateway adapters, for example core/health/infrastructure/sqlalchemy/readiness_check_gateway.py, and bind them to ReadinessCheckGateway in ioc/container.py. Bound every dependency check with a short application timeout and return only a non-sensitive core status.

Code Style

Use blank lines as logical separators in all code. Keep related statements together, but separate independent setup, action, assertion, response, branch, and transformation groups so long blocks stay readable.

References

  • references/adapter.md - adapter layout, port binding, SQLAlchemy/UoW, Redis, HTTP client, migration, and test patterns.

© maksimzayats, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/specx-add-infrastructure-adapter of maksimzayats/specx.

  • SKILL.md
  • agents/openai.yaml
  • references/adapter.md

Open the folder on GitHubat commit 9362406

Compare with similar skills

Specx Add Infrastructure Adapter next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Specx Add Infrastructure Adapter compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Specx Add Infrastructure Adapter this skillmaksimzayats/specx202—~1kAutomated safety check: PassMIT
Change Database Schemamartin-ueding/geo-activity-playground100—~225Automated safety check: PassCustom licence
Daoyou Data LayerChurchTao/Daoyou147—~1.9kAutomated safety check: PassGPL-3.0
Python Database Patternsaiskillstore/marketplace4331 repos~1.2kAutomated safety check: NotesNone
Database DevelopmentWrongStack/WrongStack371—~864Automated safety check: PassMIT
DB Connectionaiskillstore/marketplace433—~3.5kAutomated safety check: NotesNone

Similar skills

  • Change Database Schema

    martin-ueding/geo-activity-playground

    How to change the SQLAlchemy data model and generate the matching Alembic migration.

    100 GitHub stars~225 tokensUpdated today
    DatabasesAuto-check passed
  • Daoyou Data Layer

    ChurchTao/Daoyou

    Daoyou Drizzle/PostgreSQL、事务、V6 角色与宗门归属、统一背包、Redis 战局和回放归档指南。Use when modifying schema, migrations, repositories, persistence mappers, resource commits or durable game models.

    147 GitHub stars~1.9k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Python Database Patterns

    aiskillstore/marketplace

    SQLAlchemy and database patterns for Python. An agent skill from aiskillstore/marketplace.

    433 GitHub starsUsed in 1 repo~1.2k tokens
    DatabasesAuto-check: notes
  • Database Development

    WrongStack/WrongStack

    Implement database access, models and queries with explicit consistency, transactions and bounded results.

    371 GitHub stars~864 tokensUpdated yesterday
    DatabasesAuto-check passed
  • DB Connection

    aiskillstore/marketplace

    A skill your agent uses when setting up database connections, especially for Neon PostgreSQL.

    433 GitHub stars~3.5k tokensUpdated yesterday
    DatabasesAuto-check: notes
  • Sqlalchemy

    kid-sid/claude-spellbook

    A skill your agent uses when using async SQLAlchemy 2.0 — defining models, writing queries, managing async sessions, loading relationships without N+1, or setting up and debugging Alembic migrations.

    190 GitHub stars~3.5k tokensUpdated 2 mo ago
    DatabasesAuto-check passed

More from maksimzayats/specx

All 12 skills in this repo
  • Specx Add Core Service

    maksimzayats/specx

    Add or refactor a specx core scope service. An agent skill from maksimzayats/specx.

    202 GitHub stars~688 tokensUpdated 2 mo ago
    Auto-check passed
  • Specx Add Core Use Case

    maksimzayats/specx

    Add or refactor a specx core scope use case. An agent skill from maksimzayats/specx.

    202 GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Add delivery controllers for specx services, especially FastAPI HTTP routes.

    202 GitHub stars~704 tokensUpdated 2 mo ago
    Auto-check passed
  • Design or review specx core scope boundaries in Python services.

    202 GitHub stars~1.8k tokensUpdated 2 mo ago
    Auto-check passed
  • Specx Diwire Composition

    maksimzayats/specx

    Wire dependency injection for a specx Python service with diwire.

    202 GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Specx Project Structure

    maksimzayats/specx

    Create or reshape a Python FastAPI service repo into the specx clean core/delivery architecture using packaged scoped foundation bases.

    202 GitHub stars~1.5k tokensUpdated 2 mo ago
    Auto-check passed

Categories

Questions about Specx Add Infrastructure Adapter

What does Specx Add Infrastructure Adapter do?

Add technical infrastructure adapters for specx core scopes. Specx Add Infrastructure Adapter is an agent skill from maksimzayats/specx. Add technical infrastructure adapters for specx core scopes.

When should I use Specx Add Infrastructure Adapter?

Specx Add Infrastructure Adapter fits situations like: implementing SQLAlchemy repositories and Alembic-backed persistence; HTTP/network clients; unit-of-work implementations; gateway implementations for external APIs.

How do I install Specx Add Infrastructure Adapter in Claude Code?

Run `npx skills add maksimzayats/specx --skill specx-add-infrastructure-adapter -a claude-code`. Or copy the skill folder (skills/specx-add-infrastructure-adapter in maksimzayats/specx) into .claude/skills/specx-add-infrastructure-adapter in your project. Claude Code loads it when a task matches its description.

How do I install Specx Add Infrastructure Adapter in Codex?

Run `npx skills add maksimzayats/specx --skill specx-add-infrastructure-adapter -a codex`. Or copy the skill folder (skills/specx-add-infrastructure-adapter in maksimzayats/specx) into .agents/skills/specx-add-infrastructure-adapter in your project. Codex loads it when a task matches its description.

Can I use Specx Add Infrastructure Adapter in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add maksimzayats/specx --skill specx-add-infrastructure-adapter -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/specx-add-infrastructure-adapter, .gemini/skills/specx-add-infrastructure-adapter, .github/skills/specx-add-infrastructure-adapter and .opencode/skills/specx-add-infrastructure-adapter in your project.

What does Specx Add Infrastructure Adapter need to run?

SKILL.md names no scripts, command-line tools or credentials: Specx Add Infrastructure Adapter is instructions for the agent only.

Does Specx Add Infrastructure Adapter access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Specx Add Infrastructure Adapter safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Specx Add Infrastructure Adapter use?

Specx Add Infrastructure Adapter is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Specx Add Infrastructure Adapter use?

About 1k tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.9k tokens, read only when the agent opens those files.

What are the alternatives to Specx Add Infrastructure Adapter?

Skills that share tags, products or a category with Specx Add Infrastructure Adapter: Change Database Schema (martin-ueding/geo-activity-playground, 100 stars), Daoyou Data Layer (ChurchTao/Daoyou, 147 stars), Python Database Patterns (aiskillstore/marketplace, 433 stars) and Database Development (WrongStack/WrongStack, 371 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Specx Add Infrastructure Adapter?

maksimzayats (a GitHub user) maintains it in maksimzayats/specx, which has 202 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on August 8, 2026.

Source: maksimzayats/specx on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.