Agent skill

Specx Project Structure

by maksimzayats in maksimzayats/specx

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

MITAuto-check passedBackend & APIs

Install Specx Project Structure

skills CLI
$ npx skills add maksimzayats/specx --skill specx-project-structure -a claude-code

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

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

At a glance

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

  • Works in 12 steps: For a fresh framework-neutral repo,… → Preserve an existing import package… → Create src// and tests/ packages with… → …
  • Starting an API backend
  • SKILL.md covers Workflow, Non-Negotiable Boundaries and References
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Specx Project Structure is an agent skill from 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.

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

It sits in Backend & APIs, covering Backend development and Agent instruction files. It works with Python and FastAPI. 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

  • Starting an API backend
  • Adding the first src package
  • Establishing AGENTS.md
  • Optional local foundation/

Example prompts

  • “/specx-project-structure”

Requirements

  • Python 3

Workflow steps

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

  1. For a fresh framework-neutral repo, start with specx init . It creates
  2. Preserve an existing import package declared by the repo. For a new repo,
  3. Create src// and tests/ packages with empty init.py files only.
  4. Add specx as a runtime dependency and import base classes from
  5. Use core// as the main boundary. Put application packages at the
  6. Add top-level delivery/ for runnable framework apps, lifecycles,
  7. Add top-level infrastructure/ for shared technical resources such as
  8. Add infrastructure/logging/ with a stdlib LoggingConfigurator and
  9. Add ioc/ for diwire.Container creation and explicit bindings.
  10. Add shared/ only for stable cross-scope application primitives such as
  11. Add migrations/ with Alembic when SQLAlchemy models exist.
  12. Build the first user-requested business vertical slice. The initializer's

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 Project Structure loads about 1.5k tokens when it runs, and up to ~5.8k if it reads all its reference files. Until then it costs about 88 tokens; SKILL.md has 728 words of instructions outside code blocks.

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

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). 728 words, ~1,508 tokens.

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

specx Project Structure

Use this skill to create the repo shell and first runnable vertical slice. For details, read references/blueprint.md.

Workflow

  1. For a fresh framework-neutral repo, start with specx init <path>. It creates packaging, strict tooling, root AGENTS.md, a small core/health use case and pure service, ioc/container.py, and mirrored unit tests. It intentionally omits delivery and infrastructure; add those packages only with real technology-specific behavior.
  2. Preserve an existing import package declared by the repo. For a new repo, derive a lowercase underscore name, normalize every non-identifier character, and verify name.isidentifier() and not keyword.iskeyword(name); distribution names and import packages need not be identical. If normalization still yields a keyword or leading digit, choose an explicit valid package name rather than emitting it unchanged.
  3. Create src/<package>/ and tests/ packages with empty __init__.py files only.
  4. Add specx as a runtime dependency and import base classes from specx.core.foundation, specx.delivery.foundation, or specx.infrastructure.foundation.
  5. Use core/<scope>/ as the main boundary. Put application packages at the scope root: capabilities/, dtos/, entities/, exceptions/, gateways/, repositories/, services/, and use_cases/. Put scope-owned technical adapters under infrastructure/ only when real IO exists.
  6. Add top-level delivery/ for runnable framework apps, lifecycles, controllers, request/response schemas, and delivery-only services.
  7. Add top-level infrastructure/ for shared technical resources such as SQLAlchemy session factories, logging, telemetry, and external client factories. App-owned pooled clients live here even when only one scope currently consumes them; bounded short-lived clients may stay with the scope adapter.
  8. Add infrastructure/logging/ with a stdlib LoggingConfigurator and LoggingSettings for every new API repo.
  9. Add ioc/ for diwire.Container creation and explicit bindings.
  10. Add shared/ only for stable cross-scope application primitives such as unit-of-work contracts, clocks, ids, or errors.
  11. Add migrations/ with Alembic when SQLAlchemy models exist.
  12. Build the first user-requested business vertical slice. The initializer's process-health slice is a framework-neutral composition example, not a readiness check. With a delivery framework, map or replace it deliberately: keep simple liveness at delivery, and use core/health for /readyz when readiness checks a required dependency or policy is shared across deliveries.
  13. Create root AGENTS.md for every new repo. Include runnable project commands from $specx-project-tooling and specx boundaries from $specx-component-architecture.
  14. Do not create an empty local foundation/ package. Create src/<package>/foundation/ only for a real project-local base category or a stateful framework base that must not be shared globally, such as a SQLAlchemy declarative base.
  15. Add tests only where there is real code to test. Do not create empty folders just to satisfy the diagram.
Show full SKILL.md (311 more words)Show less

Non-Negotiable Boundaries

  • Keep all source and test __init__.py files empty. Do not add empty local foundation, source, test, or helper packages.
  • Every non-foundation source class inherits an explicit packaged or local scoped base and uses the suffix implied by that ancestry. Every source class, including local bases, has a scoped docstring with a real Example:.
  • Keep core inner packages free of delivery, IOC, SQLAlchemy, Redis, HTTP clients, and framework imports. Put concrete IO adapters under core/<scope>/infrastructure/<technology>/.
  • Capabilities are narrow BaseCapability collaborators; gateways are business-language BaseGateway ports; core services choose BasePureService, BaseReadService, or BaseEffectService.
  • Same-file BaseCommand or BaseQuery inputs enter use cases, and result DTOs leave them. Persistence use cases inject a UnitOfWorkManager; services do not open or finish transactions.
  • Prefer frozen, keyword-only, slotted dataclasses for core data and BaseStrEnum for reusable closed value sets. Keep Pydantic at delivery and settings edges.
  • Keep infrastructure technical and schema evolution in Alembic. Never call metadata.create_all or drop_all in application or test code.
  • Configure stdlib logging once before composing the FastAPI app. Use FastAPI lifespan for resource cleanup, then close the container; do not run schema changes or business workflows in lifespan.
  • Business routes use full /api/v1/... paths. Keep /healthz independent of external systems; use /readyz and core/health for any required external dependency, with bounded checks and minimal responses.
  • Mirror real source behavior with flat tests. Unit tests resolve targets from a native pytest container fixture; integration tests use the real internal graph and replace only external boundaries. Read the blueprint before adding shared doubles or support helpers.
  • Keep root AGENTS.md commands aligned with the Makefile and include only guidance that matches files and features present in the project.
  • This skill targets FastAPI and must enable the opt-in fastapi rule family in [tool.specx]. Framework-neutral specx rules remain the default for workers, CLIs, and other delivery technologies.

References

  • references/blueprint.md - target tree, starter files, and creation checklist.

© 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-project-structure of maksimzayats/specx.

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

Open the folder on GitHubat commit 9362406

Compare with similar skills

Specx Project Structure 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 Project Structure compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Specx Project Structure this skillmaksimzayats/specx202—~1.5kAutomated safety check: PassMIT
Fastcrudbenavlabs/fastcrud1.6k—~5kAutomated safety check: PassMIT
Phoenix ServerArize-ai/phoenix12k—~1.6kAutomated safety check: PassCustom licence
Holm Webvolfpeter/holm132—~1.2kAutomated safety check: PassMIT
Starlettesimonw/research782—~8.6kAutomated safety check: NotesNone
FbaZhongye1/KnowAgenticRAG135—~758Automated safety check: PassNone

Similar skills

  • 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 15 days ago
    Backend & APIsAuto-check passed
  • Phoenix Server

    Arize-ai/phoenix

    Backend development guide for the Phoenix AI observability platform (Strawberry GraphQL, SQLAlchemy async, FastAPI).

    12k GitHub stars~1.6k tokensUpdated today
    Backend & APIsAuto-check passed
  • Holm Web

    volfpeter/holm

    A skill your agent uses when working on web apps built with holm, or to answer questions about holm.

    132 GitHub stars~1.2k tokensUpdated 23 days ago
    Backend & APIsAuto-check passed
  • Starlette

    simonw/research

    Build async web applications and APIs with Starlette 1.0, the lightweight ASGI framework for Python.

    782 GitHub stars~8.6k tokensUpdated 5 days ago
    Backend & APIsAuto-check: notes
  • Fba

    Zhongye1/KnowAgenticRAG

    FastAPI Best Architecture (fba) project development guide. An agent skill from Zhongye1/KnowAgenticRAG.

    135 GitHub stars~758 tokensUpdated today
    Backend & APIsAuto-check passed
  • Build X402 Server

    coinbase/cdp-sdk

    Write code that charges for an HTTP route with the x402 protocol and receives USDC in a CDP-managed wallet.

    203 GitHub stars~3.7k tokensUpdated 3 days ago
    Backend & APIsAuto-check: notes

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

Works with

Questions about Specx Project Structure

What does Specx Project Structure do?

Create or reshape a Python FastAPI service repo into the specx clean core/delivery architecture using packaged scoped foundation bases. Specx Project Structure is an agent skill from maksimzayats/specx. Create or reshape a Python FastAPI service repo into the specx clean core/delivery architecture using packaged scoped foundation bases.

When should I use Specx Project Structure?

Specx Project Structure fits situations like: starting an API backend; adding the first src package; establishing AGENTS.md; optional local foundation/.

How do I install Specx Project Structure in Claude Code?

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

How do I install Specx Project Structure in Codex?

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

Can I use Specx Project Structure 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-project-structure -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-project-structure, .gemini/skills/specx-project-structure, .github/skills/specx-project-structure and .opencode/skills/specx-project-structure in your project.

What does Specx Project Structure need to run?

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

Does Specx Project Structure 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 Project Structure 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 Project Structure use?

Specx Project Structure 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 Project Structure use?

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

What are the alternatives to Specx Project Structure?

Skills that share tags, products or a category with Specx Project Structure: Fastcrud (benavlabs/fastcrud, 1.6k stars), Phoenix Server (Arize-ai/phoenix, 12k stars), Holm Web (volfpeter/holm, 132 stars) and Starlette (simonw/research, 782 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Specx Project Structure?

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.