Claude Code Plugin
The Nette plugin gives Claude deep knowledge of the framework. Instead of generic PHP advice, you get recommendations that follow Nette conventions – from presenters and forms to Latte templates and database queries.
The plugin includes:
- A broad set of skills covering all major areas of Nette development
- Automatic validation that catches errors in Latte, NEON and JavaScript files
- MCP Inspector integration for real-time application introspection
Installation
If you haven't installed Claude Code yet, see the complete setup guide. Once Claude Code is running, install the Nette plugin:
/plugin marketplace add nette/claude-code
/plugin install nette@nette
How Skills Work
You don't need to activate skills manually. They turn on automatically based on what you're talking about.
- Ask about “presenter structure” → the
nette-architectureskill activates - Ask about “form validation” → the
nette-formsskill activates - Ask about “Latte filters” → the
latte-templatesskill activates - Ask about a “BlueScreen error” → the
tracy-debuggingskill activates
This means you get relevant, context-aware help without having to think about which skill you need.
Available Skills
Here's what each skill covers:
nette-architecture
When you're designing your application structure, this skill guides you through:
- Directory organization – Where to put presenters, services, entities, and components
- Module design – How to split your application into logical modules (Admin, Front, Api)
- Presenter patterns – When to use base presenters, how to handle authentication
- Evolution strategy – Start minimal, grow organically, refactor when needed
The key principle: Don't over-engineer. Create subdirectories when you have 5+ related files, not before.
nette-configuration
Everything about the DI container and NEON configuration:
- Service registration – How to define services in
services.neon - Autowiring – When it works automatically and when you need explicit configuration
- Parameters – How to use configuration parameters across your application
- Extensions – Working with DI extensions from Nette and third parties
nette-database
Covers both the raw SQL approach and the Database Explorer:
- Database Explorer – Using
Selectionfor queries,ActiveRowfor entities - Entity conventions – The
Rowsuffix pattern, type hints with@property-read - Relationships – Navigating foreign keys with colon notation
- When to use what – Explorer for CRUD, raw SQL for complex analytics
Example: Claude knows that ->where('category.slug', $slug) automatically joins the category table.
nette-forms
Creating and handling forms the Nette way:
- Controls – All built-in controls from text inputs to file uploads
- Validation – Built-in rules, custom validators, conditional validation
- Rendering – Manual rendering, Bootstrap integration, custom renderers
- Patterns – Create/edit forms, form components, AJAX submissions
nette-schema
Data validation and normalization with the Schema component:
- Expect class – Building validation schemas for arrays and objects
- Configuration schemas – Validating NEON configuration in DI extensions
- Type coercion – Automatic conversion of strings to integers, dates, etc.
- Custom validators – Adding your own validation rules
Example: Claude knows how to create schemas like:
$schema = Expect::structure([
'name' => Expect::string()->required(),
'age' => Expect::int()->min(0)->max(120),
'email' => Expect::string(),
'roles' => Expect::listOf('string')->default([]),
]);
nette-tester
Writing tests with Nette Tester:
- Test structure – The
.phptformat,@testCaseannotation, file organization - Assertions – All
Assert::*methods:same(),equal(),exception(),match(), and more - Fixtures – Setting up test data, mocking dependencies, database transactions
- Running tests – Command-line options, parallel execution, code coverage
Example: Claude can generate proper test files:
/** @testCase */
class UserServiceTest extends TestCase
{
public function testCreateUser(): void
{
$service = new UserService($this->mockDatabase());
$user = $service->create(['name' => 'John']);
Assert::same('John', $user->name);
}
}
tracy-debugging
Working with the Tracy debugger:
- BlueScreen – Reading exception details, stack traces, source highlights
- Tracy Bar – Interpreting embedded SQL query logs, timing, and memory usage at the bottom of every page
dump()workflow – Insertingdump($variable)calls and reading the output back through curl or the browser- Production logs – Investigating
log/exception-*.htmlsnapshots andlog/error.log - Chrome MCP integration – Pulling Tracy errors out of the browser console with
list_console_messages()instead of taking screenshots
Especially useful for 500 errors, blank pages, N+1 query issues, or whenever Claude fetches a local PHP URL and needs to interpret what came back.
nette-utils
The utility classes that make PHP development easier:
- Arrays –
Nette\Utils\Arrayswithget(),getRef(),map(),flatten(), and more - Strings – Unicode-safe operations:
webalize(),truncate(),contains(),startsWith() - Finder – File system traversal with filtering by name, size, date
- Image – Resize, crop, sharpen with automatic format detection
- Json – Safe JSON encoding/decoding with proper error handling
- Validators – Email, URL, numeric validation helpers
- DateTime – Immutable date/time with Czech locale support
frontend-development
Integrating frontend tools with Nette:
- Vite – Setting up Vite for modern JavaScript/TypeScript development, HMR configuration
- Nette Assets – Using the asset system for cache-busted URLs in production
- Tailwind CSS – Configuration for Tailwind with Latte templates, purging unused styles
- ESLint & Prettier – Code quality tools integration
- Build scripts – npm/package.json scripts for development and production builds
Claude can help configure vite.config.js to work with Nette's directory structure and generate proper asset
references in Latte templates.
latte-templates
Everything about the Latte templating engine:
- Syntax – Tags, filters, blocks, and inheritance
- Security – Auto-escaping, content-aware output
- Custom filters – Creating and registering your own filters
- Template classes – Using typed templates for better IDE support
neon-format
The NEON configuration format:
- Syntax – Mappings, sequences, entities, and multiline strings
- Common patterns – Service definitions, parameter references
- Debugging – Finding and fixing syntax errors
Automatic Validation
One of the most useful features is automatic validation. After every file edit, the plugin checks for errors:
| What | How It Works |
|---|---|
| Latte templates | Runs latte-lint to check syntax after every .latte edit |
| NEON files | Validates NEON syntax after every .neon edit |
| JavaScript / TypeScript | Runs eslint --fix after every .js, .ts, .mjs or .mts edit
(only if the project has an ESLint config) |
If there's a syntax error in your Latte template, Claude knows about it immediately and can suggest a fix. No more discovering errors in the browser.
Plugin for Framework Contributors
If you're contributing to Nette itself, there's an additional plugin with coding standards:
/plugin install nette-dev@nette
| Skill | What It Covers |
|---|---|
php-coding-standards |
Nette's PHP coding style – indentation, naming, structure |
php-doc |
PHPDoc conventions – when to document, what format to use |
commit-messages |
How to write commit messages for Nette repositories |
phpstan-analysis |
How to resolve PHPStan errors – prefer refactoring over phpDoc annotations over ignoring – plus common Nette patterns and baseline management |
Automatic PHP Style Fixing
For automatic code style fixing after every PHP file edit, install the optional php-fixer plugin:
/plugin install php-fixer@nette
/install-php-fixer
The second command installs nette/coding-standard globally. After that, every PHP file you edit will be
automatically formatted according to Nette coding standards.
The plugin also comes with the php-auto-fixer skill, which teaches Claude about one subtle pitfall: the fixer
removes unused use statements, so a use added in a separate edit before the code that references it gets
stripped. Claude knows to add imports together with the code that uses them.
MCP Inspector Integration
The plugin works even better with MCP Inspector – a tool that lets Claude see your actual application state. With MCP Inspector, Claude can:
- Query your real database schema instead of guessing
- List your registered DI services and their configuration
- Read Tracy error logs for debugging
- Match URLs to presenters using your actual routes
Install it with a single command:
/install-mcp-inspector
Then restart Claude Code. See the MCP Inspector documentation for all 20 available tools.