Specx Foundation

Use specx foundation bases in Python services, or add a tiny project-local `foundation/` base for missing categories or stateful framework bases.

198 stars 33 forksSoftware Development

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add maksimzayats/specx --skill specx-foundation
Manual install
git clone --depth 1 https://github.com/maksimzayats/specx.git /tmp/specx
mkdir -p ~/.claude/skills
cp -r /tmp/specx/.agents/skills/specx-foundation ~/.claude/skills/specx-foundation

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# specx Foundation

Use this skill when a service class needs an explicit base, or when a new class
category may need a project-local foundation base. Read
`references/foundation.md` before editing foundation-related code.

## Workflow

1. Prefer packaged scoped bases from `specx.core.foundation`,
   `specx.delivery.foundation`, and `specx.infrastructure.foundation`.
2. Do not create an empty `src/<package>/foundation/` package.
3. Add a project-local `foundation/` module only when current code needs a real
   project-local base category or a stateful framework base that must not be
   shared globally, such as a SQLAlchemy declarative base.
4. Keep project-local foundation limited to base definitions: marker bases,
   common external-base wrappers, justified ABCs, and stateful framework bases.
   Put stable cross-scope concrete primitives under `shared/`, not
   `foundation/`.
5. Give every project source class, including each local base, a docstring that
   explains what it protects and includes a concrete usage example.
6. Make every non-foundation project source class inherit an explicit scoped
   base.
7. Name each class with the suffix implied by its base ancestry, such as
   `TaskDTO`, `TaskEntity`, `TaskResponseSchema`, `CreateTaskUseCase`, or
   `TaskTitleNormalizerService`.
8. Use `BaseLifecycle` for delivery app lifespan managers such as
   `FastAPILifecycle`.
9. Prefer `@dataclass(frozen=True, kw_only=True, slots=True)` for commands,
Read the full skill on GitHub

Details

Skill name
specx-foundation
Path
.agents/skills/specx-foundation/SKILL.md
License
MIT
Repo updated
8 August 2026

FAQ

What does the Specx Foundation skill do?

Use specx foundation bases in Python services, or add a tiny project-local `foundation/` base for missing categories or stateful framework bases.

How do I install the Specx Foundation skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add maksimzayats/specx --skill specx-foundation. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Specx Foundation popular?

It lives in maksimzayats/specx, which has 198 GitHub stars and 33 forks.

Related skills

Specx Add Core Service

198

maksimzayats/specx

Add or refactor a specx core scope service. Use when implementing focused reusable business/application behavior under a core scope services package, extracting logic from a use case, injecting deterministic collaborators, accepting an active unit of work, choosing between Service and Capability, or keeping business decisions away from delivery and infrastructure.

Marketing, Sales & Business33

Specx Add Core Use Case

198

maksimzayats/specx

Add or refactor a specx core scope use case. Use when implementing an externally meaningful application action under a core scope use_cases 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 class-based application code.

Software Development33

Specx Add Delivery Controller

198

maksimzayats/specx

Add delivery controllers for specx services, especially FastAPI HTTP routes. Use when creating top-level `delivery/` request/response schemas, one controller per scoped use-case set, route registration, FastAPI lifecycle managers, HTTP error translation, delivery-only auth/rate-limit/request services, or integration tests that exercise the delivery edge.

Software Development33

Specx Project Structure

198

maksimzayats/specx

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.

Software Development33

Specx Diwire Composition

198

maksimzayats/specx

Wire dependency injection for a specx Python service with `diwire`. Use when adding `ioc/container.py`, explicit dependency registrations for capabilities, repositories, gateways, UoW managers, clients, settings, or factories, `Injected[...]` constructor fields, FastAPI app factory/lifecycle composition, test overrides, or rules that keep containers out of core use cases and services.

Software Development33

Specx Settings

198

maksimzayats/specx

Add runtime configuration to specx Python services with `pydantic-settings`. Use when creating settings classes, environment variables, `.env.example`, injecting settings at delivery, infrastructure, or composition edges, documenting config, mapping configuration into typed core policy collaborators, or removing direct environment reads from core code.

Software Development33

Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.