Agent skill

Specx Component Architecture

by maksimzayats in maksimzayats/specx

Design or review specx core scope boundaries in Python services.

MITAuto-check passedAI & LLM Engineering

Install Specx Component Architecture

skills CLI
$ npx skills add maksimzayats/specx --skill specx-component-architecture -a claude-code

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

GitHub CLI
$ gh skill install maksimzayats/specx specx-component-architecture --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-component-architecture .claude/skills/specx-component-architecture && 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-component-architecture
GitHub stars
202
Token cost
~1.8k tokens
SKILL.md length
858 words
Files
3 (incl. references)
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Design or review specx core scope boundaries in Python services.

  • Deciding where code belongs across packaged scoped foundation bases
  • SKILL.md covers Boundary Model, Decision Rules, Code Style and References
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Optional local foundation extensions

What it does

Specx Component Architecture is an agent skill from maksimzayats/specx. 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, ports, and adapters.

Its SKILL.md is about 1.8k 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/boundaries.md`).

It sits in AI & LLM Engineering, covering LLM guardrails. It works with Python 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

  • Deciding where code belongs across packaged scoped foundation bases
  • Optional local foundation extensions
  • Adding guardrails
  • Splitting use cases

Example prompts

  • “/specx-component-architecture”

Requirements

  • Python 3

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 Component Architecture loads about 1.8k tokens when it runs, and up to ~6.7k if it reads all its reference files. Until then it costs about 93 tokens; SKILL.md has 858 words of instructions outside code blocks.

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

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). 858 words, ~1,779 tokens.

Download SKILL.mdSave it as .claude/skills/specx-component-architecture/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
specx-component-architecture
description
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, ports, and adapters.

specx Scope Architecture

Use this skill before broad structural changes or when a feature crosses more than one layer. Read references/boundaries.md for the full rules.

Boundary Model

  • core/<scope>/: application behavior and contracts. Inner packages are capabilities/, dtos/, entities, exceptions/, gateways/, repositories/, services/, and use_cases/.
  • core/<scope>/infrastructure/: scope-owned external IO adapters such as SQLAlchemy repositories, Redis stores, HTTP clients, file storage, and queues. Inner core packages must not import it.
  • Scoped specx foundation packages: packaged base classes under specx.core.foundation, specx.delivery.foundation, and specx.infrastructure.foundation. Every non-foundation source class must inherit an explicit packaged base directly or through a project-local base; local bases explicitly inherit the packaged or framework base they extend.
  • foundation/: optional project-local extension point for base definitions only: real project-local base categories or stateful framework bases that must not be shared globally, such as a SQLAlchemy declarative base.
  • delivery/: runnable framework apps, controllers, schemas, auth dependencies, request parsing, response serialization, HTTP error translation, app lifecycle managers, and delivery-only services.
  • infrastructure/: app-wide technical resources such as SQLAlchemy session factories, logging, telemetry, and external client factories.
  • Runtime logging lives in top-level infrastructure/logging. Configure it once with a BaseConfigurator; do not inject logging.Logger.
  • shared/: tiny stable cross-scope primitives. It is not a dumping ground.
  • ioc/: diwire container creation and explicit bindings.

Decision Rules

  • Use a use case for an externally meaningful action.
  • Use a service for focused reusable business/application behavior.
  • Use a capability for one small replaceable injectable ability that is narrower than a service.
  • Name every service class with a Service suffix.
  • Name direct concrete BaseCapability subclasses with a Capability suffix.
  • Do not call small collaborators services by default.
  • Core services inherit BasePureService, BaseReadService, or BaseEffectService; do not add or use a generic BaseService.
  • Do not add base_ prefixes to project-local foundation module filenames. Class names stay prefixed, for example clock.py defines BaseClock.
  • Use gateway ports under core/<scope>/gateways/ for outbound business capabilities such as OpenAI summaries, payments, email, queues, and external APIs. Gateway ports inherit BaseGateway, declare external effects, and do not return entities.
  • Put concrete gateway implementations under core/<scope>/infrastructure/<technology>/.
  • Use packaged scoped specx foundation bases before adding project-local bases.
  • Do not create an empty local foundation/ package.
  • Add a project-local foundation base only when a real project-local base category exists or a stateful framework base must own project-local state, such as SQLAlchemy MetaData.
  • Use a port or ABC only for a real external boundary or multiple implementations.
  • Use one delivery controller per scoped set of use cases.
  • Use core/health when readiness checks any required external dependency or probe policy is reusable across delivery layers. Keep a simple framework-specific liveness probe in delivery, and do not invent core probe services and use cases solely to satisfy the layer diagram.
  • When core/health is justified, keep framework route/status/header mapping in delivery and technical checks behind gateway adapters.
  • Keep request/response schemas in top-level delivery/. Keep use-case DTOs in core/<scope>/dtos/.
  • Prefer @dataclass(frozen=True, kw_only=True, slots=True) for commands, queries, DTOs, entities, and other core data classes unless the user asks for another model type. Keep Pydantic at delivery schemas and settings edges.
  • Use BaseStrEnum for limited known application value sets instead of plain str or Literal[...].
  • When creating or reshaping a repo, keep root AGENTS.md architecture guidance aligned with these boundaries.
  • Define each use-case input as a same-file Command or Query: commands are state-changing, queries are read-only, and even empty inputs are explicit.
  • Keep commands and queries independent from DTOs. They inherit BaseCommand or BaseQuery, not BaseDTO, and live beside the use case that consumes them.
  • Use cases return DTOs, not entities.
  • Persistence use cases inject UnitOfWorkManager for transactional work and open the active UoW inside execute(...). They do not inject repositories, SQLAlchemy sessions/engines/session factories, or concrete infrastructure adapters directly.
  • Services may receive an active UoW from a use case, but services must not open UoW scopes or own commit/rollback.
  • Give every project source class a docstring that explains scope and includes a concrete Example:; the packaged rule checks abstract ports, local bases, enums, and errors as well as concrete behavior classes.
  • Keep controller-only helpers such as auth and rate limiting in delivery/.
  • Keep FastAPI lifespan ownership in delivery/fastapi/lifecycle.py. The lifecycle releases app-owned resources and closes the DI container on shutdown.
  • Keep SQL and external API calls in scope infrastructure adapters.
  • Classes that actually emit logs create a private stdlib logger in __post_init__ using the full module plus class name. Do not add logger fields to DTOs, entities, commands, queries, or classes with no log records.
  • Logs should describe important application events and failures without secrets, credentials, request bodies, full external URLs, or infrastructure topology.
  • Do not create bare classes without explicit bases.
  • Packaged framework-neutral guardrails run by default when select is omitted. New generated projects use select = ["ALL"], which enables every rule whose required project surface exists. Projects with a narrower base selection enable technology families explicitly, for example extend-select = ["fastapi"]. Do not copy FastAPI paths or guidance into a project that uses another delivery technology.
Show full SKILL.md (41 more words)Show less

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/boundaries.md - layout, import rules, naming, and architecture test targets.

© 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-component-architecture of maksimzayats/specx.

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

Open the folder on GitHubat commit 9362406

Compare with similar skills

Specx Component Architecture 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 Component Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Specx Component Architecture this skillmaksimzayats/specx202—~1.8kAutomated safety check: PassMIT
Sponsio Agent Safety SetupSponsioLabs/Sponsio454—~12kAutomated safety check: PassApache-2.0
Migrating Openai Agents SDK To Pydantic AIpydantic/pydantic-ai21k—~1.8kAutomated safety check: PassMIT
Implementing LLM Guardrails For Securitymukul975/Anthropic-Cybersecurity-Skills34k—~2.2kAutomated safety check: PassApache-2.0
Chroma Vector DatabaseOrchestra-Research/AI-Research-SKILLs13k7 repos~2.3kAutomated safety check: PassMIT
Fastcrudbenavlabs/fastcrud1.6k—~5kAutomated safety check: PassMIT

Similar skills

  • Sponsio Agent Safety Setup

    SponsioLabs/Sponsio

    Installs, tunes and enforces Sponsio contracts that block unsafe tool calls in LLM agents, covering setup, auditing, observe mode and flipping to enforce.

    454 GitHub stars~12k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Official

    Migrate Python OpenAI Agents SDK applications to Pydantic AI and, when warranted, Pydantic AI Harness.

    21k GitHub stars~1.8k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Implementing LLM Guardrails For Security

    mukul975/Anthropic-Cybersecurity-Skills

    Implements input/output validation guardrails for LLM applications using NVIDIA NeMo Guardrails (Colang), custom Python validators for PII detection, and the Guardrails AI framework, intercepting…

    34k GitHub stars~2.2k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Chroma Vector Database

    Orchestra-Research/AI-Research-SKILLs

    Shows how to store documents and embeddings in Chroma, query them by similarity with metadata filters, and persist them to disk for RAG and semantic search projects.

    13k GitHub starsUsed in 7 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Fastcrud

    benavlabs/fastcrud

    A skill your agent uses when building or modifying CRUD endpoints with FastCRUD (the fastcrud PyPI package) in a FastAPI project — covers FastCRUD, crudrouter, EndpointCreator, FilterConfig…

    1.6k GitHub stars~5k tokensUpdated 16 days ago
    Backend & APIsAuto-check passed
  • Pixeltable

    pixeltable/pixeltable

    Build multimodal AI apps with Pixeltable. An agent skill from pixeltable/pixeltable.

    1.6k GitHub stars~216 tokensUpdated today
    AI & LLM EngineeringAuto-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
  • Add technical infrastructure adapters for specx core scopes.

    202 GitHub stars~1k 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

Questions about Specx Component Architecture

What does Specx Component Architecture do?

Design or review specx core scope boundaries in Python services. Specx Component Architecture is an agent skill from maksimzayats/specx. Design or review specx core scope boundaries in Python services.

When should I use Specx Component Architecture?

Specx Component Architecture fits situations like: deciding where code belongs across packaged scoped foundation bases; optional local foundation extensions; adding guardrails; splitting use cases.

How do I install Specx Component Architecture in Claude Code?

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

How do I install Specx Component Architecture in Codex?

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

Can I use Specx Component Architecture 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-component-architecture -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-component-architecture, .gemini/skills/specx-component-architecture, .github/skills/specx-component-architecture and .opencode/skills/specx-component-architecture in your project.

What does Specx Component Architecture need to run?

SKILL.md names no scripts, command-line tools or credentials: Specx Component Architecture is instructions for the agent only. Our summary lists: Python 3.

Does Specx Component Architecture 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 Component Architecture 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 Component Architecture use?

Specx Component Architecture 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 Component Architecture use?

About 1.8k tokens (SKILL.md is roughly 7.1k 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 5k tokens, read only when the agent opens those files.

What are the alternatives to Specx Component Architecture?

Skills that share tags, products or a category with Specx Component Architecture: Sponsio Agent Safety Setup (SponsioLabs/Sponsio, 454 stars), Migrating Openai Agents SDK To Pydantic AI (pydantic/pydantic-ai, 21k stars), Implementing LLM Guardrails For Security (mukul975/Anthropic-Cybersecurity-Skills, 34k stars) and Chroma Vector Database (Orchestra-Research/AI-Research-SKILLs, 13k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Specx Component Architecture?

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.