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 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.

198 stars 33 forksSoftware Development

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add maksimzayats/specx --skill specx-add-core-use-case
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-add-core-use-case ~/.claude/skills/specx-add-core-use-case

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 Add Core Use Case

Use this skill for one application action at a time. Read
`references/use-case.md` before writing the use case.

## Workflow

1. Name the action directly, for example `CreateInvoiceUseCase`.
2. Put it under `core/<scope>/use_cases/<action>.py`.
3. Inherit `BaseUseCase` from `specx.core.foundation.use_case`.
4. Define exactly one same-file input class: a `Command` for state-changing
   use cases or a `Query` for read-only use cases. Even empty inputs are
   explicit.
5. Make commands inherit `specx.core.foundation.command.BaseCommand`, queries inherit
   `specx.core.foundation.query.BaseQuery`, and result DTOs inherit
   `specx.core.foundation.dto.BaseDTO`. Prefer
   `@dataclass(frozen=True, kw_only=True, slots=True)` for all of these core
   data classes unless the user asks for another model type.
6. Treat commands and queries as input contracts, not DTOs. Do not make
   commands or queries inherit `BaseDTO`, put them under `dtos/`, or add a
   `DTO` suffix.
7. `execute(...)` accepts exactly one keyword-only argument named `command` or
   `query` and returns DTOs, not entities.
8. Inject services, capabilities, gateways, and UoW managers with
   `Injected[...]`. Keep infrastructure/runtime settings out of core use cases;
   expose required business policy as a typed core value or collaborator. For
   transactional persistence, inject the scope
   `UnitOfWorkManager` and open the active unit of work inside `execute(...)`.
Read the full skill on GitHub

Details

Skill name
specx-add-core-use-case
Path
.agents/skills/specx-add-core-use-case/SKILL.md
License
MIT
Repo updated
8 August 2026

FAQ

What does the Specx Add Core Use Case skill do?

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.

How do I install the Specx Add Core Use Case skill?

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

Is Specx Add Core Use Case 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 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 Add Infrastructure Adapter

198

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.

DevOps & Cloud33

Solana

101

quicknode/solana-finance-claude-plugin

Use when working on Solana software, including one or more of: Solana client code using TypeScript, Rust libraries that use Solana crates, Anchor programs, Quasar programs, LiteSVM tests, including Rust program files, TypeScript tests, and Anchor.toml or Quasar.toml configuration. Designed to create minimal, reusable code without unnecessary duplication.

Software Development12

Specx Component Architecture

198

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.

Software Development33

Vite Bundle Optimization

259

PatternsDev/skills

Teaches Vite-specific bundle optimization patterns. Use when configuring Vite builds, code splitting, managing dependencies, or troubleshooting slow Vite builds.

Software Development28

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