Logo di Developing With Turbo Basics

Developing With Turbo Basics

Organizzazione
hotwired-laravel
developing-with-turbo-basics

Basics of developing with Turbo Laravel. Activates when starting a new Turbo Laravel project; using dom_id, dom_class, turbo_stream(), or turbo_stream_view() helpers; working with Blade components like x-turbo::frame, x-turbo::stream, x-turbo::stream-from, or x-turbo::refreshes-with; using @domid, @domclass, @channel, or @turbonative directives; checking wantsTurboStream(), wasFromTurboFrame(), or wasFromHotwireNative() request macros; or when the user mentions Hotwire, Turbo, HTML over the wire, or partial page updates.

Panoramica

Pubblicato dahotwired-laravel
Repositoryturbo-laravel
Nome della skilldeveloping-with-turbo-basics
Stelle
838
Fork
54
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da hotwired-laravel su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Developing With Turbo Basics in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/hotwired-laravel/turbo-laravel/tree/2.x/resources/boost/skills/developing-with-turbo-basics
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hotwired-laravel/turbo-laravel.git /tmp/turbo-laravel
mkdir -p .claude/skills
cp -r /tmp/turbo-laravel/resources/boost/skills/developing-with-turbo-basics .claude/skills/developing-with-turbo-basics
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Developing With Turbo Basics in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Developing With Turbo Basics non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Developing With Turbo Basics non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Turbo Laravel Basics

Turbo Laravel is a package that integrates Turbo, a set of technologies for building modern web applications, with the Laravel framework. Turbo enhances user experience by enabling partial page updates, real-time interactions, and seamless navigation without full page reloads and with minimal JavaScript.

Philosophy: HTML Over the Wire

Hotwire (HTML Over the Wire) sends HTML instead of JSON from the server, letting the server handle rendering while keeping the browser's job simple. It combines four techniques:

  1. Turbo Drive — Accelerates links and forms by replacing the <body> without full page loads.
  2. Turbo Frames — Decomposes pages into independent segments that scope navigation and can lazy-load.
  3. Turbo Streams — Delivers partial page changes over WebSocket, SSE, or in response to form submissions using eight actions (append, prepend, replace, update, remove, before, after, refresh).
  4. Stimulus — A modest JavaScript framework for the HTML you already have, connecting behavior via data-controller, data-action, and data-target attributes.

Turbo Laravel provides the server-side tooling (Blade components, helpers, broadcasting, and testing utilities) to make these techniques work seamlessly with Laravel.

Turbo Drive

Turbo Drive intercepts all clicks on <a href> links to the same domain and all form submissions, turning them into fetch requests. It replaces the <body> and merges the <head>, keeping the JavaScript window and document objects persistent across navigations. This gives SPA-like speed without client-side routing.

Same deal with forms — their submissions become fetch requests and Turbo Drive follows the redirect and renders the HTML response.

IMPORTANT: Activate the developing-with-turbo-drive skill when starting out working on a feature.

Turbo Frames

Turbo Frames let you place independent segments inside <turbo-frame> elements that scope their navigation. All interaction within a frame (clicking links, submitting forms) happens within that frame, keeping the rest of the page intact. Frames can also lazy-load their content via a src attribute.

@verbatim

@endverbatim

Benefits: independent caching, parallelized execution, and mobile-ready segments.

IMPORTANT: Activate the developing-with-turbo-frames skill when working with Turbo Frames.

Turbo Streams

Turbo Streams let you change any part of the page using a <turbo-stream> element with eight actions: append, prepend, replace, update, remove, before, after, and refresh. They work both as HTTP responses and over WebSocket broadcasts.

@verbatim

@endverbatim

IMPORTANT: Activate the developing-with-turbo-streams skill when working with Turbo Streams.

Blade Components

@verbatim

  • <x-turbo::frame :id="$model"> — Renders a <turbo-frame> with auto DOM ID resolution. :id accepts a string, model instance, or [$model, 'prefix'] array.
  • <x-turbo::stream action="append" :target="$model"> — Renders a <turbo-stream> element. Omits the <template> wrapper for brevity.
  • <x-turbo::stream-from :source="$model" /> — Listens for broadcasts on the model's channel (private by default, add type="public" for public).
  • <x-turbo::refreshes-with method="morph" scroll="preserve" /> — Configures page refresh behavior (morphing and scroll preservation).
  • <x-turbo::exempts-page-from-cache /> — Adds <meta name="turbo-cache-control" content="no-cache">.
  • <x-turbo::exempts-page-from-preview /> — Adds <meta name="turbo-cache-control" content="no-preview">.
  • <x-turbo::page-requires-reload /> — Adds <meta name="turbo-visit-control" content="reload">.
  • <x-turbo::page-view-transition /> — Adds <meta name="view-transition" content="same-origin">.

@endverbatim

Helpers & Directives

@verbatim

  • DOM IDs: dom_id($model) returns e.g. "post_1", dom_id($model, 'edit') returns "edit_post_1". Blade directive: @domid($model, 'prefix').
  • DOM classes: dom_class($model) returns e.g. "post", dom_class($model, 'admin') returns "admin_post". Blade directive: @domclass($model, 'prefix').
  • Channel: @channel($model) outputs the model's broadcast channel name.
  • Conditional: @hotwirenative / @endhotwirenative shows content only for Hotwire Native visits. Also: @unlesshotwirenative, @turbonative / @endturbonative.

@endverbatim

Request Macros

@verbatim

// Check if the request came from a Turbo Frame (optionally a specific one) $request->wasFromTurboFrame(); // bool $request->wasFromTurboFrame(dom_id($post, 'create_comment')); // bool

// Check if the request came from a Hotwire Native client $request->wasFromHotwireNative(); // bool

@endverbatim

Response Helpers

@verbatim

// Return a fluent Turbo Stream builder return turbo_stream()->append('posts', view('posts._post', ['post' => $post]));

// Return multiple streams return turbo_stream([ turbo_stream()->append('posts', view('posts._post', ['post' => $post])), turbo_stream()->update('post_count', view('posts._count', ['count' => $count])), ]);

// Return a Turbo Stream view (renders a Blade view with the Turbo Stream content type) return turbo_stream_view('posts.turbo.created', ['post' => $post]);

@endverbatim

Form Handling

Laravel resource conventions auto-redirect on validation errors:

  • *.store → *.create, *.update → *.edit, *.destroy → *.delete

Performance & UX

@verbatim

  • Preserve elements during navigation: <div id="flash" data-turbo-permanent>...</div>
  • Disable preloading on specific links: <a data-turbo-preload="false">...</a>
  • Disable Turbo on specific elements: <a data-turbo="false">...</a>
  • Re-enable Turbo within a disabled container: <a data-turbo="true">...</a>

@endverbatim

Domande frequenti

Cosa fa la skill IA Developing With Turbo Basics?

Basics of developing with Turbo Laravel. Activates when starting a new Turbo Laravel project; using dom_id, dom_class, turbo_stream(), or turbo_stream_view() helpers; working with Blade components like x-turbo::frame, x-turbo::stream, x-turbo::stream-from, or x-turbo::refreshes-with; using @domid, @domclass, @channel, or @turbonative directives; checking wantsTurboStream(), wasFromTurboFrame(), or wasFromHotwireNative() request macros; or when the user mentions Hotwire, Turbo, HTML over the wire, or partial page updates.

Perché usare Developing With Turbo Basics su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Developing With Turbo Basics è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Developing With Turbo Basics in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/hotwired-laravel/turbo-laravel/tree/2.x/resources/boost/skills/developing-with-turbo-basics. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Developing With Turbo Basics?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Developing With Turbo Basics?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Developing With Turbo Basics: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Developing With Turbo Basics è gratuita?

Sì. È pubblicata su GitHub da hotwired-laravel con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇