Developing With Turbo Drive logo

Developing With Turbo Drive

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

Overview

Publisherhotwired-laravel
Repositoryturbo-laravel
Skill namedeveloping-with-turbo-drive
Stars
838
Forks
54
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by hotwired-laravel on GitHub. Read the source before you install it.

Installation

Install the Developing With Turbo Drive AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Developing With Turbo Drive in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Developing With Turbo Drive on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Developing With Turbo Drive is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

Frequently asked questions

What does the Developing With Turbo Drive AI skill do?

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.

Why use Developing With Turbo Drive on TypingMind?

Because you install it once and use it with any model. Developing With Turbo Drive is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Developing With Turbo Drive in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/hotwired-laravel/turbo-laravel/tree/2.x/resources/boost/skills/developing-with-turbo-drive. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Developing With Turbo Drive?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Developing With Turbo Drive?

As many as you like. As long as a model supports skills, you can use Developing With Turbo Drive with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Developing With Turbo Drive AI skill free?

Yes. It is published on GitHub by hotwired-laravel under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇