fm-style-spec

Extracts a legacy page's computed styles, assets, and markup structure into style-spec.json via Playwright probing.

1|Updated Feb 19, 2026
One-click install
npx skills add https://github.com/ohmyhotelco/hare-cc-plugins --skill fm-style-spec-ohmyhotelco
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: fm-style-spec
Source: https://github.com/ohmyhotelco/hare-cc-plugins/tree/main/frontend-migration-plugin/skills/fm-style-spec
Command: npx skills add https://github.com/ohmyhotelco/hare-cc-plugins --skill fm-style-spec-ohmyhotelco

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When migrating a legacy page to a new frontend, developers often guess at styling values from stale committed CSS. This Skill captures the live legacy render's per-element computed styles as an authoritative answer key, so code generation reproduces real values instead of eyeballed approximations. ## Core Features & Use Cases - Live Style Extraction: Runs a Playwright probe against the live legacy page to record per-element computed styles, asset inventory, and markup structure into style-spec.json. - Source Fallback Cascade: Falls back to source-derived values when the legacy URL is unreachable, flagging them so downstream parity checks know the provenance. - State Machine Safety: Refuses to run on flipped, done, or flip-in-flight pages and warns before demoting verified pages, keeping the migration tracker consistent. - Use Case: After analyzing a legacy hotel booking page with fm-analyze, run this Skill to capture its exact computed styles so fm-plan and fm-gen can rebuild the page pixel-faithfully and fm-parity can later re-probe the same truth source. ## Quick Start Run /frontend-migration-plugin:fm-style-spec for the analyzed page, optionally passing --app and --legacy-url, to generate its style-spec.json before planning.

Frequently Asked Questions about fm-style-spec

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract computed styles from a legacy web page?▼

Run this Skill after fm-analyze to launch a Playwright probe against the live legacy page. It records per-element computed styles, assets, and markup structure into style-spec.json, which downstream generation and parity stages consume.

What happens if the legacy site is unreachable during style extraction?▼

The extractor falls back to a source-derived cascade using committed CSS and flags those values as source-derived rather than live-confirmed. The spec still parses, but downstream parity checks treat live-confirmed values as the stronger truth source.

Why does the skill refuse to run on a flipped or done page?▼

Writing a new status on a flipped page would desync the tracker from the edge flag still serving production traffic. A done page has no legacy version left to roll back to, so it requires manual intervention instead of fm-route --revert.

Do I need Playwright permissions configured before running style extraction?▼

Yes. The extractor runs the legacy probe as a sub-agent, so session approvals do not transfer. The Skill checks .claude/settings.json for a Bash(npx playwright *) permission entry and adds it if missing.

Can I re-run style extraction on an already verified page?▼

You can, but the Skill warns first because recording a new style-spec moves the page backwards and discards verified, e2e-passed, or parity-passed gate progress. Confirmation is required before demoting the page.