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.
npx skills add maksimzayats/specx --skill specx-diwire-compositiongit clone --depth 1 https://github.com/maksimzayats/specxWrote 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.
[](https://agentmods.dev/skills/maksimzayats/specx/specx-diwire-composition)<a href="https://agentmods.dev/skills/maksimzayats/specx/specx-diwire-composition"><img src="https://agentmods.dev/badge/skills/maksimzayats/specx/specx-diwire-composition/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/maksimzayats/specx/specx-diwire-composition"><img src="https://agentmods.dev/badge/skills/maksimzayats/specx/specx-diwire-composition.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00083 | $0.00969 |
| Opus 5 | $0.00042 | $0.00485 |
| Sonnet 5 | $0.00017 | $0.00194 |
| Haiku 4.5 | $0.00008 | $0.00097 |
Grade A, and why
specx-diwire-composition 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.
How it starts
The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
specx Diwire Composition
Use this skill whenever object graphs, factories, controllers, adapters, or test
overrides need diwire. Read references/diwire.md before writing DI code.
Rules
- Application classes receive dependencies through constructor fields typed as
Injected[DependencyType]. - Keep injection constructor-based. Do not hide dependency resolution in
application functions with
resolver_context.inject. - Capabilities are normal injectable collaborators. Register only capability abstractions or existing instances that auto-wiring cannot infer.
- Only
ioc/, top-level delivery__main__.py/factory/lifecycle modules, and tests create or usediwire.Container. - Do not inject
Containerexcept inFastAPILifecycle, where it is used only to callcontainer.aclose()during app shutdown. - Do not inject
logging.Loggeror register loggers in the container. Runtime logging is configured once by a top-level infrastructure configurator; classes that log create local stdlib loggers. - Do not call
container.resolve()inside core use cases or services. - Let
diwireauto-wire concrete project classes. - Let
diwireauto-registerBaseRuntimeSettingssubclasses as root-scoped singleton factories. Register a settings instance only for an intentional test override or an explicitly prebuilt configuration object. - Register only abstractions, external adapter bindings, gateway
implementations, factories, and instances that auto-wiring cannot infer.
Keep registration in private
_register_dependencies(...)insideioc/container.py. - Register the container instance itself with
provides=Containeronly for the FastAPI lifecycle shutdown dependency. - Register concrete gateway implementations for their core
BaseGatewayports. - Register health readiness gateway implementations, such as
SQLAlchemyReadinessCheckGateway, forReadinessCheckGatewaywhen/readyzneeds infrastructure checks. - Register unit-of-work managers for UoW abstractions. Persistence use cases
inject the manager and open the active UoW inside
execute(...); they do not inject repositories, active UoWs, providers, SQLAlchemy sessions, engines, session factories, or concrete infrastructure adapters directly. - Unit tests receive a fresh native pytest
containerfixture built by the project's realget_container(). Put project-wide test overrides in that fixture and register scenario-specific overrides directly in the test before resolving the target. - Integration tests receive the transactional real-app
containerfixture. They must use the real internal graph; do not mock internal use cases, services, or capabilities. - Use
container.resolve(...)for normal synchronous graph construction, even for targets with async methods; useawait container.aresolve(...)only when DI construction itself has async providers. - One-off class-based test doubles live in the
test_*.pymodule that uses them. Reused unit-test doubles may live in mirroredtests/unit/core/<scope>/{capabilities,gateways,repositories}/fake_<source_module>.pymodules. - Inline
MagicMockorAsyncMockin the test function when only one behavior needs to change. - Do not create DI-backed test factories, target harnesses,
harness.py,tests/_support/fakes,tests/**/_fakes.py, or fake modules outside those mirrored unit port/capability packages. - Keep tests on native pytest fixtures. Do not enable
diwire.integrations.pytest_plugin, and do not useInjected[...]parameters in test functions. - FastAPI async test helpers must enter
LifespanManagerand pass the yielded manager's state-awaremanager.appto the HTTPX2ASGITransport.
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.
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.
- 9d ago First seen · 80 lines · 83 tokens per session scan A beec2f2a1c49
specx-diwire-composition is a skill published in the GitHub repository maksimzayats/specx (201 stars, last pushed 1mo ago), licensed MIT. It adds 83 tokens to every session and 969 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.
Other skills, from other repositories
scaffold-archipy-domain
Scaffold a full ArchiPy domain slice (DTOs, errors, repository adapters, logic, service). Use when adding a new domain to an existing ArchiPy app.
scaffold-archipy-app
Scaffold a minimal ArchiPy application package (config, containers stub, domain slice, helpers tree, optional manage.py). Use when starting a new ArchiPy-based service or asking to bootstrap project layout.
scaffold-archipy-logic
Scaffold an ArchiPy logic class with unit-of-work decorator and domain DTO I/O. Use when adding a use-case under logics/{domain}/.
Python Clean Architecture
This skill should be used when the user asks to "scaffold a FastAPI project", "set up clean architecture", "refactor to clean architecture", "add a new endpoint", "add a router", "add an operation", "add a repository", "review my code structure", "apply design patterns in Python", "decouple my code", "improve code…
software-engineer-python
Auto-route to this skill if project contains.
python
Enforces FastAPI, Dependency Injection, and general Python coding standards based on the repository structure.