Visual AI Instructing: Bridging the Gap Between Design and Code with Instruckt
Overview of Visual Annotations
Explaining visual changes to an AI agent often involves a clunky workflow of screenshots, manual uploads, and imprecise descriptions. changes this by allowing developers to annotate DOM elements directly in the browser. Instead of guessing class names or describing a button's location, you click the element, add a note, and generate a markdown prompt that contains the exact technical context needs to execute the change. This precision reduces the "hallucination" factor when AI attempts to style UI components.
Prerequisites
To follow this workflow, you should be comfortable with basic development and . You also need an AI agent capable of processing markdown context, such as . Familiarity with for package management is required for the installation steps.
Key Libraries & Tools
- Instruckt-Laravel: The specific adapter for applications.
- Instruckt Core: A framework-agnostic JavaScript core that handles the annotation logic.
- Claude Code: The CLI-based AI agent that receives the markdown feedback to modify the source code.
- Blade Components: The templating engine used to inject the annotation toolbar.
Implementation Walkthrough
Installing the tool requires a quick pull via . Run the following command in your terminal:
composer require joshcirre/instruckt-laravel
Once installed, you must register the visual toolbar. In a environment, you typically place the component at the bottom of your global layout file (e.g., app.blade.php or welcome.blade.php):
<x-instruckt />
This tag renders a floating toolbar on your frontend. When you enter "Annotate" mode, the tool identifies the underlying classes and HTML structure of whatever you click. After adding notes, click "Copy Annotations as Markdown." You then paste this directly into your AI terminal. The agent sees a structured list of targeted elements and your specific instructions, allowing it to swap links or adjust font sizes with perfect accuracy.
Syntax and Conventions
The tool relies on the x-instruckt component pattern, which is standard for modern packages. It intelligently scrapes classes from the DOM. If you are using , offers specialized adapters to ensure the toolbar persists across reactive state changes.
Tips & Gotchas
Always wrap your component in an environment check. You likely don't want the annotation toolbar appearing in production. Use a conditional check like @env('local') to ensure it only loads during development. If the agent fails to find an element, ensure your classes aren't being obfuscated by a minifier during the build process, as needs those class strings to locate the correct line in your source files.
- 30%· products
- 15%· products
- 15%· products
- 15%· products
- 10%· products
- Other topics
- 15%

NEW Instruckt: Visual Annotations for Claude Code and Other AI Agents
WatchAI Coding Daily // 5:26
This channel is not for vibe-coders. It's for professional devs who want to use AI as powerful assistant, while still keeping the control of their codebase. My name is Povilas Korop, and I'm passionate about coding with AI. So I started this THIRD YouTube channel, in addition to my other ones Laravel Daily and Filament Daily. You will see a lot of my experiments with AI: I will try new things and share my discoveries along the way.