Logo: Developing With Turbo Drive

Developing With Turbo Drive

Organisatioun
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.

Iwwersiicht

Editeurhotwired-laravel
Repositoryturbo-laravel
Skill-Nummdeveloping-with-turbo-drive
Stären
838
Forks
54
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    hotwired-laravel huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Developing With Turbo Drive an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/hotwired-laravel/turbo-laravel/tree/2.x/resources/boost/skills/developing-with-turbo-drive
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

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
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Developing With Turbo Drive an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Developing With Turbo Drive automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Developing With Turbo Drive net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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.

Heefeg gestallte Froen

Wat mécht de KI-Skill 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.

Firwat Developing With Turbo Drive op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Developing With Turbo Drive besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Developing With Turbo Drive an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/hotwired-laravel/turbo-laravel/tree/2.x/resources/boost/skills/developing-with-turbo-drive an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Developing With Turbo Drive benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Developing With Turbo Drive benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Developing With Turbo Drive domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Developing With Turbo Drive gratis?

Jo. hotwired-laravel huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇