AI Coding Assistant Test: How Frontend Design Skills Affect the Output of Generated Frontend Tools

    This article compares two versions of a browser-based, privacy-friendly image splitter built with an AI coding assistant, one without and one with frontend design skills. It covers the shared technical design, the prompting approach, and the key browser APIs and code. It also shows where the two versions differ: visual hierarchy, spacing and grid, interaction feedback, and responsiveness. The gap lies almost entirely in user experience rather than functionality. The article closes with zero-cost deployment options and practical tips for building lightweight tools with AI coding assistants.

    1. Background and Pain Point: Why AI-Written Frontend Is Often “Usable but Ugly”

    In scenarios such as social media content creation and self-publishing layouts, a common need is to split a large image into a 3×3 grid, a 2×2 grid, or slices of a long image. The pieces are then ready to share across different platforms. Doing this by hand in a professional image editor is time-consuming. Uploading images to third-party websites also brings privacy risks. For these reasons, the ideal tool processes images entirely in the browser: just open the web page and start.

    Using AI coding assistants to quickly generate these tools has become a popular approach. In practice, however, two gaps show up:

    1. The feature gap is small: as long as the tool slices and exports images correctly, the core logic is not hard to generate.
    2. The experience gap is huge: the default output is often a page with plain styling, a disorganized structure, and no status feedback. It looks “good enough,” but it lacks a professional feel.

    This raises the question we want to test: Given the same requirement, how much does configuring the coding assistant with a “frontend design capability / design skill” affect the quality of the final output? To find out, we built one version along each path and compared them.

    2. Technical Overview

    The target tool has these core requirements:

    • Process everything locally: all image parsing, slicing, and exporting happen inside the browser. Nothing is uploaded to an external service, so user privacy is protected.
    • Runnable from a single file: open one HTML file and you’re ready to go. No backend and no build step.
    • Three common slicing modes: a 3×3 grid, a 2×2 grid, and three vertical slices of a long image (3×1).
    • Complete export: each slice can be downloaded individually, and all slices can be downloaded together in one click.

    All of these features can be built with browser-native APIs alone, with no backend service:

    Capability Browser-native API used
    Reading local images FileReader
    Drawing and cropping CanvasRenderingContext2D drawImage
    Exporting a single slice canvas.toBlob + a temporary <a> download
    Downloading a package A general client-side compression solution that merges binary data

    3. Preparation: Setting Up the Working Directory

    Start with a clean working directory so new files don’t get mixed up with existing ones. In a terminal (using a Unix-like shell as an example):

    1. mkdir -p ~/Desktop/image-splitter-demo
    2. cd ~/Desktop/image-splitter-demo

    On Windows, use the equivalent PowerShell commands to create the folder and enter it. Once the directory is ready, start the AI coding assistant in interactive mode and begin developing through conversation.

    4. Version 1: A Bare Implementation Without Design Skills

    To measure the impact of design skills, we first had the assistant build a version without invoking any design-related capabilities. We named it index-v1.html.

    The prompt should spell out the “hard constraints” clearly rather than just saying “build an image splitter.” An effective prompt usually includes:

    • Target users and scenario: social media content creators using the tool full-screen in a desktop browser.
    • Output format: a single HTML file that processes everything locally and needs no external network.
    • Feature list: drag-and-drop or click-to-upload, three slicing modes, numbered previews, per-slice download, and one-click package download.
    • What to leave out: no unrelated images, decorative graphics, fake testimonials, or other filler.

    Core Logic Breakdown (Key Implementation in V1)

    (1) Loading and Previewing the Image

    After the user uploads a file, read it as a DataURL with FileReader. Then load it into an Image object to get its actual width and height:

    1. function loadImage(file) {
    2. return new Promise((resolve, reject) => {
    3. const reader = new FileReader();
    4. reader.onload = () => {
    5. const img = new Image();
    6. img.onload = () => resolve(img);
    7. img.onerror = reject;
    8. img.src = reader.result;
    9. };
    10. reader.readAsDataURL(file);
    11. });
    12. }

    (2) Grid Slicing Algorithm

    Slicing means dividing the source image evenly into rows and columns and extracting each piece. The key is calculating the source coordinates of each slice:

    1. function cropTile(img, cols, rows, index) {
    2. const tileW = Math.floor(img.width / cols);
    3. const tileH = Math.floor(img.height / rows);
    4. const canvas = document.createElement('canvas');
    5. canvas.width = tileW;
    6. canvas.height = tileH;
    7. const ctx = canvas.getContext('2d');
    8. const col = index % cols;
    9. const row = Math.floor(index / cols);
    10. ctx.drawImage(
    11. img,
    12. col * tileW, row * tileH, tileW, tileH, // source crop area
    13. 0, 0, tileW, tileH // target canvas
    14. );
    15. return canvas;
    16. }

    One easy-to-overlook edge case: when the image width or height isn’t evenly divisible by the number of slices, Math.floor leaves a few leftover pixels. This can produce a thin blank strip on the last row or column. A safer approach is to fold the remainder into the last piece, or calculate each piece’s boundaries with Math.round.

    (3) Per-Slice and Package Downloads

    A single slice is downloaded by generating binary data with toBlob and triggering it through a temporary <a> element:

    1. function downloadCanvas(canvas, filename) {
    2. canvas.toBlob(blob => {
    3. const url = URL.createObjectURL(blob);
    4. const a = document.createElement('a');
    5. a.href = url;
    6. a.download = filename;
    7. a.click();
    8. URL.revokeObjectURL(url);
    9. });
    10. }

    “One-click package download” requires merging the binary data of multiple images into a single archive on the client. The common approach is to add a mature ZIP packaging capability: add each slice’s Blob to the archive object, then export everything at once.

    How V1 turned out: functionally complete, logically correct, and works end to end. However, the default styling is often a pile of buttons with uneven spacing and no visual focus. There is also no feedback for the upload, processing, or completion states. The professional feel is clearly lacking.

    5. Version 2: The Difference with Frontend Design Skills Enabled

    Next, we had the coding assistant reimplement the same requirement with frontend design capabilities enabled. Here, “design capabilities” refers to a set of frontend design rules built into or loadable by the coding assistant. These rules actively guide the choice of color scheme, layout grid, spacing system, interaction feedback, and responsive design.

    At the prompt level, start with a probe-style instruction to confirm which UI-related design skills are currently loaded. If none are, have the assistant recommend and install a well-regarded open source frontend design skill, then continue development.

    Where the Two Versions Differ

    1. Visual hierarchy: V2 creates clear sections for the title, action area, and results area. It uses whitespace and font weight to distinguish primary from secondary elements, instead of laying everything out side by side.
    2. Spacing and grid: V2 uses a consistent spacing scale (such as a 4/8/16/24px system). Buttons, cards, and thumbnails then align neatly on a grid.
    3. Interaction feedback: drag-over highlights, a loading state during upload, completion notices when slicing finishes, and success feedback after a per-slice download are all explicitly designed. Nothing happens silently with no response.
    4. Responsive behavior and details: the preview area adapts to its container width. Details like index badges, hover effects, and empty-state hints are also in place. The overall result feels like a “product” rather than a “script demo.”

    Conclusion: with identical functionality, the gap created by design skills is almost entirely in the experience. For tools aimed at end users and used over the long term, this gap directly affects usability and retention.

    6. A Zero-Cost Path to Launch

    The biggest advantage of single-file tools is their extremely low deployment cost. Several common zero-cost options:

    • Static hosting: upload index.html to any static site hosting service to get a public URL.
    • Static website hosting on object storage: enable the “static website hosting” feature in a cloud provider’s object storage. The files are then served over the web by directory.
    • Local use: since the tool is pure frontend and processes everything locally, you can simply send the file to users for offline use.

    Because all processing happens locally in the browser, these tools need no server compute. That makes them a natural fit for zero-cost or very low-cost hosting.

    7. Summary and Recommendations

    Back to our original question: How far apart are the results with and without design skills?

    • Functional correctness: there is almost no difference. For purely computational tasks like image slicing, the logic can be generated correctly on the first try either way.
    • User experience and professional feel: the gap is significant. Design skills take the output from a “working script” to a “proper product.”

    Recommendations for practitioners:

    1. Spell out the hard constraints, feature list, and exclusions in your prompt. This is the first safeguard for output quality.
    2. For tools that end users will rely on, configuring frontend design skills is worthwhile. The experience gains far outweigh the configuration effort.
    3. When working with sensitive data such as images, prefer browser-based local processing. It protects privacy and costs nothing to deploy.

    Building lightweight tools with an AI coding assistant comes down to “describe the requirement clearly + equip the tool with the right capabilities.” Understanding what each capability layer does, and where its limits are, is the key to consistently producing apps that are both functional and polished.