layout-debugger

layout-debugger is a skill for Claude Code from smicolon/ai-kit. It costs 35 tokens per session (644 once invoked), scanned A, original, MIT.

A guide to fixing common Flutter layout errors caused by widgets not fitting within the available space. It explains issues such as overflowing rows or columns and children with unlimited height.

In plain words
What is it for?
Use it to troubleshoot RenderFlex overflow, unbounded viewport, and BoxConstraints errors in Flutter layouts.
Why use it?
It helps identify why an interface breaks on smaller screens or under different constraints. The suggested fixes make content scrollable or give widgets suitable size limits.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the flutter plugin — 9 skills shipped together

Good fit Use it to troubleshoot RenderFlex overflow, unbounded viewport, and BoxConstraints errors in Flutter layouts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/smicolon/ai-kit/layout-debugger
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add smicolon/ai-kit --skill layout-debugger
Clone the repo
git clone --depth 1 https://github.com/smicolon/ai-kit

Made for: Claude Code.

Or install flutter, the plugin that ships this one along with the rest of its 9 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for layout-debugger

README.md
[![agentmods](https://agentmods.dev/badge/skills/smicolon/ai-kit/layout-debugger/github.svg)](https://agentmods.dev/skills/smicolon/ai-kit/layout-debugger)
Your own site
<a href="https://agentmods.dev/skills/smicolon/ai-kit/layout-debugger"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/layout-debugger/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for layout-debugger

Your own site · 80×15
<a href="https://agentmods.dev/skills/smicolon/ai-kit/layout-debugger"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/layout-debugger.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 644 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.00644
Opus 5.5 $0.00014 $0.00258
Sonnet 5.5 $0.00007 $0.00129
Haiku 4.5 $0.00003 $0.00064

Measured 1mo ago against content hash 9e5d0ce70dde, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

layout-debugger scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packs/flutter/skills/layout-debugger/SKILL.md · 103 lines

How it starts

The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Flutter Layout Debugger

Diagnoses and fixes the most common layout constraint errors in Flutter applications.

1. "A RenderFlex overflowed by N pixels"

Cause

A Column (vertical) or Row (horizontal) contains children whose combined size exceeds the available space on screen (yellow-and-black striped bars).

Fix 1: Make Scrollable

If the content naturally exceeds screen size (e.g., forms, long pages):

// ❌ OVERFLOWS on small screens
Column(
  children: [Header(), FormFields(), SubmitButton()],
)

// ✅ FIXED: Wrap in SingleChildScrollView
SingleChildScrollView(
  child: Padding(
    padding: const EdgeInsets.all(16.0),
    child: Column(
      children: [Header(), FormFields(), SubmitButton()],
    ),
  ),
)

Fix 2: Constrain Child with Expanded or Flexible

If inside a Row or Column and an inner child (like Text) expands too far:

// ❌ OVERFLOWS if text is long
Row(
  children: [
    Icon(Icons.warning),
    Text('Very long description that will easily overflow the screen horizontally...'),
  ],
)

// ✅ FIXED: Wrap Text in Expanded
Row(
  children: [
    const Icon(Icons.warning),
    Expanded(
      child: Text('Very long description that will wrap cleanly...'),
    ),
  ],
)

2. "Vertical viewport was given unbounded height"

Cause

A scrollable widget (ListView, GridView) was placed inside another vertically unconstrained widget (like a Column or another ListView) without explicit height.

Fix 1: Wrap in Expanded

// ❌ CRASHES: Column gives infinite vertical height
Column(
  children: [
    HeaderWidget(),
    ListView.builder(...),
  ],
)

// ✅ FIXED: Wrap ListView in Expanded
Column(
  children: [
    HeaderWidget(),
    Expanded(
      child: ListView.builder(...),
    ),
  ],
)

Fix 2: Use shrinkWrap: true + physics: NeverScrollableScrollPhysics()

When you need a small list embedded inside an already scrollable page:

// ✅ FIXED: shrinkWrap sizes to content, parent handles scrolling
ListView.builder(
  shrinkWrap: true,
  physics: const NeverScrollableScrollPhysics(),
  itemCount: items.length,
  itemBuilder: (context, index) => ItemTile(items[index]),
)

Read the full file on GitHub · 103 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 103 lines · 35 tokens per session scan A 9e5d0ce70dde

Subscribe to this mod's changes

layout-debugger is a skill published in the GitHub repository smicolon/ai-kit (6 stars, last pushed 1mo ago), licensed MIT. It adds 35 tokens to every session and 644 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.

Related

Other skills, from other repositories

node-connect

Diagnose OpenClaw Control UI browser and native Android, iOS, or macOS node connection failures across route, auth, pairing, QR/setup-code, and reconnect states.

openclaw/openclaw · 39 tokens

jetpack-compose-performance

Diagnose and optimize Android Jetpack Compose UI code. Use this skill when analyzing performance bottlenecks of existing code to minimize recomposition overhead and prevent dropped frames and UI lag.

android/skills · 41 tokens

swiftui-performance-audit

SwiftUI performance: render, scroll, CPU/memory, updates, layout, Instruments.

steipete/agent-scripts · 24 tokens

android-tombstone-symbolication

Symbolicate the .NET runtime frames in an Android tombstone file. Extracts BuildIds and PC offsets from the native backtrace, downloads debug symbols from the Microsoft symbol server, and runs llvm-symbolizer to produce function names with source file and line numbers. USE FOR triaging a .NET MAUI or Mono Android app…

dotnet/skills · 176 tokens

competition-ios-runtime

Internal downstream skill for ctf-sandbox-orchestrator. CTF-sandbox workflow for IPA runtime analysis, Frida hooks, Objective-C or Swift method tracing, Keychain inspection, SSL pinning bypass, URL scheme handling, and iOS request-signing recovery. Use when the user asks to hook an IPA, trace Objective-C or Swift…

zhaoxuya520/reverse-skill · 123 tokens

ios-simulator

Verify and debug native, React Native, Expo, or Flutter apps on an iOS Simulator with agent-device. Use when an agent needs to launch an app, inspect its live UI, tap, type, scroll, validate a code change, collect failure evidence, or reproduce a workflow on an iPhone or iPad Simulator.

callstack/agent-device · 69 tokens