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:
- 10 skills covering all major areas of Nette development
- Automatic validation that catches errors in Latte and NEON 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
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::email(),
'roles' => Expect::listOf('string')->default([]),
]);
nette-testing
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);
}
}
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 |
| Tracy errors | Watches the exception log and alerts Claude about new errors |
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 |
You can also enable automatic code style fixing:
/install-nette-cs
This installs nette/coding-standard globally and configures the plugin to automatically fix code style issues
after every PHP file edit.
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.