Invoke BEFORE configuring Nette DI - services, .neon files, autowiring.
/plugin marketplace add nette/claude-code/plugin install nette@netteThis skill inherits all available tools. When active, it can use any tool Claude has access to.
services.neon - all service definitionscommon.neon - parameters, extensions, framework settings, application-wide configurationapi.neon, tasks.neon)env.local.neon for development environment, env.prod.neon for production environmentUse - for services that don't need references:
services:
- App\Model\BlogFacade
- App\Model\CustomerService
- App\Presentation\Accessory\TemplateFilters
Give names only when needed for @serviceName references elsewhere in NEON:
services:
# Named because referenced as @pohoda
pohoda:
create: Nette\Database\Connection('odbc:Driver={...}')
autowired: false
# Using the reference
- App\Model\PohodaImporter(pohoda: @pohoda)
Nette DI automatically autowires all dependencies by type. When manually specifying parameters, use named parameters if not the first parameter:
services:
# Good - first parameter, clear order
- App\Model\ImageService(%rootDir%/storage)
# Good - named parameter when mixing with autowiring
- App\Model\CustomerService(ip: %ip%)
- App\Model\BlogFacade(blogPath: %blog%)
services:
- App\Core\RouterFactory::createRouter
- Symfony\Component\HttpClient\HttpClient::create()
services:
- App\Model\MailImporter(
DG\Imap\Mailbox(
mailbox: '{imap.gmail.com:993/ssl}'
username: 'vi....com'
password: 'nrllp...'
)
debugMode: %debugMode%
)
services:
database:
create: PDO(%dsn%, %user%, %password%)
setup:
- setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION)
services:
specialDb:
create: Nette\Database\Connection(...)
autowired: false # Won't be injected automatically
Don't name services unnecessarily - only name when you need @serviceName references.
Don't create services manually - use DI container injection instead.
Don't use positional parameters - use named parameters when mixing with autowiring.
Don't register every class - only classes that need injection or are injected elsewhere.
Don't hardcode secrets - use parameters and environment variables.
Don't bypass autowiring without reason - let Nette DI handle dependencies automatically.
Use search section for classes following naming conventions:
search:
model:
in: %appDir%
classes: # Classes end with `Factory`, `Facade`, or `Service`
- *Factory
- *Facade
- *Service
Reference configuration parameters with %parameterName%:
services:
- App\Model\TexyProcessor('', %wwwDir%, %tempDir%/texy)
- App\Tasks\ImportTask(path: %rootDir%/../data/import)
- App\Model\CustomerService(ip: %ip%)
Add sections to common.neon only when you need specific functionality.
Add when: Setting up error handling or custom URL mapping
application:
mapping: App\Presentation\*\**Presenter
errorPresenter:
4xx: Error:Error4xx # When you have custom error pages
5xx: Error:Error5xx
aliases: # When you have frequently used links in n:href or $presenter->link()
home: 'Front:Home:'
admin: 'Admin:Dashboard:'
Add when you need simple file-based authentication
security:
users: # Simple username/password auth
username: password
Use when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.