Logo di Developing With Turbo Drive

Developing With Turbo Drive

Organizzazione
hotwired-laravel
developing-with-turbo-drive

Develops with Turbo Drive for SPA-like navigation. Activates when configuring page morphing with x-turbo::refreshes-with; working with data-turbo, data-turbo-track, data-turbo-permanent, or data-turbo-preload attributes; managing cache control with x-turbo::exempts-page-from-cache, x-turbo::exempts-page-from-preview, or x-turbo::page-requires-reload; enabling view transitions with x-turbo::page-view-transition; handling form redirects with TurboMiddleware; customizing the progress bar; or when the user mentions Turbo Drive, navigation, page morphing, prefetching, or asset tracking.

Panoramica

Pubblicato dahotwired-laravel
Repositoryturbo-laravel
Nome della skilldeveloping-with-turbo-drive
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 Drive 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-drive
  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-drive .claude/skills/developing-with-turbo-drive
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Developing With Turbo Drive 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 Drive 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 Drive 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 Drive

Turbo Drive accelerates navigation by intercepting link clicks and form submissions, making them as fetch requests. It replaces the <body> and merges the <head> without tearing down the JavaScript environment, giving SPA-like speed with server-rendered HTML.

How It Works

  • Link clicks: Turbo intercepts clicks on <a href> links to the same domain, updates the URL via the History API, fetches the new page, and renders the HTML response.
  • Form submissions: Form submissions become fetch requests. Turbo follows the redirect and renders the response.
  • Rendering: Replaces <body>, merges <head>. The window, document, and <html> element persist across navigations.

Navigation Types

  • Application Visits (advance/replace): Initiated by clicking a link or calling Turbo.visit(). Issues a fetch, renders HTML. Advance pushes to history; replace modifies the current entry.
  • Restoration Visits: Triggered by the browser Back/Forward buttons. Turbo restores from cache if available, otherwise fetches fresh content.

Page Refreshes with Morphing

Instead of replacing the entire <body>, Turbo can morph the existing page to preserve DOM state (form inputs, scroll positions, focus):

@verbatim

@endverbatim

When method="morph" is set, Turbo uses DOM morphing for same-page refreshes. When scroll="preserve" is set, scroll position is maintained.

Disabling Turbo Drive

Disable Turbo on a link, form, or entire section by adding data-turbo="false":

html
<a href="/external" data-turbo="false">Regular navigation</a>

<div data-turbo="false">
    <!-- All links and forms inside are excluded from Turbo -->
    <a href="/also-regular">This too</a>
    <!-- Re-enable for specific elements -->
    <a href="/turbo-again" data-turbo="true">Back to Turbo</a>
</div>

Form Submission Flow

  1. Turbo intercepts the form submission and sends it as a fetch request.
  2. The server processes the form and returns a redirect (status 303 for non-GET submissions).
  3. Turbo follows the redirect and renders the response.

IMPORTANT: Turbo requires redirect responses (303 See Other) for non-GET form submissions. Laravel's redirect() helper handles this correctly when the TurboMiddleware is active — it automatically converts 302 redirects to 303 for Turbo requests.

For validation errors, return a 422 status with the form HTML so Turbo can render it in place. To make it easier, Turbo Laravel will catch validation exceptions and redirect to the form based on the resources automatically (*.update to *.edit or *.store to *.create or *.destroy to *.delete) when the form route exists.

Asset Tracking

Mark assets with data-turbo-track="reload" so Turbo reloads the page when they change (e.g., after a deploy):

html
<link rel="stylesheet" href="/app.css?v=123" data-turbo-track="reload">
<script src="/app.js?v=123" data-turbo-track="reload"></script>

When Turbo detects tracked assets have changed, it performs a full page reload instead of a Turbo visit.

Progress Bar

Turbo shows a progress bar at the top of the page for navigations taking longer than 500ms. Customize it with CSS:

css
.turbo-progress-bar {
    height: 3px;
    background-color: #3b82f6;
}

Prefetching

Turbo prefetches links on mouseenter by default. Control this behavior:

html
<!-- Disable prefetching for a specific link -->
<a href="/heavy-page" data-turbo-preload="false">Heavy page</a>

<!-- Eagerly preload a link (fetches on page load) -->
<a href="/likely-next" data-turbo-preload>Likely next page</a>

Permanent Elements

Elements with data-turbo-permanent persist across navigations. Useful for media players, maps, or other stateful elements:

html
<div id="audio-player" data-turbo-permanent>
    <audio src="/music.mp3"></audio>
</div>

The element must have a matching id in both the current and new page.

Cache Control

@verbatim

Control how Turbo caches pages using Blade components in your layout's <head>:

{{-- Cache the page but don't show preview during navigation --}} <x-turbo::exempts-page-from-preview />

{{-- Force a full page reload when visiting this page --}} <x-turbo::page-requires-reload />

@endverbatim

View Transitions API

Enable the View Transitions API for smooth animated transitions between pages:

@verbatim

@endverbatim

This renders <meta name="view-transition" content="same-origin" />, enabling CSS-driven page transitions.

Domande frequenti

Cosa fa la skill IA Developing With Turbo Drive?

Develops with Turbo Drive for SPA-like navigation. Activates when configuring page morphing with x-turbo::refreshes-with; working with data-turbo, data-turbo-track, data-turbo-permanent, or data-turbo-preload attributes; managing cache control with x-turbo::exempts-page-from-cache, x-turbo::exempts-page-from-preview, or x-turbo::page-requires-reload; enabling view transitions with x-turbo::page-view-transition; handling form redirects with TurboMiddleware; customizing the progress bar; or when the user mentions Turbo Drive, navigation, page morphing, prefetching, or asset tracking.

Perché usare Developing With Turbo Drive su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Developing With Turbo Drive è 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 Drive 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-drive. 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 Drive?

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 Drive?

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

La skill IA Developing With Turbo Drive è 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 👇