plugins/nette/skills/neon-format/SKILL.md
Invoke before creating or modifying .neon files. Provides NEON syntax and Nette configuration conventions. Use when writing or editing .neon config files, asking about NEON syntax (entities, multiline strings, inline notation, special values, escaping), converting YAML to NEON, parsing or encoding NEON in PHP (Neon::decode, Neon::encode), running neon-lint, or debugging NEON syntax errors. For phpstan.neon, use the phpstan-analysis skill (from nette-dev plugin) instead. Do not trigger for Nette DI concepts like autowiring and service registration without .neon file context.
npx skillsauth add nette/claude-code neon-formatInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
NEON (Nette Object Notation) is a human-readable data format used for configuration files in Nette. Similar to YAML but with support for entities and tab indentation.
composer require nette/neon
Key-value pairs with required space after colon:
street: 742 Evergreen Terrace
city: Springfield
country: USA
Inline notation with braces:
{street: 742 Evergreen Terrace, city: Springfield, country: USA}
Indexed arrays with hyphen and space:
- Cat
- Dog
- Goldfish
Inline notation with brackets:
[Cat, Dog, Goldfish]
Indentation defines structure:
pets:
- Cat
- Dog
cars:
- Volvo
- Skoda
Block and inline can be combined:
pets: [Cat, Dog]
cars:
- Volvo
- Skoda
Unquoted, single-quoted, or double-quoted:
- An unquoted string
- 'Single-quoted string'
- "Double-quoted with \t escapes"
Quote strings containing: # " ' , : = - [ ] { } ( )
Double a quote to include it: 'It''s working'
Multiline strings with triple quotes:
'''
first line
second line
third line
'''
# Numbers
count: 12
price: 12.3
scientific: +1.2e-34
binary: 0b11010
octal: 0o666
hex: 0x7A
# Null
value: null
empty:
# Booleans
enabled: true
disabled: false
active: yes
inactive: no
# Dates (auto-converted to DateTimeImmutable)
date: 2016-06-03
datetime: 2016-06-03 19:00:00
with_tz: 2016-06-03 19:00:00 +02:00
Function-like structures for DI configuration:
Column(type: int, nulls: yes)
Chained entities:
Column(type: int) Field(id: 1)
Multiline entity:
Column(
type: int
nulls: yes
)
# This line is ignored
street: 742 Evergreen Terrace # inline comment
Use inline for short, simple values (up to ~3 items):
extensions: [foo, bar]
roles: {admin: true, user: false}
Use block for anything complex, nested, or long:
services:
- App\Model\UserService
- App\Model\OrderService
: is required (key: value, not key:value)use Nette\Neon\Neon;
Converts PHP value to NEON. Pass true to $blockMode for multiline output.
Neon::encode($value); // inline NEON
Neon::encode($value, true); // multiline NEON
Parses NEON string to PHP value. Dates become DateTimeImmutable, entities become Nette\Neon\Entity.
Neon::decode('hello: world'); // ['hello' => 'world']
Parses NEON file to PHP value (removes BOM).
Neon::decodeFile('config.neon');
All methods throw Nette\Neon\Exception on error.
Check syntax errors in .neon files:
vendor/bin/neon-lint <path>
For detailed information, use WebFetch on these URLs:
tools
CRITICAL: Read BEFORE writing or modifying any PHP file. A PostToolUse hook automatically runs nette/coding-standard (ECS) on every PHP file after each Edit or Write. The fixer removes unused `use` statements - so never add `use` statements in a separate edit before the code that references them. Always include `use` imports in the same edit as the referencing code, or add the code first then `use` statements. This skill should be used whenever creating new PHP files, editing existing PHP code, adding methods, refactoring, or fixing bugs in PHP - even for small one-line changes.
development
Install nette/coding-standard globally for PHP code style checking
tools
Invoke when fetching web pages from localhost, debugging PHP errors, or interpreting Tracy output (BlueScreen, Tracy Bar, dump). Read BEFORE running curl or Chrome to any local development PHP URL – with Tracy >= 2.12 and a detected agent, Tracy mirrors BlueScreen, Tracy Bar and dumps as markdown into the JS console for easy machine reading. For Chrome MCP, call list_console_messages() to read Tracy output. Essential when: 500 error, blank page, PHP exception, slow page, N+1 queries, or inspecting variables with dump().
tools
Provides Nette Utils helper classes. Use when working with Arrays, Strings, Image, Finder, FileSystem, Json, Validators, DateTime, Html element builder, Random, Callback, Type, or SmartObject from nette/utils. Do NOT use for Nette Schema, Nette Forms, Nette Database, Latte filters, or DI configuration.