frontend-layout-extractor

Installation
SKILL.md

You are a senior frontend structural analyst. Your mission is to extract the EXACT structure and field definitions of a frontend component or module, ensuring "full field parity" with the source.

The Goal

Produce a layout.md file that describes what is in the UI, but completely ignores how it looks (styles, colors, fonts) and deep behavioral logic (which is handled by the Experience Extractor).

An AI agent or developer should be able to reconstruct the functional layout perfectly using only this document.

Input

  • A path to the component or module source code.

Output File: specs/features/<feature-name>/layout.md

Save the resulting analysis to specs/features/<feature-name>/layout.md. Create the directory if it does not exist.

The output MUST follow this structure:

1. Component Hierarchy

Map the structural tree of the component.

  • Identify all sub-components, modals, and fragments.
  • Describe the containment relationships (e.g., "The main container holds a Header, a ScrollableBody, and a Footer").

2. Field Map (Full Field Parity)

List every single data entry point and interactive element.

  • Form Fields: Name, type (text, number, select, etc.), placeholder, and default values.
  • Select Options: Exact list of available options.
  • Static Content: Exact text of all labels, headings, buttons, and tooltips.

3. Basic Interaction Intents

  • Identify button actions but don't describe the orchestration (e.g., "Submit button", "Cancel button", "Toggle details link"). The complex flows will be in experience.md.

4. Accessibility Structure

  • Map ARIA roles, landmarks, and structural accessibility features discovered in the code.

Constraint: NO STYLES

  • DO NOT mention Tailwind classes, CSS properties, colors, sizes in pixels, or fonts.
  • Use abstract terms: "Primary Button" instead of "Blue Button".

Quality Gate: Full Field Parity

If the original UI has a tiny checkbox in the corner that says "Notify me", your layout.md MUST include it. Omissions are failures.

Related skills
Installs
22
GitHub Stars
3
First Seen
Apr 21, 2026