specx-project-structure

specx-project-structure is a skill for Codex from maksimzayats/specx. It costs 75 tokens per session (1,369 once invoked), scanned A, original, MIT.

A guide for creating or reshaping a specx Python service repository into a defined structure for core logic, web delivery, infrastructure, dependency setup, migrations, and tests. It also covers starting a new repository and adding an initial health-check action.

In plain words
What is it for?
Use it to start a FastAPI backend, create the first source package and tests, establish project instructions and dependency setup, or reorganize an existing repository around the specx structure.
Why use it?
It provides a consistent starting layout so developers know where code and tests belong. It avoids adding technology-specific layers before the project actually needs them.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md; $skill-name invocation.

Good fit Use it to start a FastAPI backend, create the first source package and tests, establish project instructions and dependency setup, or reorganize an existing repository around the specx structure.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/maksimzayats/specx/specx-project-structure
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add maksimzayats/specx --skill specx-project-structure
Clone the repo
git clone --depth 1 https://github.com/maksimzayats/specx

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for specx-project-structure

README.md
[![agentmods](https://agentmods.dev/badge/skills/maksimzayats/specx/specx-project-structure.svg)](https://agentmods.dev/skills/maksimzayats/specx/specx-project-structure)
Your own site
<a href="https://agentmods.dev/skills/maksimzayats/specx/specx-project-structure"><img src="https://agentmods.dev/badge/skills/maksimzayats/specx/specx-project-structure.svg" alt="Measured on agentmods" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,369 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00075 $0.01369
Opus 5 $0.00037 $0.00685
Sonnet 5 $0.00015 $0.00274
Haiku 4.5 $0.00007 $0.00137

Measured 9d ago against content hash 810eed68e684, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

specx-project-structure scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/specx-project-structure/SKILL.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Read the full file on GitHub · 101 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 101 lines · 75 tokens per session scan A 810eed68e684

Subscribe to this mod's changes

specx-project-structure is a skill published in the GitHub repository maksimzayats/specx (201 stars, last pushed 1mo ago), licensed MIT. It adds 75 tokens to every session and 1,369 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.