Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2ad63b8
added ai.nette.org
dg Jan 8, 2026
1a8341b
latte 3.1.2
dg Jan 23, 2026
ffa8452
latte: info about whitespace
dg Mar 17, 2026
35e13dc
latte 3.1.3
dg Dec 23, 2025
698ba33
typo
dg Feb 23, 2026
45a37b6
latte: changed user template
dg Apr 13, 2026
df67d93
php-generator: v4.2.2
dg Feb 23, 2026
69cfed5
di: documented @Type as service key for modifications
dg Mar 5, 2026
943a2f4
nette/mail 4.1.0
dg Mar 27, 2026
6c05c32
updated links to PhpStorm plugins
dg Apr 12, 2026
bc0383d
tracy: open-files-in-ide updated Chrome policy to AutoLaunchProtocols…
dg Apr 12, 2026
2cf9236
coding standard: added enums.php convention
dg Apr 6, 2026
99bfa00
latte 3.1.4
dg Dec 23, 2025
d0d4f7a
latte: develop.texy adds 'Ways to Extend Latte' overview
dg Apr 25, 2026
34708c1
nette: add emoji icons to documentation home links
dg Apr 25, 2026
0254cd2
nette/utils 4.1.4
dg May 11, 2026
120e4fa
nette/database 3.2.9
dg May 17, 2026
174c3a3
database: renamed mapping.texy to type-conversion.texy
dg May 17, 2026
d2e17f2
nette/mail 4.1.2
dg May 19, 2026
1be209f
best-practices: add 'Pretty URLs with Slugs' guide
dg May 20, 2026
1fd57d9
latte: improve and clarify the grouping cookbook
dg May 22, 2026
54a49d2
nette/security 3.2.4
dg May 23, 2026
02884fa
added tools
dg Jun 6, 2026
f8ba863
moved code-checker to tools
dg Jun 6, 2026
7f87225
moved editor-and-tools to tools:ide
dg Jun 6, 2026
f2bd791
improved code-checker
dg Jun 6, 2026
dba0b38
improved IDE
dg Jun 6, 2026
06a89dd
added Coding Standard page
dg Jun 6, 2026
9b96a56
added Nette PHPStan Rules page
dg May 25, 2026
fd2f702
added X-ray page
dg Jun 6, 2026
8b46d74
tracy 2.12.0
dg May 25, 2026
d4fd62d
nette/http 3.3.4
dg May 26, 2026
d143c50
nette/http 3.4.0
dg Jun 2, 2026
87507fc
improved homepages
dg Jun 14, 2026
ac8e22c
WIP
dg Jun 6, 2026
ef2f27a
Update urls.texy
Ondris Jun 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions ai/cs/@home.texy
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Nette AI
********

- [Introduction |guide]
- [Getting Started |getting-started]
- [MCP Inspector |mcp-inspector]
- [Claude Code |claude-code]
- [Tips & Best Practices |tips]

{{maintitle: Nette AI – Vibe Coding with Nette Framework}}
{{description: Build Nette applications with AI assistance. MCP Inspector gives any AI tool deep knowledge of your application's DI container, database, routing, and errors. No hallucinations, just clean code.}}
1 change: 1 addition & 0 deletions ai/cs/@meta.texy
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{sitename: Nette AI}}
11 changes: 11 additions & 0 deletions ai/en/@home.texy
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Nette AI
********

- [Introduction |guide]
- [Getting Started |getting-started]
- [MCP Inspector |mcp-inspector]
- [Claude Code |claude-code]
- [Tips & Best Practices |tips]

{{maintitle: Nette AI – Vibe Coding with Nette Framework}}
{{description: Build Nette applications with AI assistance. MCP Inspector gives any AI tool deep knowledge of your application's DI container, database, routing, and errors. No hallucinations, just clean code.}}
5 changes: 5 additions & 0 deletions ai/en/@left-menu.texy
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- [Introduction |guide]
- [Getting Started |getting-started]
- [MCP Inspector |mcp-inspector]
- [Claude Code |claude-code]
- [Tips & Best Practices |tips]
1 change: 1 addition & 0 deletions ai/en/@meta.texy
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{sitename: Nette AI}}
269 changes: 269 additions & 0 deletions ai/en/claude-code.texy
Original file line number Diff line number Diff line change
@@ -0,0 +1,269 @@
Claude Code Plugin
******************

<div class=perex>

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

</div>


Installation
============

If you haven't installed Claude Code yet, see the [complete setup guide |getting-started]. Once Claude Code is running, install the Nette plugin:

```shell
/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-architecture` skill activates
- Ask about "form validation" → the `nette-forms` skill activates
- Ask about "Latte filters" → the `latte-templates` skill activates
- Ask about a "BlueScreen error" → the `tracy-debugging` skill 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 `Selection` for queries, `ActiveRow` for entities
- **Entity conventions** – The `Row` suffix 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:

```php
$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 `.phpt` format, `@testCase` annotation, 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:

```php
/** @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** – Inserting `dump($variable)` calls and reading the output back through curl or the browser
- **Production logs** – Investigating `log/exception-*.html` snapshots and `log/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\Arrays` with `get()`, `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:

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

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

```shell
/install-mcp-inspector
```

Then restart Claude Code. See the [MCP Inspector documentation |mcp-inspector] for all 20 available tools.

{{composer: nette/claude-code}}
Loading