specx-add-infrastructure-adapter

Create SQLAlchemy repositories, Alembic migrations, and Redis stores for Specx services.

200|35|Updated Jun 17, 2021
One-click install
npx skills add https://github.com/maksimzayats/specx --skill specx-add-infrastructure-adapter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: specx-add-infrastructure-adapter
Source: https://github.com/maksimzayats/specx/tree/main/.agents/skills/specx-add-infrastructure-adapter
Command: npx skills add https://github.com/maksimzayats/specx --skill specx-add-infrastructure-adapter

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill facilitates the addition of technical infrastructure adapters for Specx core scopes, enabling seamless integration with external systems like databases, Redis, and HTTP APIs.

Core Features & Use Cases

  • Infrastructure Adapters: Supports the development of custom infrastructure adapters for Specx, including SQLAlchemy repositories and Alembic-backed persistence, Redis stores, HTTP clients, and more.
  • Repository Management: Offers guidance on defining and reusing repositories for owned persistence, with a focus on SQLAlchemy and Alembic.
  • Gateway Implementation: Provides instructions for creating gateways for outbound business capabilities to external systems, including OpenAI and SDKs.
  • Dependency Injection: Emphasizes proper dependency injection for infrastructure resources and client factories.
  • Logging and Lifecycle: Outlines best practices for logging configuration and managing the lifespan of app-owned infrastructure resources.

Quick Start

Use the specx-add-infrastructure-adapter skill to define a new database adapter for your Specx service by following the steps outlined in the references/adapter.md document.

Frequently Asked Questions about specx-add-infrastructure-adapter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a SQLAlchemy repository and Alembic migrations to a Specx service?

To add a SQLAlchemy repository and Alembic migrations to Specx, you define infrastructure adapters for owned persistence by following the steps in the adapter reference documentation, ensuring proper database schema management.

How does dependency injection work for infrastructure resources in Specx?

Dependency injection for Specx infrastructure resources emphasizes proper configuration of client factories and managing the lifespan of app-owned resources, ensuring adapters like Redis stores and HTTP clients are initialized and cleaned up correctly.

What is the best way to implement an HTTP client gateway for outbound calls in Specx?

The best way to implement an HTTP client gateway in Specx is to create infrastructure adapters for outbound business capabilities, providing structured instructions for external system integrations including SDKs.

When do I need to create a custom infrastructure adapter for Specx?

You need to create a custom infrastructure adapter for Specx when integrating core scopes with external systems like databases, Redis stores, or HTTP APIs, requiring knowledge of Specx architecture and infrastructure design patterns.

Does adding a Redis store to Specx require managing the resource lifecycle?

Adding a Redis store to Specx does require managing the resource lifecycle, as the Skill outlines best practices for logging configuration and managing the lifespan of app-owned infrastructure resources and client factories.