interfaces-and-autowiring

interfaces-and-autowiring is a skill for Claude Code from dev-toolings/superpowers-symfony. It costs 26 tokens per session (433 once invoked), scanned A, a copy of daily-workflow, MIT.

A Symfony dependency-injection guide for using interfaces and autowiring. Dependency injection lets Symfony provide a class with the services it needs, while autowiring chooses those services from type declarations.

In plain words
What is it for?
Use it when defining service boundaries, connecting interfaces to implementations, or planning medium and complex changes in a Symfony project.
Why use it?
It helps keep code loosely connected and makes implementations easier to replace, test, and organize. It also supports safer architectural changes with checkpoints.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the superpowers-symfony plugin — 44 skills, 13 commands, 7 agents, 1 hook shipped together

Good fit Use it when defining service boundaries, connecting interfaces to implementations, or planning medium and complex changes in a Symfony project.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dev-toolings/superpowers-symfony/interfaces-and-autowiring
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 dev-toolings/superpowers-symfony --skill interfaces-and-autowiring
Clone the repo
git clone --depth 1 https://github.com/dev-toolings/superpowers-symfony

Made for: Claude Code.

Or install superpowers-symfony, the plugin that ships this one along with the rest of its 44 skills, 13 commands, 7 agents, 1 hook.

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 interfaces-and-autowiring

README.md
[![agentmods](https://agentmods.dev/badge/skills/dev-toolings/superpowers-symfony/interfaces-and-autowiring/github.svg)](https://agentmods.dev/skills/dev-toolings/superpowers-symfony/interfaces-and-autowiring)
Your own site
<a href="https://agentmods.dev/skills/dev-toolings/superpowers-symfony/interfaces-and-autowiring"><img src="https://agentmods.dev/badge/skills/dev-toolings/superpowers-symfony/interfaces-and-autowiring/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.

agentmods 80×15 button for interfaces-and-autowiring

Your own site · 80×15
<a href="https://agentmods.dev/skills/dev-toolings/superpowers-symfony/interfaces-and-autowiring"><img src="https://agentmods.dev/badge/skills/dev-toolings/superpowers-symfony/interfaces-and-autowiring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 433 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.
Origin 86% copy Near-identical to another mod 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.00026 $0.00433
Opus 5.5 $0.00010 $0.00173
Sonnet 5.5 $0.00005 $0.00087
Haiku 4.5 $0.00003 $0.00043

Measured 20d ago against content hash 3f3398e78a7d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

interfaces-and-autowiring 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 20d 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.

Origin

This is a copy

86% identical to daily-workflow — 42 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

content/skills/interfaces-and-autowiring/SKILL.md · 47 lines

What it actually says

Interfaces And Autowiring (Symfony)

Use when

  • A service depends on a concrete class and must be swappable or replaced in tests.
  • Several implementations of one interface exist and the right one must be injected.
  • Adding cross-cutting behavior (logging, caching, retries) around an existing service.
  • Injecting scalars, parameters, env vars, or every service carrying a tag.
  • Autowiring fails with "cannot autowire" or an ambiguous type.

Default workflow

  1. Extract a focused interface for what the consumer actually needs.
  2. Let autowiring bind it when there is a single implementation.
  3. With several implementations, pick one per consumer through a named alias and #[Target].
  4. Add behavior around a service with #[AsDecorator] instead of editing or extending it.
  5. Inject scalars with #[Autowire] and tagged collections with #[AutowireIterator].
  6. Confirm the result with debug:autowiring for each type involved.

Guardrails

  • Constructor injection with private readonly dependencies; no setter injection, no container access.
  • Keep interfaces small: one consumer need per interface.
  • Make services final by default and decorate them rather than extend them.
  • Use lazy services or service closures only for expensive dependencies that some paths skip.

Progressive disclosure

  • Use this file for execution posture and risk controls.
  • Open references when deep implementation details are needed.

Output contract

  • Interfaces and the bindings or aliases that select each implementation.
  • Decorators or tagged collections, with their priority.
  • The debug:autowiring output for the types involved.

References

  • reference.md
Files

What ships with it

1 file 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. 20d ago Changed · +5 lines 3f3398e78a7d
  2. 1mo ago Changed · +2 lines · +8 tokens per session 40b8a235536e
  3. 1mo ago First seen · 40 lines · 18 tokens per session scan A e09ce2e80482

Subscribe to this mod's changes

interfaces-and-autowiring is a skill published in the GitHub repository dev-toolings/superpowers-symfony (226 stars, last pushed 20d ago), licensed MIT. It adds 26 tokens to every session and 433 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 86% identical to daily-workflow, differing in 42 lines, and is treated as a copy.

Related

Other skills, from other repositories

api-platform-upgrade

Migrate an API Platform codebase from 3.x or 4.0–4.2 up to 4.3. Trigger when composer.lock shows api-platform/ < 4.3, when grep finds.

gerard-labs/superpowers-api-platform · 49 tokens

api-platform-identifiers

Choose and wire up API Platform 4.3 resource identifiers — UUID v7 (recommended for temporal cursor pagination), ULID, scalar (string/int), \DateTimeInterface, composite identifiers via Link(uriVariables: …), custom identifiers (slug) with #[ApiProperty(identifier: true)], decorating UriVariableTransformerInterface to…

gerard-labs/superpowers-api-platform · 0 tokens

ports-and-adapters

Apply Hexagonal Architecture / Ports & Adapters in Symfony — Domain (POPOs, no framework imports), Application (use cases orchestrating ports), Infrastructure (Symfony / Doctrine / API Platform adapters). Bounded contexts variant: one context per business domain with a Contract/ public surface. Deptrac to enforce…

gerard-labs/superpowers-api-platform · 120 tokens

bootstrap-check

Verify a Symfony project's bootstrap state before any work — .env / .env.dist parity, config/bundles.php enabled bundles, config/services.yaml recipe-default App\ block with exclude:, config/packages/apiplatform.yaml flags (hydraprefix, eagerloading.forceeager, usesymfonylisteners), composer.lock presence, framework /…

gerard-labs/superpowers-api-platform · 125 tokens

llamaindex-development

Expert guidance for LlamaIndex development including RAG applications, vector stores, document processing, query engines, and building production AI applications.

Mindrally/skills · 32 tokens

craftcms

Craft CMS 5 plugin and module development — extending Craft with PHP. Covers elements, element queries, services, models, records, controllers, migrations, queue jobs, console commands, field types, native fields, events, behaviors, Twig extensions, widgets, filesystems, permissions, project config, GraphQL, testing…

michtio/craftcms-claude-skills · 70 tokens