Back to Skills

nette-configuration

verified

Invoke before configuring Nette DI - services, .neon files, autowiring.

View on GitHub

Marketplace

nette

nette/claude-code

Plugin

nette

development

Repository
Verified Org

nette/claude-code
29stars

plugins/nette/skills/nette-configuration/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/nette/claude-code/blob/main/plugins/nette/skills/nette-configuration/SKILL.md -a claude-code --skill nette-configuration

Installation paths:

Claude
.claude/skills/nette-configuration/
Powered by add-skill CLI

Instructions

## Nette DI & Services Guidelines

- **Primary services:** `services.neon` - all service definitions
- **Framework config:** `common.neon` - parameters, extensions, framework settings, application-wide configuration
- **Project scaling:** Create additional files for larger projects (`api.neon`, `tasks.neon`)
- **Environment-specific settings:** `env.local.neon` for development environment, `env.prod.neon` for production environment

### When to Add Sections

- **Start minimal** - Add only what you immediately need
- **Add incrementally** - Include sections as features are implemented
- **Environment-specific** - Override in local/production configs as needed

### Service Definition Syntax

Use `-` for services that don't need references:

```neon
services:
	- App\Model\BlogFacade
	- App\Model\CustomerService
	- App\Presentation\Accessory\TemplateFilters
```

Give names **only when needed for `@serviceName` references** elsewhere in NEON:

```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:

```neon
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%)
```

#### Factory Method Services

```neon
services:
	- App\Core\RouterFactory::createRouter
	- Symfony\Component\HttpClient\HttpClient::create()
```

#### Complex Service Configuration

```neon
services:
	- App\Model\MailImporter(
		DG\Imap\Mailbox(
			mailbox: '{imap.gmail.com:993/ssl}'
			username: 'vi....com'
			password: 'nrllp...'
		)
		debugMode: %debugMode%
	)
```

#### Setup Methods

```neon
services:
	database:
		create: PDO(

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3833 chars